Adium

Changeset 24086

Show
Ignore:
Timestamp:
06/28/2008 04:36:34 PM (5 months ago)
Author:
evands
Message:

Escape and enter are now handled properly in the social networking status window. Fixes #10007

Files:

Legend:

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

    r23830 r24086  
    9292 
    9393/*! 
     94 * @brief If escape or return are pressed inside one of our text views, pass the action on to our buttons 
     95 */ 
     96- (BOOL)textView:(NSTextView *)aTextView doCommandBySelector:(SEL)aSelector 
     97{ 
     98        NSButton *equivalentButton = nil; 
     99 
     100        if (aSelector == @selector(cancelOperation:)) { 
     101                equivalentButton = button_cancel; 
     102                 
     103        } else if ((aSelector == @selector(insertNewline:)) || (aSelector == @selector(insertNewlineIgnoringFieldEditor:))) { 
     104                equivalentButton = button_okay; 
     105        } 
     106 
     107        if (equivalentButton) { 
     108                [equivalentButton performClick:aTextView]; 
     109                return YES; 
     110                 
     111        } else { 
     112                return NO; 
     113        } 
     114} 
     115 
     116/*! 
    94117 * @brief Called before the window is closed 
    95118 *