aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillermo Ignacio Enriquez Gutierrez <ignacio@jp.ibm.com>2015-08-25 07:34:19 +0900
committerMax <post@wickenrode.com>2015-09-25 17:12:58 +0200
commit61cc6c70653ef7cab7e53da0b1ad9934b1777697 (patch)
tree1f88b031a295ac2cf4cc88cb26f024fa57e04c4e
parent9a1541e55336b1833ba8ee403b99d20ea1ecce5f (diff)
downloadsequelpro-61cc6c70653ef7cab7e53da0b1ad9934b1777697.tar.gz
sequelpro-61cc6c70653ef7cab7e53da0b1ad9934b1777697.tar.bz2
sequelpro-61cc6c70653ef7cab7e53da0b1ad9934b1777697.zip
Call [super validateMenuItem:] on SPTextView to update osx build in menu
items (issue #2156)
-rw-r--r--Source/SPTextView.m16
1 files changed, 7 insertions, 9 deletions
diff --git a/Source/SPTextView.m b/Source/SPTextView.m
index 12d6ed13..f9ec441e 100644
--- a/Source/SPTextView.m
+++ b/Source/SPTextView.m
@@ -3203,16 +3203,14 @@ static inline NSPoint SPPointOnLine(NSPoint a, NSPoint b, CGFloat t) { return NS
*/
- (BOOL)validateMenuItem:(NSMenuItem *)menuItem
{
-
- // Enable or disable the search in the MySQL help menu item depending on whether there is a
+ // Enable or disable the search in the MySQL help menu item depending on whether there is a
// selection and whether it is a reasonable length.
if ([menuItem action] == @selector(showMySQLHelpForCurrentWord:)) {
- if ([self selectedRange].length > 0) {
- [menuItem setTitle:NSLocalizedString(@"MySQL Help for Selection", @"MySQL Help for Selection")];
- } else {
- [menuItem setTitle: NSLocalizedString(@"MySQL Help for Word", @"MySQL Help for Word")];
- }
-
+ if ([self selectedRange].length > 0) {
+ [menuItem setTitle:NSLocalizedString(@"MySQL Help for Selection", @"MySQL Help for Selection")];
+ } else {
+ [menuItem setTitle: NSLocalizedString(@"MySQL Help for Word", @"MySQL Help for Word")];
+ }
NSUInteger stringSize = [self getRangeForCurrentWord].length;
return (stringSize || stringSize > 64);
}
@@ -3231,7 +3229,7 @@ static inline NSPoint SPPointOnLine(NSPoint a, NSPoint b, CGFloat t) { return NS
return NO;
}
- return YES;
+ return [super validateMenuItem:menuItem];
}
/**