From 0997148fbdb59e50d411ff2b9c85f4af5841b52d Mon Sep 17 00:00:00 2001 From: Mitchell Livingston Date: Mon, 26 Nov 2007 21:56:18 +0000 Subject: [PATCH] show bytes in tooltip --- macosx/InfoWindowController.m | 7 ++++++- macosx/StatsWindowController.m | 8 ++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/macosx/InfoWindowController.m b/macosx/InfoWindowController.m index 01fa2bb5c..104f36e5b 100644 --- a/macosx/InfoWindowController.m +++ b/macosx/InfoWindowController.m @@ -205,7 +205,9 @@ typedef enum } [fBasicInfoField setStringValue: [NSString stringWithFormat: NSLocalizedString(@"%d Files, %@ Total", - "Inspector -> torrents"), fileCount, [NSString stringForFileSize: size]]]; + "Inspector -> above tabs -> selected torrents"), fileCount, [NSString stringForFileSize: size]]]; + [fBasicInfoField setToolTip: [NSString stringWithFormat: NSLocalizedString(@"%u bytes", + "Inspector -> above tabs -> selected torrents"), size]]; } else { @@ -213,6 +215,7 @@ typedef enum [fNameField setStringValue: NSLocalizedString(@"No Torrents Selected", "Inspector -> above tabs -> selected torrents")]; [fBasicInfoField setStringValue: @""]; + [fBasicInfoField setToolTip: @""]; [fHaveField setStringValue: @""]; [fDownloadedTotalField setStringValue: @""]; @@ -338,6 +341,8 @@ typedef enum basicString = [fileString stringByAppendingString: basicString]; } [fBasicInfoField setStringValue: basicString]; + [fBasicInfoField setToolTip: [NSString stringWithFormat: NSLocalizedString(@"%u bytes", + "Inspector -> above tabs -> selected torrents"), [torrent size]]]; NSArray * allTrackers = [torrent allTrackers], * subTrackers; NSMutableArray * trackerStrings = [NSMutableArray arrayWithCapacity: [allTrackers count]]; diff --git a/macosx/StatsWindowController.m b/macosx/StatsWindowController.m index 62d3249ae..a272c295a 100644 --- a/macosx/StatsWindowController.m +++ b/macosx/StatsWindowController.m @@ -80,12 +80,20 @@ tr_handle * fLib; tr_getSessionStats(fLib, &statsSession); [fUploadedField setStringValue: [NSString stringForFileSize: statsSession.uploadedBytes]]; + [fUploadedField setToolTip: [NSString stringWithFormat: NSLocalizedString(@"%u bytes", "stats -> bytes"), + statsSession.uploadedBytes]]; [fUploadedAllField setStringValue: [[NSString stringForFileSize: statsAll.uploadedBytes] stringByAppendingString: NSLocalizedString(@" total", "stats total")]]; + [fUploadedAllField setToolTip: [NSString stringWithFormat:NSLocalizedString(@"%u bytes", "stats -> bytes"), + statsAll.uploadedBytes]]; [fDownloadedField setStringValue: [NSString stringForFileSize: statsSession.downloadedBytes]]; + [fDownloadedField setToolTip: [NSString stringWithFormat: NSLocalizedString(@"%u bytes", "stats -> bytes"), + statsSession.downloadedBytes]]; [fDownloadedAllField setStringValue: [[NSString stringForFileSize: statsAll.downloadedBytes] stringByAppendingString: NSLocalizedString(@" total", "stats total")]]; + [fDownloadedAllField setToolTip: [NSString stringWithFormat: NSLocalizedString(@"%u bytes", "stats -> bytes"), + statsAll.downloadedBytes]]; [fRatioField setStringValue: [NSString stringForRatio: statsSession.ratio]];