[33732] users/rhwood/Pallet

rhwood at macports.org rhwood at macports.org
Mon Feb 4 03:01:06 PST 2008


Revision: 33732
          http://trac.macosforge.org/projects/macports/changeset/33732
Author:   rhwood at macports.org
Date:     2008-02-04 03:01:05 -0800 (Mon, 04 Feb 2008)

Log Message:
-----------
Add status indicators for Installed and Outdated ports in the list view.

Modified Paths:
--------------
    users/rhwood/Pallet/English.lproj/MainMenu.nib/info.nib
    users/rhwood/Pallet/English.lproj/MainMenu.nib/keyedobjects.nib
    users/rhwood/Pallet/PAStatusTransformer.h
    users/rhwood/Pallet/PAStatusTransformer.m
    users/rhwood/Pallet/Pallet.xcodeproj/project.pbxproj
    users/rhwood/Pallet/PortAuthority.h
    users/rhwood/Pallet/PortAuthority.m

Added Paths:
-----------
    users/rhwood/Pallet/Installed.tiff
    users/rhwood/Pallet/Outdated.tiff

Modified: users/rhwood/Pallet/English.lproj/MainMenu.nib/info.nib
===================================================================
--- users/rhwood/Pallet/English.lproj/MainMenu.nib/info.nib	2008-02-04 09:32:17 UTC (rev 33731)
+++ users/rhwood/Pallet/English.lproj/MainMenu.nib/info.nib	2008-02-04 11:01:05 UTC (rev 33732)
@@ -16,20 +16,23 @@
 		<string>545 307 187 225 0 0 1280 832 </string>
 	</dict>
 	<key>IBFramework Version</key>
-	<string>446.1</string>
+	<string>489.0</string>
 	<key>IBLockedObjects</key>
-	<array/>
+	<array>
+		<integer>655</integer>
+	</array>
 	<key>IBLockedTabItems</key>
 	<array>
 		<integer>210</integer>
 	</array>
 	<key>IBOpenObjects</key>
 	<array>
-		<integer>568</integer>
 		<integer>29</integer>
+		<integer>21</integer>
 		<integer>290</integer>
+		<integer>568</integer>
 	</array>
 	<key>IBSystem Version</key>
-	<string>8R218</string>
+	<string>8S165</string>
 </dict>
 </plist>

Modified: users/rhwood/Pallet/English.lproj/MainMenu.nib/keyedobjects.nib
===================================================================
(Binary files differ)

Added: users/rhwood/Pallet/Installed.tiff
===================================================================
(Binary files differ)


Property changes on: users/rhwood/Pallet/Installed.tiff
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: users/rhwood/Pallet/Outdated.tiff
===================================================================
(Binary files differ)


Property changes on: users/rhwood/Pallet/Outdated.tiff
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Modified: users/rhwood/Pallet/PAStatusTransformer.h
===================================================================
--- users/rhwood/Pallet/PAStatusTransformer.h	2008-02-04 09:32:17 UTC (rev 33731)
+++ users/rhwood/Pallet/PAStatusTransformer.h	2008-02-04 11:01:05 UTC (rev 33732)
@@ -8,7 +8,7 @@
 
 #import <Foundation/Foundation.h>
 #import "PortAuthority.h"
-#import <MacPorts/MPConstants.h>
+#import <MacPorts/MPPort.h>
 
 @interface PAStatusTransformer : NSValueTransformer
 {

Modified: users/rhwood/Pallet/PAStatusTransformer.m
===================================================================
--- users/rhwood/Pallet/PAStatusTransformer.m	2008-02-04 09:32:17 UTC (rev 33731)
+++ users/rhwood/Pallet/PAStatusTransformer.m	2008-02-04 11:01:05 UTC (rev 33732)
@@ -31,13 +31,13 @@
 			return nil;
 			break;
 		case MPPortStateActive:
-			return [resourcePath stringByAppendingPathComponent:@"active.gif"];
+			return [resourcePath stringByAppendingPathComponent:@"Installed.tiff"];
 			break;
 		case MPPortStateInstalled:
-			return [resourcePath stringByAppendingPathComponent:@"installed.gif"];
+			return [resourcePath stringByAppendingPathComponent:@"Installed.tiff"];
 			break;
 		case MPPortStateOutdated:
-			return [resourcePath stringByAppendingPathComponent:@"outdated.gif"];
+			return [resourcePath stringByAppendingPathComponent:@"Outdated.tiff"];
 			break;
 	}
 	return nil;

