From 51fc9cd34f8a646a00214fe87a253244054c74e5 Mon Sep 17 00:00:00 2001 From: Mitchell Livingston Date: Fri, 18 Jun 2010 03:21:29 +0000 Subject: [PATCH] --warnings --- macosx/InfoActivityViewController.m | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/macosx/InfoActivityViewController.m b/macosx/InfoActivityViewController.m index 8bb798085..8b748588c 100644 --- a/macosx/InfoActivityViewController.m +++ b/macosx/InfoActivityViewController.m @@ -124,13 +124,15 @@ [fStateField setStringValue: [torrent stateString]]; - #warning simplify + NSString * progressString = [NSString localizedStringWithFormat: @"%.2f%%", tr_truncd(100.0 * [torrent progress], 2)]; if ([torrent isFolder]) - [fProgressField setStringValue: [NSString localizedStringWithFormat: NSLocalizedString(@"%.2f%% (%.2f%% selected)", - "Inspector -> Activity tab -> progress"), tr_truncd(100.0 * [torrent progress], 2), - tr_truncd(100.0 * [torrent progressDone], 2)]]; - else - [fProgressField setStringValue: [NSString localizedStringWithFormat: @"%.2f%%", tr_truncd(100.0 * [torrent progress], 2)]]; + { + NSString * progressSelectedString = [NSString localizedStringWithFormat: + NSLocalizedString(@"%.2f%% selected", "Inspector -> Activity tab -> progress"), + tr_truncd(100.0 * [torrent progressDone], 2)]; + progressString = [progressString stringByAppendingFormat: @" (%@)", progressSelectedString]; + } + [fProgressField setStringValue: progressString]; [fRatioField setStringValue: [NSString stringForRatio: [torrent ratio]]];