Changeset 5324


Ignore:
Timestamp:
Mar 21, 2008, 8:28:04 PM (14 years ago)
Author:
livings124
Message:

fix filtering by tracker name

Location:
trunk/macosx
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/Controller.h

    r5260 r5324  
    183183- (void) updateUI;
    184184
    185 - (void) setBottomCountTextFiltering: (BOOL) filtering;
     185- (void) setBottomCountText: (BOOL) filtering;
    186186
    187187- (void) updateTorrentsInQueue;
  • trunk/macosx/Controller.m

    r5323 r5324  
    14641464}
    14651465
    1466 - (void) setBottomCountTextFiltering: (BOOL) filtering
     1466- (void) setBottomCountText: (BOOL) filtering
    14671467{
    14681468    NSString * totalTorrentsString;
     
    18861886            {
    18871887                BOOL removeTextField = YES;
    1888                 NSEnumerator * trackerEnumerator = [[torrent allTrackers] objectEnumerator], * subTrackerEnumerator;
    1889                 NSArray * subTrackers;
    1890                 while (removeTextField && (subTrackers = [trackerEnumerator nextObject]))
     1888                NSEnumerator * trackerEnumerator = [[torrent allTrackers] objectEnumerator];
     1889                id tracker;
     1890                while (tracker = [trackerEnumerator nextObject])
    18911891                {
    1892                     NSEnumerator * subTrackerEnumerator = [subTrackers objectEnumerator];
    1893                     NSString * tracker;
    1894                     while ((tracker = [subTrackerEnumerator nextObject]))
    1895                         if ([tracker rangeOfString: searchString options: NSCaseInsensitiveSearch].location != NSNotFound)
    1896                         {
    1897                             removeTextField = NO;
    1898                             break;
    1899                         }
     1892                    if (![tracker isKindOfClass: [NSNumber class]]
     1893                        && [tracker rangeOfString: searchString options: NSCaseInsensitiveSearch].location != NSNotFound)
     1894                    {
     1895                        removeTextField = NO;
     1896                        break;
     1897                    }
    19001898                }
    19011899               
     
    19771975    }
    19781976   
    1979     [self setBottomCountTextFiltering: groupRows || filterStatus || filterGroup || filterText];
     1977    [self setBottomCountText: groupRows || filterStatus || filterGroup || filterText];
    19801978
    19811979    [self setWindowSizeToFit];
     
    38043802{
    38053803    [self setWindowSizeToFit];
    3806     [self setBottomCountTextFiltering: YES];
     3804    [self setBottomCountText: YES];
    38073805}
    38083806
Note: See TracChangeset for help on using the changeset viewer.