From c9f9a074151b6d5b40eef5d1d3ccd6959e37c165 Mon Sep 17 00:00:00 2001 From: Mitchell Livingston Date: Tue, 24 Jul 2007 01:45:14 +0000 Subject: [PATCH] add progress of checking --- macosx/English.lproj/Localizable.strings | Bin 41356 -> 41392 bytes macosx/Torrent.m | 10 ++++++++-- macosx/TorrentTableView.m | 11 +++++++---- 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/macosx/English.lproj/Localizable.strings b/macosx/English.lproj/Localizable.strings index cde8a03d10c4759f96d30dc0f797ec1716287072..06bf93cfc722535176599acab6233066ee1ff81c 100644 GIT binary patch delta 73 zcmeA<%(MZBzN${1%O*4Vzp4(a0)qyF>f~E&(v#<#+fD8d7TesbHbs4MY>dj}^S&ID d-}^;OuJ+)XJlj`cvTTCHWJ|w<&F=oLK>#3$8|451 delta 75 zcmV-R0JQ(G!vc)M0>lRrf+lmAjClgT9#ll3MTv)d+WCzIbU h7?TT6V3VIn3X{K0Ad{P4B$EqI3X^kARD+r diff --git a/macosx/Torrent.m b/macosx/Torrent.m index e40935de9..7a6bc59bf 100644 --- a/macosx/Torrent.m +++ b/macosx/Torrent.m @@ -357,7 +357,8 @@ static uint32_t kRed = BE(0xFF6450FF), //255, 100, 80 break; case TR_STATUS_CHECK: - tempString = [NSLocalizedString(@"Checking existing data", "Torrent -> status string") stringByAppendingEllipsis]; + tempString = [NSString stringWithFormat: NSLocalizedString(@"Checking existing data (%.2f%%)", + "Torrent -> status string"), 100.0 * fStat->recheckProgress]; [statusString setString: tempString]; [shortStatusString setString: tempString]; @@ -990,7 +991,12 @@ static uint32_t kRed = BE(0xFF6450FF), //255, 100, 80 break; case TR_STATUS_CHECK: - return [NSLocalizedString(@"Checking existing data", "Torrent -> status string") stringByAppendingEllipsis]; + return [NSString stringWithFormat: NSLocalizedString(@"Checking existing data (%.2f%%)", + "Torrent -> status string"), 100.0 * fStat->recheckProgress]; + break; + + case TR_STATUS_CHECK_WAIT: + return [NSLocalizedString(@"Waiting to check existing data", "Torrent -> status string") stringByAppendingEllipsis]; break; case TR_STATUS_DOWNLOAD: diff --git a/macosx/TorrentTableView.m b/macosx/TorrentTableView.m index 821bb7db0..78e0f51b7 100644 --- a/macosx/TorrentTableView.m +++ b/macosx/TorrentTableView.m @@ -248,8 +248,12 @@ torrent = [fTorrents objectAtIndex: i]; rect = [self pauseRectForRow: i]; - if ([torrent isActive] && ![torrent isChecking]) - image = NSPointInRect(fClickPoint, rect) ? fPauseOnIcon : fPauseOffIcon; + image = nil; + if ([torrent isActive]) + { + if (![torrent isChecking]) + image = NSPointInRect(fClickPoint, rect) ? fPauseOnIcon : fPauseOffIcon; + } else if ([torrent isPaused]) { if ([[NSApp currentEvent] modifierFlags] & NSAlternateKeyMask && [fDefaults boolForKey: @"Queue"]) @@ -259,8 +263,7 @@ else image = NSPointInRect(fClickPoint, rect) ? fResumeOnIcon : fResumeOffIcon; } - else - image = nil; + else; if (image) [image compositeToPoint: NSMakePoint(rect.origin.x, NSMaxY(rect)) operation: NSCompositeSourceOver];