Disable global hotkeys again for macOS < 15.0

Clearly, NSUserDefaults bindings were not really meant to be used in
practice at all, as they do nothing but crash the app.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
This commit is contained in:
Christopher Snowhill 2025-03-09 14:23:59 -07:00
parent 6036000214
commit 05f2434462
2 changed files with 27 additions and 14 deletions

View file

@ -210,11 +210,13 @@ static BOOL consentLastEnabled = NO;
[randomizeButton setToolTip:NSLocalizedString(@"RandomizeButtonTooltip", @"")]; [randomizeButton setToolTip:NSLocalizedString(@"RandomizeButtonTooltip", @"")];
[fileButton setToolTip:NSLocalizedString(@"FileButtonTooltip", @"")]; [fileButton setToolTip:NSLocalizedString(@"FileButtonTooltip", @"")];
if(@available(macOS 15, *)) {
[self registerDefaultHotKeys]; [self registerDefaultHotKeys];
[self migrateHotKeys]; [self migrateHotKeys];
[self registerHotKeys]; [self registerHotKeys];
}
(void)[spotlightWindowController init]; (void)[spotlightWindowController init];

View file

@ -41,6 +41,7 @@
[[NSBundle bundleWithIdentifier:@"org.cogx.cog.preferences"] loadNibNamed:@"Preferences" [[NSBundle bundleWithIdentifier:@"org.cogx.cog.preferences"] loadNibNamed:@"Preferences"
owner:plugin owner:plugin
topLevelObjects:nil]; topLevelObjects:nil];
if(@available(macos 15, *)) {
return @[[plugin playlistPane], return @[[plugin playlistPane],
[plugin hotKeyPane], [plugin hotKeyPane],
[plugin updatesPane], [plugin updatesPane],
@ -50,6 +51,16 @@
[plugin appearancePane], [plugin appearancePane],
[plugin midiPane], [plugin midiPane],
[plugin rubberbandPane]]; [plugin rubberbandPane]];
} else {
return @[[plugin playlistPane],
[plugin updatesPane],
[plugin outputPane],
[plugin generalPane],
[plugin notificationsPane],
[plugin appearancePane],
[plugin midiPane],
[plugin rubberbandPane]];
}
} }
- (HotKeyPane *)hotKeyPane { - (HotKeyPane *)hotKeyPane {