add an option in the open window to delete the torrent file

This commit is contained in:
Mitchell Livingston
2008-01-04 18:10:37 +00:00
parent d56a7619fa
commit f7372aa0d1
4 changed files with 424 additions and 356 deletions

View File

@@ -49,6 +49,7 @@
fDeleteTorrent = deleteTorrent == TORRENT_FILE_DELETE || (deleteTorrent == TORRENT_FILE_DEFAULT
&& [[NSUserDefaults standardUserDefaults] boolForKey: @"DeleteOriginalTorrent"]);
fDeleteEnable = deleteTorrent == TORRENT_FILE_DEFAULT;
}
return self;
}
@@ -88,6 +89,9 @@
[fStartCheck setState: [[NSUserDefaults standardUserDefaults] boolForKey: @"AutoStartDownload"] ? NSOnState : NSOffState];
[fDeleteCheck setState: fDeleteTorrent ? NSOnState : NSOffState];
[fDeleteCheck setEnabled: fDeleteEnable];
if (fDestination)
{
[fLocationField setStringValue: [fDestination stringByAbbreviatingWithTildeInPath]];
@@ -137,7 +141,7 @@
[fController askOpenConfirmed: fTorrent];
if (fDeleteTorrent)
if ([fDeleteCheck state] == NSOnState)
[fTorrent trashTorrent];
[self release];
@@ -153,6 +157,8 @@
- (void) updateGroupMenu: (NSNotification *) notification
{
#warning add option to go to group window
int groupValue = [[fGroupPopUp selectedItem] tag];
[fGroupPopUp setMenu: [[GroupsWindowController groups] groupMenuWithTarget: nil action: NULL isSmall: NO]];
[fGroupPopUp selectItemWithTag: groupValue];