aboutsummaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authoravenjamin <avenjamin@gmail.com>2009-03-22 07:05:18 +0000
committeravenjamin <avenjamin@gmail.com>2009-03-22 07:05:18 +0000
commit0aaf081f83c5df251ce5101da6795a59299bc0d9 (patch)
treeccb7bcdb3159d460f1b05b5bd5a74191c721d657 /Source
parent970f249810e35f46f06e26e9bf864b756213e582 (diff)
downloadsequelpro-0aaf081f83c5df251ce5101da6795a59299bc0d9.tar.gz
sequelpro-0aaf081f83c5df251ce5101da6795a59299bc0d9.tar.bz2
sequelpro-0aaf081f83c5df251ce5101da6795a59299bc0d9.zip
- Added tooltips to action button menu items
- Removed refresh tables menu item - refresh button right beside it.
Diffstat (limited to 'Source')
-rw-r--r--Source/TableDocument.m2
-rw-r--r--Source/TablesList.m15
2 files changed, 15 insertions, 2 deletions
diff --git a/Source/TableDocument.m b/Source/TableDocument.m
index 6d936800..8596f60b 100644
--- a/Source/TableDocument.m
+++ b/Source/TableDocument.m
@@ -1141,7 +1141,7 @@ NSString *TableDocumentFavoritesControllerFavoritesDidChange = @"TableDocumentFa
* Menu validation
*/
- (BOOL)validateMenuItem:(NSMenuItem *)menuItem
-{
+{
if ([menuItem action] == @selector(import:) ||
[menuItem action] == @selector(export:) ||
[menuItem action] == @selector(exportMultipleTables:) ||
diff --git a/Source/TablesList.m b/Source/TablesList.m
index 602e4644..afe60a25 100644
--- a/Source/TablesList.m
+++ b/Source/TablesList.m
@@ -266,7 +266,7 @@ closes copyTableSheet and stops modal session
/*
removes selected table(s) from mysql-db and tableView
*/
-- (void)removeTable;
+- (void)removeTable
{
NSIndexSet *indexes = [tablesListView selectedRowIndexes];
NSString *errorText;
@@ -732,6 +732,19 @@ loads structure or source if tab selected the first time
*/
}
+- (BOOL)validateMenuItem:(NSMenuItem *)menuItem
+{
+ // popup button below table list
+ if ([menuItem action] == @selector(copyTable:) ||
+ [menuItem action] == @selector(removeTable:))
+ {
+ return [tablesListView numberOfSelectedRows] > 0;
+ }
+
+ return [super validateMenuItem:menuItem];
+}
+
+
#pragma mark -
//last but not least
- (id)init