Changeset 4347


Ignore:
Timestamp:
Dec 27, 2007, 5:07:40 AM (15 years ago)
Author:
livings124
Message:

ipc update to ensure unlimited bandwidth is set correctly

Location:
trunk/macosx
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/English.lproj/Localizable.strings

    r4307 r4347  
    258258"Create a Torrent File" = "Create a Torrent File";
    259259
     260/* Create toolbar item -> tooltip */
     261"Create torrent file" = "Create torrent file";
     262
    260263/* Create torrent -> select file
    261264   Create toolbar item -> palette label */
    262265"Create Torrent File" = "Create Torrent File";
    263266
    264 /* Create toolbar item -> tooltip */
    265 "Create torrent file" = "Create torrent file";
    266 
    267267/* Create torrent -> failed -> title */
    268268"Creation of \"%@\" failed." = "Creation of \"%@\" failed.";
     
    302302"Downloading from %d of 1 peer" = "Downloading from %d of 1 peer";
    303303
     304/* inspector -> peer table -> header tool tip */
     305"Downloading From Peer" = "Downloading From Peer";
     306
    304307/* Inspector -> peer -> status */
    305308"Downloading from peer" = "Downloading from peer";
    306 
    307 /* inspector -> peer table -> header tool tip */
    308 "Downloading From Peer" = "Downloading From Peer";
    309309
    310310/* inspector -> peer table -> header tool tip
     
    441441"Open" = "Open";
    442442
     443/* Open toolbar item -> tooltip */
     444"Open torrent files" = "Open torrent files";
     445
    443446/* Open toolbar item -> palette label */
    444447"Open Torrent Files" = "Open Torrent Files";
    445 
    446 /* Open toolbar item -> tooltip */
    447 "Open torrent files" = "Open torrent files";
    448448
    449449/* Inspector -> title */
     
    519519   Confirm Quit panel -> button */
    520520"Quit" = "Quit";
     521
     522/* Dock Badger -> quit message */
     523"Quitting" = "Quitting";
    521524
    522525/* Torrent -> status string
     
    763766"untitled" = "untitled";
    764767
     768/* inspector -> peer table -> header tool tip */
     769"Uploading To Peer" = "Uploading To Peer";
     770
    765771/* Inspector -> peer -> status */
    766772"Uploading to peer" = "Uploading to peer";
    767773
    768 /* inspector -> peer table -> header tool tip */
    769 "Uploading To Peer" = "Uploading To Peer";
    770 
    771774/* Torrent -> status string */
    772775"Waiting to check existing data" = "Waiting to check existing data";
  • trunk/macosx/IPCController.m

    r4305 r4347  
    409409    buf = ipc_mkempty( _ipc, &size, msgid, tag );
    410410    if( NULL == buf )
    411         return FALSE;
     411        return NO;
    412412
    413413    return [self sendresp: buf
     
    424424    buf = ipc_mkint( _ipc, &size, msgid, tag, val );
    425425    if( NULL == buf )
    426         return FALSE;
     426        return NO;
    427427
    428428    return [self sendresp: buf
     
    452452    }
    453453    if( NULL == buf )
    454         return FALSE;
     454        return NO;
    455455
    456456    return [self sendresp: buf
     
    808808    fDefaults = [NSUserDefaults standardUserDefaults];
    809809   
     810    int theValue;
     811   
    810812    switch( msgid )
    811813    {
    812814        case IPC_MSG_GETDOWNLIMIT:
    813             [client sendrespInt:IPC_MSG_DOWNLIMIT tag:tag val:[fDefaults integerForKey:@"DownloadLimit"]];
     815            if ( [fDefaults boolForKey:@"CheckDownload"] )
     816                theValue = [fDefaults integerForKey:@"DownloadLimit"];
     817            else
     818                theValue = -1;
     819            [client sendrespInt:IPC_MSG_DOWNLIMIT tag:tag val:theValue];
    814820            break;
    815821        case IPC_MSG_GETPORT:
     
    817823            break;
    818824        case IPC_MSG_GETUPLIMIT:
    819             [client sendrespInt:IPC_MSG_UPLIMIT tag:tag val:[fDefaults integerForKey:@"UploadLimit"]];
     825            if ( [fDefaults boolForKey:@"CheckUpload"] )
     826                theValue = [fDefaults integerForKey:@"UploadLimit"];
     827            else
     828                theValue = -1;
     829            [client sendrespInt:IPC_MSG_UPLIMIT tag:tag val:theValue];
    820830            break;
    821831        default:
     
    905915    {
    906916        case IPC_MSG_DOWNLIMIT:
    907             [fDefaults setInteger:val->val.i forKey:@"DownloadLimit"];
     917            if ( val->val.i < 0 )
     918                [fDefaults setBool:NO forKey:@"CheckDownload"];
     919            else
     920            {
     921                [fDefaults setBool:YES forKey:@"CheckDownload"];
     922                [fDefaults setInteger:val->val.i forKey:@"DownloadLimit"];
     923            }
    908924            [fPrefsController updateLimitFields];
    909925            [fPrefsController applySpeedSettings: nil];
     
    914930            break;
    915931        case IPC_MSG_UPLIMIT:
    916             [fDefaults setInteger:val->val.i forKey:@"UploadLimit"];
     932            if ( val->val.i < 0 )
     933                [fDefaults setBool:NO forKey:@"CheckUpload"];
     934            else
     935            {
     936                [fDefaults setBool:YES forKey:@"CheckUpload"];
     937                [fDefaults setInteger:val->val.i forKey:@"UploadLimit"];
     938            }
    917939            [fPrefsController updateLimitFields];
    918940            [fPrefsController applySpeedSettings: nil];
     
    949971            if(!strcasecmp(val->val.s.s, "required"))
    950972            {
    951                 [fDefaults setBool:TRUE  forKey: @"EncryptionPrefer"];
    952                 [fDefaults setBool:TRUE  forKey: @"EncryptionRequire"];
     973                [fDefaults setBool:YES  forKey: @"EncryptionPrefer"];
     974                [fDefaults setBool:YES  forKey: @"EncryptionRequire"];
    953975            }
    954976           
    955977            else if(!strcasecmp(val->val.s.s, "preferred"))
    956978            {
    957                 [fDefaults setBool:TRUE  forKey: @"EncryptionPrefer"];
    958                 [fDefaults setBool:FALSE  forKey: @"EncryptionRequire"];
     979                [fDefaults setBool:YES  forKey: @"EncryptionPrefer"];
     980                [fDefaults setBool:NO  forKey: @"EncryptionRequire"];
    959981            }
    960982           
    961983            else if(!strcasecmp(val->val.s.s, "plaintext"))
    962984            {
    963                 [fDefaults setBool:FALSE  forKey: @"EncryptionPrefer"];
    964                 [fDefaults setBool:FALSE  forKey: @"EncryptionRequire"];
     985                [fDefaults setBool:NO  forKey: @"EncryptionPrefer"];
     986                [fDefaults setBool:NO  forKey: @"EncryptionRequire"];
    965987            }
    966988           
Note: See TracChangeset for help on using the changeset viewer.