diff --git a/src/cthulhu/cthulhu.py b/src/cthulhu/cthulhu.py index f5db1e9..399d378 100644 --- a/src/cthulhu/cthulhu.py +++ b/src/cthulhu/cthulhu.py @@ -530,6 +530,26 @@ def loadUserSettings(script=None, inputEvent=None, skipReloadMessage=False): return True +def _showPreferencesUI(script, prefs): + if cthulhu_state.cthulhuOS: + cthulhu_state.cthulhuOS.showGUI() + return + + try: + module = importlib.import_module('.cthulhu_gui_prefs', 'cthulhu') + except Exception: + debug.printException(debug.LEVEL_SEVERE) + return + + uiFile = os.path.join(cthulhu_platform.datadir, + cthulhu_platform.package, + "ui", + "cthulhu-setup.ui") + + cthulhu_state.cthulhuOS = module.CthulhuSetupGUI(uiFile, "cthulhuSetupWindow", prefs) + cthulhu_state.cthulhuOS.init(script) + cthulhu_state.cthulhuOS.showGUI() + def showPreferencesGUI(script=None, inputEvent=None): """Displays the user interface to configure Cthulhu and set up user preferences using a GUI.