mirror of
https://github.com/transmission/transmission
synced 2025-03-04 02:28:03 +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
|
- (void) updateStatusField: (NSNotification *) notification
|
||||||
{
|
{
|
||||||
NSString * statusString = [NSString stringForFileSize: [fTorrent size]];
|
NSString * statusString = [NSString stringForFileSize: [fTorrent size]];
|
||||||
if ([fTorrent folder])
|
|
||||||
statusString = [statusString stringByAppendingFormat: NSLocalizedString(@" (%@ selected)", "Add torrent -> info"),
|
|
||||||
[NSString stringForFileSize: [fTorrent totalSizeSelected]]];
|
|
||||||
|
|
||||||
if ([fTorrent folder])
|
if ([fTorrent folder])
|
||||||
{
|
{
|
||||||
NSString * fileString;
|
NSString * fileString;
|
||||||
int count = [fTorrent fileCount];
|
int count = [fTorrent fileCount];
|
||||||
if (count != 1)
|
if (count != 1)
|
||||||
fileString = [NSString stringWithFormat: NSLocalizedString(@"%d Files, ", "Add torrent -> info"), count];
|
fileString = [NSString stringWithFormat: NSLocalizedString(@"%d Files", "Add torrent -> info"), count];
|
||||||
else
|
else
|
||||||
fileString = NSLocalizedString(@"1 File, ", "Add torrent -> info");
|
fileString = NSLocalizedString(@"1 File", "Add torrent -> info");
|
||||||
statusString = [fileString stringByAppendingString: statusString];
|
|
||||||
|
statusString = [NSString stringWithFormat: NSLocalizedString(@"%@, %@ (%@ selected)", "Add torrent -> info"), fileString,
|
||||||
|
statusString, [NSString stringForFileSize: [fTorrent totalSizeSelected]]];
|
||||||
}
|
}
|
||||||
|
|
||||||
[fStatusField setStringValue: statusString];
|
[fStatusField setStringValue: statusString];
|
||||||
|
|
Binary file not shown.
Loading…
Add table
Reference in a new issue