From c79f772acdfbd56f01aa475d05e58afa19194699 Mon Sep 17 00:00:00 2001 From: Mitchell Livingston Date: Mon, 26 Nov 2007 17:33:31 +0000 Subject: [PATCH] attempt to make per-torrent action menu a little faster --- macosx/Torrent.m | 3 --- macosx/TorrentTableView.m | 8 ++------ 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/macosx/Torrent.m b/macosx/Torrent.m index b792fdf12..568d7014d 100644 --- a/macosx/Torrent.m +++ b/macosx/Torrent.m @@ -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]; } diff --git a/macosx/TorrentTableView.m b/macosx/TorrentTableView.m index 35a42e1b5..478c2b919 100644 --- a/macosx/TorrentTableView.m +++ b/macosx/TorrentTableView.m @@ -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:)];