Ignore:
Timestamp:
Sep 17, 2009, 12:33:39 AM (13 years ago)
Author:
livings124
Message:

remove distinction between built-in trackers and custom-added trackers; add trackers to the end of the list instead of the beginning

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/InfoWindowController.m

    r9124 r9125  
    11031103        return NO;
    11041104   
    1105     //only allow modification of custom-added trackers
    1106     if ([[fTrackers objectAtIndex: row] isKindOfClass: [NSNumber class]] || ![[fTorrents objectAtIndex: 0] hasAddedTrackers])
    1107         return NO;
    1108    
    11091105    NSUInteger i;
    11101106    for (i = row-1; ![[fTrackers objectAtIndex: i] isKindOfClass: [NSNumber class]]; i--);
     
    17321728    [[self window] makeKeyWindow];
    17331729   
    1734     NSUInteger index = 1;
    1735     if ([fTrackers count] > 0 && [[fTorrents objectAtIndex: 0] hasAddedTrackers])
    1736     {
    1737         for (; index < [fTrackers count]; index++)
    1738             if ([[fTrackers objectAtIndex: index] isKindOfClass: [NSNumber class]])
    1739                 break;
    1740     }
    1741     else
    1742         [fTrackers insertObject: [NSNumber numberWithInt: 0] atIndex: 0];
    1743    
    1744     [fTrackers insertObject: @"" atIndex: index];
     1730    NSUInteger tierCount = 0;
     1731    for (id trackerObject in fTrackers)
     1732        if ([trackerObject isKindOfClass: [NSNumber class]])
     1733            tierCount++;
     1734   
     1735    [fTrackers addObject: [NSNumber numberWithInt: tierCount+1]];
     1736    [fTrackers addObject: @""];
     1737   
    17451738    [fTrackerTable reloadData];
    1746     [fTrackerTable selectRowIndexes: [NSIndexSet indexSetWithIndex: index] byExtendingSelection: NO];
    1747     [fTrackerTable editColumn: 0 row: index withEvent: nil select: YES];
     1739    [fTrackerTable selectRowIndexes: [NSIndexSet indexSetWithIndex: [fTrackers count]-1] byExtendingSelection: NO];
     1740    [fTrackerTable editColumn: 0 row: [fTrackers count]-1 withEvent: nil select: YES];
    17481741}
    17491742
     
    17991792   
    18001793    //determine if removing trackers built into the torrent
    1801     if (numberBuiltIn > 0 && [[NSUserDefaults standardUserDefaults] boolForKey: @"WarningRemoveBuiltInTracker"])
     1794    #warning remove?
     1795    if (NO && numberBuiltIn > 0 && [[NSUserDefaults standardUserDefaults] boolForKey: @"WarningRemoveBuiltInTracker"])
    18021796    {
    18031797        NSAlert * alert = [[NSAlert alloc] init];
Note: See TracChangeset for help on using the changeset viewer.