1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2025-03-04 18:48:06 +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];
if (action == @selector(revealFile:))
return [fFileOutline numberOfSelectedRows] > 0
&& [[[fTabView selectedTabViewItem] identifier] isEqualToString: TAB_FILES_IDENT]
&& [[NSFileManager defaultManager] fileExistsAtPath:
[[[fTorrents objectAtIndex: 0] downloadFolder] stringByAppendingPathComponent:
[[fFiles objectAtIndex: [fFileOutline selectedRow]] objectForKey: @"Path"]]];
{
if (![[[fTabView selectedTabViewItem] identifier] isEqualToString: TAB_FILES_IDENT])
return NO;
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:))
{