Changeset 1050 for trunk/macosx


Ignore:
Timestamp:
Nov 3, 2006, 2:49:16 AM (15 years ago)
Author:
livings124
Message:

remove some 10.3 checks

Location:
trunk/macosx
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/Controller.h

    r1044 r1050  
    102102
    103103- (void) quitSheetDidEnd: (NSWindow *) sheet returnCode: (int) returnCode contextInfo: (void *) contextInfo;
    104 
    105 - (NSArray *) torrentsAtIndexes: (NSIndexSet *) indexSet;
    106104
    107105- (void) resumeSelectedTorrents:    (id) sender;
  • trunk/macosx/Controller.m

    r1049 r1050  
    447447}
    448448
    449 - (NSArray *) torrentsAtIndexes: (NSIndexSet *) indexSet
    450 {
    451     if ([fDisplayedTorrents respondsToSelector: @selector(objectsAtIndexes:)])
    452         return [fDisplayedTorrents objectsAtIndexes: indexSet];
    453     else
    454     {
    455         NSMutableArray * torrents = [NSMutableArray arrayWithCapacity: [indexSet count]];
    456         unsigned int i;
    457         for (i = [indexSet firstIndex]; i != NSNotFound; i = [indexSet indexGreaterThanIndex: i])
    458             [torrents addObject: [fDisplayedTorrents objectAtIndex: i]];
    459 
    460         return torrents;
    461     }
    462 }
    463 
    464449- (void) application: (NSApplication *) sender openFiles: (NSArray *) filenames
    465450{
     
    615600- (void) resumeSelectedTorrents: (id) sender
    616601{
    617     [self resumeTorrents: [self torrentsAtIndexes: [fTableView selectedRowIndexes]]];
     602    [self resumeTorrents: [fDisplayedTorrents objectsAtIndexes: [fTableView selectedRowIndexes]]];
    618603}
    619604
     
    639624- (void) resumeSelectedTorrentsNoWait:  (id) sender
    640625{
    641     [self resumeTorrentsNoWait: [self torrentsAtIndexes: [fTableView selectedRowIndexes]]];
     626    [self resumeTorrentsNoWait: [fDisplayedTorrents objectsAtIndexes: [fTableView selectedRowIndexes]]];
    642627}
    643628
     
    670655- (void) stopSelectedTorrents: (id) sender
    671656{
    672     [self stopTorrents: [self torrentsAtIndexes: [fTableView selectedRowIndexes]]];
     657    [self stopTorrents: [fDisplayedTorrents objectsAtIndexes: [fTableView selectedRowIndexes]]];
    673658}
    674659
     
    825810- (void) removeNoDelete: (id) sender
    826811{
    827     [self removeTorrents: [self torrentsAtIndexes: [fTableView selectedRowIndexes]]
     812    [self removeTorrents: [fDisplayedTorrents objectsAtIndexes: [fTableView selectedRowIndexes]]
    828813                deleteData: NO deleteTorrent: NO];
    829814}
     
    831816- (void) removeDeleteData: (id) sender
    832817{
    833     [self removeTorrents: [self torrentsAtIndexes: [fTableView selectedRowIndexes]]
     818    [self removeTorrents: [fDisplayedTorrents objectsAtIndexes: [fTableView selectedRowIndexes]]
    834819                deleteData: YES deleteTorrent: NO];
    835820}
     
    837822- (void) removeDeleteTorrent: (id) sender
    838823{
    839     [self removeTorrents: [self torrentsAtIndexes: [fTableView selectedRowIndexes]]
     824    [self removeTorrents: [fDisplayedTorrents objectsAtIndexes: [fTableView selectedRowIndexes]]
    840825                deleteData: NO deleteTorrent: YES];
    841826}
     
    843828- (void) removeDeleteDataAndTorrent: (id) sender
    844829{
    845     [self removeTorrents: [self torrentsAtIndexes: [fTableView selectedRowIndexes]]
     830    [self removeTorrents: [fDisplayedTorrents objectsAtIndexes: [fTableView selectedRowIndexes]]
    846831                deleteData: YES deleteTorrent: YES];
    847832}
     
    850835{
    851836    [self copyTorrentFileForTorrents: [[NSMutableArray alloc] initWithArray:
    852             [self torrentsAtIndexes: [fTableView selectedRowIndexes]]]];
     837            [fDisplayedTorrents objectsAtIndexes: [fTableView selectedRowIndexes]]]];
    853838}
    854839
     
    10201005    int numSelected = [fTableView numberOfSelectedRows];
    10211006    if (numSelected > 0 && numSelected < [fDisplayedTorrents count])
    1022         selectedTorrents = [self torrentsAtIndexes: [fTableView selectedRowIndexes]];
     1007        selectedTorrents = [fDisplayedTorrents objectsAtIndexes: [fTableView selectedRowIndexes]];
    10231008
    10241009    [self sortTorrentsIgnoreSelected]; //actually sort
     
    11631148    //remember selected rows if needed
    11641149    NSArray * selectedTorrents = [fTableView numberOfSelectedRows] > 0
    1165                 ? [self torrentsAtIndexes: [fTableView selectedRowIndexes]] : nil;
     1150                ? [fDisplayedTorrents objectsAtIndexes: [fTableView selectedRowIndexes]] : nil;
    11661151
    11671152    NSMutableArray * tempTorrents = [[NSMutableArray alloc] initWithCapacity: [fTorrents count]];
     
    16911676        int numSelected = [fTableView numberOfSelectedRows];
    16921677        if (numSelected > 0 && numSelected < [fDisplayedTorrents count])
    1693             selectedTorrents = [self torrentsAtIndexes: [fTableView selectedRowIndexes]];
     1678            selectedTorrents = [fDisplayedTorrents objectsAtIndexes: [fTableView selectedRowIndexes]];
    16941679   
    16951680        NSIndexSet * indexes = [NSKeyedUnarchiver unarchiveObjectWithData:
     
    16971682       
    16981683        //move torrent in array
    1699         NSArray * movingTorrents = [[self torrentsAtIndexes: indexes] retain];
     1684        NSArray * movingTorrents = [[fDisplayedTorrents objectsAtIndexes: indexes] retain];
    17001685        [fDisplayedTorrents removeObjectsInArray: movingTorrents];
    17011686       
     
    17431728- (void) tableViewSelectionDidChange: (NSNotification *) notification
    17441729{
    1745     [fInfoController updateInfoForTorrents: [self torrentsAtIndexes: [fTableView selectedRowIndexes]]];
     1730    [fInfoController updateInfoForTorrents: [fDisplayedTorrents objectsAtIndexes: [fTableView selectedRowIndexes]]];
    17461731}
    17471732
  • trunk/macosx/PrefsController.m

    r1049 r1050  
    223223- (void) updatePortStatus
    224224{
    225     long sytemVersion;
    226     [fPortStatusField setStringValue: @""];
     225    PortChecker * portChecker = [[PortChecker alloc] initWithDelegate: self];
     226
     227    [fPortStatusField setStringValue: [NSLocalizedString(@"Checking port status",
     228                                        "Preferences -> Network -> port status") stringByAppendingEllipsis]];
    227229    [fPortStatusImage setImage: nil];
    228    
    229     Gestalt('sysv', & sytemVersion);
    230     if (sytemVersion >= 0x1040)
    231     {
    232         //NSXML features are unfortunately only available since Mac OS X v10.4
    233         PortChecker * checker = [[PortChecker alloc] initWithDelegate: self];
    234 
    235         [fPortStatusField setStringValue: [NSLocalizedString(@"Checking port status",
    236                                             "Preferences -> Network -> port status") stringByAppendingEllipsis]];
    237         [fPortStatusProgress startAnimation: self];
    238        
    239         [checker probePort: [fDefaults integerForKey: @"BindPort"]];
    240     }
     230    [fPortStatusProgress startAnimation: self];
     231       
     232    [portChecker probePort: [fDefaults integerForKey: @"BindPort"]];
    241233}
    242234
Note: See TracChangeset for help on using the changeset viewer.