Changeset 23983
- Timestamp:
- 06/14/2008 07:24:11 PM (6 months ago)
- Files:
-
- trunk/Frameworks/Adium Framework/Source/AIAbstractListController.h (modified) (1 diff)
- trunk/Frameworks/Adium Framework/Source/AIAbstractListController.m (modified) (1 diff)
- trunk/Frameworks/AIUtilities Framework/Source/AIOutlineView.m (modified) (1 diff)
- trunk/Source/AIStandardListWindowController.h (modified) (1 diff)
- trunk/Source/AIStandardListWindowController.m (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/Frameworks/Adium Framework/Source/AIAbstractListController.h
r23952 r23983 166 166 @interface NSObject(AIListControllerOptionalDelegateMethods) 167 167 - (void)toggleFindPanel:(id)sender; 168 - ( void)forwardKeyEventToFindPanel:(NSEvent *)theEvent;168 - (BOOL)forwardKeyEventToFindPanel:(NSEvent *)theEvent; 169 169 @end 170 170 trunk/Frameworks/Adium Framework/Source/AIAbstractListController.m
r23952 r23983 964 964 - (void)outlineViewToggleFindPanel:(NSOutlineView *)outlineView; 965 965 { 966 if ([[self delegate] respondsToSelector:@selector(toggleFindPanel:)])967 [[self delegate] toggleFindPanel:outlineView];966 if ([[self delegate] respondsToSelector:@selector(toggleFindPanel:)]) 967 [[self delegate] toggleFindPanel:outlineView]; 968 968 } 969 969 - (BOOL)outlineView:(NSOutlineView *)outlineView forwardKeyEventToFindPanel:(NSEvent *)event; 970 970 { 971 if ([[self delegate]respondsToSelector:@selector(forwardKeyEventToFindPanel:)]) { 972 [[self delegate]forwardKeyEventToFindPanel:event]; 973 return YES; 971 if ([[self delegate] respondsToSelector:@selector(forwardKeyEventToFindPanel:)]) { 972 return [[self delegate] forwardKeyEventToFindPanel:event]; 974 973 } else { 975 974 return NO; trunk/Frameworks/AIUtilities Framework/Source/AIOutlineView.m
r23921 r23983 129 129 [self findNext:self]; 130 130 131 } else if([[self delegate] respondsToSelector:@selector(outlineView:forwardKeyEventToFindPanel:)] && 132 !([theEvent modifierFlags] & NSCommandKeyMask) && 133 !([theEvent modifierFlags] & NSControlKeyMask) && 134 [[[NSCharacterSet controlCharacterSet]invertedSet]characterIsMember:pressedChar]) { 131 } else if ([[self delegate] respondsToSelector:@selector(outlineView:forwardKeyEventToFindPanel:)] && 132 !([theEvent modifierFlags] & NSCommandKeyMask) && 133 !([theEvent modifierFlags] & NSControlKeyMask)) { 135 134 //handle any key we have not alredy handled that is a visable character and likely not to be a shortcut key (no command or control key modifiers) by asking the delegate to add it to the search string 136 if (![[self delegate]outlineView:self forwardKeyEventToFindPanel:theEvent]) {135 if (![[self delegate] outlineView:self forwardKeyEventToFindPanel:theEvent]) { 137 136 //the delegate's find panel could not handle the event, so we just pass it to super 138 137 [super keyDown:theEvent]; trunk/Source/AIStandardListWindowController.h
r23277 r23983 64 64 65 65 - (void)toggleFindPanel:(id)sender; 66 - (void)forwardKeyEventToFindPanel:(NSEvent *)theEvent;67 66 - (IBAction)hideFilterBar:(id)sender; 68 67 - (IBAction)filterContacts:(id)sender; trunk/Source/AIStandardListWindowController.m
r23979 r23983 1011 1011 * @brief Forward typing events from the contact list to the filter bar 1012 1012 */ 1013 - ( void)forwardKeyEventToFindPanel:(NSEvent *)theEvent;1013 - (BOOL)forwardKeyEventToFindPanel:(NSEvent *)theEvent; 1014 1014 { 1015 1015 //if we were not searching something before, we need to show the filter bar first without animation 1016 [self showFilterBarWithAnimation:NO]; 1017 1018 [[self window] makeFirstResponder:searchField]; 1019 [[[self window] fieldEditor:YES forObject:searchField] keyDown:theEvent]; 1016 NSString *charString = [theEvent charactersIgnoringModifiers]; 1017 unichar pressedChar = 0; 1018 1019 //Get the pressed character 1020 if ([charString length] == 1) pressedChar = [charString characterAtIndex:0]; 1021 1022 #define NSEscapeFunctionKey 27 1023 if ((pressedChar == NSEscapeFunctionKey) && ([contactListView selectedRow] != -1)) { 1024 return NO; 1025 1026 } else { 1027 if (!filterBarIsVisible) 1028 [self showFilterBarWithAnimation:NO]; 1029 1030 [[self window] makeFirstResponder:searchField]; 1031 [[[self window] fieldEditor:YES forObject:searchField] keyDown:theEvent]; 1032 1033 return YES; 1034 } 1020 1035 } 1021 1036