mirror of
https://github.com/transmission/transmission
synced 2024-12-26 01:27:28 +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
|
- (float) progressDone
|
||||||
{
|
{
|
||||||
return fStat->percentDone;
|
return fStat->percentDone;
|
||||||
/*uint64_t have = [self haveTotal];
|
|
||||||
return (float)have / (have + [self sizeLeft]);*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- (float) progressLeft
|
- (float) progressLeft
|
||||||
{
|
{
|
||||||
//NSLog(@"left %f",(float)fStat->leftUntilDone / [self size]);
|
|
||||||
return (float)[self sizeLeft] / [self size];
|
return (float)[self sizeLeft] / [self size];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -609,10 +609,7 @@
|
||||||
|
|
||||||
NSImage * icon;
|
NSImage * icon;
|
||||||
if (![[dict objectForKey: @"IsFolder"] boolValue])
|
if (![[dict objectForKey: @"IsFolder"] boolValue])
|
||||||
{
|
icon = [[NSWorkspace sharedWorkspace] iconForFileType: [name pathExtension]];
|
||||||
icon = [[dict objectForKey: @"Icon"] copy];
|
|
||||||
[icon setFlipped: NO];
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
NSMenu * itemMenu = [[NSMenu alloc] initWithTitle: name];
|
NSMenu * itemMenu = [[NSMenu alloc] initWithTitle: name];
|
||||||
|
@ -621,7 +618,7 @@
|
||||||
[itemMenu setDelegate: self];
|
[itemMenu setDelegate: self];
|
||||||
[itemMenu release];
|
[itemMenu release];
|
||||||
|
|
||||||
icon = [[[NSWorkspace sharedWorkspace] iconForFileType: NSFileTypeForHFSTypeCode('fldr')] copy];
|
icon = [[NSWorkspace sharedWorkspace] iconForFileType: NSFileTypeForHFSTypeCode('fldr')];
|
||||||
}
|
}
|
||||||
|
|
||||||
[item setRepresentedObject: dict];
|
[item setRepresentedObject: dict];
|
||||||
|
@ -629,7 +626,6 @@
|
||||||
[icon setScalesWhenResized: YES];
|
[icon setScalesWhenResized: YES];
|
||||||
[icon setSize: NSMakeSize(16.0, 16.0)];
|
[icon setSize: NSMakeSize(16.0, 16.0)];
|
||||||
[item setImage: icon];
|
[item setImage: icon];
|
||||||
[icon release];
|
|
||||||
|
|
||||||
[item setAction: @selector(checkFile:)];
|
[item setAction: @selector(checkFile:)];
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue