Changeset 1570
- Timestamp:
- 09/06/04 19:49:17 (4 years ago)
- Files:
-
- WiredClient/trunk/WCApplication.h (modified) (2 diffs)
- WiredClient/trunk/WCApplication.m (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
WiredClient/trunk/WCApplication.h
r1383 r1570 1 /* $Id: WCApplication.h,v 1. 2 2004/07/28 08:00:26morris Exp $ */1 /* $Id: WCApplication.h,v 1.3 2004/09/06 17:49:17 morris Exp $ */ 2 2 3 3 /* … … 29 29 @interface WCApplication : NSApplication 30 30 31 #define WCApplicationDidChangeStatus @"WCApplicationDidChangeStatus" 31 @end 32 33 34 @interface NSObject(WCApplicationDelegate) 35 36 - (void) applicationShouldDisplayStats:(id)sender; 32 37 33 38 @end WiredClient/trunk/WCApplication.m
r1535 r1570 1 /* $Id: WCApplication.m,v 1. 2 2004/08/27 17:31:05morris Exp $ */1 /* $Id: WCApplication.m,v 1.3 2004/09/06 17:49:17 morris Exp $ */ 2 2 3 3 /* … … 33 33 34 34 - (void)sendEvent:(NSEvent *)event { 35 // --- check for ctrl-F12 36 if([event type] == NSKeyDown && [[event characters] length] > 0 && 37 [[event characters] characterAtIndex:0] == NSF12FunctionKey && 38 [event modifierFlags] & NSControlKeyMask) 39 [WCSharedMain handleStatsKey]; 40 else 35 BOOL handled = NO; 36 37 if([event type] == NSKeyDown && [[event characters] length] > 0) { 38 unichar key; 39 40 key = [[event characters] characterAtIndex:0]; 41 42 if(key == NSF12FunctionKey && [event modifierFlags] & NSControlKeyMask) { 43 if([[self delegate] respondsToSelector:@selector(applicationShouldDisplayStats:)]) { 44 [[self delegate] applicationShouldDisplayStats:self]; 45 46 handled = YES; 47 } 48 } 49 } 50 51 if(!handled) 41 52 [super sendEvent:event]; 42 53 }
