Changeset 10948


Ignore:
Timestamp:
Jul 6, 2010, 3:31:17 AM (12 years ago)
Author:
livings124
Message:

Mac build compiles again

Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/NEWS

    r10899 r10948  
    66  * Better parsing of nonstandard magnet links
    77==== Mac ====
    8   * If the seed ratio is already met when download completes, still show the Growl notification and download-complete sound
     8  * If the seed ratio is already met when download completes, still perform the Growl notification and download-complete sound
    99  * Fix the Help buttons in the preferences window
    1010==== GTK+ ====
  • trunk/libtransmission/transmission.h

    r10937 r10948  
    658658***/
    659659
    660 void tr_sessionSetSpeedLimit_KBps( tr_session *, tr_direction, int Bps );
     660void tr_sessionSetSpeedLimit_KBps( tr_session *, tr_direction, int KBps );
    661661int tr_sessionGetSpeedLimit_KBps( const tr_session *, tr_direction );
    662662
  • trunk/macosx/Badger.m

    r9844 r10948  
    5757{
    5858    const float downloadRate = [[NSUserDefaults standardUserDefaults] boolForKey: @"BadgeDownloadRate"]
    59                                 ? tr_sessionGetPieceSpeed(fLib, TR_DOWN) : 0.0;
     59                                ? tr_sessionGetPieceSpeed_KBps(fLib, TR_DOWN) : 0.0;
    6060    const float uploadRate = [[NSUserDefaults standardUserDefaults] boolForKey: @"BadgeUploadRate"]
    61                                 ? tr_sessionGetPieceSpeed(fLib, TR_UP) : 0.0;
     61                                ? tr_sessionGetPieceSpeed_KBps(fLib, TR_UP) : 0.0;
    6262   
    6363    //only update if the badged values change
  • trunk/macosx/Controller.m

    r10861 r10948  
    274274            tr_bencDictAddBool(&settings, TR_PREFS_KEY_ALT_SPEED_ENABLED, [fDefaults boolForKey: @"SpeedLimit"]);
    275275       
    276         tr_bencDictAddInt(&settings, TR_PREFS_KEY_ALT_SPEED_UP, [fDefaults integerForKey: @"SpeedLimitUploadLimit"]);
    277         tr_bencDictAddInt(&settings, TR_PREFS_KEY_ALT_SPEED_DOWN, [fDefaults integerForKey: @"SpeedLimitDownloadLimit"]);
     276        tr_bencDictAddInt(&settings, TR_PREFS_KEY_ALT_SPEED_UP_KBps, [fDefaults integerForKey: @"SpeedLimitUploadLimit"]);
     277        tr_bencDictAddInt(&settings, TR_PREFS_KEY_ALT_SPEED_DOWN_KBps, [fDefaults integerForKey: @"SpeedLimitDownloadLimit"]);
    278278       
    279279        tr_bencDictAddBool(&settings, TR_PREFS_KEY_ALT_SPEED_TIME_ENABLED, [fDefaults boolForKey: @"SpeedLimitAuto"]);
     
    286286        tr_bencDictAddBool(&settings, TR_PREFS_KEY_START, [fDefaults boolForKey: @"AutoStartDownload"]);
    287287       
    288         tr_bencDictAddInt(&settings, TR_PREFS_KEY_DSPEED, [fDefaults integerForKey: @"DownloadLimit"]);
     288        tr_bencDictAddInt(&settings, TR_PREFS_KEY_DSPEED_KBps, [fDefaults integerForKey: @"DownloadLimit"]);
    289289        tr_bencDictAddBool(&settings, TR_PREFS_KEY_DSPEED_ENABLED, [fDefaults boolForKey: @"CheckDownload"]);
    290         tr_bencDictAddInt(&settings, TR_PREFS_KEY_USPEED, [fDefaults integerForKey: @"UploadLimit"]);
     290        tr_bencDictAddInt(&settings, TR_PREFS_KEY_USPEED_KBps, [fDefaults integerForKey: @"UploadLimit"]);
    291291        tr_bencDictAddBool(&settings, TR_PREFS_KEY_USPEED_ENABLED, [fDefaults boolForKey: @"CheckUpload"]);
    292292       
     
    336336        fLib = tr_sessionInit("macosx", configDir, YES, &settings);
    337337        tr_bencFree(&settings);
     338       
     339        #warning localize and make consistent
     340        tr_formatter_size_init(1024, "bytes", "KB", "MB", "GB");
     341        tr_formatter_speed_init(1024, "B/s", "KB/s", "MB/s", "GB/s");
     342        tr_formatter_mem_init(1024, "bytes", "KB", "MB", "GB");
    338343       
    339344        [NSApp setDelegate: self];
     
    16991704            {
    17001705                //set rates
    1701                 [fTotalDLField setStringValue: [NSString stringForSpeed: tr_sessionGetPieceSpeed(fLib, TR_DOWN)]];
    1702                 [fTotalULField setStringValue: [NSString stringForSpeed: tr_sessionGetPieceSpeed(fLib, TR_UP)]];
     1706                [fTotalDLField setStringValue: [NSString stringForSpeed: tr_sessionGetPieceSpeed_KBps(fLib, TR_DOWN)]];
     1707                [fTotalULField setStringValue: [NSString stringForSpeed: tr_sessionGetPieceSpeed_KBps(fLib, TR_UP)]];
    17031708               
    17041709                //set status button text
  • trunk/macosx/PrefsController.m

    r10809 r10948  
    572572{
    573573    tr_sessionLimitSpeed(fHandle, TR_UP, [fDefaults boolForKey: @"CheckUpload"]);
    574     tr_sessionSetSpeedLimit(fHandle, TR_UP, [fDefaults integerForKey: @"UploadLimit"]);
     574    tr_sessionSetSpeedLimit_KBps(fHandle, TR_UP, [fDefaults integerForKey: @"UploadLimit"]);
    575575   
    576576    tr_sessionLimitSpeed(fHandle, TR_DOWN, [fDefaults boolForKey: @"CheckDownload"]);
    577     tr_sessionSetSpeedLimit(fHandle, TR_DOWN, [fDefaults integerForKey: @"DownloadLimit"]);
     577    tr_sessionSetSpeedLimit_KBps(fHandle, TR_DOWN, [fDefaults integerForKey: @"DownloadLimit"]);
    578578   
    579579    [[NSNotificationCenter defaultCenter] postNotificationName: @"SpeedLimitUpdate" object: nil];
     
    582582- (void) applyAltSpeedSettings
    583583{
    584     tr_sessionSetAltSpeed(fHandle, TR_UP, [fDefaults integerForKey: @"SpeedLimitUploadLimit"]);
    585     tr_sessionSetAltSpeed(fHandle, TR_DOWN, [fDefaults integerForKey: @"SpeedLimitDownloadLimit"]);
     584    tr_sessionSetAltSpeed_KBps(fHandle, TR_UP, [fDefaults integerForKey: @"SpeedLimitUploadLimit"]);
     585    tr_sessionSetAltSpeed_KBps(fHandle, TR_DOWN, [fDefaults integerForKey: @"SpeedLimitDownloadLimit"]);
    586586       
    587587    [[NSNotificationCenter defaultCenter] postNotificationName: @"SpeedLimitUpdate" object: nil];
     
    11811181    [fDefaults setBool: downLimitEnabled forKey: @"CheckDownload"];
    11821182   
    1183     const int downLimit = tr_sessionGetSpeedLimit(fHandle, TR_DOWN);
     1183    const int downLimit = tr_sessionGetSpeedLimit_KBps(fHandle, TR_DOWN);
    11841184    [fDefaults setInteger: downLimit forKey: @"DownloadLimit"];
    11851185   
     
    11881188    [fDefaults setBool: upLimitEnabled forKey: @"CheckUpload"];
    11891189   
    1190     const int upLimit = tr_sessionGetSpeedLimit(fHandle, TR_UP);
     1190    const int upLimit = tr_sessionGetSpeedLimit_KBps(fHandle, TR_UP);
    11911191    [fDefaults setInteger: upLimit forKey: @"UploadLimit"];
    11921192   
     
    11961196   
    11971197    //alt speed limit - down
    1198     const int downLimitAlt = tr_sessionGetAltSpeed(fHandle, TR_DOWN);
     1198    const int downLimitAlt = tr_sessionGetAltSpeed_KBps(fHandle, TR_DOWN);
    11991199    [fDefaults setInteger: downLimitAlt forKey: @"SpeedLimitDownloadLimit"];
    12001200   
    12011201    //alt speed limit - up
    1202     const int upLimitAlt = tr_sessionGetAltSpeed(fHandle, TR_UP);
     1202    const int upLimitAlt = tr_sessionGetAltSpeed_KBps(fHandle, TR_UP);
    12031203    [fDefaults setInteger: upLimitAlt forKey: @"SpeedLimitUploadLimit"];
    12041204   
  • trunk/macosx/Torrent.m

    r10861 r10948  
    400400- (NSInteger) speedLimit: (BOOL) upload
    401401{
    402     return tr_torrentGetSpeedLimit(fHandle, upload ? TR_UP : TR_DOWN);
     402    return tr_torrentGetSpeedLimit_KBps(fHandle, upload ? TR_UP : TR_DOWN);
    403403}
    404404
    405405- (void) setSpeedLimit: (NSInteger) limit upload: (BOOL) upload
    406406{
    407     tr_torrentSetSpeedLimit(fHandle, upload ? TR_UP : TR_DOWN, limit);
     407    tr_torrentSetSpeedLimit_KBps(fHandle, upload ? TR_UP : TR_DOWN, limit);
    408408}
    409409
     
    884884       
    885885        if (peer->isUploadingTo)
    886             [dict setObject: [NSNumber numberWithFloat: peer->rateToPeer] forKey: @"UL To Rate"];
     886            [dict setObject: [NSNumber numberWithFloat: peer->rateToPeer_KBps] forKey: @"UL To Rate"];
    887887        if (peer->isDownloadingFrom)
    888             [dict setObject: [NSNumber numberWithFloat: peer->rateToClient] forKey: @"DL From Rate"];
     888            [dict setObject: [NSNumber numberWithFloat: peer->rateToClient_KBps] forKey: @"DL From Rate"];
    889889       
    890890        [peerDicts addObject: dict];
     
    905905    NSMutableArray * webSeeds = [NSMutableArray arrayWithCapacity: fInfo->webseedCount];
    906906   
    907     float * dlSpeeds = tr_torrentWebSpeeds(fHandle);
     907    double * dlSpeeds = tr_torrentWebSpeeds_KBps(fHandle);
    908908   
    909909    for (NSInteger i = 0; i < fInfo->webseedCount; i++)
     
    12311231- (CGFloat) downloadRate
    12321232{
    1233     return fStat->pieceDownloadSpeed;
     1233    return fStat->pieceDownloadSpeed_KBps;
    12341234}
    12351235
    12361236- (CGFloat) uploadRate
    12371237{
    1238     return fStat->pieceUploadSpeed;
     1238    return fStat->pieceUploadSpeed_KBps;
    12391239}
    12401240
Note: See TracChangeset for help on using the changeset viewer.