diff --git a/whisper_local/tray/_tray.py b/whisper_local/tray/_tray.py index 4ff255b..8b253d7 100644 --- a/whisper_local/tray/_tray.py +++ b/whisper_local/tray/_tray.py @@ -43,6 +43,11 @@ class PystrayApp: from whisper_local.tray._icon import create_icon self._icon.icon = create_icon(state) + def set_warning(self, msg: str | None) -> None: + """Setzt Tray-Titel auf Warnung oder zurück auf normal (thread-sicher).""" + if self._icon is not None: + self._icon.title = "whisper-local" if msg is None else f"whisper-local ⚠ {msg}" + def _menu_settings(self, icon, item) -> None: self._on_settings() @@ -60,3 +65,6 @@ class NoOpTray: def set_state(self, state: AppState) -> None: pass + + def set_warning(self, msg: str | None) -> None: + pass