From e8ef26243311aa2492624f39150cd244623f63d9 Mon Sep 17 00:00:00 2001 From: MattHag <16444067+MattHag@users.noreply.github.com> Date: Wed, 18 Sep 2024 23:08:20 +0200 Subject: [PATCH] Rename ui/notify module to desktop notifications Related #2273 --- lib/solaar/ui/__init__.py | 8 ++++---- lib/solaar/ui/{notify.py => desktop_notifications.py} | 0 2 files changed, 4 insertions(+), 4 deletions(-) rename lib/solaar/ui/{notify.py => desktop_notifications.py} (100%) diff --git a/lib/solaar/ui/__init__.py b/lib/solaar/ui/__init__.py index b73e3c05..890d7dcc 100644 --- a/lib/solaar/ui/__init__.py +++ b/lib/solaar/ui/__init__.py @@ -28,8 +28,8 @@ from solaar.ui.config_panel import record_setting from solaar.ui.window import find_device from . import common +from . import desktop_notifications from . import diversion_rules -from . import notify from . import tray from . import window @@ -47,7 +47,7 @@ def _startup(app, startup_hook, use_tray, show_window): if logger.isEnabledFor(logging.DEBUG): logger.debug("startup registered=%s, remote=%s", app.get_is_registered(), app.get_is_remote()) common.start_async() - notify.init() + desktop_notifications.init() if use_tray: tray.init(lambda _ignore: window.destroy()) window.init(show_window, use_tray) @@ -85,7 +85,7 @@ def _shutdown(app, shutdown_hook): shutdown_hook() common.stop_async() tray.destroy() - notify.uninit() + desktop_notifications.uninit() def run_loop(startup_hook, shutdown_hook, use_tray, show_window): @@ -120,7 +120,7 @@ def _status_changed(device, alert, reason, refresh=False): diversion_rules.update_devices() if alert & (Alert.NOTIFICATION | Alert.ATTENTION): - notify.show(device, reason) + desktop_notifications.show(device, reason) def status_changed(device, alert=Alert.NONE, reason=None, refresh=False): diff --git a/lib/solaar/ui/notify.py b/lib/solaar/ui/desktop_notifications.py similarity index 100% rename from lib/solaar/ui/notify.py rename to lib/solaar/ui/desktop_notifications.py