mirror of
https://github.com/transmission/transmission
synced 2025-03-05 02:58:33 +00:00
check Reveal File for multiple files
This commit is contained in:
parent
06165e065d
commit
01b33df0d9
1 changed files with 13 additions and 5 deletions
|
@ -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:))
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue