From 041f6415294ae42bccd414997b241227164984b7 Mon Sep 17 00:00:00 2001 From: avenjamin Date: Mon, 22 Dec 2008 11:42:46 +0000 Subject: =?UTF-8?q?Disabled=20"Remove=20Database=E2=80=A6"=20menu=20item?= =?UTF-8?q?=20when=20no=20database=20selected.=20Issue=20#124?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Source/TableDocument.m | 4 ++++ 1 file changed, 4 insertions(+) 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:) || -- cgit v1.2.3