eric6/UI/UserInterface.py

changeset 7955
567f2ec958c3
parent 7952
1849f61cf2b6
child 7959
44e15eda6506
equal deleted inserted replaced
7954:d32319ede131 7955:567f2ec958c3
7429 @type str 7429 @type str
7430 @param timeout time in seconds the notification should be shown 7430 @param timeout time in seconds the notification should be shown
7431 (None = use configured timeout, 0 = indefinitely) 7431 (None = use configured timeout, 0 = indefinitely)
7432 @type int 7432 @type int
7433 """ 7433 """
7434 if Preferences.getUI("NotificationsEnabled"): 7434 if self.__notification is None:
7435 if self.__notification is None: 7435 from .NotificationWidget import NotificationWidget
7436 from .NotificationWidget import NotificationWidget 7436 self.__notification = NotificationWidget(parent=self)
7437 self.__notification = NotificationWidget(parent=self) 7437 if timeout is None:
7438 if timeout is None: 7438 timeout = Preferences.getUI("NotificationTimeout")
7439 timeout = Preferences.getUI("NotificationTimeout") 7439 self.__notification.showNotification(icon, heading, text,
7440 self.__notification.showNotification(icon, heading, text, 7440 timeout=timeout)
7441 timeout=timeout)
7442
7443 def notificationsEnabled(self):
7444 """
7445 Public method to check, if notifications are enabled.
7446
7447 @return flag indicating, if notifications are enabled (boolean)
7448 """
7449 return Preferences.getUI("NotificationsEnabled")
7450 7441
7451 ######################### 7442 #########################
7452 ## Support for IRC below 7443 ## Support for IRC below
7453 ######################### 7444 #########################
7454 7445

eric ide

mercurial