From d863cf03533777238f5c24221451f6513b88016d Mon Sep 17 00:00:00 2001 From: Storm Dragon Date: Wed, 18 Dec 2024 19:25:24 -0500 Subject: [PATCH 1/3] Fixed the preferences gui keyboard shortcut. --- src/cthulhu/scripts/default.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/cthulhu/scripts/default.py b/src/cthulhu/scripts/default.py index 27a4aed..972d8a7 100644 --- a/src/cthulhu/scripts/default.py +++ b/src/cthulhu/scripts/default.py @@ -209,6 +209,16 @@ class Script(script.Script): cthulhu.quitCthulhu, cmdnames.QUIT_CTHULHU) + self.inputEventHandlers["preferencesSettingsHandler"] = \ + input_event.InputEventHandler( + orca.showPreferencesGUI, + cmdnames.SHOW_PREFERENCES_GUI) + + self.inputEventHandlers["appPreferencesSettingsHandler"] = \ + input_event.InputEventHandler( + orca.showAppPreferencesGUI, + cmdnames.SHOW_APP_PREFERENCES_GUI) + self.inputEventHandlers["cycleSettingsProfileHandler"] = \ input_event.InputEventHandler( Script.cycleSettingsProfile, From 53e6e095b39be1991a5698d9f19a3f4e1e4a4816 Mon Sep 17 00:00:00 2001 From: Storm Dragon Date: Wed, 18 Dec 2024 19:33:16 -0500 Subject: [PATCH 2/3] Oops, forgot to change orca to cthulhu in a couple of spots, no worky. --- src/cthulhu/scripts/default.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cthulhu/scripts/default.py b/src/cthulhu/scripts/default.py index 972d8a7..5a19f7a 100644 --- a/src/cthulhu/scripts/default.py +++ b/src/cthulhu/scripts/default.py @@ -211,12 +211,12 @@ class Script(script.Script): self.inputEventHandlers["preferencesSettingsHandler"] = \ input_event.InputEventHandler( - orca.showPreferencesGUI, + cthulhu.showPreferencesGUI, cmdnames.SHOW_PREFERENCES_GUI) self.inputEventHandlers["appPreferencesSettingsHandler"] = \ input_event.InputEventHandler( - orca.showAppPreferencesGUI, + cthulhu.showAppPreferencesGUI, cmdnames.SHOW_APP_PREFERENCES_GUI) self.inputEventHandlers["cycleSettingsProfileHandler"] = \ From 80033b3f3785946ae84ab4306e90a1542cb61279 Mon Sep 17 00:00:00 2001 From: Storm Dragon Date: Wed, 18 Dec 2024 19:41:39 -0500 Subject: [PATCH 3/3] Fixed missing function. --- src/cthulhu/cthulhu.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/cthulhu/cthulhu.py b/src/cthulhu/cthulhu.py index 66dc7d8..ba0a3b4 100644 --- a/src/cthulhu/cthulhu.py +++ b/src/cthulhu/cthulhu.py @@ -554,6 +554,23 @@ def _showPreferencesUI(script, prefs): cthulhu_state.cthulhuOS.init(script) cthulhu_state.cthulhuOS.showGUI() +def showAppPreferencesGUI(script=None, inputEvent=None): + """Displays the user interface to configure the settings for a + specific applications within Cthulhu and set up those app-specific + user preferences using a GUI. + + Returns True to indicate the input event has been consumed. + """ + + prefs = {} + for key in settings.userCustomizableSettings: + prefs[key] = _settingsManager.getSetting(key) + + script = script or cthulhu_state.activeScript + _showPreferencesUI(script, prefs) + + return True + def showPreferencesGUI(script=None, inputEvent=None): """Displays the user interface to configure Cthulhu and set up user preferences using a GUI.