diff options
author | Bibiko <bibiko@eva.mpg.de> | 2009-10-14 15:07:25 +0000 |
---|---|---|
committer | Bibiko <bibiko@eva.mpg.de> | 2009-10-14 15:07:25 +0000 |
commit | 0eb001d5b887776b827d503568921f6230bf862a (patch) | |
tree | 5836b41c3fcb7506f21769eaf59000d98bd3661e /Source/SPAppController.m | |
parent | 080b6b90f0021d6f58090cc19f268f8f0df86351 (diff) | |
download | sequelpro-0eb001d5b887776b827d503568921f6230bf862a.tar.gz sequelpro-0eb001d5b887776b827d503568921f6230bf862a.tar.bz2 sequelpro-0eb001d5b887776b827d503568921f6230bf862a.zip |
• added AppleScript support for "make new document"
• fixed validation of the main menu item "Print" - only enabled if one table is selected (otherwise it throws an exception)
Diffstat (limited to 'Source/SPAppController.m')
-rw-r--r-- | Source/SPAppController.m | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Source/SPAppController.m b/Source/SPAppController.m index 15e36fc4..43d7b8c5 100644 --- a/Source/SPAppController.m +++ b/Source/SPAppController.m @@ -546,6 +546,16 @@ return [[NSDocumentController sharedDocumentController] documents]; } +/* Support for "make new document" +*/ +- (void)insertInOrderedDocuments:(TableDocument *)doc { + if ([[NSUserDefaults standardUserDefaults] boolForKey:@"AutoConnectToDefault"]) + [doc setShouldAutomaticallyConnect:YES]; + [[NSDocumentController sharedDocumentController] addDocument:doc]; + [doc makeWindowControllers]; + [doc showWindows]; +} + /* * AppleScript calls that method to get the available windows */ |