]> granicus.if.org Git - transmission/commitdiff
when the progress string is showing info for selected, the percent value should be...
authorMitchell Livingston <livings124@transmissionbt.com>
Tue, 8 Apr 2008 03:32:07 +0000 (03:32 +0000)
committerMitchell Livingston <livings124@transmissionbt.com>
Tue, 8 Apr 2008 03:32:07 +0000 (03:32 +0000)
macosx/Torrent.m

index c31a4699c8922def0529efa443eb50d2b6470205..fa408548afad435ba468e3ae512aae6f1b213324 100644 (file)
@@ -973,14 +973,21 @@ void completenessChangeCallback(tr_torrent * torrent, cp_status_t status, void *
     
     if (![self allDownloaded])
     {
+        float progress;
         if ([self folder] && [fDefaults boolForKey: @"DisplayStatusProgressSelected"])
+        {
             string = [NSString stringWithFormat: NSLocalizedString(@"%@ of %@ selected", "Torrent -> progress string"),
                         [NSString stringForFileSize: [self haveTotal]], [NSString stringForFileSize: [self totalSizeSelected]]];
+            progress = 100.0 * [self progressDone];
+        }
         else
+        {
             string = [NSString stringWithFormat: NSLocalizedString(@"%@ of %@", "Torrent -> progress string"),
                         [NSString stringForFileSize: [self haveTotal]], [NSString stringForFileSize: [self size]]];
+            progress = 100.0 * [self progress];
+        }
         
-        string = [NSString localizedStringWithFormat: @"%@ (%.2f%%)", string, 100.0 * [self progress]];
+        string = [NSString localizedStringWithFormat: @"%@ (%.2f%%)", string, progress];
     }
     else
     {