From 0aaf081f83c5df251ce5101da6795a59299bc0d9 Mon Sep 17 00:00:00 2001 From: avenjamin Date: Sun, 22 Mar 2009 07:05:18 +0000 Subject: - Added tooltips to action button menu items - Removed refresh tables menu item - refresh button right beside it. --- Source/TablesList.m | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'Source/TablesList.m') 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 -- cgit v1.2.3