Changeset 384


Ignore:
Timestamp:
Jun 16, 2006, 2:30:59 PM (16 years ago)
Author:
livings124
Message:

Validate using ident instead of function name...it's more future-proof.

Transfers, not Torrents.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/Controller.m

    r383 r384  
    10581058        [item setLabel: @"Remove"];
    10591059        [item setPaletteLabel: @"Remove Selected"];
    1060         [item setToolTip: @"Remove selected torrents"];
     1060        [item setToolTip: @"Remove selected transfers"];
    10611061        [item setImage: [NSImage imageNamed: @"Remove.png"]];
    10621062        [item setTarget: self];
     
    10761076        [item setLabel: @"Pause All"];
    10771077        [item setPaletteLabel: [item label]];
    1078         [item setToolTip: @"Pause all torrents"];
     1078        [item setToolTip: @"Pause all transfers"];
    10791079        [item setImage: [NSImage imageNamed: @"PauseAll.png"]];
    10801080        [item setTarget: self];
     
    10851085        [item setLabel: @"Resume All"];
    10861086        [item setPaletteLabel: [item label]];
    1087         [item setToolTip: @"Resume all torrents"];
     1087        [item setToolTip: @"Resume all transfers"];
    10881088        [item setImage: [NSImage imageNamed: @"ResumeAll.png"]];
    10891089        [item setTarget: self];
     
    10941094        [item setLabel: @"Pause"];
    10951095        [item setPaletteLabel: @"Pause Selected"];
    1096         [item setToolTip: @"Pause selected torrents"];
     1096        [item setToolTip: @"Pause selected transfers"];
    10971097        [item setImage: [NSImage imageNamed: @"PauseSelected.png"]];
    10981098        [item setTarget: self];
     
    11031103        [item setLabel: @"Resume"];
    11041104        [item setPaletteLabel: @"Resume Selected"];
    1105         [item setToolTip: @"Resume selected torrents"];
     1105        [item setToolTip: @"Resume selected transfers"];
    11061106        [item setImage: [NSImage imageNamed: @"ResumeSelected.png"]];
    11071107        [item setTarget: self];
     
    11421142- (BOOL) validateToolbarItem: (NSToolbarItem *) toolbarItem
    11431143{
    1144     SEL action = [toolbarItem action];
     1144    NSString * ident = [toolbarItem itemIdentifier];
    11451145
    11461146    //enable remove item
    1147     if (action == @selector(removeTorrent:))
     1147    if ([ident isEqualToString: TOOLBAR_REMOVE])
    11481148        return [fTableView numberOfSelectedRows] > 0;
    11491149
    11501150    //enable pause all item
    1151     if (action == @selector(stopAllTorrents:))
     1151    if ([ident isEqualToString: TOOLBAR_PAUSE_ALL])
    11521152    {
    11531153        Torrent * torrent;
     
    11601160
    11611161    //enable resume all item
    1162     if (action == @selector(resumeAllTorrents:))
     1162    if ([ident isEqualToString: TOOLBAR_RESUME_ALL])
    11631163    {
    11641164        Torrent * torrent;
     
    11711171
    11721172    //enable pause item
    1173     if( action == @selector(stopTorrent:) )
     1173    if ([ident isEqualToString: TOOLBAR_PAUSE_SELECTED])
    11741174    {
    11751175        Torrent * torrent;
     
    11871187   
    11881188    //enable resume item
    1189     if( action == @selector(resumeTorrent:) )
     1189    if ([ident isEqualToString: TOOLBAR_RESUME_SELECTED])
    11901190    {
    11911191        Torrent * torrent;
Note: See TracChangeset for help on using the changeset viewer.