1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2025-02-03 04:53:27 +00:00

(trunk) Fix visual glitch with the tracker inspector tab when there is no scrape address

This commit is contained in:
Mitchell Livingston 2008-03-30 04:41:55 +00:00
parent fb437cb20a
commit b773c9aeba
3 changed files with 17 additions and 4 deletions

4
NEWS
View file

@ -4,6 +4,10 @@ NEWS file for Transmission <http://www.transmissionbt.com/>
- Mac
+ Display of decimal numbers matches system international settings
1.11 (2008/xx/yy)
- Mac
+ Fix visual glitch with the tracker inspector tab when there is no scrape address
1.10 (2008/03/28)
- All Platforms
+ Stop torrents when downloading and the disk becomes full

View file

@ -1134,9 +1134,18 @@ typedef enum
[fAnnounceNextField setStringValue: announceNext > 0 ? [NSString timeString: announceNext showSeconds: YES] : @""];
//scrape fields
NSString * scrapeAddress = [[torrent trackerAddress] stringByAppendingString: [torrent trackerAddressScrape]];
NSString * scrapeAddressTail;
if ((scrapeAddressTail = [torrent trackerAddressScrape]))
{
NSString * scrapeAddress = [[torrent trackerAddress] stringByAppendingString: scrapeAddressTail];
[fScrapeAddressField setStringValue: scrapeAddress];
[fScrapeAddressField setToolTip: scrapeAddress];
}
else
{
[fScrapeAddressField setStringValue: @""];
[fScrapeAddressField setToolTip: @""];
}
[fScrapeLastField setObjectValue: [torrent lastScrapeTime]];

View file

@ -738,7 +738,7 @@ void completenessChangeCallback(tr_torrent * torrent, cp_status_t status, void *
- (NSString *) trackerAddressScrape
{
return [NSString stringWithUTF8String: fStat->tracker->scrape];
return fStat->tracker->scrape ? [NSString stringWithUTF8String: fStat->tracker->scrape] : nil;
}
- (NSDate *) lastScrapeTime