Adium

Changeset 13963

Show
Ignore:
Timestamp:
11/02/2005 04:22:08 PM (3 years ago)
Author:
evands
Message:

Along with [13958], removed the Sametime contact list option, defaulting/forcing to 'Load and Save From/To Server'

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/Plugins/Gaim Service/ESGaimMeanwhileAccount.m

    r13868 r13963  
    4848        int contactListChoice = [[self preferenceForKey:KEY_MEANWHILE_CONTACTLIST group:GROUP_ACCOUNT_STATUS] intValue]; 
    4949 
    50         gaim_prefs_set_int(MW_PRPL_OPT_BLIST_ACTION, contactListChoice); 
     50        gaim_prefs_set_int(MW_PRPL_OPT_BLIST_ACTION, Meanwhile_CL_Load_And_Save); 
    5151} 
    5252 
  • trunk/Plugins/Gaim Service/ESGaimMeanwhileAccountViewController.h

    r9455 r13963  
    1818 
    1919@interface ESGaimMeanwhileAccountViewController : AIAccountViewController { 
    20         IBOutlet        NSPopUpButton   *popUp_contactList; 
    21         IBOutlet        NSTextField             *textField_contactListWarning; 
     20 
    2221} 
    2322 
  • trunk/Plugins/Gaim Service/ESGaimMeanwhileAccountViewController.m

    r12821 r13963  
    1616 
    1717#import "ESGaimMeanwhileAccountViewController.h" 
    18 #import "ESGaimMeanwhileAccount.h" 
    19 #import <Adium/AIAccount.h> 
    20 #import <AIUtilities/AIMenuAdditions.h> 
    21  
    22 #define SAVE_WARNING AILocalizedString(@"Warning: The 'load and save' option is still experimental. Please back up your contact list with an official client before enabling.",nil) 
    23  
    24 @interface ESGaimMeanwhileAccountViewController (PRIVATE) 
    25 - (NSMenu *)_contactListMenu; 
    26 - (NSMenuItem *)_contactListMenuItemWithTitle:(NSString *)title tag:(int)tag; 
    27 - (void)_updateContactListWarning; 
    28 @end 
    2918 
    3019@implementation ESGaimMeanwhileAccountViewController 
    31  
    32 #ifndef MEANWHILE_NOT_AVAILABLE 
    3320 
    3421- (NSString *)nibName{ 
     
    3623} 
    3724 
    38 //Configure our controls 
    39 - (void)configureForAccount:(AIAccount *)inAccount 
    40 { 
    41     [super configureForAccount:inAccount]; 
    42          
    43         //Build the contact list mode menu 
    44         [popUp_contactList setMenu:[self _contactListMenu]]; 
    45          
    46         //Select the correct list mode 
    47         int contactListChoice = [[inAccount preferenceForKey:KEY_MEANWHILE_CONTACTLIST group:GROUP_ACCOUNT_STATUS] intValue]; 
    48         [popUp_contactList selectItemAtIndex:[popUp_contactList indexOfItemWithTag:contactListChoice]]; 
    49         [self _updateContactListWarning]; 
    50 } 
    51  
    52 //Save controls 
    53 - (void)saveConfiguration 
    54 { 
    55     [super saveConfiguration]; 
    56  
    57         //Contact list mode 
    58         [account setPreference:[NSNumber numberWithInt:[[popUp_contactList selectedItem] tag]] 
    59                                         forKey:KEY_MEANWHILE_CONTACTLIST 
    60                                          group:GROUP_ACCOUNT_STATUS]; 
    61 } 
    62  
    63  
    64 //Contact list mode menu ----------------------------------------------------------------------------------------------- 
    65 #pragma mark Contact list mode menu 
    66 //Show or hide the contact list warning depending on the contact list mode currently selected 
    67 - (void)_updateContactListWarning 
    68 { 
    69         if ([[popUp_contactList selectedItem] tag] == Meanwhile_CL_Load_And_Save) { 
    70                 [textField_contactListWarning setStringValue:SAVE_WARNING]; 
    71         } else { 
    72                 [textField_contactListWarning setStringValue:@""];               
    73         } 
    74 } 
    75  
    76 //Returns the contact list popup menu 
    77 - (NSMenu *)_contactListMenu 
    78 { 
    79     NSMenu                      *contactListMenu = [[NSMenu alloc] init]; 
    80          
    81     [contactListMenu addItem:[self _contactListMenuItemWithTitle:AILocalizedString(@"Local Only",nil) tag:Meanwhile_CL_None]]; 
    82         [contactListMenu addItem:[self _contactListMenuItemWithTitle:AILocalizedString(@"Load From Server",nil) tag:Meanwhile_CL_Load]]; 
    83         [contactListMenu addItem:[self _contactListMenuItemWithTitle:AILocalizedString(@"Load From and Save To Server",nil) tag:Meanwhile_CL_Load_And_Save]]; 
    84  
    85         return [contactListMenu autorelease]; 
    86 } 
    87  
    88 //Create a contact list popup menu item 
    89 - (NSMenuItem *)_contactListMenuItemWithTitle:(NSString *)title tag:(int)tag 
    90 { 
    91         NSMenuItem              *menuItem; 
    92      
    93     menuItem = [[NSMenuItem allocWithZone:[NSMenu menuZone]] initWithTitle:title 
    94                                                                                                                                         target:self 
    95                                                                                                                                         action:@selector(changeCLType:) 
    96                                                                                                                          keyEquivalent:@""]; 
    97     [menuItem setTag:tag]; 
    98          
    99         return [menuItem autorelease]; 
    100 } 
    101  
    102 //User selected a new contact list mode 
    103 - (void)changeCLType:(id)sender 
    104 { 
    105         //Show or hide the warning depending on their selection 
    106         [self _updateContactListWarning]; 
    107 } 
    108  
    109 #endif 
    110  
    11125@end