Modified: users/rhwood/Pallet/Pallet.xcodeproj/project.pbxproj
===================================================================
--- users/rhwood/Pallet/Pallet.xcodeproj/project.pbxproj	2008-02-04 09:32:17 UTC (rev 33731)
+++ users/rhwood/Pallet/Pallet.xcodeproj/project.pbxproj	2008-02-04 11:01:05 UTC (rev 33732)
@@ -9,6 +9,8 @@
 /* Begin PBXBuildFile section */
 		480062BF0B597D9A005F27E4 /* PAStatusTransformer.m in Sources */ = {isa = PBXBuildFile; fileRef = 480062BE0B597D9A005F27E4 /* PAStatusTransformer.m */; };
 		481B84120BA254A4000D1385 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4854CE0F0B420D8C00950EE4 /* Security.framework */; };
+		4820065B0CF916F6009EAF35 /* Installed.tiff in Resources */ = {isa = PBXBuildFile; fileRef = 482006590CF916F6009EAF35 /* Installed.tiff */; };
+		4820065C0CF916F7009EAF35 /* Outdated.tiff in Resources */ = {isa = PBXBuildFile; fileRef = 4820065A0CF916F6009EAF35 /* Outdated.tiff */; };
 		4828C6310AD7B84D002AF0DD /* TaskWrapper.m in Sources */ = {isa = PBXBuildFile; fileRef = 4828C6300AD7B84D002AF0DD /* TaskWrapper.m */; };
 		483A5E460B57A50900712840 /* MPPortsController.m in Sources */ = {isa = PBXBuildFile; fileRef = 483A5E450B57A50900712840 /* MPPortsController.m */; };
 		4844B92B0AD91F5800A4A4DB /* UserDefaults.plist in Resources */ = {isa = PBXBuildFile; fileRef = 4844B92A0AD91F5800A4A4DB /* UserDefaults.plist */; };
@@ -25,6 +27,7 @@
 		48A284030C608C9800D1AC4B /* MPObject.m in Sources */ = {isa = PBXBuildFile; fileRef = 48CD131A0BBE6C24002B0D0E /* MPObject.m */; };
 		48AA3F9D0C93F85800C6AC60 /* MacPorts.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 48AA3F950C93F85800C6AC60 /* MacPorts.framework */; };
 		48AA3F9E0C93F85800C6AC60 /* MacPorts.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 48AA3F950C93F85800C6AC60 /* MacPorts.framework */; };
+		48AB404E0CEDB033000BA2E3 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 48AB404D0CEDB033000BA2E3 /* Localizable.strings */; };
 		48ACD7930B4284A400D34B4C /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4854CE0F0B420D8C00950EE4 /* Security.framework */; };
 		48B63D820BCA40760028248A /* CFLib.c in Sources */ = {isa = PBXBuildFile; fileRef = 48B63D810BCA40760028248A /* CFLib.c */; };
 		48C570FC0C46287D002EC172 /* MPAgent.m in Sources */ = {isa = PBXBuildFile; fileRef = 48CD13150BBE6C24002B0D0E /* MPAgent.m */; };
@@ -70,6 +73,8 @@
 		32CA4F630368D1EE00C91783 /* Port Authority_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "Port Authority_Prefix.pch"; sourceTree = "<group>"; };
 		480062BD0B597D9A005F27E4 /* PAStatusTransformer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PAStatusTransformer.h; sourceTree = "<group>"; };
 		480062BE0B597D9A005F27E4 /* PAStatusTransformer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PAStatusTransformer.m; sourceTree = "<group>"; };
+		482006590CF916F6009EAF35 /* Installed.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = Installed.tiff; path = /Users/rhwood/Developer/Pallet/Pallet/Installed.tiff; sourceTree = "<absolute>"; };
+		4820065A0CF916F6009EAF35 /* Outdated.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = Outdated.tiff; path = /Users/rhwood/Developer/Pallet/Pallet/Outdated.tiff; sourceTree = "<absolute>"; };
 		4828C62F0AD7B84D002AF0DD /* TaskWrapper.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = TaskWrapper.h; sourceTree = "<group>"; };
 		4828C6300AD7B84D002AF0DD /* TaskWrapper.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = TaskWrapper.m; sourceTree = "<group>"; };
 		482C61C90BD225F400F7AC59 /* PalletHelper */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = PalletHelper; sourceTree = BUILT_PRODUCTS_DIR; };
