aboutsummaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBibiko <bibiko@eva.mpg.de>2009-04-21 08:54:00 +0000
committerBibiko <bibiko@eva.mpg.de>2009-04-21 08:54:00 +0000
commit1f71bfce7c1b1e50efcdf82a63b80f661909af48 (patch)
treefb37caa2450b8b3df834925c7e65830f5aa1979e /Source
parentf5570a3b665da74a221af92eec8b11a13fbbdb6e (diff)
downloadsequelpro-1f71bfce7c1b1e50efcdf82a63b80f661909af48.tar.gz
sequelpro-1f71bfce7c1b1e50efcdf82a63b80f661909af48.tar.bz2
sequelpro-1f71bfce7c1b1e50efcdf82a63b80f661909af48.zip
• FIXED: synchronized "Run Current/Selection/Previous" button appearance with the the corresponding gear menu item
Diffstat (limited to 'Source')
-rw-r--r--Source/CustomQuery.m14
1 files changed, 12 insertions, 2 deletions
diff --git a/Source/CustomQuery.m b/Source/CustomQuery.m
index b3aad504..bf3390bc 100644
--- a/Source/CustomQuery.m
+++ b/Source/CustomQuery.m
@@ -700,6 +700,12 @@ sets the connection (received from TableDocument) and makes things that have to
[queryHistoryButton addItemsWithTitles:[prefs objectForKey:@"queryHistory"]];
}
[self setFavorites];
+
+ // To be able to disable runSelectionMenuItem
+ [[runSelectionMenuItem menu] setAutoenablesItems:NO];
+ // Disable runSelectionMenuItem in the gear menu
+ [runSelectionMenuItem setEnabled:NO];
+
}
- (void)setFavorites
@@ -1029,6 +1035,9 @@ traps enter key and
// Ensure that the notification is from the custom query text view
if ( [aNotification object] != textView ) return;
+ // To be able to disable runSelectionMenuItem
+ [[runSelectionMenuItem menu] setAutoenablesItems:NO];
+
// If no text is selected, disable the button and action menu.
if ( [textView selectedRange].location == NSNotFound ) {
[runSelectionButton setEnabled:NO];
@@ -1106,9 +1115,9 @@ traps enter key and
// For selection ranges, enable the button.
} else {
[runSelectionButton setTitle:NSLocalizedString(@"Run Selection", @"Title of button to run selected text in custom query view")];
- [runSelectionButton setEnabled:YES];
+ [runSelectionButton setEnabled:YES];
[runSelectionMenuItem setTitle:NSLocalizedString(@"Run Selected Text", @"Title of action menu item to run selected text in custom query view")];
- [runSelectionMenuItem setEnabled:YES];
+ [runSelectionMenuItem setEnabled:YES];
}
}
@@ -1154,6 +1163,7 @@ traps enter key and
self = [super init];
prefs = nil;
usedQuery = [[NSString stringWithString:@""] retain];
+
return self;
}