diff options
-rw-r--r-- | Resources/English.lproj/Localizable.strings | bin | 238236 -> 238488 bytes | |||
-rw-r--r-- | Source/SPWindow.m | 21 |
2 files changed, 19 insertions, 2 deletions
diff --git a/Resources/English.lproj/Localizable.strings b/Resources/English.lproj/Localizable.strings Binary files differindex b27d1d80..6413a27d 100644 --- a/Resources/English.lproj/Localizable.strings +++ b/Resources/English.lproj/Localizable.strings diff --git a/Source/SPWindow.m b/Source/SPWindow.m index f4164ef2..492b8779 100644 --- a/Source/SPWindow.m +++ b/Source/SPWindow.m @@ -192,13 +192,30 @@ - (BOOL)validateMenuItem:(NSMenuItem *)menuItem { - + + // If the item is the Show/Hide Toolbar menu item, override the text to allow correct translation + if ([menuItem action] == @selector(toggleToolbarShown:)) { + BOOL theResponse = [super validateMenuItem:menuItem]; + if ([[self toolbar] isVisible] || [menuItem state] == NSOnState) { + [menuItem setTitle:NSLocalizedString(@"Hide Toolbar", @"Hide Toolbar menu item")]; + } else { + [menuItem setTitle:NSLocalizedString(@"Show Toolbar", @"Show Toolbar menu item")]; + } + return theResponse; + } + + // On systems which don't support fullscreen windows, disable the fullscreen menu item if ([menuItem action] == @selector(toggleFullScreen:)) { - return ([super respondsToSelector:@selector(toggleFullScreen:)]); + if (![super respondsToSelector:@selector(toggleFullScreen:)]) { + return NO; + } } + + // Allow the superclass to perform validation otherwise (if possible) if ([super respondsToSelector:@selector(validateMenuItem:)]) { return [super validateMenuItem:menuItem]; } + return YES; } |