From 318cfd71ea1752baf6518a50711abaf819935176 Mon Sep 17 00:00:00 2001 From: Christopher Snowhill Date: Sun, 9 Mar 2025 18:22:48 -0700 Subject: [PATCH] Bug Fix: Fix circular bind setter loop in hotkeys MASShortcut had a potential circular loop in its bindings, let's fix that right up. Signed-off-by: Christopher Snowhill --- Application/AppController.m | 12 ++++----- Frameworks/shpakovski/MASShortcut | 2 +- .../Preferences/GeneralPreferencesPlugin.m | 26 ++++++------------- 3 files changed, 14 insertions(+), 26 deletions(-) diff --git a/Application/AppController.m b/Application/AppController.m index e137d46e4..3868f24b0 100644 --- a/Application/AppController.m +++ b/Application/AppController.m @@ -186,13 +186,11 @@ static BOOL consentLastEnabled = NO; [randomizeButton setToolTip:NSLocalizedString(@"RandomizeButtonTooltip", @"")]; [fileButton setToolTip:NSLocalizedString(@"FileButtonTooltip", @"")]; - if(@available(macOS 15, *)) { - [self registerDefaultHotKeys]; - - [self migrateHotKeys]; - - [self registerHotKeys]; - } + [self registerDefaultHotKeys]; + + [self migrateHotKeys]; + + [self registerHotKeys]; (void)[spotlightWindowController init]; diff --git a/Frameworks/shpakovski/MASShortcut b/Frameworks/shpakovski/MASShortcut index c4a91c10e..e5e82dcef 160000 --- a/Frameworks/shpakovski/MASShortcut +++ b/Frameworks/shpakovski/MASShortcut @@ -1 +1 @@ -Subproject commit c4a91c10e47310dba71782c46577e31117d0b6ef +Subproject commit e5e82dcef993dfbae9ac26917b2bb8d4bd000932 diff --git a/Preferences/Preferences/GeneralPreferencesPlugin.m b/Preferences/Preferences/GeneralPreferencesPlugin.m index f7ea717f9..e43f6cfdd 100644 --- a/Preferences/Preferences/GeneralPreferencesPlugin.m +++ b/Preferences/Preferences/GeneralPreferencesPlugin.m @@ -41,24 +41,14 @@ [[NSBundle bundleWithIdentifier:@"org.cogx.cog.preferences"] loadNibNamed:@"Preferences" owner:plugin topLevelObjects:nil]; - if(@available(macos 15, *)) { - return @[[plugin playlistPane], - [plugin hotKeyPane], - [plugin outputPane], - [plugin generalPane], - [plugin notificationsPane], - [plugin appearancePane], - [plugin midiPane], - [plugin rubberbandPane]]; - } else { - return @[[plugin playlistPane], - [plugin outputPane], - [plugin generalPane], - [plugin notificationsPane], - [plugin appearancePane], - [plugin midiPane], - [plugin rubberbandPane]]; - } + return @[[plugin playlistPane], + [plugin hotKeyPane], + [plugin outputPane], + [plugin generalPane], + [plugin notificationsPane], + [plugin appearancePane], + [plugin midiPane], + [plugin rubberbandPane]]; } - (HotKeyPane *)hotKeyPane {