Adium

Changeset 14339

Show
Ignore:
Timestamp:
12/06/2005 05:47:24 PM (3 years ago)
Author:
evands
Message:
  • Renamed some of the menu item locations to more accurately reflect their function.
  • Added a location just for tab contextual menus.
  • Added a Close Chat menu item to tab contextual menus. Fixes #1595
Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/Plugins/Dual Window Interface/AIMessageWindowController.m

    r13685 r14339  
    428428- (NSMenu *)customTabView:(AICustomTabsView *)tabView menuForTabViewItem:(NSTabViewItem *)tabViewItem 
    429429{ 
    430     AIListContact       *selectedObject = [[(AIMessageTabViewItem *)tabViewItem chat] listObject]; 
    431     NSMenu *tmp=nil; 
    432          
     430        AIChat                  *chat = [(AIMessageTabViewItem *)tabViewItem chat]; 
     431    AIListContact       *selectedObject = [chat listObject]; 
     432    NSMenu                      *tmp = nil; 
     433 
    433434    if (selectedObject) { 
    434435                NSArray *locations; 
    435436                if ([selectedObject isStranger]) { 
    436                         locations = [NSArray arrayWithObjects: 
     437                        locations = [NSMutableArray arrayWithObjects: 
    437438                                [NSNumber numberWithInt:Context_Contact_Manage], 
    438439                                [NSNumber numberWithInt:Context_Contact_Action], 
    439440                                [NSNumber numberWithInt:Context_Contact_NegativeAction], 
    440                                 [NSNumber numberWithInt:Context_Contact_TabAction], 
    441                                 [NSNumber numberWithInt:Context_Contact_Stranger_TabAction], 
     441                                [NSNumber numberWithInt:Context_Contact_ChatAction], 
     442                                [NSNumber numberWithInt:Context_Contact_Stranger_ChatAction], 
    442443                                [NSNumber numberWithInt:Context_Contact_Additions], nil]; 
    443444                } else { 
    444                         locations = [NSArray arrayWithObjects: 
     445                        locations = [NSMutableArray arrayWithObjects: 
    445446                                [NSNumber numberWithInt:Context_Contact_Manage], 
    446447                                [NSNumber numberWithInt:Context_Contact_Action], 
    447448                                [NSNumber numberWithInt:Context_Contact_NegativeAction], 
    448                                 [NSNumber numberWithInt:Context_Contact_TabAction], 
     449                                [NSNumber numberWithInt:Context_Contact_ChatAction], 
    449450                                [NSNumber numberWithInt:Context_Contact_Additions], nil]; 
    450451                } 
    451452                 
     453                [locations addObject:[NSNumber numberWithInt:Context_Tab_Action]]; 
     454 
    452455                tmp = [[adium menuController] contextualMenuWithLocations:locations 
    453                                                                                                          forListObject:selectedObject]; 
     456                                                                                                         forListObject:selectedObject 
     457                                                                                                                   inChat:chat]; 
    454458         
    455459    } 
  • trunk/Plugins/Dual Window Interface/ESChatUserListController.m

    r12862 r14339  
    4040{ 
    4141        NSArray                 *locationsArray = [NSArray arrayWithObjects: 
    42                 [NSNumber numberWithInt:Context_Contact_ChatAction],           
     42                [NSNumber numberWithInt:Context_Contact_GroupChatAction],              
    4343                [NSNumber numberWithInt:Context_Contact_Manage], 
    4444                [NSNumber numberWithInt:Context_Contact_Action], 
  • trunk/Plugins/WebKit Message View/AIWebKitMessageViewController.m

    r13395 r14339  
    709709                                [NSNumber numberWithInt:Context_Contact_Action], 
    710710                                [NSNumber numberWithInt:Context_Contact_NegativeAction], 
    711                                 [NSNumber numberWithInt:Context_Contact_TabAction], 
    712                                 [NSNumber numberWithInt:Context_Contact_Stranger_TabAction], 
     711                                [NSNumber numberWithInt:Context_Contact_ChatAction], 
     712                                [NSNumber numberWithInt:Context_Contact_Stranger_ChatAction], 
    713713                                [NSNumber numberWithInt:Context_Contact_Additions], nil]; 
    714714                } else { 
     
    717717                                [NSNumber numberWithInt:Context_Contact_Action], 
    718718                                [NSNumber numberWithInt:Context_Contact_NegativeAction], 
    719                                 [NSNumber numberWithInt:Context_Contact_TabAction], 
     719                                [NSNumber numberWithInt:Context_Contact_ChatAction], 
    720720                                [NSNumber numberWithInt:Context_Contact_Additions], nil]; 
    721721                } 
  • trunk/Source/AIChatController.m

    r14113 r14339  
    7373                                                                                                                                                   action:@selector(toggleIgnoreOfContact:) 
    7474                                                                                                                                        keyEquivalent:@""]; 
    75         [[adium menuController] addContextualMenuItem:menuItem_ignore toLocation:Context_Contact_ChatAction]; 
     75        [[adium menuController] addContextualMenuItem:menuItem_ignore toLocation:Context_Contact_GroupChatAction]; 
    7676         
    7777        [adiumChatEvents controllerDidLoad];     
  • trunk/Source/AIContactListEditorPlugin.m

    r14062 r14339  
    8484                                                                                                                                                                   action:@selector(addContactFromTab:) 
    8585                                                                                                                                                        keyEquivalent:@""] autorelease]; 
    86     [[adium menuController] addContextualMenuItem:menuItem_tabAddContact toLocation:Context_Contact_Stranger_TabAction]; 
     86    [[adium menuController] addContextualMenuItem:menuItem_tabAddContact toLocation:Context_Contact_Stranger_ChatAction]; 
    8787 
    8888        [[adium notificationCenter] addObserver:self  
  • trunk/Source/AIInterfaceController.m

    r14251 r14339  
    4343#import <Adium/KFTypeSelectTableView.h> 
    4444 
    45  
    46 #define CLOSE_CHAT_MENU_TITLE                   AILocalizedString(@"Close Chat","Title for the close chat menu item") 
    47 #define CLOSE_MENU_TITLE                                AILocalizedString(@"Close","Title for the close menu item") 
    48 #define CLOSE_ALL_TABS_MENU_TITLE               AILocalizedString(@"Close All Chats","Title for the close all chats menu item") 
    49  
    5045#define ERROR_MESSAGE_WINDOW_TITLE              AILocalizedString(@"Adium : Error","Error message window title") 
    5146#define LABEL_ENTRY_SPACING                             4.0 
     
    162157        [menuItem release]; 
    163158 
     159        menuItem = [[NSMenuItem allocWithZone:[NSMenu menuZone]] initWithTitle:AILocalizedString(@"Close Chat","Title for the close chat menu item") 
     160                                                                                                                                        target:self 
     161                                                                                                                                        action:@selector(closeContextualChat:) 
     162                                                                                                                         keyEquivalent:@""]; 
     163        [menuController addContextualMenuItem:menuItem toLocation:Context_Tab_Action]; 
     164        [menuItem release]; 
     165         
     166                 
    164167        //Observe preference changes 
    165168        [[adium preferenceController] registerPreferenceObserver:self forGroup:PREF_GROUP_INTERFACE]; 
     
    349352- (void)closeChat:(AIChat *)inChat 
    350353{ 
    351     [interfacePlugin closeChat:inChat]; 
     354        if (inChat) { 
     355                [interfacePlugin closeChat:inChat]; 
     356        } 
    352357} 
    353358 
     
    536541{ 
    537542        if (activeChat) [self closeChat:activeChat]; 
     543} 
     544 
     545- (IBAction)closeContextualChat:(id)sender 
     546{ 
     547        [self closeChat:[[adium menuController] currentContextMenuChat]]; 
    538548} 
    539549 
     
    12321242                NSDictionary    *typingAttributes = [(NSTextView *)responder typingAttributes]; 
    12331243                NSColor                 *foregroundColor, *backgroundColor; 
    1234                 NSLog(@"Typing attributes are %@",typingAttributes); 
     1244 
    12351245                if ((foregroundColor = [typingAttributes objectForKey:NSForegroundColorAttributeName])) { 
    12361246                        [[adium preferenceController] setPreference:[foregroundColor stringRepresentation]