Changeset 9213
- Timestamp:
- Sep 28, 2009, 3:16:23 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/libtransmission/announcer.c
r9190 r9213 317 317 tracker->scrape = tr_strdup( scrape ); 318 318 generateKeyParam( tracker->key_param, KEYLEN ); 319 tracker->seederCount = -1; 320 tracker->leecherCount = -1; 321 tracker->downloadCount = -1; 319 322 return tracker; 320 323 } -
trunk/libtransmission/transmission.h
r9179 r9213 1233 1233 typedef struct 1234 1234 { 1235 /* how many downloads this tracker knows of */1235 /* how many downloads this tracker knows of (-1 means it does not know) */ 1236 1236 int downloadCount; 1237 1237 … … 1294 1294 time_t lastScrapeTime; 1295 1295 1296 /* number of leechers this tracker knows of */1296 /* number of leechers this tracker knows of (-1 means it does not know) */ 1297 1297 int leecherCount; 1298 1298 … … 1305 1305 time_t nextScrapeTime; 1306 1306 1307 /* number of seeders this tracker knows of */1307 /* number of seeders this tracker knows of (-1 means it does not know) */ 1308 1308 int seederCount; 1309 1309 -
trunk/macosx/TrackerCell.m
r9210 r9213 135 135 136 136 //count strings 137 NSString * seederBaseString = [NSLocalizedString(@"Seeders", "tracker peer stat") stringByAppendingFormat: @": %d", 138 [node totalSeeders]]; 137 NSString * seederBaseString = [NSLocalizedString(@"Seeders", "tracker peer stat") stringByAppendingFormat: @": %@", 138 [node totalSeeders] != -1 ? [NSString stringWithFormat: @"%d", [node totalSeeders]] 139 : NSLocalizedString(@"N/A", "tracker peer stat")]; 139 140 NSAttributedString * seederString = [self attributedStatusWithString: seederBaseString color: statusColor]; 140 141 const NSRect seederRect = [self rectForCountWithString: seederString withAboveRect: nameRect inBounds: cellFrame]; 141 142 [seederString drawInRect: seederRect]; 142 143 143 NSString * leecherBaseString = [NSLocalizedString(@"Leechers", "tracker peer stat") stringByAppendingFormat: @": %d", 144 [node totalLeechers]]; 144 NSString * leecherBaseString = [NSLocalizedString(@"Leechers", "tracker peer stat") stringByAppendingFormat: @": %@", 145 [node totalLeechers] != -1 ? [NSString stringWithFormat: @"%d", [node totalLeechers]] 146 : NSLocalizedString(@"N/A", "tracker peer stat")]; 145 147 NSAttributedString * leecherString = [self attributedStatusWithString: leecherBaseString color: statusColor]; 146 148 const NSRect leecherRect = [self rectForCountWithString: leecherString withAboveRect: seederRect inBounds: cellFrame]; 147 149 [leecherString drawInRect: leecherRect]; 148 150 149 NSString * downloadedBaseString = [NSLocalizedString(@"Downloaded", "tracker peer stat") stringByAppendingFormat: @": %d", 150 [node totalDownloaded]]; 151 NSString * downloadedBaseString = [NSLocalizedString(@"Downloaded", "tracker peer stat") stringByAppendingFormat: @": %@", 152 [node totalDownloaded] != -1 ? [NSString stringWithFormat: @"%d", [node totalDownloaded]] 153 : NSLocalizedString(@"N/A", "tracker peer stat")]; 151 154 NSAttributedString * downloadedString = [self attributedStatusWithString: downloadedBaseString color: statusColor]; 152 155 const NSRect downloadedRect = [self rectForCountWithString: downloadedString withAboveRect: leecherRect inBounds: cellFrame];
Note: See TracChangeset
for help on using the changeset viewer.