Changeset 3073


Ignore:
Timestamp:
Sep 15, 2007, 8:09:28 PM (15 years ago)
Author:
livings124
Message:

make setting code more dynamic

Location:
trunk/macosx
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/Controller.m

    r3063 r3073  
    21142114    [self updateTorrentsInQueue];
    21152115    [fInfoController updateInfoStats];
    2116     [fInfoController updateRatioForTorrent: torrent];
    21172116   
    21182117    if ([fDefaults boolForKey: @"PlaySeedingSound"])
  • trunk/macosx/InfoWindowController.h

    r3063 r3073  
    7272- (void) updateInfoStats;
    7373
    74 - (void) updateRatioForTorrent: (Torrent *) torrent;
    75 
    7674- (void) setNextTab;
    7775- (void) setPreviousTab;
  • trunk/macosx/InfoWindowController.m

    r3071 r3073  
    109109    //allow for update notifications
    110110    NSNotificationCenter * nc = [NSNotificationCenter defaultCenter];
    111     [nc addObserver: self selector: @selector(updateInfoStats)
    112             name: @"UpdateStats" object: nil];
    113    
    114     [nc addObserver: self selector: @selector(updateInfoSettings)
    115             name: @"UpdateSettings" object: nil];
     111    [nc addObserver: self selector: @selector(updateInfoStats) name: @"UpdateStats" object: nil];
    116112}
    117113
     
    309305   
    310306    //update stats and settings
    311     [self updateInfoSettings];
     307    [self updateInfoStats];
    312308   
    313309    [fPeerTable reloadData];
     
    332328    else if ([ident isEqualToString: TAB_FILES_IDENT])
    333329        [self updateInfoFiles];
     330    else if ([ident isEqualToString: TAB_OPTIONS_IDENT])
     331        [self updateInfoSettings];
    334332    else;
    335333}
     
    580578        }
    581579               
    582         #warning change even when already active
    583580                [fPexCheck setEnabled: pexEnabled];
    584581                [fPexCheck setState: pexState];
    585         [fPexCheck setToolTip: !pexEnabled ? NSLocalizedString(@"PEX can only be toggled on public torrents when paused.",
     582        [fPexCheck setToolTip: !pexEnabled ? NSLocalizedString(@"PEX can only be toggled on paused public torrents.",
    586583                                    "Inspector -> pex check") : @""];
    587584    }
    588585    else
    589586    {
     587        #warning move
     588       
    590589        [fUploadLimitPopUp setEnabled: NO];
    591590        [fUploadLimitPopUp selectItemAtIndex: -1];
     
    609608        [fPexCheck setToolTip: @""];
    610609    }
    611    
    612     [self updateInfoStats];
    613 }
    614 
    615 - (void) updateRatioForTorrent: (Torrent *) torrent
    616 {
    617     if ([fTorrents containsObject: torrent])
    618         [self updateInfoSettings];
    619610}
    620611
  • trunk/macosx/TorrentTableView.m

    r3045 r3073  
    395395    [fMenuTorrent setSpeedMode: mode upload: [sender menu] == fUploadMenu];
    396396   
    397     [[NSNotificationCenter defaultCenter] postNotificationName: @"UpdateSettings" object: nil];
     397    [[NSNotificationCenter defaultCenter] postNotificationName: @"UpdateStats" object: nil];
    398398}
    399399
     
    404404    [fMenuTorrent setSpeedLimit: [[sender title] intValue] upload: upload];
    405405   
    406     [[NSNotificationCenter defaultCenter] postNotificationName: @"UpdateSettings" object: nil];
     406    [[NSNotificationCenter defaultCenter] postNotificationName: @"UpdateStats" object: nil];
    407407}
    408408
     
    421421    [fMenuTorrent setRatioSetting: mode];
    422422   
    423     [[NSNotificationCenter defaultCenter] postNotificationName: @"UpdateSettings" object: nil];
     423    [[NSNotificationCenter defaultCenter] postNotificationName: @"UpdateStats" object: nil];
    424424}
    425425
     
    429429    [fMenuTorrent setRatioLimit: [[sender title] floatValue]];
    430430   
    431     [[NSNotificationCenter defaultCenter] postNotificationName: @"UpdateSettings" object: nil];
     431    [[NSNotificationCenter defaultCenter] postNotificationName: @"UpdateStats" object: nil];
    432432}
    433433
Note: See TracChangeset for help on using the changeset viewer.