-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
HotkeysPrefs.m
53 lines (44 loc) · 1.29 KB
/
HotkeysPrefs.m
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
//
// HotkeysPrefs.m
// Hachidori
//
// Created by Nanoha Takamachi on 2014/12/21.
//
//
#import "HotkeysPrefs.h"
#import "HotKeyConstants.h"
@interface HotkeysPrefs ()
@end
@implementation HotkeysPrefs
- (instancetype)init
{
return [super initWithNibName:@"HotkeysPrefs" bundle:nil];
}
#pragma mark -
#pragma mark MASPreferencesViewController
- (void)loadView{
[super loadView];
// Set Shortcut Recorder Viewer Defaults Key
self.confirmupdateshortcutView.associatedUserDefaultsKey = kPreferenceConfirmUpdateShortcut;
self.scrobblenowshortcutView.associatedUserDefaultsKey = kPreferenceScrobbleNowShortcut;
self.statusshortcutView.associatedUserDefaultsKey = kPreferenceShowStatusMenuShortcut;
self.toggleautoscrobbleshortcutView.associatedUserDefaultsKey = kPreferenceToggleScrobblingShortcut;
}
- (NSString *)viewIdentifier
{
return @"HotkeyPreferences";
}
- (NSImage *)toolbarItemImage
{
if (@available(macOS 11.0, *)) {
return [NSImage imageWithSystemSymbolName:@"command.square" accessibilityDescription:nil];
} else {
// Fallback on earlier versions
return [NSImage imageNamed:@"Hotkeys"];
}
}
- (NSString *)toolbarItemLabel
{
return NSLocalizedString(@"Hotkeys", @"Toolbar item name for the Hotkeys preference pane");
}
@end