Compare commits

...

4 Commits

Author SHA1 Message Date
Storm Dragon
c46cf1c939 Merge branch 'testing' fixed preferences GUI. 2024-12-18 19:45:59 -05:00
Storm Dragon
80033b3f37 Fixed missing function. 2024-12-18 19:41:39 -05:00
Storm Dragon
53e6e095b3 Oops, forgot to change orca to cthulhu in a couple of spots, no worky. 2024-12-18 19:33:16 -05:00
Storm Dragon
d863cf0353 Fixed the preferences gui keyboard shortcut. 2024-12-18 19:25:24 -05:00
2 changed files with 27 additions and 0 deletions

View File

@ -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.

View File

@ -209,6 +209,16 @@ class Script(script.Script):
cthulhu.quitCthulhu,
cmdnames.QUIT_CTHULHU)
self.inputEventHandlers["preferencesSettingsHandler"] = \
input_event.InputEventHandler(
cthulhu.showPreferencesGUI,
cmdnames.SHOW_PREFERENCES_GUI)
self.inputEventHandlers["appPreferencesSettingsHandler"] = \
input_event.InputEventHandler(
cthulhu.showAppPreferencesGUI,
cmdnames.SHOW_APP_PREFERENCES_GUI)
self.inputEventHandlers["cycleSettingsProfileHandler"] = \
input_event.InputEventHandler(
Script.cycleSettingsProfile,