feat(tray): set_warning() für Tray-Tooltip-Warnung
This commit is contained in:
@@ -43,6 +43,11 @@ class PystrayApp:
|
|||||||
from whisper_local.tray._icon import create_icon
|
from whisper_local.tray._icon import create_icon
|
||||||
self._icon.icon = create_icon(state)
|
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:
|
def _menu_settings(self, icon, item) -> None:
|
||||||
self._on_settings()
|
self._on_settings()
|
||||||
|
|
||||||
@@ -60,3 +65,6 @@ class NoOpTray:
|
|||||||
|
|
||||||
def set_state(self, state: AppState) -> None:
|
def set_state(self, state: AppState) -> None:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
def set_warning(self, msg: str | None) -> None:
|
||||||
|
pass
|
||||||
|
|||||||
Reference in New Issue
Block a user