[23020] users/rhwood/Pallet
source_changes at macosforge.org
source_changes at macosforge.org
Wed Mar 21 18:15:41 PDT 2007
Revision: 23020
http://trac.macosforge.org/projects/macports/changeset/23020
Author: rhwood at macports.org
Date: 2007-03-21 18:15:40 -0700 (Wed, 21 Mar 2007)
Log Message:
-----------
Add (as of yet useless) header menu to the port listing.
Add some debugging messages.
Simplify command methods.
Add "port update outdated" command method.
Modified Paths:
--------------
users/rhwood/Pallet/English.lproj/MainMenu.nib/classes.nib
users/rhwood/Pallet/English.lproj/MainMenu.nib/info.nib
users/rhwood/Pallet/English.lproj/MainMenu.nib/keyedobjects.nib
users/rhwood/Pallet/PortAuthority.h
users/rhwood/Pallet/PortAuthority.m
Modified: users/rhwood/Pallet/English.lproj/MainMenu.nib/classes.nib
===================================================================
--- users/rhwood/Pallet/English.lproj/MainMenu.nib/classes.nib 2007-03-22 01:00:19 UTC (rev 23019)
+++ users/rhwood/Pallet/English.lproj/MainMenu.nib/classes.nib 2007-03-22 01:15:40 UTC (rev 23020)
@@ -70,6 +70,7 @@
portLog = NSTextView;
portLogWindow = NSWindow;
portsList = NSTableView;
+ portsListHeaderMenu = NSMenu;
portsWindow = NSWindow;
progressIndicator = NSProgressIndicator;
status = NSTextField;
Modified: users/rhwood/Pallet/English.lproj/MainMenu.nib/info.nib
===================================================================
--- users/rhwood/Pallet/English.lproj/MainMenu.nib/info.nib 2007-03-22 01:00:19 UTC (rev 23019)
+++ users/rhwood/Pallet/English.lproj/MainMenu.nib/info.nib 2007-03-22 01:15:40 UTC (rev 23020)
@@ -3,15 +3,17 @@
<plist version="1.0">
<dict>
<key>IBDocumentLocation</key>
- <string>117 29 356 240 0 0 1680 1028 </string>
+ <string>180 150 356 240 0 0 1280 832 </string>
<key>IBEditorPositions</key>
<dict>
<key>29</key>
- <string>201 458 366 44 0 0 1280 832 </string>
+ <string>201 458 304 44 0 0 1280 832 </string>
<key>290</key>
- <string>726 647 170 75 0 0 1680 1028 </string>
+ <string>555 518 170 75 0 0 1280 832 </string>
<key>292</key>
<string>82 267 75 68 0 0 1280 832 </string>
+ <key>568</key>
+ <string>545 307 187 225 0 0 1280 832 </string>
</dict>
<key>IBFramework Version</key>
<string>446.1</string>
@@ -21,9 +23,12 @@
</array>
<key>IBOpenObjects</key>
<array>
+ <integer>29</integer>
+ <integer>568</integer>
<integer>290</integer>
+ <integer>21</integer>
</array>
<key>IBSystem Version</key>
- <string>8P2137</string>
+ <string>8P135</string>
</dict>
</plist>
Modified: users/rhwood/Pallet/English.lproj/MainMenu.nib/keyedobjects.nib
===================================================================
(Binary files differ)
Modified: users/rhwood/Pallet/PortAuthority.h
===================================================================
--- users/rhwood/Pallet/PortAuthority.h 2007-03-22 01:00:19 UTC (rev 23019)
+++ users/rhwood/Pallet/PortAuthority.h 2007-03-22 01:15:40 UTC (rev 23020)
@@ -42,6 +42,7 @@
IBOutlet NSWindow *portsWindow;
IBOutlet NSWindow *portLogWindow;
IBOutlet MPPortsController *portIndexController;
+ IBOutlet NSMenu *portsListHeaderMenu;
// IBOutlet NSTextField *portInstallationPath; // this needs to be set correctly first run to ensure that
// the preference gets stored
Modified: users/rhwood/Pallet/PortAuthority.m
===================================================================
--- users/rhwood/Pallet/PortAuthority.m 2007-03-22 01:00:19 UTC (rev 23019)
+++ users/rhwood/Pallet/PortAuthority.m 2007-03-22 01:15:40 UTC (rev 23020)
@@ -72,6 +72,9 @@
// Setup the value transformers used in bindings
NSValueTransformer *transformer = [[PAStatusTransformer alloc] init];
[NSValueTransformer setValueTransformer:transformer forName:@"PAStatusTransformer"];
+ // UI Tweaks
+ [[portsList headerView] setMenu:portsListHeaderMenu];
+ [[portsList cornerView] setMenu:portsListHeaderMenu];
}
/*
@@ -287,37 +290,44 @@
- (IBAction)syncPortsList:(id)sender
{
- if (!portIsRunning) {
- portCommand = portSync;
- [status setStringValue:NSLocalizedStringWithDefaultValue(@"statusSyncPortsList",
- @"Localizable",
- [NSBundle mainBundle],
- @"Syncing ports list with MacPorts",
- @"Status for [MPAuthority syncPortsList] method")];
- [self launchAuthorizedExecutableWithArguments:[NSArray arrayWithObjects:macPortsPort,
- @"sync",
- @"-dv",
- nil]];
- }
+ portCommand = portSync;
+ [status setStringValue:NSLocalizedStringWithDefaultValue(@"statusSyncPortsList",
+ @"Localizable",
+ [NSBundle mainBundle],
+ @"Syncing ports list with MacPorts",
+ @"Status for [MPAuthority syncPortsList] method")];
+ [self launchAuthorizedExecutableWithArguments:[NSArray arrayWithObjects:macPortsPort,
+ @"sync",
+ @"-dv",
+ nil]];
}
- (IBAction)updateMacPorts:(id)sender
{
- if (!portIsRunning) {
- portCommand = portSelfupdate;
- [status setStringValue:NSLocalizedStringWithDefaultValue(@"statusUpdateMacPorts",
- @"Localizable",
- [NSBundle mainBundle],
- @"Updating MacPorts Installation",
- @"Status for [MPAuthority updateMacPorts] method")];
- [self launchAuthorizedExecutableWithArguments:[NSArray arrayWithObjects:macPortsPort,
- @"selfupdate",
- nil]];
- }
+ portCommand = portSelfupdate;
+ [status setStringValue:NSLocalizedStringWithDefaultValue(@"statusUpdateMacPorts",
+ @"Localizable",
+ [NSBundle mainBundle],
+ @"Updating MacPorts Installation",
+ @"Status for [MPAuthority updateMacPorts] method")];
+ [self launchAuthorizedExecutableWithArguments:[NSArray arrayWithObjects:macPortsPort,
+ @"selfupdate",
+ nil]];
}
- (IBAction)upgradeOutdated:(id)sender
{
+ NSLog(@"Upgrade Outdated\n");
+ portCommand = portSelfupdate;
+ [status setStringValue:NSLocalizedStringWithDefaultValue(@"statusUpgradeOutdated",
+ @"Localizable",
+ [NSBundle mainBundle],
+ @"Preparing to upgrade all outdated ports...",
+ @"Status for [MPAuthority upgradeOutdated] method")];
+ [self launchAuthorizedExecutableWithArguments:[NSArray arrayWithObjects:macPortsPort,
+ @"upgrade",
+ @"outdated",
+ nil]];
}
- (IBAction)upgradePort:(id)sender
@@ -437,6 +447,7 @@
- (void)launchAuthorizedExecutableWithArguments:(NSMutableArray *)args
{
+ NSLog(@"Launching command %@", args);
if (!portIsRunning) {
portIsRunning = YES;
[NSApp setApplicationIconImage:[NSImage imageNamed:@"ApplicationIconBusy"]];
@@ -514,6 +525,7 @@
- (void)executableFinished:(AuthorizedExecutable *)exe withStatus:(int)exeStatus
{
+ NSLog(@"Launcher finished with status %u", exeStatus);
portIsRunning = NO;
[status setStringValue:@""];
[progressIndicator stopAnimation:nil];
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20070321/8635bd9f/attachment.html
More information about the macports-changes
mailing list