aboutsummaryrefslogtreecommitdiffstats
path: root/Low Battery Yup/AppDelegate.m
diff options
context:
space:
mode:
Diffstat (limited to 'Low Battery Yup/AppDelegate.m')
-rw-r--r--Low Battery Yup/AppDelegate.m10
1 files changed, 9 insertions, 1 deletions
diff --git a/Low Battery Yup/AppDelegate.m b/Low Battery Yup/AppDelegate.m
index e5b9d90..83d03ae 100644
--- a/Low Battery Yup/AppDelegate.m
+++ b/Low Battery Yup/AppDelegate.m
@@ -7,6 +7,7 @@
//
#import "AppDelegate.h"
+#import "Constants.h"
@implementation AppDelegate
@@ -17,7 +18,14 @@
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification
{
- // Insert code here to initialize your application
+ NSDictionary *saved_shortcut;
+ if ((saved_shortcut = [[NSUserDefaults standardUserDefaults] objectForKey:kPreferenceGlobalShortcut])) {
+ MASShortcut *shortcut = [MASShortcut
+ shortcutWithKeyCode:[[saved_shortcut objectForKey:@"keyCode"] unsignedIntegerValue]
+ modifierFlags:[[saved_shortcut objectForKey:@"modifierFlags"] unsignedIntegerValue]];
+
+ [_shortcut_view setShortcutValue:shortcut];
+ }
}
- (BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication *)theApplication