@@ -86,6 +91,7 @@
 		487EB9470B453785001B0F72 /* AuthorizedExecutable.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = AuthorizedExecutable.h; sourceTree = "<group>"; };
 		487EB9480B453786001B0F72 /* AuthorizedExecutable.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = AuthorizedExecutable.m; sourceTree = "<group>"; };
 		48AA3F950C93F85800C6AC60 /* MacPorts.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MacPorts.framework; path = /Library/Frameworks/MacPorts.framework; sourceTree = "<absolute>"; };
+		48AB40450CEDB00D000BA2E3 /* English */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/Localizable.strings; sourceTree = "<group>"; };
 		48ACD78B0B42846B00D34B4C /* Launcher */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = Launcher; sourceTree = BUILT_PRODUCTS_DIR; };
 		48ACD7D10B42855600D34B4C /* Launcher.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Launcher.h; sourceTree = "<group>"; };
 		48ACD7D20B42855600D34B4C /* Launcher.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Launcher.m; sourceTree = "<group>"; };
@@ -251,8 +257,11 @@
 				48D4718C0AD73ECD00352CE9 /* Upgrade.tiff */,
 				48D470C70AD7256600352CE9 /* Remove.tiff */,
 				48D470C80AD7256700352CE9 /* Halt.tiff */,
+				482006590CF916F6009EAF35 /* Installed.tiff */,
+				4820065A0CF916F6009EAF35 /* Outdated.tiff */,
 				8D1107310486CEB800E47090 /* Info.plist */,
 				089C165CFE840E0CC02AAC07 /* InfoPlist.strings */,
+				48AB404D0CEDB033000BA2E3 /* Localizable.strings */,
 				29B97318FDCFA39411CA2CEA /* MainMenu.nib */,
 				4875A9550B4839D700FDDC21 /* installed.gif */,
 				4875A9530B4839C000FDDC21 /* active.gif */,
@@ -346,9 +355,11 @@
 		29B97313FDCFA39411CA2CEA /* Project object */ = {
 			isa = PBXProject;
 			buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "Pallet" */;
+			compatibilityVersion = "Xcode 2.4";
 			hasScannedForEncodings = 1;
 			mainGroup = 29B97314FDCFA39411CA2CEA /* Port Authority */;
 			projectDirPath = "";
+			projectRoot = "";
 			targets = (
 				8D1107260486CEB800E47090 /* Pallet */,
 				48ACD78A0B42846B00D34B4C /* Launcher */,
@@ -377,6 +388,9 @@
 				4875A9520B4839AA00FDDC21 /* outdated.gif in Resources */,
 				4875A9540B4839C000FDDC21 /* active.gif in Resources */,
 				4875A9560B4839D700FDDC21 /* installed.gif in Resources */,
+				48AB404E0CEDB033000BA2E3 /* Localizable.strings in Resources */,
+				4820065B0CF916F6009EAF35 /* Installed.tiff in Resources */,
+				4820065C0CF916F7009EAF35 /* Outdated.tiff in Resources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -448,6 +462,14 @@
 			name = MainMenu.nib;
 			sourceTree = "<group>";
 		};
+		48AB404D0CEDB033000BA2E3 /* Localizable.strings */ = {
+			isa = PBXVariantGroup;
+			children = (
+				48AB40450CEDB00D000BA2E3 /* English */,
+			);
+			name = Localizable.strings;
+			sourceTree = "<group>";
+		};
 /* End PBXVariantGroup section */
 
 /* Begin XCBuildConfiguration section */

Modified: users/rhwood/Pallet/PortAuthority.h
===================================================================
--- users/rhwood/Pallet/PortAuthority.h	2008-02-04 09:32:17 UTC (rev 33731)
+++ users/rhwood/Pallet/PortAuthority.h	2008-02-04 11:01:05 UTC (rev 33732)
@@ -92,6 +92,10 @@
 - (IBAction)macPortsSite:(id)sender;
 - (IBAction)palletSite:(id)sender;
 
+- (void)didSetIndex:(NSNotification *)notification;
+- (void)willSetIndex:(NSNotification *)notification;
+	
+
 - (void)launchExecutableWithArguments:(NSMutableArray *)args;
 - (void)launchAuthorizedExecutableWithArguments:(NSMutableArray *)args;
 

Modified: users/rhwood/Pallet/PortAuthority.m
===================================================================
--- users/rhwood/Pallet/PortAuthority.m	2008-02-04 09:32:17 UTC (rev 33731)
+++ users/rhwood/Pallet/PortAuthority.m	2008-02-04 11:01:05 UTC (rev 33732)
@@ -46,6 +46,9 @@
 {
 	// Get a MacPorts Interpeter
 	macPorts = [MPMacPorts sharedInstance];
+	// Register for notifications
+	[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(willSetIndex:) name:MPIndexWillSetIndex object:nil];
+	[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(didSetIndex:) name:MPIndexDidSetIndex object:nil];
 	// Load/set preferences/defaults
 	if (![[[NSUserDefaultsController sharedUserDefaultsController] values] valueForKey:@"synchronizePortsListOnStartup"]) {
 		NSString *userDefaultsValuesPath;
@@ -64,7 +67,7 @@
 	// Initialize the port settings cache
 	portSettings = [[NSMutableDictionary alloc] init];
 	// Clean the main window
-	[status setStringValue:@""];
+	//[status setStringValue:@""];
 	// Setup the port task
 	portIsRunning = NO;
 	launcher = [[NSBundle mainBundle] pathForResource:@"Launcher" ofType:nil];
@@ -83,8 +86,8 @@
 	// setup the displayed index
 	portsListIndex = [[NSMutableArray alloc] init];
 	// START TESTING START TESTING START TESTING
-	NSLog([[[MPRegistery sharedRegistery] installed:@"nonesuch"] description]);
-	NSLog([[[MPRegistery sharedRegistery] installed:@"gtk2"] description]);
+	//NSLog([[[MPRegistry sharedRegistry] installed:@"nonesuch"] description]);
+	//NSLog([[[MPRegistry sharedRegistry] installed:@"gtk2"] description]);
 	// END TESTING END TESTING END TESTING
 }
 
@@ -93,16 +96,6 @@
  */
 - (void)applicationDidFinishLaunching:(NSNotification *)aNotification
 {
-	/*
-	// configure and register the connection to the PalletHelper
-	connection = [NSConnection defaultConnection];
-    [connection setRootObject: self];
-    [connection enableMultipleThreads];
-    if ([connection registerName:MPAppMessagePort] == NO) {
-        NSRunAlertPanel(@"Pallet", @"Could not register Pallet connection on this host.", nil, @"Quit", nil);
-        [NSApp terminate: self];
-    }
-	*/
 	// sync or selfupdate as required
 	if ([[[[NSUserDefaultsController sharedUserDefaultsController] values] valueForKey:@"updateMacPortsOnStartup"] boolValue] == YES) {
 		[self updateMacPorts:nil];
@@ -110,22 +103,8 @@
 		[self syncPortsList:nil];
 	}
 	// List ports
-	[progressIndicator startAnimation:nil];
-	[status setStringValue:[NSString stringWithFormat:
-		NSLocalizedStringWithDefaultValue(@"statusPopulatePortIndex",
-										  @"Localizable",
-										  [NSBundle mainBundle],
-										  @"Reading list of ports...",
-										  @"Status for [MPAuthority populatePortIndex] method")
-		]];
 	portsIndex = [[MPIndex alloc] init];
 	[portIndexController setContent:[portsIndex allValues]];
-	NSLog(@"%i items in the index.", [portsIndex count]);
-	[status setStringValue:@""];
-	[progressIndicator stopAnimation:nil];
-	// START TESTING START TESTING START TESTING
-	NSLog([[portsIndex valueForKey:@"gtk2"] description]);
-	// END TESTING END TESTING END TESTING
 }
 
 /*
@@ -285,6 +264,23 @@
 	
 }
 
+#pragma mark SELECTORS
+
+- (void)didSetIndex:(NSNotification *)notification {
+	[status setStringValue:@""];
+	[progressIndicator stopAnimation:nil];
+}
+
+- (void)willSetIndex:(NSNotification *)notification {
+	[status setStringValue:NSLocalizedStringWithDefaultValue(@"statusSetIndex",
+															 @"Localizable",
+															 [NSBundle mainBundle],
+															 @"Reading list of ports...(one less NSString)",
+															 @"Status while setting Index")
+		];
+	[progressIndicator startAnimation:nil];
+}
+
 #pragma mark TABLES
 
 - (void)updateAvailablePorts:(id)output

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20080204/2a784d6b/attachment-0001.html


More information about the macports-changes mailing list