mirror of
https://github.com/transmission/transmission
synced 2024-12-25 01:03:01 +00:00
attempt to make per-torrent action menu a little faster
This commit is contained in:
parent
1fb09fafa1
commit
c79f772acd
2 changed files with 2 additions and 9 deletions
|
@ -713,13 +713,10 @@ void completenessChangeCallback(tr_torrent * torrent, cp_status_t status, void *
|
|||
- (float) progressDone
|
||||
{
|
||||
return fStat->percentDone;
|
||||
/*uint64_t have = [self haveTotal];
|
||||
return (float)have / (have + [self sizeLeft]);*/
|
||||
}
|
||||
|
||||
- (float) progressLeft
|
||||
{
|
||||
//NSLog(@"left %f",(float)fStat->leftUntilDone / [self size]);
|
||||
return (float)[self sizeLeft] / [self size];
|
||||
}
|
||||
|
||||
|
|
|
@ -609,10 +609,7 @@
|
|||
|
||||
NSImage * icon;
|
||||
if (![[dict objectForKey: @"IsFolder"] boolValue])
|
||||
{
|
||||
icon = [[dict objectForKey: @"Icon"] copy];
|
||||
[icon setFlipped: NO];
|
||||
}
|
||||
icon = [[NSWorkspace sharedWorkspace] iconForFileType: [name pathExtension]];
|
||||
else
|
||||
{
|
||||
NSMenu * itemMenu = [[NSMenu alloc] initWithTitle: name];
|
||||
|
@ -621,7 +618,7 @@
|
|||
[itemMenu setDelegate: self];
|
||||
[itemMenu release];
|
||||
|
||||
icon = [[[NSWorkspace sharedWorkspace] iconForFileType: NSFileTypeForHFSTypeCode('fldr')] copy];
|
||||
icon = [[NSWorkspace sharedWorkspace] iconForFileType: NSFileTypeForHFSTypeCode('fldr')];
|
||||
}
|
||||
|
||||
[item setRepresentedObject: dict];
|
||||
|
@ -629,7 +626,6 @@
|
|||
[icon setScalesWhenResized: YES];
|
||||
[icon setSize: NSMakeSize(16.0, 16.0)];
|
||||
[item setImage: icon];
|
||||
[icon release];
|
||||
|
||||
[item setAction: @selector(checkFile:)];
|
||||
|
||||
|
|
Loading…
Reference in a new issue