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:
parent
06165e065d
commit
01b33df0d9
1 changed files with 13 additions and 5 deletions
|
@ -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:))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue