Skip to content

Commit

Permalink
fix: init - accidentally remove gui kwarg (#45)
Browse files Browse the repository at this point in the history
the rabbit warned me!
  • Loading branch information
JarbasAl authored Nov 5, 2024
1 parent e0eed10 commit 6e47041
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions ovos_gui_plugin_shell_companion/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import platform
from os.path import join, dirname
from typing import Optional, Any, Dict

from ovos_bus_client import Message
from ovos_bus_client.apis.gui import GUIInterface
Expand All @@ -26,15 +27,18 @@ class OVOSShellCompanionExtension(GUIExtension):
bus: MessageBus instance
"""

def __init__(self, config: dict, bus: MessageBusClient = None):
def __init__(self, config: Dict[str, Any],
bus: Optional[MessageBusClient] = None,
gui: Optional[GUIInterface] = None):
LOG.info("OVOS Shell: Initializing")
bus = bus or get_mycroft_bus()
config["homescreen_supported"] = True
res_dir = join(dirname(__file__), "gui")
gui = GUIInterface("ovos_gui_plugin_shell_companion",
bus=bus, config=Configuration().get("gui", {}),
ui_directories={"qt5": join(res_dir, "qt5")})
LOG.info(f"Setting default qt5 resource directory to: {res_dir}/qt5")
gui = gui or GUIInterface("ovos_gui_plugin_shell_companion",
bus=bus, config=Configuration().get("gui", {}),
ui_directories={"qt5": join(res_dir, "qt5")})
gui.ui_directories["qt5"] = join(res_dir, "qt5")
LOG.info(f"Shell companion: qt5 resources directory: {res_dir}/qt5")
super().__init__(config=config, bus=bus, gui=gui,
preload_gui=False, permanent=True)
self.about_page_data = []
Expand Down

0 comments on commit 6e47041

Please sign in to comment.