feat(tray): set_warning() für Tray-Tooltip-Warnung

This commit is contained in:
2026-05-14 18:12:21 +02:00
parent 2e29f1729b
commit d0aca751bd
+8
View File
@@ -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