aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBibiko <bibiko@eva.mpg.de>2009-10-13 13:04:47 +0000
committerBibiko <bibiko@eva.mpg.de>2009-10-13 13:04:47 +0000
commitd77ef8c0d4526c44823216c219f0734639cad701 (patch)
tree48ad35f1035b41dcfd3e2c1bb5b067f77df8f4a0
parenta2a954c933d261e0cb9a0b4eca0d0d1f42902e81 (diff)
downloadsequelpro-d77ef8c0d4526c44823216c219f0734639cad701.tar.gz
sequelpro-d77ef8c0d4526c44823216c219f0734639cad701.tar.bz2
sequelpro-d77ef8c0d4526c44823216c219f0734639cad701.zip
• cleaned the current Applescript support definitions slightly
- removed unnecessary method 'handleQuitScriptCommand' from SPAppController - set main class to SPAppController
-rw-r--r--Resources/sequel-pro.scriptSuite5
-rw-r--r--Resources/sequel-pro.scriptTerminology36
-rw-r--r--Source/SPAppController.h3
-rw-r--r--Source/SPAppController.m13
4 files changed, 21 insertions, 36 deletions
diff --git a/Resources/sequel-pro.scriptSuite b/Resources/sequel-pro.scriptSuite
index e5dcb29f..3d98e84d 100644
--- a/Resources/sequel-pro.scriptSuite
+++ b/Resources/sequel-pro.scriptSuite
@@ -3,12 +3,11 @@
"AppleEventCode" = "cmec";
"Classes" = {
- "NSApplication" = {
- "Superclass" = "NSCoreSuite.NSApplication";
+ "SPAppController" = {
+ "Superclass" = "NSCoreSuite.AbstractObject";
"AppleEventCode" = "capp";
"SupportedCommands" = {
"authenticate" = "authenticate:";
- "NSCoreSuite.Quit" = "handleQuitScriptCommand:";
};
};
};
diff --git a/Resources/sequel-pro.scriptTerminology b/Resources/sequel-pro.scriptTerminology
index a59a137d..f569cbfe 100644
--- a/Resources/sequel-pro.scriptTerminology
+++ b/Resources/sequel-pro.scriptTerminology
@@ -2,28 +2,28 @@
"Name" = "Sequel Pro suite";
"Description" = "Sequel Pro specific classes.";
"Classes" = {
- "NSApplication" = {
+ "SPAppController" = {
"Name" = "application";
"PluralName" = "applications";
"Description" = "Sequel Pro application";
};
- };
- "Commands" = {
- "authenticate" = {
- "Name" = "authenticate";
- "Description" = "Open the dialog asking for password or passphrase";
- "Arguments" = {
- "query" = {
- "Name" = "query phrase";
- "Description" = "The string to show in the dialog";
- };
- "fifo" = {
- "Name" = "fifo";
- "Description" = "The FIFO file where expecting the passphrase";
- };
- "tunnelName" = {
- "Name" = "tunnel";
- "Description" = "Tunnel's name";
+ "Commands" = {
+ "authenticate" = {
+ "Name" = "authenticate";
+ "Description" = "Open the dialog asking for password or passphrase";
+ "Arguments" = {
+ "query" = {
+ "Name" = "query phrase";
+ "Description" = "The string to show in the dialog";
+ };
+ "fifo" = {
+ "Name" = "fifo";
+ "Description" = "The FIFO file where expecting the passphrase";
+ };
+ "tunnelName" = {
+ "Name" = "tunnel";
+ "Description" = "Tunnel's name";
+ };
};
};
};
diff --git a/Source/SPAppController.h b/Source/SPAppController.h
index f22cd1d5..473baa23 100644
--- a/Source/SPAppController.h
+++ b/Source/SPAppController.h
@@ -52,9 +52,6 @@
// Getters
- (SPPreferenceController *)preferenceController;
-// AppleScript handler
-- (id)handleQuitScriptCommand:(NSScriptCommand *)command;
-
// Others
- (NSString *)contentOfFile:(NSString *)aPath;
diff --git a/Source/SPAppController.m b/Source/SPAppController.m
index e329f796..09bca271 100644
--- a/Source/SPAppController.m
+++ b/Source/SPAppController.m
@@ -390,7 +390,7 @@
- (BOOL)applicationShouldOpenUntitledFile:(NSApplication *)sender
{
TableDocument *firstTableDocument;
-
+
// Manually open a new document, setting SPAppController as sender to trigger autoconnection
if (firstTableDocument = [[NSDocumentController sharedDocumentController] makeUntitledDocumentOfType:@"SequelPro connection" error:nil]) {
if ([[NSUserDefaults standardUserDefaults] boolForKey:@"AutoConnectToDefault"]) {
@@ -478,17 +478,6 @@
return @"";
}
-
-
-/**
- * AppleScript handler to quit Sequel Pro
- */
-- (id)handleQuitScriptCommand:(NSScriptCommand *)command
-{
- [NSApp terminate:self];
- return nil;
-}
-
/**
* Sparkle updater delegate method. Called just before the updater relaunches Sequel Pro and we need to make
* sure that no sheets are currently open, which will prevent the app from being quit.