Changeset 1577


Ignore:
Timestamp:
Mar 22, 2007, 7:16:08 PM (15 years ago)
Author:
livings124
Message:

update progress bar when seeding immediately when the stop ratio setting is changed

Location:
trunk/macosx
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/Controller.h

    r1368 r1577  
    153153- (void) updateControlTint: (NSNotification *) notification;
    154154
    155 - (void) updateUI: (NSTimer *) timer;
     155- (void) updateUI;
    156156
    157157- (void) updateTorrentsInQueue;
  • trunk/macosx/Controller.m

    r1576 r1577  
    325325    NSNotificationCenter * nc = [NSNotificationCenter defaultCenter];
    326326   
     327    [nc addObserver: self selector: @selector(updateUI)
     328                    name: @"UpdateUI" object: nil];
     329   
    327330    [nc addObserver: fInfoController selector: @selector(updateInfoSettings)
    328331                    name: @"UpdateInfoSettings" object: nil];
     
    363366    //timer to update the interface every second
    364367    fCompleted = 0;
    365     [self updateUI: nil];
     368    [self updateUI];
    366369    fTimer = [NSTimer scheduledTimerWithTimeInterval: UPDATE_UI_SECONDS target: self
    367         selector: @selector(updateUI:) userInfo: nil repeats: YES];
     370        selector: @selector(updateUI) userInfo: nil repeats: YES];
    368371    [[NSRunLoop currentRunLoop] addTimer: fTimer forMode: NSModalPanelRunLoopMode];
    369372    [[NSRunLoop currentRunLoop] addTimer: fTimer forMode: NSEventTrackingRunLoopMode];
     
    900903        [torrent startTransfer];
    901904   
    902     [self updateUI: nil];
     905    [self updateUI];
    903906    [self applyFilter: nil];
    904907    [self updateTorrentHistory];
     
    925928    [torrents makeObjectsPerformSelector: @selector(stopTransfer)];
    926929   
    927     [self updateUI: nil];
     930    [self updateUI];
    928931    [self applyFilter: nil];
    929932    [self updateTorrentHistory];
     
    10521055    [fTableView deselectAll: nil];
    10531056   
    1054     [self updateUI: nil];
     1057    [self updateUI];
    10551058    [self applyFilter: nil];
    10561059   
     
    11921195}
    11931196
    1194 - (void) updateUI: (NSTimer *) timer
     1197- (void) updateUI
    11951198{
    11961199    [fTorrents makeObjectsPerformSelector: @selector(update)];
     
    12901293    }
    12911294   
    1292     [self updateUI: nil];
     1295    [self updateUI];
    12931296    [self applyFilter: nil];
    12941297    [self updateTorrentHistory];
     
    20682071    }
    20692072
    2070     [self updateUI: nil];
     2073    [self updateUI];
    20712074   
    20722075    //set views to not autoresize
  • trunk/macosx/English.lproj/PrefsWindow.nib/classes.nib

    r1327 r1577  
    66        {
    77            ACTIONS = {
     8                applyRatioSetting = id;
    89                applySpeedSettings = id;
    910                folderSheetShow = id;
  • trunk/macosx/English.lproj/PrefsWindow.nib/info.nib

    r1344 r1577  
    1010                <string>294 445 563 268 0 0 1152 842 </string>
    1111                <key>28</key>
    12                 <string>156 256 571 290 0 0 1152 842 </string>
     12                <string>294 433 563 290 0 0 1152 842 </string>
    1313                <key>41</key>
    14                 <string>170 417 563 305 0 0 1152 842 </string>
     14                <string>189 445 563 305 0 0 1152 842 </string>
    1515                <key>66</key>
    1616                <string>294 507 563 144 0 0 1152 842 </string>
     
    2424        <key>IBOpenObjects</key>
    2525        <array>
    26                 <integer>41</integer>
     26                <integer>28</integer>
    2727        </array>
    2828        <key>IBSystem Version</key>
    29         <string>8L127</string>
     29        <string>8P135</string>
    3030</dict>
    3131</plist>
  • trunk/macosx/InfoWindowController.m

    r1574 r1577  
    873873   
    874874    [fRatioLimitField setHidden: setting != NSOnState];
     875   
     876    [[NSNotificationCenter defaultCenter] postNotificationName: @"UpdateUI" object: nil];
    875877}
    876878
     
    899901            [torrent setRatioLimit: ratioLimit];
    900902    }
     903   
     904    [[NSNotificationCenter defaultCenter] postNotificationName: @"UpdateUI" object: nil];
    901905}
    902906
  • trunk/macosx/PrefsController.h

    r1561 r1577  
    7878- (void) updateNatStatus;
    7979
     80- (void) applyRatioSetting: (id) sender;
    8081- (void) updateRatioStopField;
    8182- (void) setRatioStop: (id) sender;
  • trunk/macosx/PrefsController.m

    r1561 r1577  
    341341}
    342342
     343- (void) applyRatioSetting: (id) sender
     344{
     345    [[NSNotificationCenter defaultCenter] postNotificationName: @"UpdateUI" object: nil];
     346}
     347
    343348- (void) updateRatioStopField
    344349{
     
    347352   
    348353    [fRatioStopField setFloatValue: [fDefaults floatForKey: @"RatioLimit"]];
     354   
     355    [self applyRatioSetting: nil];
    349356}
    350357
     
    360367   
    361368    [fDefaults setFloat: ratio forKey: @"RatioLimit"];
     369   
     370    [self applyRatioSetting: nil];
    362371}
    363372
  • trunk/macosx/TorrentCell.m

    r1575 r1577  
    100100    float completedWidth, remainingWidth;
    101101   
    102     //bar images
     102    //bar images and widths
    103103    NSImage * barLeftEnd, * barRightEnd, * barComplete, * barRemaining;
    104104    if (seeding)
     
    140140    }
    141141   
     142    //place bar
    142143    [barLeftEnd compositeToPoint: point operation: NSCompositeSourceOver];
    143144   
    144     //active bar
    145145    point.x += 1.0;
    146146    [self placeBar: barComplete width: completedWidth point: point];
    147147   
    148     //remaining bar
    149148    point.x += completedWidth;
    150149    [self placeBar: barRemaining width: remainingWidth point: point];
Note: See TracChangeset for help on using the changeset viewer.