Changeset 10197
- Timestamp:
- Feb 14, 2010, 4:48:12 AM (13 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/libtransmission/announcer.c
r10196 r10197 1934 1934 tr_strlcpy( st->host, tracker->host->name, sizeof( st->host ) ); 1935 1935 tr_strlcpy( st->announce, tracker->announce, sizeof( st->announce ) ); 1936 st->tier = i + 1;1936 st->tier = i; 1937 1937 st->isBackup = tracker != tier->currentTracker; 1938 1938 st->lastScrapeStartTime = tier->lastScrapeStartTime; -
trunk/macosx/InfoWindowController.m
r10190 r10197 711 711 if (tableView == fTrackerTable) 712 712 { 713 if (![[fTrackers objectAtIndex: row] isKindOfClass: [TrackerNode class]] && [tableView editedRow] != row) 713 //check for NSDictionay instead of TrackerNode because of display issue when adding a row 714 if ([[fTrackers objectAtIndex: row] isKindOfClass: [NSDictionary class]]) 714 715 return TRACKER_GROUP_SEPARATOR_HEIGHT; 715 716 } … … 1783 1784 [[self window] makeKeyWindow]; 1784 1785 1785 [fTrackers addObject: NSLocalizedString(@"New Tier", "inspector -> add tracker")]; 1786 NSAssert1([fTorrents count] == 1, @"Attempting to add tracker with %d transfers selected", [fTorrents count]); 1787 1788 Torrent * torrent = [fTorrents objectAtIndex: 0]; 1789 1790 [fTrackers addObject: [NSDictionary dictionaryWithObject: [NSNumber numberWithInteger: [torrent numberOfTrackerTiers]+1] 1791 forKey: @"Tier"]]; 1786 1792 [fTrackers addObject: @""]; 1787 1793 -
trunk/macosx/Torrent.h
r10190 r10197 131 131 - (NSMutableArray *) allTrackerStats; 132 132 - (NSArray *) allTrackersFlat; //used by GroupRules 133 - (NSUInteger) numberOfTrackerTiers; 133 134 - (BOOL) addTrackerToNewTier: (NSString *) tracker; 134 135 - (void) removeTrackersWithIdentifiers: (NSIndexSet *) removeIdentifiers; -
trunk/macosx/Torrent.m
r10190 r10197 594 594 tr_tracker_stat * stats = tr_torrentTrackers(fHandle, &count); 595 595 596 NSMutableArray * trackers = [NSMutableArray arrayWithCapacity: (count > 0 ? count + stats[count-1].tier: 0)];596 NSMutableArray * trackers = [NSMutableArray arrayWithCapacity: (count > 0 ? count + (stats[count-1].tier + 1) : 0)]; 597 597 598 598 int prevTier = -1; … … 601 601 if (stats[i].tier != prevTier) 602 602 { 603 [trackers addObject: [NSDictionary dictionaryWithObjectsAndKeys: [NSNumber numberWithInteger: stats[i].tier ], @"Tier",603 [trackers addObject: [NSDictionary dictionaryWithObjectsAndKeys: [NSNumber numberWithInteger: stats[i].tier + 1], @"Tier", 604 604 [self name], @"Name", nil]]; 605 605 prevTier = stats[i].tier; … … 623 623 624 624 return allTrackers; 625 } 626 627 - (NSUInteger) numberOfTrackerTiers 628 { 629 if (fInfo->trackerCount == 0) 630 return 0; 631 632 return fInfo->trackers[fInfo->trackerCount-1].tier + 1; 625 633 } 626 634 -
trunk/macosx/en.lproj/Localizable.strings
r10163 r10197 529 529 /* Prefs -> blocklist -> message */ 530 530 "Never" = "Never"; 531 532 /* inspector -> add tracker */533 "New Tier" = "New Tier";534 531 535 532 /* Tracker next announce */
Note: See TracChangeset
for help on using the changeset viewer.