From 4015b32a8af9104c1b62503ff32c08642b0143bd Mon Sep 17 00:00:00 2001 From: Steve Macenski Date: Wed, 15 Apr 2020 13:51:56 -0700 Subject: [PATCH 1/2] Transient message notifications, per #45 --- colcon_notification/desktop_notification/notify2.py | 1 + 1 file changed, 1 insertion(+) diff --git a/colcon_notification/desktop_notification/notify2.py b/colcon_notification/desktop_notification/notify2.py index bc90197..f92eb23 100644 --- a/colcon_notification/desktop_notification/notify2.py +++ b/colcon_notification/desktop_notification/notify2.py @@ -47,4 +47,5 @@ def notify(self, *, title, message, icon_path=None): # noqa: D102 else: self._last_notification.update( title, message=message, icon=icon_path) + self._last_notification.set_hint('transient', True) self._last_notification.show() From 9951bd5917c726bb68241cb1cbd38245c07d86cd Mon Sep 17 00:00:00 2001 From: stevemacenski Date: Wed, 15 Apr 2020 15:43:53 -0700 Subject: [PATCH 2/2] moving hint to notification creation Signed-off-by: stevemacenski --- colcon_notification/desktop_notification/notify2.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/colcon_notification/desktop_notification/notify2.py b/colcon_notification/desktop_notification/notify2.py index f92eb23..03f0aea 100644 --- a/colcon_notification/desktop_notification/notify2.py +++ b/colcon_notification/desktop_notification/notify2.py @@ -44,8 +44,8 @@ def notify(self, *, title, message, icon_path=None): # noqa: D102 if self._last_notification is None: self._last_notification = notify2.Notification( title, message=message, icon=icon_path) + self._last_notification.set_hint('transient', True) else: self._last_notification.update( title, message=message, icon=icon_path) - self._last_notification.set_hint('transient', True) self._last_notification.show()