summaryrefslogtreecommitdiffstats
path: root/Mac/OSX
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>2002-08-01 15:07:00 (GMT)
committerJack Jansen <jack.jansen@cwi.nl>2002-08-01 15:07:00 (GMT)
commit0a3d6060d53da872729997807e1f564dbbb8c550 (patch)
tree5ad8d20c6182798e36708620dde3b430b0a8a051 /Mac/OSX
parent0dbab4c560c944956e4b732fe33ba0d72a8fb6df (diff)
downloadcpython-0a3d6060d53da872729997807e1f564dbbb8c550.zip
cpython-0a3d6060d53da872729997807e1f564dbbb8c550.tar.gz
cpython-0a3d6060d53da872729997807e1f564dbbb8c550.tar.bz2
Only show the UI for selecting options if the ALT key was depressed while
dragging or double-clicking the script.
Diffstat (limited to 'Mac/OSX')
-rw-r--r--Mac/OSX/PythonLauncher/MyAppDelegate.m25
1 files changed, 7 insertions, 18 deletions
diff --git a/Mac/OSX/PythonLauncher/MyAppDelegate.m b/Mac/OSX/PythonLauncher/MyAppDelegate.m
index 107e7d0..cb97972 100644
--- a/Mac/OSX/PythonLauncher/MyAppDelegate.m
+++ b/Mac/OSX/PythonLauncher/MyAppDelegate.m
@@ -1,5 +1,6 @@
#import "MyAppDelegate.h"
#import "PreferencesWindowController.h"
+#import <Carbon/Carbon.h>
@implementation MyAppDelegate
@@ -29,12 +30,13 @@
- (BOOL)shouldShowUI
{
- // if this call comes before applicationDidFinishLaunching: we do not show a UI
- // for the file. Also, we should terminate immedeately after starting the script.
- if (initial_action_done)
- return YES;
+ // if this call comes before applicationDidFinishLaunching: we
+ // should terminate immedeately after starting the script.
+ if (!initial_action_done)
+ should_terminate = YES;
initial_action_done = YES;
- should_terminate = YES;
+ if( GetCurrentKeyModifiers() & optionKey )
+ return YES;
return NO;
}
@@ -48,17 +50,4 @@
return NO;
}
-
-- (BOOL)application:(NSApplication *)sender xx_openFile:(NSString *)filename
-{
- initial_action_done = YES;
- return YES;
-}
-
-- (BOOL)application:(id)sender xx_openFileWithoutUI:(NSString *)filename
-{
- initial_action_done = YES;
- return YES;
-}
-
@end