mirror of
https://github.com/transmission/transmission
synced 2025-03-03 10:15:45 +00:00
streamline code from last commit
This commit is contained in:
parent
78b08324ea
commit
4f11506522
2 changed files with 5 additions and 7 deletions
|
@ -207,19 +207,17 @@
|
|||
- (void) updateStatusField: (NSNotification *) notification
|
||||
{
|
||||
NSString * statusString = [NSString stringForFileSize: [fTorrent size]];
|
||||
if ([fTorrent folder])
|
||||
statusString = [statusString stringByAppendingFormat: NSLocalizedString(@" (%@ selected)", "Add torrent -> info"),
|
||||
[NSString stringForFileSize: [fTorrent totalSizeSelected]]];
|
||||
|
||||
if ([fTorrent folder])
|
||||
{
|
||||
NSString * fileString;
|
||||
int count = [fTorrent fileCount];
|
||||
if (count != 1)
|
||||
fileString = [NSString stringWithFormat: NSLocalizedString(@"%d Files, ", "Add torrent -> info"), count];
|
||||
fileString = [NSString stringWithFormat: NSLocalizedString(@"%d Files", "Add torrent -> info"), count];
|
||||
else
|
||||
fileString = NSLocalizedString(@"1 File, ", "Add torrent -> info");
|
||||
statusString = [fileString stringByAppendingString: statusString];
|
||||
fileString = NSLocalizedString(@"1 File", "Add torrent -> info");
|
||||
|
||||
statusString = [NSString stringWithFormat: NSLocalizedString(@"%@, %@ (%@ selected)", "Add torrent -> info"), fileString,
|
||||
statusString, [NSString stringForFileSize: [fTorrent totalSizeSelected]]];
|
||||
}
|
||||
|
||||
[fStatusField setStringValue: statusString];
|
||||
|
|
Binary file not shown.
Loading…
Reference in a new issue