diff options
author | rowanbeentje <rowan@beent.je> | 2013-01-05 21:59:32 +0000 |
---|---|---|
committer | rowanbeentje <rowan@beent.je> | 2013-01-05 21:59:32 +0000 |
commit | a3a738ea230ead792aa747e4a66ced6e8bea8562 (patch) | |
tree | 3fb47c41a7594fac74ff6e1c77158df4f334ab4f /Source/SPWindow.m | |
parent | 8d397ab95afd68d5f9d7ecf5267c9a11a72d04c6 (diff) | |
download | sequelpro-a3a738ea230ead792aa747e4a66ced6e8bea8562.tar.gz sequelpro-a3a738ea230ead792aa747e4a66ced6e8bea8562.tar.bz2 sequelpro-a3a738ea230ead792aa747e4a66ced6e8bea8562.zip |
- Call the NSWindow super implementation of validateMenuItem: in SPWindow, fixing Show Toolbar/Hide Toolbar menu item title not being updated correctly - addresses Issue #1521
- When the toolbar is hidden, draw a line in the window to cover up the bottom border of the window's title bar, improving appearance
- Improve tab appearance when toolbar is hidden
Diffstat (limited to 'Source/SPWindow.m')
-rw-r--r-- | Source/SPWindow.m | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Source/SPWindow.m b/Source/SPWindow.m index 5563235f..f4164ef2 100644 --- a/Source/SPWindow.m +++ b/Source/SPWindow.m @@ -170,6 +170,17 @@ } /** + * Override the standard toolbar show/hide, adding a notification that can be + * used to update state. + */ +- (void)toggleToolbarShown:(id)sender +{ + [super toggleToolbarShown:sender]; + + [[NSNotificationCenter defaultCenter] postNotificationName:SPWindowToolbarDidToggleNotification object:nil]; +} + +/** * On 10.7+, allow the window to go fullscreen; do nothing on <10.7. */ - (void)toggleFullScreen:(id)sender @@ -185,6 +196,9 @@ if ([menuItem action] == @selector(toggleFullScreen:)) { return ([super respondsToSelector:@selector(toggleFullScreen:)]); } + if ([super respondsToSelector:@selector(validateMenuItem:)]) { + return [super validateMenuItem:menuItem]; + } return YES; } |