comparison cagou/core/cagou_main.py @ 419:b047d14e4be5

notifs: fixed desktop notification duration
author Goffi <goffi@goffi.org>
date Wed, 26 Feb 2020 16:32:27 +0100
parents 72a6b06728ab
children 83d184393fe1
comparison
equal deleted inserted replaced
418:8a9bfe3fb9c6 419:b047d14e4be5
1054 super().notify( 1054 super().notify(
1055 type_=type_, entity=entity, message=message, subject=subject, 1055 type_=type_, entity=entity, message=message, subject=subject,
1056 callback=callback, cb_args=cb_args, widget=widget, profile=profile) 1056 callback=callback, cb_args=cb_args, widget=widget, profile=profile)
1057 self.desktop_notif(message, title=subject) 1057 self.desktop_notif(message, title=subject)
1058 1058
1059 def desktop_notif(self, message, title='', duration=5000): 1059 def desktop_notif(self, message, title='', duration=5):
1060 global notification 1060 global notification
1061 if notification is not None: 1061 if notification is not None:
1062 try: 1062 try:
1063 log.debug( 1063 log.debug(
1064 f"sending desktop notification (duration: {duration}):\n" 1064 f"sending desktop notification (duration: {duration}):\n"