From 0eb001d5b887776b827d503568921f6230bf862a Mon Sep 17 00:00:00 2001 From: Bibiko Date: Wed, 14 Oct 2009 15:07:25 +0000 Subject: =?UTF-8?q?=E2=80=A2=20added=20AppleScript=20support=20for=20"make?= =?UTF-8?q?=20new=20document"=20=E2=80=A2=20fixed=20validation=20of=20the?= =?UTF-8?q?=20main=20menu=20item=20"Print"=20-=20only=20enabled=20if=20one?= =?UTF-8?q?=20table=20is=20selected=20(otherwise=20it=20throws=20an=20exce?= =?UTF-8?q?ption)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Source/TableDocument.m | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Source/TableDocument.m') diff --git a/Source/TableDocument.m b/Source/TableDocument.m index f465628c..427e73fd 100644 --- a/Source/TableDocument.m +++ b/Source/TableDocument.m @@ -2674,6 +2674,10 @@ return ([self database] != nil && [self table] != nil); } + if ([menuItem action] == @selector(printDocument:)) { + return ([self database] != nil && [[tablesListInstance valueForKeyPath:@"tablesListView"] numberOfSelectedRows] == 1); + } + if ([menuItem action] == @selector(chooseEncoding:)) { return [self supportsEncoding]; } -- cgit v1.2.3