Commit 0a3d6060 authored by Jack Jansen's avatar Jack Jansen

Only show the UI for selecting options if the ALT key was depressed while

dragging or double-clicking the script.
parent 0dbab4c5
#import "MyAppDelegate.h" #import "MyAppDelegate.h"
#import "PreferencesWindowController.h" #import "PreferencesWindowController.h"
#import <Carbon/Carbon.h>
@implementation MyAppDelegate @implementation MyAppDelegate
...@@ -29,12 +30,13 @@ ...@@ -29,12 +30,13 @@
- (BOOL)shouldShowUI - (BOOL)shouldShowUI
{ {
// if this call comes before applicationDidFinishLaunching: we do not show a UI // if this call comes before applicationDidFinishLaunching: we
// for the file. Also, we should terminate immedeately after starting the script. // should terminate immedeately after starting the script.
if (initial_action_done) if (!initial_action_done)
return YES;
initial_action_done = YES;
should_terminate = YES; should_terminate = YES;
initial_action_done = YES;
if( GetCurrentKeyModifiers() & optionKey )
return YES;
return NO; return NO;
} }
...@@ -48,17 +50,4 @@ ...@@ -48,17 +50,4 @@
return NO; 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 @end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment