From cb7b55b0032ee69f8e3fdf8a98eb858117273409 Mon Sep 17 00:00:00 2001 From: Sylvain Leclerc Date: Mon, 30 Sep 2024 10:30:19 +0200 Subject: [PATCH] try fixing systray disparition Signed-off-by: Sylvain Leclerc --- antarest/gui.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/antarest/gui.py b/antarest/gui.py index ead31c0416..8ca213d2c6 100644 --- a/antarest/gui.py +++ b/antarest/gui.py @@ -63,9 +63,9 @@ def create_systray_app() -> QApplication: # Adding an icon icon = QIcon(str(RESOURCE_PATH / "webapp" / "logo16.png")) # Adding item on the menu bar - tray = QSystemTrayIcon() - tray.setIcon(icon) + tray = QSystemTrayIcon(icon, app) tray.setVisible(True) + # Creating the options menu = QMenu() open_app_action = QAction("Open application") @@ -79,6 +79,7 @@ def create_systray_app() -> QApplication: tray.setContextMenu(menu) app.processEvents() tray.setToolTip("AntaresWebServer") + return app @@ -118,7 +119,7 @@ def notification_popup(message: str) -> None: else: from plyer import notification # type: ignore - notification.notification_popup( + notification.notify( title="AntaresWebServer", message=message, app_name="AntaresWebServer",