aboutsummaryrefslogtreecommitdiffstats
path: root/Demo
diff options
context:
space:
mode:
authorTomáš Znamenáček2014-08-07 10:10:08 +0200
committerTomáš Znamenáček2015-01-07 15:42:21 +0100
commitbe9358bf32dc402f3bc77c6cc20957047ab363af (patch)
tree48edbf8bed4603fbb4ba5d4b6857dc7e4c6d2c0c /Demo
parentf9f48f5ca83f7723eabdd16d0c95195092a8a514 (diff)
downloadMASShortcut-be9358bf32dc402f3bc77c6cc20957047ab363af.tar.bz2
Turned MASShortcutMonitor into a singleton.
There can only be one Carbon event handler, so it doesn’t make sense to create multiple instances of the shortcut monitor.
Diffstat (limited to 'Demo')
-rw-r--r--Demo/AppDelegate.m3
1 files changed, 1 insertions, 2 deletions
diff --git a/Demo/AppDelegate.m b/Demo/AppDelegate.m
index d2c07ba..81b2661 100644
--- a/Demo/AppDelegate.m
+++ b/Demo/AppDelegate.m
@@ -16,8 +16,7 @@ NSString *const MASPreferenceKeyConstantShortcutEnabled = @"MASDemoConstantShort
[super awakeFromNib];
_shortcutBinder = [[MASShortcutBinder alloc] init];
- _shortcutMonitor = [[MASShortcutMonitor alloc] init];
- [_shortcutBinder setShortcutMonitor:_shortcutMonitor];
+ _shortcutMonitor = [MASShortcutMonitor sharedMonitor];
// Checkbox will enable and disable the shortcut view
[self.shortcutView bind:@"enabled" toObject:self withKeyPath:@"shortcutEnabled" options:nil];