allow folders of files to be enabled/disabled from the action button

This commit is contained in:
Mitchell Livingston 2007-08-16 23:05:59 +00:00
parent 54cd26c409
commit 20f33e82e2
2 changed files with 6 additions and 9 deletions

View File

@ -823,7 +823,6 @@ static int static_lastid = 0;
: [[self name] pathExtension]] retain]; : [[self name] pathExtension]] retain];
[fIcon setFlipped: YES]; [fIcon setFlipped: YES];
} }
return fIcon; return fIcon;
} }
@ -1369,6 +1368,7 @@ static int static_lastid = 0;
return [NSNumber numberWithInt: 2]; return [NSNumber numberWithInt: 2];
} }
#warning is progress different when seeding?
- (NSNumber *) progressSortKey - (NSNumber *) progressSortKey
{ {
float progress; float progress;

View File

@ -353,8 +353,6 @@
NSImage * icon; NSImage * icon;
if (!folder) if (!folder)
{ {
[item setAction: @selector(checkFile:)];
icon = [[dict objectForKey: @"Icon"] copy]; icon = [[dict objectForKey: @"Icon"] copy];
[icon setFlipped: NO]; [icon setFlipped: NO];
} }
@ -376,19 +374,18 @@
[item setImage: icon]; [item setImage: icon];
[icon release]; [icon release];
[item setAction: @selector(checkFile:)];
[menu addItem: item]; [menu addItem: item];
[item release]; [item release];
} }
else else
item = [menu itemWithTitle: name]; item = [menu itemWithTitle: name];
if (!folder)
{
NSIndexSet * indexSet = [dict objectForKey: @"Indexes"]; NSIndexSet * indexSet = [dict objectForKey: @"Indexes"];
[item setState: [fMenuTorrent checkForFiles: indexSet]]; [item setState: [fMenuTorrent checkForFiles: indexSet]];
[item setEnabled: [fMenuTorrent canChangeDownloadCheckForFiles: indexSet]]; [item setEnabled: [fMenuTorrent canChangeDownloadCheckForFiles: indexSet]];
} }
}
} }
- (void) checkFile: (id) sender - (void) checkFile: (id) sender