diff -r f227183ae1df -r c3f41b959a65 UI/UserInterface.py --- a/UI/UserInterface.py Thu Aug 10 11:57:04 2017 +0200 +++ b/UI/UserInterface.py Thu Aug 10 13:58:50 2017 +0200 @@ -6748,13 +6748,19 @@ ## Support for desktop notifications below ########################################## - def showNotification(self, icon, heading, text): + def showNotification(self, icon, heading, text, timeout=None): """ Public method to show a desktop notification. - @param icon icon to be shown in the notification (QPixmap) - @param heading heading of the notification (string) - @param text text of the notification (string) + @param icon icon to be shown in the notification + @type QPixmap + @param heading heading of the notification + @type str + @param text text of the notification + @type str + @param timeout time in seconds the notification should be shown + (None = use configured timeout, 0 = indefinitely) + @type int """ if Preferences.getUI("NotificationsEnabled"): if self.__notification is None: @@ -6763,8 +6769,9 @@ self.__notification.setPixmap(icon) self.__notification.setHeading(heading) self.__notification.setText(text) - self.__notification.setTimeout( - Preferences.getUI("NotificationTimeout")) + if timeout is None: + timeout = Preferences.getUI("NotificationTimeout") + self.__notification.setTimeout(timeout) self.__notification.move(Preferences.getUI("NotificationPosition")) self.__notification.show()