Changeset 10248


Ignore:
Timestamp:
Feb 20, 2010, 10:20:03 PM (12 years ago)
Author:
livings124
Message:

display correct number of trackers to remove in the dialog box

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/InfoWindowController.m

    r10213 r10248  
    18001800- (void) removeTrackers
    18011801{
    1802     NSMutableDictionary * removeIdentifiers = [NSMutableDictionary dictionary];
    1803    
     1802    NSMutableDictionary * removeIdentifiers = [NSMutableDictionary dictionaryWithCapacity: [fTorrents count]];
     1803    NSUInteger removeCount = 0;
     1804       
    18041805    NSIndexSet * selectedIndexes = [fTrackerTable selectedRowIndexes];
    18051806    BOOL groupSelected = NO;
     
    18201821               
    18211822                [removeIndexSet addIndex: [(TrackerNode *)object identifier]];
     1823                ++removeCount;
    18221824            }
    18231825        }
     
    18301832    }
    18311833   
    1832     NSAssert([removeIdentifiers count] > 0, @"Trying to remove no trackers.");
     1834    NSAssert(removeCount > 0, @"Trying to remove no trackers.");
    18331835   
    18341836    if ([[NSUserDefaults standardUserDefaults] boolForKey: @"WarningRemoveTrackers"])
     
    18361838        NSAlert * alert = [[NSAlert alloc] init];
    18371839       
    1838         if ([removeIdentifiers count] > 1)
     1840        if (removeCount > 1)
    18391841        {
    18401842            [alert setMessageText: [NSString stringWithFormat: NSLocalizedString(@"Are you sure you want to remove %d trackers?",
    1841                                                                 "Remove trackers alert -> title"), [removeIdentifiers count]]];
     1843                                                                "Remove trackers alert -> title"), removeCount]];
    18421844            [alert setInformativeText: NSLocalizedString(@"Once removed, Transmission will no longer attempt to contact them."
    18431845                                        " This cannot be undone.", "Remove trackers alert -> message")];
Note: See TracChangeset for help on using the changeset viewer.