[28928] users/rhwood/Pallet
source_changes at macosforge.org
source_changes at macosforge.org
Wed Sep 12 01:22:19 PDT 2007
Revision: 28928
http://trac.macosforge.org/projects/macports/changeset/28928
Author: rhwood at macports.org
Date: 2007-09-12 01:22:19 -0700 (Wed, 12 Sep 2007)
Log Message:
-----------
Remove portIndexes variable and supporting function in favor of using methods from the MacPorts.Framework.
Modified Paths:
--------------
users/rhwood/Pallet/PortAuthority.h
users/rhwood/Pallet/PortAuthority.m
Modified: users/rhwood/Pallet/PortAuthority.h
===================================================================
--- users/rhwood/Pallet/PortAuthority.h 2007-09-12 07:35:04 UTC (rev 28927)
+++ users/rhwood/Pallet/PortAuthority.h 2007-09-12 08:22:19 UTC (rev 28928)
@@ -71,7 +71,6 @@
NSMutableDictionary *portSettings;
NSMutableDictionary *dependencies;
NSMutableArray *operations;
- NSDictionary *portIndexes;
MPMacPorts *macPorts;
}
@@ -95,7 +94,6 @@
- (IBAction)macPortsSite:(id)sender;
- (IBAction)portAuthoritySite:(id)sender;
-- (void)getPortIndexes;
- (void)populatePortIndex;
- (void)launchExecutableWithArguments:(NSMutableArray *)args;
Modified: users/rhwood/Pallet/PortAuthority.m
===================================================================
--- users/rhwood/Pallet/PortAuthority.m 2007-09-12 07:35:04 UTC (rev 28927)
+++ users/rhwood/Pallet/PortAuthority.m 2007-09-12 08:22:19 UTC (rev 28928)
@@ -105,30 +105,12 @@
} else if ([[[[NSUserDefaultsController sharedUserDefaultsController] values] valueForKey:@"synchronizePortsListOnStartup"] boolValue] == YES) {
[self syncPortsList:nil];
}
- // List ports
- [self getPortIndexes];
+ // List ports
[self populatePortIndex];
}
#pragma mark PORT INDEX
-- (void)getPortIndexes
-{
- NSMutableDictionary *sources;
- NSEnumerator *enumerator;
- id source;
-
- sources = [[NSMutableDictionary alloc] init];
- enumerator = [[macPorts sources] objectEnumerator];
- while (source = [enumerator nextObject]) {
- [sources setValue:[macPorts pathToPortIndex:source] forKey:source];
- }
- if (portIndexes != nil) {
- [portIndexes release];
- }
- portIndexes = [[NSDictionary alloc] initWithDictionary:sources copyItems:YES];
-}
-
- (void)parsePortIndex:(NSString *)index intoIndexObject:(id)indexObject
{
NSString *file;
@@ -243,7 +225,7 @@
if (portIndex = nil) {
portIndex = [[NSMutableArray alloc] init];
}
- indexEnumerator = [portIndexes keyEnumerator];
+ indexEnumerator = [macPorts sources];
while (index = [indexEnumerator nextObject]) {
[progressIndicator startAnimation:nil];
[status setStringValue:@"Listing ports in all indexes..."];
@@ -254,7 +236,7 @@
@"Listing ports in index %@",
@"Status for [MPAuthority populatePortIndex] method"),
index]];
- [self parsePortIndex:[portIndexes valueForKey:index] intoIndexObject:portIndexController];
+ [self parsePortIndex:[macPorts pathToPortIndex:index] intoIndexObject:portIndexController];
}
[status setStringValue:@""];
[progressIndicator stopAnimation:nil];
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20070912/81f540b3/attachment.html
More information about the macports-changes
mailing list