eric6/UI/UserInterface.py

changeset 7952
1849f61cf2b6
parent 7948
6cbd0c086887
child 7955
567f2ec958c3
equal deleted inserted replaced
7951:fa058239133f 7952:1849f61cf2b6
7433 """ 7433 """
7434 if Preferences.getUI("NotificationsEnabled"): 7434 if Preferences.getUI("NotificationsEnabled"):
7435 if self.__notification is None: 7435 if self.__notification is None:
7436 from .NotificationWidget import NotificationWidget 7436 from .NotificationWidget import NotificationWidget
7437 self.__notification = NotificationWidget(parent=self) 7437 self.__notification = NotificationWidget(parent=self)
7438 self.__notification.setPixmap(icon)
7439 self.__notification.setHeading(heading)
7440 self.__notification.setText(text)
7441 if timeout is None: 7438 if timeout is None:
7442 timeout = Preferences.getUI("NotificationTimeout") 7439 timeout = Preferences.getUI("NotificationTimeout")
7443 self.__notification.setTimeout(timeout) 7440 self.__notification.showNotification(icon, heading, text,
7444 self.__notification.move(Preferences.getUI("NotificationPosition")) 7441 timeout=timeout)
7445 self.__notification.show()
7446 7442
7447 def notificationsEnabled(self): 7443 def notificationsEnabled(self):
7448 """ 7444 """
7449 Public method to check, if notifications are enabled. 7445 Public method to check, if notifications are enabled.
7450 7446

eric ide

mercurial