diff --git a/yin_yang/plugins/_plugin.py b/yin_yang/plugins/_plugin.py index 1a0007e..a8b98d5 100644 --- a/yin_yang/plugins/_plugin.py +++ b/yin_yang/plugins/_plugin.py @@ -257,7 +257,7 @@ class DBusPlugin(Plugin): def __init__(self, message_data: List[str]): super().__init__() self.connection = QDBusConnection.sessionBus() - self.message = QDBusMessage() + self.message: QDBusMessage self.message_data: List[str] = message_data # Store DBusMessage data(destination, path, interface, method) def set_theme(self, theme: str): diff --git a/yin_yang/plugins/notify.py b/yin_yang/plugins/notify.py index 6184eeb..adaff67 100644 --- a/yin_yang/plugins/notify.py +++ b/yin_yang/plugins/notify.py @@ -1,14 +1,12 @@ -from PySide6.QtDBus import QDBusMessage - from ..NotificationHandler import create_dbus_message from ._plugin import DBusPlugin class Notification(DBusPlugin): def __init__(self): - super().__init__() - self.theme_light = 'Day' - self.theme_dark = 'Night' + super().__init__([]) # We do everything in [create_dbus_message] + self.theme_light = "Day" + self.theme_dark = "Night" - def create_message(self, theme: str) -> QDBusMessage: - return create_dbus_message('Theme changed', f'Set the theme to {theme}') + def create_message(self, theme: str): + self.message = create_dbus_message("Theme changed", f"Set the theme to {theme}")