From 757f8d6bb4c59f5444811b5d079bbb8d19daf9ae Mon Sep 17 00:00:00 2001 From: Mitchell Livingston Date: Sun, 30 Nov 2008 21:23:59 +0000 Subject: [PATCH] #757 trio of group support patches --- macosx/AddWindowController.m | 10 +++++++--- macosx/GroupsWindowController.m | 1 + 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/macosx/AddWindowController.m b/macosx/AddWindowController.m index 8d3933e71..bb6c25d3b 100644 --- a/macosx/AddWindowController.m +++ b/macosx/AddWindowController.m @@ -257,7 +257,7 @@ [fController askOpenConfirmed: self add: YES]; //ensure last, since it releases this controller } -- (void) setDestination: (NSString *) destination +- (void) setDestinationPath: (NSString *) destination { [fDestination release]; fDestination = [destination retain]; @@ -275,7 +275,7 @@ - (void) folderChoiceClosed: (NSOpenPanel *) openPanel returnCode: (NSInteger) code contextInfo: (void *) contextInfo { if (code == NSOKButton) - [self setDestination: [[openPanel filenames] objectAtIndex: 0]]; + [self setDestinationPath: [[openPanel filenames] objectAtIndex: 0]]; else { if (!fDestination) @@ -291,10 +291,14 @@ - (void) changeGroupValue: (id) sender { + NSInteger previousGroup = fGroupValue; fGroupValue = [sender tag]; if ([[GroupsController groups] usesCustomDownloadLocationForIndex: fGroupValue] && [[GroupsController groups] customDownloadLocationForIndex: fGroupValue]) - [self setDestination: [[GroupsController groups] customDownloadLocationForIndex: fGroupValue]]; + [self setDestinationPath: [[GroupsController groups] customDownloadLocationForIndex: fGroupValue]]; + else if ([fDestination isEqualToString: [[GroupsController groups] customDownloadLocationForIndex: previousGroup]]) + [self setDestinationPath: [[NSUserDefaults standardUserDefaults] stringForKey: @"DownloadFolder"]]; + else; } - (void) sameNameAlertDidEnd: (NSAlert *) alert returnCode: (NSInteger) returnCode contextInfo: (void *) contextInfo diff --git a/macosx/GroupsWindowController.m b/macosx/GroupsWindowController.m index 08ac66761..461fe0a26 100644 --- a/macosx/GroupsWindowController.m +++ b/macosx/GroupsWindowController.m @@ -223,6 +223,7 @@ { [[GroupsController groups] setUsesCustomDownloadLocation: NO forIndex: index]; [fCustomLocationEnableCheck setState: NSOffState]; + [fCustomLocationPopUp setEnabled: NO]; } [fCustomLocationPopUp selectItemAtIndex: 0];