1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-26 09:37:56 +00:00

#757 trio of group support patches

This commit is contained in:
Mitchell Livingston 2008-11-30 21:23:59 +00:00
parent d67c4a2697
commit 757f8d6bb4
2 changed files with 8 additions and 3 deletions

View file

@ -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

View file

@ -223,6 +223,7 @@
{
[[GroupsController groups] setUsesCustomDownloadLocation: NO forIndex: index];
[fCustomLocationEnableCheck setState: NSOffState];
[fCustomLocationPopUp setEnabled: NO];
}
[fCustomLocationPopUp selectItemAtIndex: 0];