63 from Tasks.TaskViewer import TaskViewer |
63 from Tasks.TaskViewer import TaskViewer |
64 |
64 |
65 from Templates.TemplateViewer import TemplateViewer |
65 from Templates.TemplateViewer import TemplateViewer |
66 |
66 |
67 from Cooperation.ChatWidget import ChatWidget |
67 from Cooperation.ChatWidget import ChatWidget |
|
68 |
|
69 from Network.IRC.IrcWidget import IrcWidget |
68 |
70 |
69 from .Browser import Browser |
71 from .Browser import Browser |
70 from .Info import Version, BugAddress, Program, FeatureAddress |
72 from .Info import Version, BugAddress, Program, FeatureAddress |
71 from . import Config |
73 from . import Config |
72 from .EmailDialog import EmailDialog |
74 from .EmailDialog import EmailDialog |
488 e5App().registerObject("DummyHelpViewer", self.dummyHelpViewer) |
490 e5App().registerObject("DummyHelpViewer", self.dummyHelpViewer) |
489 e5App().registerObject("PluginManager", self.pluginManager) |
491 e5App().registerObject("PluginManager", self.pluginManager) |
490 e5App().registerObject("ToolbarManager", self.toolbarManager) |
492 e5App().registerObject("ToolbarManager", self.toolbarManager) |
491 e5App().registerObject("Terminal", self.terminal) |
493 e5App().registerObject("Terminal", self.terminal) |
492 e5App().registerObject("Cooperation", self.cooperation) |
494 e5App().registerObject("Cooperation", self.cooperation) |
|
495 e5App().registerObject("IRC", self.irc) |
493 e5App().registerObject("Symbols", self.symbolsViewer) |
496 e5App().registerObject("Symbols", self.symbolsViewer) |
494 e5App().registerObject("Numbers", self.numbersViewer) |
497 e5App().registerObject("Numbers", self.numbersViewer) |
495 |
498 |
496 # Initialize the actions, menus, toolbars and statusbar |
499 # Initialize the actions, menus, toolbars and statusbar |
497 splash.showMessage(self.trUtf8("Initializing Actions...")) |
500 splash.showMessage(self.trUtf8("Initializing Actions...")) |
674 self.cooperation = ChatWidget(self) |
677 self.cooperation = ChatWidget(self) |
675 self.rToolbox.addItem(self.cooperation, |
678 self.rToolbox.addItem(self.cooperation, |
676 UI.PixmapCache.getIcon("cooperation.png"), |
679 UI.PixmapCache.getIcon("cooperation.png"), |
677 self.trUtf8("Cooperation")) |
680 self.trUtf8("Cooperation")) |
678 |
681 |
|
682 # Create the IRC part of the user interface |
|
683 self.irc = IrcWidget(self) |
|
684 self.rToolbox.addItem(self.irc, |
|
685 UI.PixmapCache.getIcon("irc.png"), |
|
686 self.trUtf8("IRC")) |
|
687 |
679 # Create the terminal part of the user interface |
688 # Create the terminal part of the user interface |
680 self.terminalAssembly = TerminalAssembly(self.viewmanager) |
689 self.terminalAssembly = TerminalAssembly(self.viewmanager) |
681 self.terminal = self.terminalAssembly.terminal() |
690 self.terminal = self.terminalAssembly.terminal() |
682 self.hToolbox.addItem(self.terminalAssembly, |
691 self.hToolbox.addItem(self.terminalAssembly, |
683 UI.PixmapCache.getIcon("terminal.png"), |
692 UI.PixmapCache.getIcon("terminal.png"), |
780 # Create the chat part of the user interface |
789 # Create the chat part of the user interface |
781 logging.debug("Creating Chat Widget...") |
790 logging.debug("Creating Chat Widget...") |
782 self.cooperation = ChatWidget(self) |
791 self.cooperation = ChatWidget(self) |
783 self.rightSidebar.addTab(self.cooperation, |
792 self.rightSidebar.addTab(self.cooperation, |
784 UI.PixmapCache.getIcon("cooperation.png"), self.trUtf8("Cooperation")) |
793 UI.PixmapCache.getIcon("cooperation.png"), self.trUtf8("Cooperation")) |
|
794 |
|
795 # Create the IRC part of the user interface |
|
796 logging.debug("Creating IRC Widget...") |
|
797 self.irc = IrcWidget(self) |
|
798 self.rightSidebar.addTab(self.irc, |
|
799 UI.PixmapCache.getIcon("irc.png"), self.trUtf8("IRC")) |
785 |
800 |
786 # Create the terminal part of the user interface |
801 # Create the terminal part of the user interface |
787 logging.debug("Creating Terminal...") |
802 logging.debug("Creating Terminal...") |
788 self.terminalAssembly = TerminalAssembly(self.viewmanager) |
803 self.terminalAssembly = TerminalAssembly(self.viewmanager) |
789 self.terminal = self.terminalAssembly.terminal() |
804 self.terminal = self.terminalAssembly.terminal() |
1411 )) |
1426 )) |
1412 self.cooperationViewerActivateAct.triggered[()].connect( |
1427 self.cooperationViewerActivateAct.triggered[()].connect( |
1413 self.activateCooperationViewer) |
1428 self.activateCooperationViewer) |
1414 self.actions.append(self.cooperationViewerActivateAct) |
1429 self.actions.append(self.cooperationViewerActivateAct) |
1415 self.addAction(self.cooperationViewerActivateAct) |
1430 self.addAction(self.cooperationViewerActivateAct) |
|
1431 |
|
1432 self.ircActivateAct = E5Action( |
|
1433 self.trUtf8('IRC'), |
|
1434 self.trUtf8('&IRC'), |
|
1435 QKeySequence(self.trUtf8("Meta+Shift+I")), |
|
1436 0, self, |
|
1437 'irc_widget_activate') |
|
1438 self.ircActivateAct.setStatusTip(self.trUtf8( |
|
1439 "Switch the input focus to the IRC window.")) |
|
1440 self.ircActivateAct.setWhatsThis(self.trUtf8( |
|
1441 """<b>Activate IRC</b>""" |
|
1442 """<p>This switches the input focus to the IRC window.</p>""" |
|
1443 )) |
|
1444 self.ircActivateAct.triggered[()].connect( |
|
1445 self.__activateIRC) |
|
1446 self.actions.append(self.ircActivateAct) |
|
1447 self.addAction(self.ircActivateAct) |
1416 |
1448 |
1417 self.symbolsViewerActivateAct = E5Action( |
1449 self.symbolsViewerActivateAct = E5Action( |
1418 self.trUtf8('Symbols-Viewer'), |
1450 self.trUtf8('Symbols-Viewer'), |
1419 self.trUtf8('S&ymbols-Viewer'), |
1451 self.trUtf8('S&ymbols-Viewer'), |
1420 QKeySequence(self.trUtf8("Alt+Shift+Y")), |
1452 QKeySequence(self.trUtf8("Alt+Shift+Y")), |
2152 self.__menus["window"].setTearOffEnabled(True) |
2184 self.__menus["window"].setTearOffEnabled(True) |
2153 self.__menus["window"].aboutToShow.connect(self.__showWindowMenu) |
2185 self.__menus["window"].aboutToShow.connect(self.__showWindowMenu) |
2154 |
2186 |
2155 self.__menus["subwindow"] = QMenu(self.trUtf8("&Windows"), self.__menus["window"]) |
2187 self.__menus["subwindow"] = QMenu(self.trUtf8("&Windows"), self.__menus["window"]) |
2156 self.__menus["subwindow"].setTearOffEnabled(True) |
2188 self.__menus["subwindow"].setTearOffEnabled(True) |
|
2189 # left side |
2157 self.__menus["subwindow"].addAction(self.pbActivateAct) |
2190 self.__menus["subwindow"].addAction(self.pbActivateAct) |
2158 self.__menus["subwindow"].addAction(self.mpbActivateAct) |
2191 self.__menus["subwindow"].addAction(self.mpbActivateAct) |
|
2192 self.__menus["subwindow"].addAction(self.templateViewerActivateAct) |
2159 self.__menus["subwindow"].addAction(self.browserActivateAct) |
2193 self.__menus["subwindow"].addAction(self.browserActivateAct) |
2160 self.__menus["subwindow"].addAction(self.debugViewerActivateAct) |
2194 self.__menus["subwindow"].addAction(self.symbolsViewerActivateAct) |
|
2195 # bottom side |
2161 self.__menus["subwindow"].addAction(self.shellActivateAct) |
2196 self.__menus["subwindow"].addAction(self.shellActivateAct) |
2162 self.__menus["subwindow"].addAction(self.terminalActivateAct) |
2197 self.__menus["subwindow"].addAction(self.terminalActivateAct) |
|
2198 self.__menus["subwindow"].addAction(self.taskViewerActivateAct) |
2163 self.__menus["subwindow"].addAction(self.logViewerActivateAct) |
2199 self.__menus["subwindow"].addAction(self.logViewerActivateAct) |
2164 self.__menus["subwindow"].addAction(self.taskViewerActivateAct) |
2200 self.__menus["subwindow"].addAction(self.numbersViewerActivateAct) |
2165 self.__menus["subwindow"].addAction(self.templateViewerActivateAct) |
2201 # right side |
|
2202 self.__menus["subwindow"].addAction(self.debugViewerActivateAct) |
2166 self.__menus["subwindow"].addAction(self.cooperationViewerActivateAct) |
2203 self.__menus["subwindow"].addAction(self.cooperationViewerActivateAct) |
2167 self.__menus["subwindow"].addAction(self.symbolsViewerActivateAct) |
2204 self.__menus["subwindow"].addAction(self.ircActivateAct) |
2168 self.__menus["subwindow"].addAction(self.numbersViewerActivateAct) |
|
2169 |
2205 |
2170 self.__menus["toolbars"] = \ |
2206 self.__menus["toolbars"] = \ |
2171 QMenu(self.trUtf8("&Toolbars"), self.__menus["window"]) |
2207 QMenu(self.trUtf8("&Toolbars"), self.__menus["window"]) |
2172 self.__menus["toolbars"].setTearOffEnabled(True) |
2208 self.__menus["toolbars"].setTearOffEnabled(True) |
2173 self.__menus["toolbars"].aboutToShow.connect(self.__showToolbarsMenu) |
2209 self.__menus["toolbars"].aboutToShow.connect(self.__showToolbarsMenu) |
3502 self.rightSidebar.setCurrentWidget(self.cooperation) |
3538 self.rightSidebar.setCurrentWidget(self.cooperation) |
3503 else: |
3539 else: |
3504 self.cooperation.show() |
3540 self.cooperation.show() |
3505 self.cooperation.setFocus(Qt.ActiveWindowFocusReason) |
3541 self.cooperation.setFocus(Qt.ActiveWindowFocusReason) |
3506 |
3542 |
|
3543 def __activateIRC(self): |
|
3544 """ |
|
3545 Public slot to handle the activation of the IRC window. |
|
3546 """ |
|
3547 if self.layout == "Toolboxes": |
|
3548 self.rToolboxDock.show() |
|
3549 self.rToolbox.setCurrentWidget(self.irc) |
|
3550 elif self.layout == "Sidebars": |
|
3551 self.rightSidebar.show() |
|
3552 self.rightSidebar.setCurrentWidget(self.irc) |
|
3553 else: |
|
3554 self.irc.show() |
|
3555 self.irc.setFocus(Qt.ActiveWindowFocusReason) |
|
3556 |
3507 def __activateSymbolsViewer(self): |
3557 def __activateSymbolsViewer(self): |
3508 """ |
3558 """ |
3509 Private slot to handle the activation of the Symbols Viewer. |
3559 Private slot to handle the activation of the Symbols Viewer. |
3510 """ |
3560 """ |
3511 if self.layout == "Toolboxes": |
3561 if self.layout == "Toolboxes": |