75 from .LogView import LogViewer |
75 from .LogView import LogViewer |
76 from .FindFileDialog import FindFileDialog |
76 from .FindFileDialog import FindFileDialog |
77 from .FindFileNameDialog import FindFileNameDialog |
77 from .FindFileNameDialog import FindFileNameDialog |
78 from .SymbolsWidget import SymbolsWidget |
78 from .SymbolsWidget import SymbolsWidget |
79 from .NumbersWidget import NumbersWidget |
79 from .NumbersWidget import NumbersWidget |
|
80 from .NotificationWidget import NotificationWidget |
80 |
81 |
81 from E5Gui.E5SingleApplication import E5SingleApplicationServer |
82 from E5Gui.E5SingleApplication import E5SingleApplicationServer |
82 from E5Gui.E5Action import E5Action, createActionGroup |
83 from E5Gui.E5Action import E5Action, createActionGroup |
83 from E5Gui.E5ToolBarManager import E5ToolBarManager |
84 from E5Gui.E5ToolBarManager import E5ToolBarManager |
84 from E5Gui.E5ToolBarDialog import E5ToolBarDialog |
85 from E5Gui.E5ToolBarDialog import E5ToolBarDialog |
288 self.findFileNameDialog = None |
289 self.findFileNameDialog = None |
289 self.diffDlg = None |
290 self.diffDlg = None |
290 self.compareDlg = None |
291 self.compareDlg = None |
291 self.findFilesDialog = None |
292 self.findFilesDialog = None |
292 self.replaceFilesDialog = None |
293 self.replaceFilesDialog = None |
|
294 self.__notification = None |
293 |
295 |
294 # now setup the connections |
296 # now setup the connections |
295 splash.showMessage(self.trUtf8("Setting up connections...")) |
297 splash.showMessage(self.trUtf8("Setting up connections...")) |
296 app.focusChanged.connect( |
298 app.focusChanged.connect( |
297 self.viewmanager.appFocusChanged) |
299 self.viewmanager.appFocusChanged) |
667 self.rToolbox.addItem(self.debugViewer, |
669 self.rToolbox.addItem(self.debugViewer, |
668 UI.PixmapCache.getIcon("debugViewer.png"), |
670 UI.PixmapCache.getIcon("debugViewer.png"), |
669 self.trUtf8("Debug-Viewer")) |
671 self.trUtf8("Debug-Viewer")) |
670 |
672 |
671 # Create the chat part of the user interface |
673 # Create the chat part of the user interface |
672 self.cooperation = ChatWidget() |
674 self.cooperation = ChatWidget(self) |
673 self.rToolbox.addItem(self.cooperation, |
675 self.rToolbox.addItem(self.cooperation, |
674 UI.PixmapCache.getIcon("cooperation.png"), |
676 UI.PixmapCache.getIcon("cooperation.png"), |
675 self.trUtf8("Cooperation")) |
677 self.trUtf8("Cooperation")) |
676 |
678 |
677 # Create the terminal part of the user interface |
679 # Create the terminal part of the user interface |
775 self.rightSidebar.addTab(self.debugViewer, |
777 self.rightSidebar.addTab(self.debugViewer, |
776 UI.PixmapCache.getIcon("debugViewer.png"), self.trUtf8("Debug-Viewer")) |
778 UI.PixmapCache.getIcon("debugViewer.png"), self.trUtf8("Debug-Viewer")) |
777 |
779 |
778 # Create the chat part of the user interface |
780 # Create the chat part of the user interface |
779 logging.debug("Creating Chat Widget...") |
781 logging.debug("Creating Chat Widget...") |
780 self.cooperation = ChatWidget() |
782 self.cooperation = ChatWidget(self) |
781 self.rightSidebar.addTab(self.cooperation, |
783 self.rightSidebar.addTab(self.cooperation, |
782 UI.PixmapCache.getIcon("cooperation.png"), self.trUtf8("Cooperation")) |
784 UI.PixmapCache.getIcon("cooperation.png"), self.trUtf8("Cooperation")) |
783 |
785 |
784 # Create the terminal part of the user interface |
786 # Create the terminal part of the user interface |
785 logging.debug("Creating Terminal...") |
787 logging.debug("Creating Terminal...") |
5132 |
5134 |
5133 if not self.debuggerUI.shutdownServer(): |
5135 if not self.debuggerUI.shutdownServer(): |
5134 return False |
5136 return False |
5135 self.debuggerUI.shutdown() |
5137 self.debuggerUI.shutdown() |
5136 |
5138 |
|
5139 self.cooperation.shutdown() |
|
5140 |
5137 self.pluginManager.doShutdown() |
5141 self.pluginManager.doShutdown() |
5138 |
5142 |
5139 if self.layout == "Sidebars": |
5143 if self.layout == "Sidebars": |
5140 self.leftSidebar.shutdown() |
5144 self.leftSidebar.shutdown() |
5141 self.bottomSidebar.shutdown() |
5145 self.bottomSidebar.shutdown() |
5500 """ |
5504 """ |
5501 if self.__startup: |
5505 if self.__startup: |
5502 if Preferences.getGeometry("MainMaximized"): |
5506 if Preferences.getGeometry("MainMaximized"): |
5503 self.setWindowState(Qt.WindowStates(Qt.WindowMaximized)) |
5507 self.setWindowState(Qt.WindowStates(Qt.WindowMaximized)) |
5504 self.__startup = False |
5508 self.__startup = False |
|
5509 |
|
5510 ########################################## |
|
5511 ## Support for desktop notifications below |
|
5512 ########################################## |
|
5513 |
|
5514 def showNotification(self, icon, heading, text): |
|
5515 """ |
|
5516 Public method to show a desktop notification. |
|
5517 |
|
5518 @param icon icon to be shown in the notification (QPixmap) |
|
5519 @param heading heading of the notification (string) |
|
5520 @param text text of the notification (string) |
|
5521 """ |
|
5522 if Preferences.getUI("NotificationsEnabled"): |
|
5523 if self.__notification is None: |
|
5524 self.__notification = NotificationWidget(parent=self) |
|
5525 self.__notification.setPixmap(icon) |
|
5526 self.__notification.setHeading(heading) |
|
5527 self.__notification.setText(text) |
|
5528 self.__notification.setTimeout(Preferences.getUI("NotificationTimeout")) |
|
5529 self.__notification.move(Preferences.getUI("NotificationPosition")) |
|
5530 self.__notification.show() |
|
5531 |
|
5532 def notificationsEnabled(self): |
|
5533 """ |
|
5534 Public method to check, if notifications are enabled. |
|
5535 |
|
5536 @return flag indicating, if notifications are enabled (boolean) |
|
5537 """ |
|
5538 return Preferences.getUI("NotificationsEnabled") |