Changeset 7941


Ignore:
Timestamp:
Feb 24, 2009, 12:34:46 AM (13 years ago)
Author:
livings124
Message:

#1859 fix per-torrent action menu's ratio settings

Location:
trunk/macosx
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/InfoWindowController.m

    r7892 r7941  
    12561256        [[self window] makeKeyAndOrderFront: self];
    12571257    }
    1258    
    1259     [[NSNotificationCenter defaultCenter] postNotificationName: @"UpdateUI" object: nil];
    12601258}
    12611259
  • trunk/macosx/TorrentTableView.m

    r7894 r7941  
    632632        }
    633633       
    634         NSInteger mode = [fMenuTorrent ratioSetting];
     634        tr_ratiolimit mode = [fMenuTorrent ratioSetting];
    635635       
    636636        item = [menu itemWithTag: ACTION_MENU_LIMIT_TAG];
    637         [item setState: mode == NSOnState ? NSOnState : NSOffState];
     637        [item setState: mode == TR_RATIOLIMIT_SINGLE ? NSOnState : NSOffState];
    638638        [item setTitle: [NSString localizedStringWithFormat: NSLocalizedString(@"Stop at Ratio (%.2f)",
    639639            "torrent action menu -> ratio stop"), [fMenuTorrent ratioLimit]]];
    640640       
    641641        item = [menu itemWithTag: ACTION_MENU_UNLIMITED_TAG];
    642         [item setState: mode == NSOffState ? NSOnState : NSOffState];
     642        [item setState: mode == TR_RATIOLIMIT_UNLIMITED ? NSOnState : NSOffState];
    643643       
    644644        item = [menu itemWithTag: ACTION_MENU_GLOBAL_TAG];
    645         [item setState: mode == NSMixedState ? NSOnState : NSOffState];
     645        [item setState: mode == TR_RATIOLIMIT_GLOBAL ? NSOnState : NSOffState];
    646646    }
    647647    else //assume the menu is part of the file list
     
    755755- (void) setQuickRatioMode: (id) sender
    756756{
    757     NSInteger mode;
     757    tr_ratiolimit mode;
    758758    switch ([sender tag])
    759759    {
    760760        case ACTION_MENU_UNLIMITED_TAG:
    761             mode = NSOffState;
     761            mode = TR_RATIOLIMIT_UNLIMITED;
    762762            break;
    763763        case ACTION_MENU_LIMIT_TAG:
    764             mode = NSOnState;
     764            mode = TR_RATIOLIMIT_SINGLE;
    765765            break;
    766766        case ACTION_MENU_GLOBAL_TAG:
    767             mode = NSMixedState;
     767            mode = TR_RATIOLIMIT_GLOBAL;
    768768            break;
    769769        default:
     
    778778- (void) setQuickRatio: (id) sender
    779779{
    780     [fMenuTorrent setRatioSetting: NSOnState];
     780    [fMenuTorrent setRatioSetting: TR_RATIOLIMIT_SINGLE];
    781781    [fMenuTorrent setRatioLimit: [[sender representedObject] floatValue]];
    782782   
Note: See TracChangeset for help on using the changeset viewer.