Changeset 3010

Show
Ignore:
Timestamp:
06/29/05 02:19:00 (4 years ago)
Author:
morris
Message:

Remove references to removed subsystems

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • WiredServer/trunk/WCConfigController.h

    r2987 r3010  
    4242        IBOutlet NSButton                               *_selectBannerButton; 
    4343        IBOutlet NSButton                               *_clearBannerButton; 
    44         IBOutlet NSButton                               *_terminateServerOnQuitButton; 
    4544        IBOutlet NSButton                               *_useRendezvousButton; 
    4645 
  • WiredServer/trunk/WCConfigController.m

    r2997 r3010  
    392392         
    393393        // --- config 
    394         if(_terminateServerOnQuitButton) 
    395                 [_terminateServerOnQuitButton setState:[WCSettings boolForKey:WCTerminateServerOnQuit]]; 
    396  
    397         if(_limitNewsButton) 
    398                 [_limitNewsButton setState:[WCSettings boolForKey:WCLimitNews]]; 
    399          
    400         if(_logMethodMatrix) 
    401                 [_logMethodMatrix selectCellWithTag:[WCSettings intForKey:WCLogMethod]]; 
    402         if(_syslogPopUpButton) 
    403                 [_syslogPopUpButton selectItemWithTitle:[WCSettings objectForKey:WCSyslogFacility]]; 
    404         if(_logFileTextField) 
    405                 [_logFileTextField setStringValue:[WCSettings objectForKey:WCLogFile]]; 
    406         if(_limitLogFileButton) 
    407                 [_limitLogFileButton setState:[WCSettings boolForKey:WCLimitLogFile]]; 
    408          
    409         if(_limitLogFileTextField && [WCSettings intForKey:WCLimitLogFileLines] > 0) 
     394        [_limitNewsButton setState:[WCSettings boolForKey:WCLimitNews]]; 
     395         
     396        [_logMethodMatrix selectCellWithTag:[WCSettings intForKey:WCLogMethod]]; 
     397        [_syslogPopUpButton selectItemWithTitle:[WCSettings objectForKey:WCSyslogFacility]]; 
     398        [_logFileTextField setStringValue:[WCSettings objectForKey:WCLogFile]]; 
     399        [_limitLogFileButton setState:[WCSettings boolForKey:WCLimitLogFile]]; 
     400         
     401        if([WCSettings intForKey:WCLimitLogFileLines] > 0) 
    410402                [_limitLogFileTextField setIntValue:[WCSettings intForKey:WCLimitLogFileLines]]; 
    411403 
    412404        // --- settings 
    413         if(_nameTextField) 
    414                 [_nameTextField setStringValue:[_config stringForKey:@"name"]]; 
    415         if(_controlPortTextField) 
    416                 [_controlPortTextField setStringValue:[_config stringForKey:@"port"]]; 
    417          
    418         if(_transferPortTextField && [_controlPortTextField intValue] > 0) 
     405        [_nameTextField setStringValue:[_config stringForKey:@"name"]]; 
     406        [_controlPortTextField setStringValue:[_config stringForKey:@"port"]]; 
     407         
     408        if([_controlPortTextField intValue] > 0) 
    419409                [_transferPortTextField setIntValue:[_controlPortTextField intValue] + 1]; 
    420410 
    421         if(_descriptionTextField) 
    422                 [_descriptionTextField setStringValue:[_config stringForKey:@"description"]]; 
    423         if(_bannerImageView) 
    424                 [_bannerImageView setImage:[_config imageForKey:@"banner"]]; 
    425         if(_useRendezvousButton) 
    426                 [_useRendezvousButton setState:[_config boolForKey:@"zeroconf"]]; 
    427         if(_launchAtBootButton) { 
    428                 [_launchAtBootButton setState:[[NSFileManager defaultManager] fileExistsAtPath: 
    429                         WCExpandWiredPath(@"etc/wired.startup")]]; 
    430         } 
    431          
    432         if(_totalDownloadsTextField) 
    433                 [_totalDownloadsTextField setStringValue:[_config stringForKey:@"total downloads"]]; 
    434         if(_clientDownloadsTextField) 
    435                 [_clientDownloadsTextField setStringValue:[_config stringForKey:@"client downloads"]]; 
    436          
    437         if(_downloadSpeedTextField && [_config intForKey:@"total download speed"] > 0) { 
    438                 [_downloadSpeedTextField setIntValue: 
    439                         [_config doubleForKey:@"total download speed"] / 1024]; 
    440         } 
    441          
    442         if(_totalUploadsTextField) 
    443                 [_totalUploadsTextField setStringValue:[_config stringForKey:@"total uploads"]]; 
    444         if(_clientUploadsTextField) 
    445                 [_clientUploadsTextField setStringValue:[_config stringForKey:@"client uploads"]]; 
    446          
    447         if(_uploadSpeedTextField && [_config intForKey:@"total upload speed"] > 0) { 
    448                 [_uploadSpeedTextField setIntValue: 
    449                         [_config doubleForKey:@"total upload speed"] / 1024]; 
    450         } 
    451          
    452         if(_filesTextField) 
    453                 [_filesTextField setStringValue:[_config pathForKey:@"files"]]; 
     411        [_descriptionTextField setStringValue:[_config stringForKey:@"description"]]; 
     412        [_bannerImageView setImage:[_config imageForKey:@"banner"]]; 
     413        [_useRendezvousButton setState:[_config boolForKey:@"zeroconf"]]; 
     414        [_launchAtBootButton setState:[[NSFileManager defaultManager] fileExistsAtPath: 
     415                WCExpandWiredPath(@"etc/wired.startup")]]; 
     416         
     417        [_totalDownloadsTextField setStringValue:[_config stringForKey:@"total downloads"]]; 
     418        [_clientDownloadsTextField setStringValue:[_config stringForKey:@"client downloads"]]; 
     419         
     420        if([_config intForKey:@"total download speed"] > 0) 
     421                [_downloadSpeedTextField setIntValue:[_config doubleForKey:@"total download speed"] / 1024]; 
     422         
     423        [_totalUploadsTextField setStringValue:[_config stringForKey:@"total uploads"]]; 
     424        [_clientUploadsTextField setStringValue:[_config stringForKey:@"client uploads"]]; 
     425         
     426        if([_config intForKey:@"total upload speed"] > 0) 
     427                [_uploadSpeedTextField setIntValue:[_config doubleForKey:@"total upload speed"] / 1024]; 
     428         
     429        [_filesTextField setStringValue:[_config pathForKey:@"files"]]; 
    454430         
    455431        // --- advanced 
    456         if(_urlTextField) 
    457                 [_urlTextField setStringValue:[_config stringForKey:@"url"]]; 
    458         if(_bandwidthPopUpButton) 
    459                 [_bandwidthPopUpButton selectItemWithTag:[_config intForKey:@"bandwidth"]]; 
     432        [_urlTextField setStringValue:[_config stringForKey:@"url"]]; 
     433        [_bandwidthPopUpButton selectItemWithTag:[_config intForKey:@"bandwidth"]]; 
    460434         
    461435        [_trackersTableView reloadData]; 
    462436 
    463         if(_searchMethodMatrix) { 
    464                 if([[_config stringForKey:@"search method"] isEqualToString:@"live"]) 
    465                         [_searchMethodMatrix selectCellWithTag:0]; 
     437        if([[_config stringForKey:@"search method"] isEqualToString:@"live"]) 
     438                [_searchMethodMatrix selectCellWithTag:0]; 
     439        else 
     440                [_searchMethodMatrix selectCellWithTag:1]; 
     441         
     442        if([[_config stringForKey:@"index"] length] == 0) { 
     443                [_indexPopUpButton selectItemAtIndex:0]; 
     444        } else { 
     445                if([_config intForKey:@"index time"] == 3600) 
     446                        [_indexPopUpButton selectItemAtIndex:2]; 
     447                else if([_config intForKey:@"index time"] == 86400) 
     448                        [_indexPopUpButton selectItemAtIndex:3]; 
    466449                else 
    467                         [_searchMethodMatrix selectCellWithTag:1]; 
    468         } 
    469          
    470         if(_indexPopUpButton) { 
    471                 if([[_config stringForKey:@"index"] length] == 0) { 
    472                         [_indexPopUpButton selectItemAtIndex:0]; 
    473                 } else { 
    474                         if([_config intForKey:@"index time"] == 3600) 
    475                                 [_indexPopUpButton selectItemAtIndex:2]; 
    476                         else if([_config intForKey:@"index time"] == 86400) 
    477                                 [_indexPopUpButton selectItemAtIndex:3]; 
    478                         else 
    479                                 [_indexPopUpButton selectItemAtIndex:1]; 
    480                 } 
    481         } 
    482          
    483         if(_showInvisibleButton) 
    484                 [_showInvisibleButton setState:[_config boolForKey:@"show invisible files"]]; 
    485         if(_showDotFilesButton) 
    486                 [_showDotFilesButton setState:[_config boolForKey:@"show dot files"]]; 
    487          
    488         if(_allowUnencryptedButton) { 
    489                 [_allowUnencryptedButton setState: 
    490                         ([[_config stringForKey:@"transfer cipher"] rangeOfString:@"NULL"].location != NSNotFound)]; 
    491         } 
    492          
    493         if(_showDotFilesButton) 
    494                 [_showDotFilesButton setStringValue:[_config stringForKey:@"news limit"]]; 
     450                        [_indexPopUpButton selectItemAtIndex:1]; 
     451        } 
     452         
     453        [_showInvisibleButton setState:[_config boolForKey:@"show invisible files"]]; 
     454        [_showDotFilesButton setState:[_config boolForKey:@"show dot files"]]; 
     455         
     456        [_allowUnencryptedButton setState: 
     457                ([[_config stringForKey:@"transfer cipher"] rangeOfString:@"NULL"].location != NSNotFound)]; 
     458         
     459        [_showDotFilesButton setStringValue:[_config stringForKey:@"news limit"]]; 
    495460         
    496461        // --- system 
    497         if(_userPopUpButton) 
    498                 [_userPopUpButton selectItemWithTitle:[_config stringForKey:@"user"]]; 
    499         if(_groupPopUpButton) 
    500                 [_groupPopUpButton selectItemWithTitle:[_config stringForKey:@"group"]]; 
     462        [_userPopUpButton selectItemWithTitle:[_config stringForKey:@"user"]]; 
     463        [_groupPopUpButton selectItemWithTitle:[_config stringForKey:@"group"]]; 
    501464} 
    502465 
     
    509472 
    510473        // --- config 
    511         if(_terminateServerOnQuitButton) 
    512                 [WCSettings setBool:([_terminateServerOnQuitButton state] == NSOnState) forKey:WCTerminateServerOnQuit]; 
    513  
    514         if(_limitNewsButton) 
    515                 [WCSettings setBool:([_limitNewsButton state] == NSOnState) forKey:WCLimitNews]; 
    516          
    517         if(_logMethodMatrix) 
    518                 [WCSettings setInt:[[_logMethodMatrix selectedCell] tag] forKey:WCLogMethod]; 
    519         if(_syslogPopUpButton) 
    520                 [WCSettings setObject:[_syslogPopUpButton titleOfSelectedItem] forKey:WCSyslogFacility]; 
    521         if(_logFileTextField) 
    522                 [WCSettings setObject:[_logFileTextField stringValue] forKey:WCLogFile]; 
    523         if(_limitLogFileButton) 
    524                 [WCSettings setBool:([_limitLogFileButton state] == NSOnState) forKey:WCLimitLogFile]; 
    525         if(_limitLogFileTextField) 
    526                 [WCSettings setInt:[_limitLogFileTextField intValue] forKey:WCLimitLogFileLines]; 
     474        [WCSettings setBool:([_limitNewsButton state] == NSOnState) forKey:WCLimitNews]; 
     475         
     476        [WCSettings setInt:[[_logMethodMatrix selectedCell] tag] forKey:WCLogMethod]; 
     477        [WCSettings setObject:[_syslogPopUpButton titleOfSelectedItem] forKey:WCSyslogFacility]; 
     478        [WCSettings setObject:[_logFileTextField stringValue] forKey:WCLogFile]; 
     479        [WCSettings setBool:([_limitLogFileButton state] == NSOnState) forKey:WCLimitLogFile]; 
     480        [WCSettings setInt:[_limitLogFileTextField intValue] forKey:WCLimitLogFileLines]; 
    527481         
    528482        // --- settings 
    529         if(_nameTextField) 
    530                 [_config setString:[_nameTextField stringValue] forKey:@"name"]; 
    531         if(_controlPortTextField) 
    532                 [_config setString:[_controlPortTextField stringValue] forKey:@"port"]; 
    533         if(_descriptionTextField) 
    534                 [_config setString:[_descriptionTextField stringValue] forKey:@"description"]; 
    535         if(_useRendezvousButton) 
    536                 [_config setBool:([_useRendezvousButton state] == NSOnState) forKey:@"zeroconf"]; 
    537          
    538         if(_totalDownloadsTextField) 
    539                 [_config setString:[_totalDownloadsTextField stringValue] forKey:@"total downloads"]; 
    540         if(_clientDownloadsTextField) 
    541                 [_config setString:[_clientDownloadsTextField stringValue] forKey:@"client downloads"]; 
    542         if(_downloadSpeedTextField) 
    543                 [_config setInt:[_downloadSpeedTextField intValue] * 1024 forKey:@"total download speed"]; 
    544         if(_totalUploadsTextField) 
    545                 [_config setString:[_totalUploadsTextField stringValue] forKey:@"total uploads"]; 
    546         if(_clientUploadsTextField) 
    547                 [_config setString:[_clientUploadsTextField stringValue] forKey:@"client uploads"]; 
    548         if(_uploadSpeedTextField) 
    549                 [_config setInt:[_uploadSpeedTextField intValue] * 1024 forKey:@"total upload speed"]; 
    550          
    551         if(_filesTextField) 
    552                 [_config setString:[_filesTextField stringValue] forKey:@"files"]; 
     483        [_config setString:[_nameTextField stringValue] forKey:@"name"]; 
     484        [_config setString:[_controlPortTextField stringValue] forKey:@"port"]; 
     485        [_config setString:[_descriptionTextField stringValue] forKey:@"description"]; 
     486        [_config setBool:([_useRendezvousButton state] == NSOnState) forKey:@"zeroconf"]; 
     487         
     488        [_config setString:[_totalDownloadsTextField stringValue] forKey:@"total downloads"]; 
     489        [_config setString:[_clientDownloadsTextField stringValue] forKey:@"client downloads"]; 
     490        [_config setInt:[_downloadSpeedTextField intValue] * 1024 forKey:@"total download speed"]; 
     491        [_config setString:[_totalUploadsTextField stringValue] forKey:@"total uploads"]; 
     492        [_config setString:[_clientUploadsTextField stringValue] forKey:@"client uploads"]; 
     493        [_config setInt:[_uploadSpeedTextField intValue] * 1024 forKey:@"total upload speed"]; 
     494         
     495        [_config setString:[_filesTextField stringValue] forKey:@"files"]; 
    553496         
    554497        // --- advanced 
    555         if(_urlTextField) 
    556                 [_config setString:[_urlTextField stringValue] forKey:@"url"]; 
    557         if(_bandwidthPopUpButton) 
    558                 [_config setInt:[[_bandwidthPopUpButton selectedItem] tag] forKey:@"bandwidth"]; 
    559          
    560         if(_searchMethodMatrix) { 
    561                 if([[_searchMethodMatrix selectedCell] tag] == 0) 
    562                         [_config setString:@"live" forKey:@"search method"]; 
    563                 else 
    564                         [_config setString:@"index" forKey:@"search method"]; 
    565         } 
    566          
    567         if(_indexPopUpButton) { 
    568                 switch([_indexPopUpButton indexOfSelectedItem]) { 
    569                         case 0: 
    570                                 [_config setString:@"" forKey:@"index"]; 
    571                                 [_config setString:@"" forKey:@"index time"]; 
    572                                 break; 
    573                                  
    574                         case 1: 
    575                                 [_config setString:@"files.index" forKey:@"index"]; 
    576                                 [_config setString:@"" forKey:@"index time"]; 
    577                                 break; 
    578                                  
    579                         case 2: 
    580                                 [_config setString:@"files.index" forKey:@"index"]; 
    581                                 [_config setInt:3600 forKey:@"index time"]; 
    582                                 break; 
    583                                  
    584                         case 3: 
    585                                 [_config setString:@"files.index" forKey:@"index"]; 
    586                                 [_config setInt:86400 forKey:@"index time"]; 
    587                                 break; 
    588                 } 
    589         } 
    590          
    591         if(_showDotFilesButton) 
    592                 [_config setBool:([_showInvisibleButton state] == NSOnState) forKey:@"show invisible files"]; 
    593         if(_showDotFilesButton) 
    594                 [_config setBool:([_showDotFilesButton state] == NSOnState) forKey:@"show dot files"]; 
    595          
    596         if(_allowUnencryptedButton) { 
    597                 if([_allowUnencryptedButton state] == NSOnState) 
    598                         [_config setString:@"ALL:NULL:!MD5:@STRENGTH" forKey:@"transfer cipher"]; 
    599                 else 
    600                         [_config setString:@"ALL:!MD5:@STRENGTH" forKey:@"transfer cipher"]; 
    601         } 
    602          
    603         if(_limitNewsButton) { 
    604                 if([_limitNewsButton state] == NSOnState) 
    605                         [_config setString:[_limitNewsTextField stringValue] forKey:@"news limit"]; 
    606                 else 
    607                         [_config setString:@"" forKey:@"news limit"]; 
    608         } 
     498        [_config setString:[_urlTextField stringValue] forKey:@"url"]; 
     499        [_config setInt:[[_bandwidthPopUpButton selectedItem] tag] forKey:@"bandwidth"]; 
     500         
     501        if([[_searchMethodMatrix selectedCell] tag] == 0) 
     502                [_config setString:@"live" forKey:@"search method"]; 
     503        else 
     504                [_config setString:@"index" forKey:@"search method"]; 
     505         
     506        switch([_indexPopUpButton indexOfSelectedItem]) { 
     507                case 0: 
     508                        [_config setString:@"" forKey:@"index"]; 
     509                        [_config setString:@"" forKey:@"index time"]; 
     510                        break; 
     511                         
     512                case 1: 
     513                        [_config setString:@"files.index" forKey:@"index"]; 
     514                        [_config setString:@"" forKey:@"index time"]; 
     515                        break; 
     516                         
     517                case 2: 
     518                        [_config setString:@"files.index" forKey:@"index"]; 
     519                        [_config setInt:3600 forKey:@"index time"]; 
     520                        break; 
     521                         
     522                case 3: 
     523                        [_config setString:@"files.index" forKey:@"index"]; 
     524                        [_config setInt:86400 forKey:@"index time"]; 
     525                        break; 
     526        } 
     527         
     528        [_config setBool:([_showInvisibleButton state] == NSOnState) forKey:@"show invisible files"]; 
     529        [_config setBool:([_showDotFilesButton state] == NSOnState) forKey:@"show dot files"]; 
     530         
     531        if([_allowUnencryptedButton state] == NSOnState) 
     532                [_config setString:@"ALL:NULL:!MD5:@STRENGTH" forKey:@"transfer cipher"]; 
     533        else 
     534                [_config setString:@"ALL:!MD5:@STRENGTH" forKey:@"transfer cipher"]; 
     535         
     536        if([_limitNewsButton state] == NSOnState) 
     537                [_config setString:[_limitNewsTextField stringValue] forKey:@"news limit"]; 
     538        else 
     539                [_config setString:@"" forKey:@"news limit"]; 
    609540         
    610541        // --- system 
    611         if(_userPopUpButton) 
    612                 [_config setString:[_userPopUpButton titleOfSelectedItem] forKey:@"user"]; 
    613         if(_groupPopUpButton) 
    614                 [_config setString:[_groupPopUpButton titleOfSelectedItem] forKey:@"group"]; 
     542        [_config setString:[_userPopUpButton titleOfSelectedItem] forKey:@"user"]; 
     543        [_config setString:[_groupPopUpButton titleOfSelectedItem] forKey:@"group"]; 
    615544         
    616545        if([[[NSFileManager defaultManager] ownerAtPath:path] isEqualToString:NSUserName()]) { 
  • WiredServer/trunk/WCSettings.h

    r938 r3010  
    1 /* $Id: WCSettings.h,v 1.2 2005/01/14 16:09:22 morris Exp $ */ 
     1/* $Id$ */ 
    22 
    33/* 
     
    4949#define WCLimitNews                                     @"WCLimitNews" 
    5050 
    51 #define WCTerminateServerOnQuit         @"WCTerminateServerOnQuit" 
    52  
    5351#define WCUpdateInterval                        @"WCUpdateInterval" 
    5452 
  • WiredServer/trunk/WCSettings.m

    r2995 r3010  
    8383                        WCLimitNews, 
    8484                 
    85                 [NSNumber numberWithBool:NO], 
    86                         WCTerminateServerOnQuit, 
    87                  
    8885                [NSNumber numberWithDouble:1.0], 
    8986                        WCUpdateInterval, 
  • WiredServer/trunk/WCStatusController.m

    r2975 r3010  
    198198                 
    199199                if(string && [string length] > 0) { 
    200                         [_versionTextField setStringValue:string]; 
     200                        [_versionTextField setStringValue:[string stringByRemovingSurroundingWhitespace]]; 
    201201                        _available = YES; 
    202202