[53991] branches/gsoc09-gui/MPGUI

juanger at macports.org juanger at macports.org
Fri Jul 17 16:52:40 PDT 2009


Revision: 53991
          http://trac.macports.org/changeset/53991
Author:   juanger at macports.org
Date:     2009-07-17 16:52:40 -0700 (Fri, 17 Jul 2009)
Log Message:
-----------
Fixing predicate editor bug

Modified Paths:
--------------
    branches/gsoc09-gui/MPGUI/MPActionLauncher.m
    branches/gsoc09-gui/MPGUI/PortsTableController.m

Modified: branches/gsoc09-gui/MPGUI/MPActionLauncher.m
===================================================================
--- branches/gsoc09-gui/MPGUI/MPActionLauncher.m	2009-07-17 23:52:00 UTC (rev 53990)
+++ branches/gsoc09-gui/MPGUI/MPActionLauncher.m	2009-07-17 23:52:40 UTC (rev 53991)
@@ -81,20 +81,14 @@
 
 - (void)loadPorts {
     [self setIsLoading:YES];
-    ports = [NSMutableArray arrayWithCapacity:6000];
     NSDictionary *allPorts = [[MPMacPorts sharedInstance] search:MPPortsAll];
     NSDictionary *installedPorts = [[MPRegistry sharedRegistry] installed];
     
     [self willChangeValueForKey:@"ports"];
-    for (id port in allPorts) {
-        MPPort *mpport = [allPorts objectForKey:port];
-        [mpport setState:MPPortStateNotInstalled];
-        [ports addObject:mpport];
-    }
-    
     for (id port in installedPorts) {
         [[allPorts objectForKey:port] setStateFromReceipts:[installedPorts objectForKey:port]];
     }
+    ports = [allPorts allValues];
     [self didChangeValueForKey:@"ports"];
     
     id theProxy = [NSConnection

Modified: branches/gsoc09-gui/MPGUI/PortsTableController.m
===================================================================
--- branches/gsoc09-gui/MPGUI/PortsTableController.m	2009-07-17 23:52:00 UTC (rev 53990)
+++ branches/gsoc09-gui/MPGUI/PortsTableController.m	2009-07-17 23:52:40 UTC (rev 53991)
@@ -63,6 +63,10 @@
     if (newRowCount == rowCount)
         return;
     
+    if (newRowCount == 0) {
+        [self setPredicate:[NSPredicate predicateWithFormat:@"name LIKE '*'"]];
+    }
+    
     NSScrollView* tableScrollView = [portsTableView enclosingScrollView];
     NSUInteger oldOutlineViewMask = [tableScrollView autoresizingMask];
     
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20090717/9d1b17cf/attachment.html>


More information about the macports-changes mailing list