Adium

Changeset 24798

Show
Ignore:
Timestamp:
08/15/2008 02:23:36 AM (5 months ago)
Author:
catfish_man
Message:

Propertyize AIListObject and convert some more controller accesses to dot syntax

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/Frameworks/Adium Framework/Source/AIAbstractAccount.m

    r24792 r24798  
    8585                } 
    8686                 
    87                 [[adium preferenceController] registerDefaults:defaults 
     87                [adium.preferenceController registerDefaults:defaults 
    8888                                                                                          forGroup:GROUP_ACCOUNT_STATUS 
    8989                                                                                                object:self]; 
     
    115115 
    116116                //Handle the preference changed monitoring (for account status) for our subclass 
    117                 [[adium preferenceController] registerPreferenceObserver:self forGroup:GROUP_ACCOUNT_STATUS]; 
     117                [adium.preferenceController registerPreferenceObserver:self forGroup:GROUP_ACCOUNT_STATUS]; 
    118118 
    119119                //Update our display name and formattedUID immediately 
     
    143143         
    144144    [[adium notificationCenter] removeObserver:self]; 
    145         [[adium preferenceController] unregisterPreferenceObserver:self]; 
     145        [adium.preferenceController unregisterPreferenceObserver:self]; 
    146146         
    147147    [super dealloc]; 
     
    294294 
    295295                //Inform the account controller of the changed UID 
    296                 [[adium accountController] accountDidChangeUID:self]; 
     296                [adium.accountController accountDidChangeUID:self]; 
    297297 
    298298                didChangeUID = YES; 
     
    446446        AILogWithSignature(@"Retrieving %@'s password (promptOption %i)", self, promptOption); 
    447447 
    448         [[adium accountController] passwordForAccount:self  
     448        [adium.accountController passwordForAccount:self  
    449449                                                                         promptOption:promptOption 
    450450                                                                  notifyingTarget:self 
     
    763763        NSString                        *originalValueString = [originalValue string]; 
    764764         
    765         filteredValue = [[adium contentController] filterAttributedString:originalValue 
     765        filteredValue = [adium.contentController filterAttributedString:originalValue 
    766766                                                                                                          usingFilterType:AIFilterContent 
    767767                                                                                                                        direction:AIFilterOutgoing 
     
    805805         
    806806        //Filter the content 
    807         [[adium contentController] filterAttributedString:originalValue 
     807        [adium.contentController filterAttributedString:originalValue 
    808808                                                                          usingFilterType:AIFilterContent 
    809809                                                                                        direction:AIFilterOutgoing 
     
    886886        [dynamicKeys addObject:key]; 
    887887 
    888         if ([[adium contentController] shouldPollToUpdateString:originalValueString]) { 
     888        if ([adium.contentController shouldPollToUpdateString:originalValueString]) { 
    889889                [autoRefreshingKeys addObject:key]; 
    890890                [self _startAttributedRefreshTimer]; 
     
    11071107        [statusMessage setCoalescingKey:ACCOUNT_STATUS_UPDATE_COALESCING_KEY]; 
    11081108         
    1109         [[adium contentController] receiveContentObject:statusMessage]; 
     1109        [adium.contentController receiveContentObject:statusMessage]; 
    11101110} 
    11111111 
     
    12371237                [listContact setRemoteGroupName:nil]; 
    12381238                [self removePropetyValuesFromContact:listContact silently:YES]; 
    1239                 if (![[adium chatController] existingChatWithContact:[listContact parentContact]]) 
     1239                if (![adium.chatController existingChatWithContact:[listContact parentContact]]) 
    12401240                        [adium.contactController account:self didStopTrackingContact:listContact]; 
    12411241        } 
     
    12821282                                [statusMessage setCoalescingKey:ACCOUNT_STATUS_UPDATE_COALESCING_KEY]; 
    12831283 
    1284                                 [[adium contentController] receiveContentObject:statusMessage]; 
     1284                                [adium.contentController receiveContentObject:statusMessage]; 
    12851285                                 
    12861286                                if ([chat isGroupChat]) 
     
    15591559                        if (context) [proxyConfiguration setObject:context forKey:@"NotificationContext"]; 
    15601560                         
    1561                         [[adium accountController] passwordForProxyServer:host  
     1561                        [adium.accountController passwordForProxyServer:host  
    15621562                                                                                                         userName:username  
    15631563                                                                                          notifyingTarget:self  
  • trunk/Frameworks/Adium Framework/Source/AIAbstractListController.m

    r24783 r24798  
    873873- (void)listControllerDragEnded:(NSNotification *)notification 
    874874{ 
    875         [self setShowTooltips:[[[adium preferenceController] preferenceForKey:KEY_CL_SHOW_TOOLTIPS 
     875        [self setShowTooltips:[[adium.preferenceController preferenceForKey:KEY_CL_SHOW_TOOLTIPS 
    876876                                                                                                                                        group:PREF_GROUP_CONTACT_LIST] boolValue]]; 
    877877         
  • trunk/Frameworks/Adium Framework/Source/AIAccount.m

    r24792 r24798  
    228228- (void)performDelete 
    229229{ 
    230         [[adium accountController] deleteAccount:self]; 
     230        [adium.accountController deleteAccount:self]; 
    231231} 
    232232 
     
    818818                                                inChat:(AIChat *)inChat 
    819819{ 
    820         [[adium contentController] requestSecureOTRMessaging:inSecureMessaging 
     820        [adium.contentController requestSecureOTRMessaging:inSecureMessaging 
    821821                                                                                                  inChat:inChat]; 
    822822} 
     
    831831- (void)promptToVerifyEncryptionIdentityInChat:(AIChat *)inChat 
    832832{ 
    833         [[adium contentController] promptToVerifyEncryptionIdentityInChat:inChat]; 
     833        [adium.contentController promptToVerifyEncryptionIdentityInChat:inChat]; 
    834834} 
    835835 
     
    10081008                } 
    10091009                 
    1010                 AIChat *newChat = [[adium chatController] chatWithContact:contact]; 
     1010                AIChat *newChat = [adium.chatController chatWithContact:contact]; 
    10111011//              NSLog(@"Making new chat %@ in chat window %@:%@",newChat,chatWindowController,[chatWindowController containerID]); 
    10121012                [[adium interfaceController] openChat:newChat inContainerWithID:[chatWindowController containerID] atIndex:index]; 
     
    10301030                } 
    10311031                 
    1032                 //AIChat *newChat = [[adium chatController] chatWithName:name identifier:nil onAccount:self chatCreationInfo:nil]; 
     1032                //AIChat *newChat = [adium.chatController chatWithName:name identifier:nil onAccount:self chatCreationInfo:nil]; 
    10331033                DCJoinChatViewController *chatController = [DCJoinChatViewController joinChatView]; 
    10341034                [chatController doJoinChatWithName:name onAccount:self chatCreationInfo:nil invitingContacts:newParticipants withInvitationMessage:@"Hey, wanna join my chat?"]; 
    1035                 return [[adium chatController] existingChatWithName:name onAccount:self]; 
     1035                return [adium.chatController existingChatWithName:name onAccount:self]; 
    10361036        } 
    10371037} 
  • trunk/Frameworks/Adium Framework/Source/AIAccountMenu.m

    r24783 r24798  
    205205- (void)connectAllAccounts:(NSMenuItem *)menuItem 
    206206{ 
    207         NSEnumerator            *enumerator = [[[adium accountController] accounts] objectEnumerator]; 
     207        NSEnumerator            *enumerator = [[adium.accountController accounts] objectEnumerator]; 
    208208        AIAccount                       *account; 
    209209         
     
    224224{ 
    225225        NSMutableArray  *menuItemArray = [NSMutableArray array]; 
    226         NSArray                 *accounts = [[adium accountController] accounts]; 
     226        NSArray                 *accounts = [adium.accountController accounts]; 
    227227         
    228228        if (includeConnectAllMenuItem) { 
     
    497497{ 
    498498        AIService       *service = [sender representedObject]; 
    499         AIAccount       *account = [[adium accountController] createAccountWithService:service 
     499        AIAccount       *account = [adium.accountController createAccountWithService:service 
    500500                                                                                                                                                   UID:[service defaultUserName]]; 
    501         [[adium accountController] editAccount:account 
     501        [adium.accountController editAccount:account 
    502502                                                                  onWindow:nil 
    503503                                                   notifyingTarget:self]; 
     
    511511        if (successful) { 
    512512                //New accounts need to be added to our account list once they're configured 
    513                 [[adium accountController] addAccount:inAccount]; 
     513                [adium.accountController addAccount:inAccount]; 
    514514         
    515515                //Put new accounts online by default 
  • trunk/Frameworks/Adium Framework/Source/AIAccountPlusFieldPromptController.m

    r24792 r24798  
    117117- (void)_restoreLastAccountIfPossible 
    118118{ 
    119         NSString *accountID = [[adium preferenceController] preferenceForKey:[NSString stringWithFormat:@"AccountPlusFieldLastAccountID:%@", [self lastAccountIDKey]] 
     119        NSString *accountID = [adium.preferenceController preferenceForKey:[NSString stringWithFormat:@"AccountPlusFieldLastAccountID:%@", [self lastAccountIDKey]] 
    120120                                                                                                                                   group:ACCOUNT_PLUS_FIELD_GROUP]; 
    121         AIAccount *account = [[adium accountController] accountWithInternalObjectID:accountID]; 
     121        AIAccount *account = [adium.accountController accountWithInternalObjectID:accountID]; 
    122122        int accountIndex = (account ? [[popUp_service menu] indexOfItemWithRepresentedObject:account] : -1); 
    123123 
     
    129129- (void)_saveConfiguredAccount 
    130130{ 
    131         [[adium preferenceController] setPreference:[[[popUp_service selectedItem] representedObject] internalObjectID] 
     131        [adium.preferenceController setPreference:[[[popUp_service selectedItem] representedObject] internalObjectID] 
    132132                                                                                 forKey:[NSString stringWithFormat:@"AccountPlusFieldLastAccountID:%@", [self lastAccountIDKey]] 
    133133                                                                                         group:ACCOUNT_PLUS_FIELD_GROUP]; 
     
    209209{ 
    210210        //First online account in our list 
    211         NSEnumerator *enumerator = [[[adium accountController] accounts] objectEnumerator]; 
     211        NSEnumerator *enumerator = [[adium.accountController accounts] objectEnumerator]; 
    212212        AIAccount    *preferredAccount; 
    213213        while ((preferredAccount = [enumerator nextObject])) { 
  • trunk/Frameworks/Adium Framework/Source/AIAccountViewController.m

    r24783 r24798  
    114114{ 
    115115        if (popUp_encryption) { 
    116                 [popUp_encryption setMenu:[[adium contentController] encryptionMenuNotifyingTarget:nil  
     116                [popUp_encryption setMenu:[adium.contentController encryptionMenuNotifyingTarget:nil  
    117117                                                                                                                                                           withDefault:NO]]; 
    118118                [[popUp_encryption menu] setAutoenablesItems:NO]; 
     
    216216                 
    217217                //Password 
    218                 NSString        *savedPassword = [[adium accountController] passwordForAccount:account]; 
     218                NSString        *savedPassword = [adium.accountController passwordForAccount:account]; 
    219219                [textField_password setStringValue:[savedPassword length] ? savedPassword : @""]; 
    220220                 
     
    222222                NSString *alias = [[[account preferenceForKey:KEY_ACCOUNT_DISPLAY_NAME group:GROUP_ACCOUNT_STATUS ignoreInheritedValues:YES] attributedString] string]; 
    223223                [textField_alias setStringValue:(alias ? alias : @"")]; 
    224                 [[textField_alias cell] setPlaceholderString:[[[[adium preferenceController] preferenceForKey:KEY_ACCOUNT_DISPLAY_NAME group:GROUP_ACCOUNT_STATUS] attributedString] string]]; 
     224                [[textField_alias cell] setPlaceholderString:[[[adium.preferenceController preferenceForKey:KEY_ACCOUNT_DISPLAY_NAME group:GROUP_ACCOUNT_STATUS] attributedString] string]]; 
    225225         
    226226                //Server Host 
     
    275275        //Password 
    276276        NSString                *password = [textField_password secureStringValue]; 
    277         NSString                *oldPassword = [[adium accountController] passwordForAccount:account]; 
     277        NSString                *oldPassword = [adium.accountController passwordForAccount:account]; 
    278278         
    279279        if (password && [password length] != 0) { 
    280280                if (![password isEqualToString:oldPassword]) { 
    281                         [[adium accountController] setPassword:password forAccount:account]; 
     281                        [adium.accountController setPassword:password forAccount:account]; 
    282282                } 
    283283        } else if (oldPassword && [oldPassword length] != 0) { 
    284                 [[adium accountController] forgetPasswordForAccount:account]; 
     284                [adium.accountController forgetPasswordForAccount:account]; 
    285285        } 
    286286         
  • trunk/Frameworks/Adium Framework/Source/AIAddressBookController.m

    r24792 r24798  
    9797                 
    9898                //Configure our preferences 
    99                 [[adium preferenceController] registerDefaults:[NSDictionary dictionaryNamed:AB_DISPLAYFORMAT_DEFAULT_PREFS forClass:[self class]]   
     99                [adium.preferenceController registerDefaults:[NSDictionary dictionaryNamed:AB_DISPLAYFORMAT_DEFAULT_PREFS forClass:[self class]]   
    100100                                                      forGroup:PREF_GROUP_ADDRESSBOOK]; 
    101101                 
    102102                //We want the enableImport preference immediately (without waiting for the preferences observer to be registered in adiumFinishedLaunching:) 
    103                 enableImport = [[[adium preferenceController] preferenceForKey:KEY_AB_ENABLE_IMPORT 
     103                enableImport = [[adium.preferenceController preferenceForKey:KEY_AB_ENABLE_IMPORT 
    104104                                                                         group:PREF_GROUP_ADDRESSBOOK] boolValue]; 
    105105                 
     
    190190        [personUniqueIdToMetaContactDict release]; personUniqueIdToMetaContactDict = nil; 
    191191         
    192         [[adium preferenceController] unregisterPreferenceObserver:self]; 
     192        [adium.preferenceController unregisterPreferenceObserver:self]; 
    193193        [[adium notificationCenter] removeObserver:self]; 
    194194 
     
    243243 
    244244        //Observe preferences changes 
    245         id<AIPreferenceController> preferenceController = [adium preferenceController]
     245        id<AIPreferenceController> preferenceController = adium.preferenceController
    246246        [preferenceController registerPreferenceObserver:self forGroup:PREF_GROUP_ADDRESSBOOK]; 
    247247        [preferenceController registerPreferenceObserver:self forGroup:PREF_GROUP_USERICONS]; 
     
    577577                serviceID = @"Yahoo!"; 
    578578 
    579         return (serviceID ? [[adium accountController] firstServiceWithServiceID:serviceID] : nil); 
     579        return (serviceID ? [adium.accountController firstServiceWithServiceID:serviceID] : nil); 
    580580} 
    581581 
     
    615615{ 
    616616        if (tag == meTag) { 
    617                 [[adium preferenceController] setPreference:inData 
     617                [adium.preferenceController setPreference:inData 
    618618                                                                                         forKey:KEY_DEFAULT_USER_ICON  
    619619                                                                                          group:GROUP_ACCOUNT_STATUS]; 
     
    737737                        if ([email hasSuffix:@"@mac.com"]) { 
    738738                                //Retrieve all appropriate contacts 
    739                                 NSSet   *contacts = [adium.contactController allContactsWithService:[[adium accountController] firstServiceWithServiceID:@"Mac"] 
     739                                NSSet   *contacts = [adium.contactController allContactsWithService:[adium.accountController firstServiceWithServiceID:@"Mac"] 
    740740                                                                                                                                                                  UID:email]; 
    741741 
     
    745745                        } else if ([email hasSuffix:@"me.com"]) { 
    746746                                        //Retrieve all appropriate contacts 
    747                                         NSSet   *contacts = [adium.contactController allContactsWithService:[[adium accountController] firstServiceWithServiceID:@"MobileMe"] 
     747                                        NSSet   *contacts = [adium.contactController allContactsWithService:[adium.accountController firstServiceWithServiceID:@"MobileMe"] 
    748748                                                                                                                                                                        UID:email]; 
    749749                                         
     
    753753                        } else if ([email hasSuffix:@"gmail.com"] || [email hasSuffix:@"googlemail.com"]) { 
    754754                                //Retrieve all appropriate contacts 
    755                                 NSSet   *contacts = [adium.contactController allContactsWithService:[[adium accountController] firstServiceWithServiceID:@"GTalk"] 
     755          &n