1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2025-03-05 19:18:19 +00:00

check Reveal File for multiple files

This commit is contained in:
Mitchell Livingston 2007-08-26 23:49:16 +00:00
parent 06165e065d
commit 01b33df0d9

View file

@ -617,11 +617,19 @@
SEL action = [menuItem action]; SEL action = [menuItem action];
if (action == @selector(revealFile:)) if (action == @selector(revealFile:))
return [fFileOutline numberOfSelectedRows] > 0 {
&& [[[fTabView selectedTabViewItem] identifier] isEqualToString: TAB_FILES_IDENT] if (![[[fTabView selectedTabViewItem] identifier] isEqualToString: TAB_FILES_IDENT])
&& [[NSFileManager defaultManager] fileExistsAtPath: return NO;
[[[fTorrents objectAtIndex: 0] downloadFolder] stringByAppendingPathComponent:
[[fFiles objectAtIndex: [fFileOutline selectedRow]] objectForKey: @"Path"]]]; NSString * downloadFolder = [[fTorrents objectAtIndex: 0] downloadFolder];
NSIndexSet * indexSet = [fFileOutline selectedRowIndexes];
int i;
for (i = [indexSet firstIndex]; i != NSNotFound; i = [indexSet indexGreaterThanIndex: i])
if ([[NSFileManager defaultManager] fileExistsAtPath:
[downloadFolder stringByAppendingPathComponent: [[fFiles objectAtIndex: i] objectForKey: @"Path"]]])
return YES;
return NO;
}
if (action == @selector(setCheck:)) if (action == @selector(setCheck:))
{ {