blob: 83d03ae4f38815506a90610e442f736d516cb8f6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
//
// AppDelegate.m
// Low Battery Yup
//
// Created by TW on 11/16/16.
// Copyright (c) 2016 TW. All rights reserved.
//
#import "AppDelegate.h"
#import "Constants.h"
@implementation AppDelegate
- (void)dealloc
{
[super dealloc];
}
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification
{
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
{
return YES;
}
@end
|