aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPWindow.m
diff options
context:
space:
mode:
Diffstat (limited to 'Source/SPWindow.m')
-rw-r--r--Source/SPWindow.m14
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;
}