eric6/UI/UserInterface.py

changeset 7959
44e15eda6506
parent 7955
567f2ec958c3
child 7960
e8fc383322f7
--- a/eric6/UI/UserInterface.py	Tue Jan 05 15:14:40 2021 +0100
+++ b/eric6/UI/UserInterface.py	Tue Jan 05 18:28:31 2021 +0100
@@ -33,6 +33,7 @@
 
 from .Info import Version, VersionOnly, BugAddress, Program, FeatureAddress
 from . import Config
+from .NotificationWidget import NotificationTypes
 
 from E5Gui.E5SingleApplication import E5SingleApplicationServer
 from E5Gui.E5Action import E5Action, createActionGroup
@@ -7417,7 +7418,8 @@
     ## Support for desktop notifications below
     ##########################################
     
-    def showNotification(self, icon, heading, text, timeout=None):
+    def showNotification(self, icon, heading, text,
+                         kind=NotificationTypes.Information, timeout=None):
         """
         Public method to show a desktop notification.
         
@@ -7427,6 +7429,8 @@
         @type str
         @param text text of the notification
         @type str
+        @param kind kind of notification to be shown
+        @type NotificationTypes
         @param timeout time in seconds the notification should be shown
             (None = use configured timeout, 0 = indefinitely)
         @type int
@@ -7436,7 +7440,7 @@
             self.__notification = NotificationWidget(parent=self)
         if timeout is None:
             timeout = Preferences.getUI("NotificationTimeout")
-        self.__notification.showNotification(icon, heading, text,
+        self.__notification.showNotification(icon, heading, text, kind=kind,
                                              timeout=timeout)
     
     #########################

eric ide

mercurial