aboutsummaryrefslogtreecommitdiffstats
path: root/Source/TableDocument.m
diff options
context:
space:
mode:
authoravenjamin <avenjamin@gmail.com>2008-12-22 11:42:46 +0000
committeravenjamin <avenjamin@gmail.com>2008-12-22 11:42:46 +0000
commit041f6415294ae42bccd414997b241227164984b7 (patch)
tree3e057622e15755084981d301ba76bcd1eb559a11 /Source/TableDocument.m
parent3c337359293bb47598574720906058f30cb33895 (diff)
downloadsequelpro-041f6415294ae42bccd414997b241227164984b7.tar.gz
sequelpro-041f6415294ae42bccd414997b241227164984b7.tar.bz2
sequelpro-041f6415294ae42bccd414997b241227164984b7.zip
Disabled "Remove Database…" menu item when no database selected. Issue #124
Diffstat (limited to 'Source/TableDocument.m')
-rw-r--r--Source/TableDocument.m4
1 files changed, 4 insertions, 0 deletions
diff --git a/Source/TableDocument.m b/Source/TableDocument.m
index 15e875e8..d1412032 100644
--- a/Source/TableDocument.m
+++ b/Source/TableDocument.m
@@ -1192,6 +1192,10 @@ NSString *TableDocumentFavoritesControllerFavoritesDidChange = @"TableDocumentFa
return [self supportsEncoding];
}
+ if ([menuItem action] == @selector(removeDatabase:)) {
+ return ([self database] != nil);
+ }
+
// table menu items
if ([menuItem action] == @selector(showCreateTableSyntax:) ||
[menuItem action] == @selector(copyCreateTableSyntax:) ||