diff options
author | rowanbeentje <rowan@beent.je> | 2012-12-17 09:34:49 +0000 |
---|---|---|
committer | rowanbeentje <rowan@beent.je> | 2012-12-17 09:34:49 +0000 |
commit | 5a194fdff493435091e550a96d9e8ce79f1ee463 (patch) | |
tree | b9b060238298d4eb4a06e1701711707b82118921 /Source/SPWindow.m | |
parent | 0dc6bc96075af5a17f09598c6c179f32dd4cfda5 (diff) | |
download | sequelpro-5a194fdff493435091e550a96d9e8ce79f1ee463.tar.gz sequelpro-5a194fdff493435091e550a96d9e8ce79f1ee463.tar.bz2 sequelpro-5a194fdff493435091e550a96d9e8ce79f1ee463.zip |
- Rearrange some menu shortcuts: ⌘F is now used on the Content tab to set the focus to the Filter Content tab bar. ⇧⌘F is used to show the advanced content filter table. This allows ^⌘F to be used for the standard OS X fullscreen window command, addressing Issue #1513.
Diffstat (limited to 'Source/SPWindow.m')
-rw-r--r-- | Source/SPWindow.m | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/Source/SPWindow.m b/Source/SPWindow.m index 39bed812..5563235f 100644 --- a/Source/SPWindow.m +++ b/Source/SPWindow.m @@ -33,6 +33,10 @@ #import "SPWindow.h" #import "SPWindowController.h" +@interface NSWindow (LionPlusMethods) +- (void)toggleFullScreen:(id)sender; +@end + @implementation SPWindow @synthesize isSheetWhichCanBecomeMain; @@ -165,4 +169,23 @@ return [super canBecomeMainWindow]; } +/** + * On 10.7+, allow the window to go fullscreen; do nothing on <10.7. + */ +- (void)toggleFullScreen:(id)sender +{ + if ([super respondsToSelector:@selector(toggleFullScreen:)]) { + [super toggleFullScreen:sender]; + } +} + +- (BOOL)validateMenuItem:(NSMenuItem *)menuItem +{ + + if ([menuItem action] == @selector(toggleFullScreen:)) { + return ([super respondsToSelector:@selector(toggleFullScreen:)]); + } + return YES; +} + @end |