UI/UserInterface.py

changeset 3030
4a0a82ddd9d2
parent 3020
542e97d4ecb3
child 3034
7ce719013078
child 3058
0a02c433f52d
equal deleted inserted replaced
3029:4055a15ce0f2 3030:4a0a82ddd9d2
629 self.__setupDockWindow(self.rToolboxDock, Qt.RightDockWidgetArea, 629 self.__setupDockWindow(self.rToolboxDock, Qt.RightDockWidgetArea,
630 self.rToolbox, self.trUtf8("Right Toolbox")) 630 self.rToolbox, self.trUtf8("Right Toolbox"))
631 631
632 # Create the project browser 632 # Create the project browser
633 from Project.ProjectBrowser import ProjectBrowser 633 from Project.ProjectBrowser import ProjectBrowser
634 self.projectBrowser = ProjectBrowser(self.project, None, 634 self.projectBrowser = ProjectBrowser(
635 self.project, None,
635 embeddedBrowser=(self.embeddedFileBrowser == 2)) 636 embeddedBrowser=(self.embeddedFileBrowser == 2))
636 self.lToolbox.addItem(self.projectBrowser, 637 self.lToolbox.addItem(self.projectBrowser,
637 UI.PixmapCache.getIcon("projectViewer.png"), 638 UI.PixmapCache.getIcon("projectViewer.png"),
638 self.trUtf8("Project-Viewer")) 639 self.trUtf8("Project-Viewer"))
639 640
652 UI.PixmapCache.getIcon("templateViewer.png"), 653 UI.PixmapCache.getIcon("templateViewer.png"),
653 self.trUtf8("Template-Viewer")) 654 self.trUtf8("Template-Viewer"))
654 655
655 # Create the debug viewer maybe without the embedded shell 656 # Create the debug viewer maybe without the embedded shell
656 from Debugger.DebugViewer import DebugViewer 657 from Debugger.DebugViewer import DebugViewer
657 self.debugViewer = DebugViewer(debugServer, True, self.viewmanager, 658 self.debugViewer = DebugViewer(
658 None, 659 debugServer, True, self.viewmanager, None,
659 embeddedShell=self.embeddedShell, 660 embeddedShell=self.embeddedShell,
660 embeddedBrowser=(self.embeddedFileBrowser == 1)) 661 embeddedBrowser=(self.embeddedFileBrowser == 1))
661 self.rToolbox.addItem(self.debugViewer, 662 self.rToolbox.addItem(self.debugViewer,
662 UI.PixmapCache.getIcon("debugViewer.png"), 663 UI.PixmapCache.getIcon("debugViewer.png"),
663 self.trUtf8("Debug-Viewer")) 664 self.trUtf8("Debug-Viewer"))
749 self.rightSidebar = E5SideBar(E5SideBar.East, delay) 750 self.rightSidebar = E5SideBar(E5SideBar.East, delay)
750 751
751 # Create the project browser 752 # Create the project browser
752 logging.debug("Creating Project Browser...") 753 logging.debug("Creating Project Browser...")
753 from Project.ProjectBrowser import ProjectBrowser 754 from Project.ProjectBrowser import ProjectBrowser
754 self.projectBrowser = ProjectBrowser(self.project, None, 755 self.projectBrowser = ProjectBrowser(
756 self.project, None,
755 embeddedBrowser=(self.embeddedFileBrowser == 2)) 757 embeddedBrowser=(self.embeddedFileBrowser == 2))
756 self.leftSidebar.addTab(self.projectBrowser, 758 self.leftSidebar.addTab(
757 UI.PixmapCache.getIcon("projectViewer.png"), 759 self.projectBrowser,
758 self.trUtf8("Project-Viewer")) 760 UI.PixmapCache.getIcon("projectViewer.png"),
761 self.trUtf8("Project-Viewer"))
759 762
760 # Create the multi project browser 763 # Create the multi project browser
761 logging.debug("Creating Multiproject Browser...") 764 logging.debug("Creating Multiproject Browser...")
762 from MultiProject.MultiProjectBrowser import MultiProjectBrowser 765 from MultiProject.MultiProjectBrowser import MultiProjectBrowser
763 self.multiProjectBrowser = MultiProjectBrowser(self.multiProject) 766 self.multiProjectBrowser = MultiProjectBrowser(self.multiProject)
764 self.leftSidebar.addTab(self.multiProjectBrowser, 767 self.leftSidebar.addTab(
765 UI.PixmapCache.getIcon("multiProjectViewer.png"), 768 self.multiProjectBrowser,
766 self.trUtf8("Multiproject-Viewer")) 769 UI.PixmapCache.getIcon("multiProjectViewer.png"),
770 self.trUtf8("Multiproject-Viewer"))
767 771
768 # Create the template viewer part of the user interface 772 # Create the template viewer part of the user interface
769 logging.debug("Creating Template Viewer...") 773 logging.debug("Creating Template Viewer...")
770 from Templates.TemplateViewer import TemplateViewer 774 from Templates.TemplateViewer import TemplateViewer
771 self.templateViewer = TemplateViewer(None, 775 self.templateViewer = TemplateViewer(None,
772 self.viewmanager) 776 self.viewmanager)
773 self.leftSidebar.addTab(self.templateViewer, 777 self.leftSidebar.addTab(
774 UI.PixmapCache.getIcon("templateViewer.png"), 778 self.templateViewer,
775 self.trUtf8("Template-Viewer")) 779 UI.PixmapCache.getIcon("templateViewer.png"),
780 self.trUtf8("Template-Viewer"))
776 781
777 # Create the debug viewer maybe without the embedded shell 782 # Create the debug viewer maybe without the embedded shell
778 logging.debug("Creating Debug Viewer...") 783 logging.debug("Creating Debug Viewer...")
779 from Debugger.DebugViewer import DebugViewer 784 from Debugger.DebugViewer import DebugViewer
780 self.debugViewer = DebugViewer(debugServer, True, self.viewmanager, 785 self.debugViewer = DebugViewer(
781 None, 786 debugServer, True, self.viewmanager, None,
782 embeddedShell=self.embeddedShell, 787 embeddedShell=self.embeddedShell,
783 embeddedBrowser=(self.embeddedFileBrowser == 1)) 788 embeddedBrowser=(self.embeddedFileBrowser == 1))
784 self.rightSidebar.addTab( 789 self.rightSidebar.addTab(
785 self.debugViewer, UI.PixmapCache.getIcon("debugViewer.png"), 790 self.debugViewer, UI.PixmapCache.getIcon("debugViewer.png"),
786 self.trUtf8("Debug-Viewer")) 791 self.trUtf8("Debug-Viewer"))
795 800
796 # Create the IRC part of the user interface 801 # Create the IRC part of the user interface
797 logging.debug("Creating IRC Widget...") 802 logging.debug("Creating IRC Widget...")
798 from Network.IRC.IrcWidget import IrcWidget 803 from Network.IRC.IrcWidget import IrcWidget
799 self.irc = IrcWidget(self) 804 self.irc = IrcWidget(self)
800 self.rightSidebar.addTab(self.irc, 805 self.rightSidebar.addTab(
801 UI.PixmapCache.getIcon("irc.png"), self.trUtf8("IRC")) 806 self.irc, UI.PixmapCache.getIcon("irc.png"), self.trUtf8("IRC"))
802 807
803 # Create the task viewer part of the user interface 808 # Create the task viewer part of the user interface
804 logging.debug("Creating Task Viewer...") 809 logging.debug("Creating Task Viewer...")
805 from Tasks.TaskViewer import TaskViewer 810 from Tasks.TaskViewer import TaskViewer
806 self.taskViewer = TaskViewer(None, self.project) 811 self.taskViewer = TaskViewer(None, self.project)
1167 Private method to define the user interface actions. 1172 Private method to define the user interface actions.
1168 """ 1173 """
1169 self.actions = [] 1174 self.actions = []
1170 self.wizardsActions = [] 1175 self.wizardsActions = []
1171 1176
1172 self.exitAct = E5Action(self.trUtf8('Quit'), 1177 self.exitAct = E5Action(
1173 UI.PixmapCache.getIcon("exit.png"), 1178 self.trUtf8('Quit'),
1174 self.trUtf8('&Quit'), 1179 UI.PixmapCache.getIcon("exit.png"),
1175 QKeySequence(self.trUtf8("Ctrl+Q", "File|Quit")), 1180 self.trUtf8('&Quit'),
1176 0, self, 'quit') 1181 QKeySequence(self.trUtf8("Ctrl+Q", "File|Quit")),
1182 0, self, 'quit')
1177 self.exitAct.setStatusTip(self.trUtf8('Quit the IDE')) 1183 self.exitAct.setStatusTip(self.trUtf8('Quit the IDE'))
1178 self.exitAct.setWhatsThis(self.trUtf8( 1184 self.exitAct.setWhatsThis(self.trUtf8(
1179 """<b>Quit the IDE</b>""" 1185 """<b>Quit the IDE</b>"""
1180 """<p>This quits the IDE. Any unsaved changes may be saved""" 1186 """<p>This quits the IDE. Any unsaved changes may be saved"""
1181 """ first. Any Python program being debugged will be stopped""" 1187 """ first. Any Python program being debugged will be stopped"""
1183 )) 1189 ))
1184 self.exitAct.triggered[()].connect(self.__quit) 1190 self.exitAct.triggered[()].connect(self.__quit)
1185 self.exitAct.setMenuRole(QAction.QuitRole) 1191 self.exitAct.setMenuRole(QAction.QuitRole)
1186 self.actions.append(self.exitAct) 1192 self.actions.append(self.exitAct)
1187 1193
1188 self.newWindowAct = E5Action(self.trUtf8('New Window'), 1194 self.newWindowAct = E5Action(
1189 UI.PixmapCache.getIcon("newWindow.png"), 1195 self.trUtf8('New Window'),
1190 self.trUtf8('New &Window'), 1196 UI.PixmapCache.getIcon("newWindow.png"),
1191 QKeySequence(self.trUtf8("Ctrl+Shift+N", "File|New Window")), 1197 self.trUtf8('New &Window'),
1192 0, self, 'new_window') 1198 QKeySequence(self.trUtf8("Ctrl+Shift+N", "File|New Window")),
1199 0, self, 'new_window')
1193 self.newWindowAct.setStatusTip(self.trUtf8( 1200 self.newWindowAct.setStatusTip(self.trUtf8(
1194 'Open a new eric5 instance')) 1201 'Open a new eric5 instance'))
1195 self.newWindowAct.setWhatsThis(self.trUtf8( 1202 self.newWindowAct.setWhatsThis(self.trUtf8(
1196 """<b>New Window</b>""" 1203 """<b>New Window</b>"""
1197 """<p>This opens a new instance of the eric5 IDE.</p>""" 1204 """<p>This opens a new instance of the eric5 IDE.</p>"""
1201 self.newWindowAct.setEnabled( 1208 self.newWindowAct.setEnabled(
1202 not Preferences.getUI("SingleApplicationMode")) 1209 not Preferences.getUI("SingleApplicationMode"))
1203 1210
1204 self.viewProfileActGrp = createActionGroup(self, "viewprofiles", True) 1211 self.viewProfileActGrp = createActionGroup(self, "viewprofiles", True)
1205 1212
1206 self.setEditProfileAct = E5Action(self.trUtf8('Edit Profile'), 1213 self.setEditProfileAct = E5Action(
1207 UI.PixmapCache.getIcon("viewProfileEdit.png"), 1214 self.trUtf8('Edit Profile'),
1208 self.trUtf8('Edit Profile'), 1215 UI.PixmapCache.getIcon("viewProfileEdit.png"),
1209 0, 0, 1216 self.trUtf8('Edit Profile'),
1210 self.viewProfileActGrp, 'edit_profile', True) 1217 0, 0,
1218 self.viewProfileActGrp, 'edit_profile', True)
1211 self.setEditProfileAct.setStatusTip(self.trUtf8( 1219 self.setEditProfileAct.setStatusTip(self.trUtf8(
1212 'Activate the edit view profile')) 1220 'Activate the edit view profile'))
1213 self.setEditProfileAct.setWhatsThis(self.trUtf8( 1221 self.setEditProfileAct.setWhatsThis(self.trUtf8(
1214 """<b>Edit Profile</b>""" 1222 """<b>Edit Profile</b>"""
1215 """<p>Activate the "Edit View Profile". Windows being shown,""" 1223 """<p>Activate the "Edit View Profile". Windows being shown,"""
1217 """ "View Profile Configuration" dialog.</p>""" 1225 """ "View Profile Configuration" dialog.</p>"""
1218 )) 1226 ))
1219 self.setEditProfileAct.triggered[()].connect(self.__setEditProfile) 1227 self.setEditProfileAct.triggered[()].connect(self.__setEditProfile)
1220 self.actions.append(self.setEditProfileAct) 1228 self.actions.append(self.setEditProfileAct)
1221 1229
1222 self.setDebugProfileAct = E5Action(self.trUtf8('Debug Profile'), 1230 self.setDebugProfileAct = E5Action(
1223 UI.PixmapCache.getIcon("viewProfileDebug.png"), 1231 self.trUtf8('Debug Profile'),
1224 self.trUtf8('Debug Profile'), 1232 UI.PixmapCache.getIcon("viewProfileDebug.png"),
1225 0, 0, 1233 self.trUtf8('Debug Profile'),
1226 self.viewProfileActGrp, 'debug_profile', True) 1234 0, 0,
1235 self.viewProfileActGrp, 'debug_profile', True)
1227 self.setDebugProfileAct.setStatusTip( 1236 self.setDebugProfileAct.setStatusTip(
1228 self.trUtf8('Activate the debug view profile')) 1237 self.trUtf8('Activate the debug view profile'))
1229 self.setDebugProfileAct.setWhatsThis(self.trUtf8( 1238 self.setDebugProfileAct.setWhatsThis(self.trUtf8(
1230 """<b>Debug Profile</b>""" 1239 """<b>Debug Profile</b>"""
1231 """<p>Activate the "Debug View Profile". Windows being shown,""" 1240 """<p>Activate the "Debug View Profile". Windows being shown,"""
1233 """ "View Profile Configuration" dialog.</p>""" 1242 """ "View Profile Configuration" dialog.</p>"""
1234 )) 1243 ))
1235 self.setDebugProfileAct.triggered[()].connect(self.setDebugProfile) 1244 self.setDebugProfileAct.triggered[()].connect(self.setDebugProfile)
1236 self.actions.append(self.setDebugProfileAct) 1245 self.actions.append(self.setDebugProfileAct)
1237 1246
1238 self.pbActivateAct = E5Action(self.trUtf8('Project-Viewer'), 1247 self.pbActivateAct = E5Action(
1239 self.trUtf8('&Project-Viewer'), 1248 self.trUtf8('Project-Viewer'),
1240 QKeySequence(self.trUtf8("Alt+Shift+P")), 1249 self.trUtf8('&Project-Viewer'),
1241 0, self, 1250 QKeySequence(self.trUtf8("Alt+Shift+P")),
1242 'project_viewer_activate') 1251 0, self,
1252 'project_viewer_activate')
1243 self.pbActivateAct.setStatusTip(self.trUtf8( 1253 self.pbActivateAct.setStatusTip(self.trUtf8(
1244 "Switch the input focus to the Project-Viewer window.")) 1254 "Switch the input focus to the Project-Viewer window."))
1245 self.pbActivateAct.setWhatsThis(self.trUtf8( 1255 self.pbActivateAct.setWhatsThis(self.trUtf8(
1246 """<b>Activate Project-Viewer</b>""" 1256 """<b>Activate Project-Viewer</b>"""
1247 """<p>This switches the input focus to the Project-Viewer""" 1257 """<p>This switches the input focus to the Project-Viewer"""
1249 )) 1259 ))
1250 self.pbActivateAct.triggered[()].connect(self.__activateProjectBrowser) 1260 self.pbActivateAct.triggered[()].connect(self.__activateProjectBrowser)
1251 self.actions.append(self.pbActivateAct) 1261 self.actions.append(self.pbActivateAct)
1252 self.addAction(self.pbActivateAct) 1262 self.addAction(self.pbActivateAct)
1253 1263
1254 self.mpbActivateAct = E5Action(self.trUtf8('Multiproject-Viewer'), 1264 self.mpbActivateAct = E5Action(
1255 self.trUtf8('&Multiproject-Viewer'), 1265 self.trUtf8('Multiproject-Viewer'),
1256 QKeySequence(self.trUtf8("Alt+Shift+M")), 1266 self.trUtf8('&Multiproject-Viewer'),
1257 0, self, 1267 QKeySequence(self.trUtf8("Alt+Shift+M")),
1258 'multi_project_viewer_activate') 1268 0, self,
1269 'multi_project_viewer_activate')
1259 self.mpbActivateAct.setStatusTip(self.trUtf8( 1270 self.mpbActivateAct.setStatusTip(self.trUtf8(
1260 "Switch the input focus to the Multiproject-Viewer window.")) 1271 "Switch the input focus to the Multiproject-Viewer window."))
1261 self.mpbActivateAct.setWhatsThis(self.trUtf8( 1272 self.mpbActivateAct.setWhatsThis(self.trUtf8(
1262 """<b>Activate Multiproject-Viewer</b>""" 1273 """<b>Activate Multiproject-Viewer</b>"""
1263 """<p>This switches the input focus to the Multiproject-Viewer""" 1274 """<p>This switches the input focus to the Multiproject-Viewer"""
1266 self.mpbActivateAct.triggered[()].connect( 1277 self.mpbActivateAct.triggered[()].connect(
1267 self.__activateMultiProjectBrowser) 1278 self.__activateMultiProjectBrowser)
1268 self.actions.append(self.mpbActivateAct) 1279 self.actions.append(self.mpbActivateAct)
1269 self.addAction(self.mpbActivateAct) 1280 self.addAction(self.mpbActivateAct)
1270 1281
1271 self.debugViewerActivateAct = E5Action(self.trUtf8('Debug-Viewer'), 1282 self.debugViewerActivateAct = E5Action(
1272 self.trUtf8('&Debug-Viewer'), 1283 self.trUtf8('Debug-Viewer'),
1273 QKeySequence(self.trUtf8("Alt+Shift+D")), 1284 self.trUtf8('&Debug-Viewer'),
1274 0, self, 1285 QKeySequence(self.trUtf8("Alt+Shift+D")),
1275 'debug_viewer_activate') 1286 0, self,
1287 'debug_viewer_activate')
1276 self.debugViewerActivateAct.setStatusTip(self.trUtf8( 1288 self.debugViewerActivateAct.setStatusTip(self.trUtf8(
1277 "Switch the input focus to the Debug-Viewer window.")) 1289 "Switch the input focus to the Debug-Viewer window."))
1278 self.debugViewerActivateAct.setWhatsThis(self.trUtf8( 1290 self.debugViewerActivateAct.setWhatsThis(self.trUtf8(
1279 """<b>Activate Debug-Viewer</b>""" 1291 """<b>Activate Debug-Viewer</b>"""
1280 """<p>This switches the input focus to the Debug-Viewer""" 1292 """<p>This switches the input focus to the Debug-Viewer"""
1283 self.debugViewerActivateAct.triggered[()].connect( 1295 self.debugViewerActivateAct.triggered[()].connect(
1284 self.__activateDebugViewer) 1296 self.__activateDebugViewer)
1285 self.actions.append(self.debugViewerActivateAct) 1297 self.actions.append(self.debugViewerActivateAct)
1286 self.addAction(self.debugViewerActivateAct) 1298 self.addAction(self.debugViewerActivateAct)
1287 1299
1288 self.shellActivateAct = E5Action(self.trUtf8('Shell'), 1300 self.shellActivateAct = E5Action(
1289 self.trUtf8('&Shell'), 1301 self.trUtf8('Shell'),
1290 QKeySequence(self.trUtf8("Alt+Shift+S")), 1302 self.trUtf8('&Shell'),
1291 0, self, 1303 QKeySequence(self.trUtf8("Alt+Shift+S")),
1292 'interprter_shell_activate') 1304 0, self,
1305 'interprter_shell_activate')
1293 self.shellActivateAct.setStatusTip(self.trUtf8( 1306 self.shellActivateAct.setStatusTip(self.trUtf8(
1294 "Switch the input focus to the Shell window.")) 1307 "Switch the input focus to the Shell window."))
1295 self.shellActivateAct.setWhatsThis(self.trUtf8( 1308 self.shellActivateAct.setWhatsThis(self.trUtf8(
1296 """<b>Activate Shell</b>""" 1309 """<b>Activate Shell</b>"""
1297 """<p>This switches the input focus to the Shell window.</p>""" 1310 """<p>This switches the input focus to the Shell window.</p>"""
1298 )) 1311 ))
1299 self.shellActivateAct.triggered[()].connect(self.__activateShell) 1312 self.shellActivateAct.triggered[()].connect(self.__activateShell)
1300 self.actions.append(self.shellActivateAct) 1313 self.actions.append(self.shellActivateAct)
1301 self.addAction(self.shellActivateAct) 1314 self.addAction(self.shellActivateAct)
1302 1315
1303 self.browserActivateAct = E5Action(self.trUtf8('File-Browser'), 1316 self.browserActivateAct = E5Action(
1304 self.trUtf8('&File-Browser'), 1317 self.trUtf8('File-Browser'),
1305 QKeySequence(self.trUtf8("Alt+Shift+F")), 1318 self.trUtf8('&File-Browser'),
1306 0, self, 1319 QKeySequence(self.trUtf8("Alt+Shift+F")),
1307 'file_browser_activate') 1320 0, self,
1321 'file_browser_activate')
1308 self.browserActivateAct.setStatusTip(self.trUtf8( 1322 self.browserActivateAct.setStatusTip(self.trUtf8(
1309 "Switch the input focus to the File-Browser window.")) 1323 "Switch the input focus to the File-Browser window."))
1310 self.browserActivateAct.setWhatsThis(self.trUtf8( 1324 self.browserActivateAct.setWhatsThis(self.trUtf8(
1311 """<b>Activate File-Browser</b>""" 1325 """<b>Activate File-Browser</b>"""
1312 """<p>This switches the input focus to the File-Browser""" 1326 """<p>This switches the input focus to the File-Browser"""
1314 )) 1328 ))
1315 self.browserActivateAct.triggered[()].connect(self.__activateBrowser) 1329 self.browserActivateAct.triggered[()].connect(self.__activateBrowser)
1316 self.actions.append(self.browserActivateAct) 1330 self.actions.append(self.browserActivateAct)
1317 self.addAction(self.browserActivateAct) 1331 self.addAction(self.browserActivateAct)
1318 1332
1319 self.logViewerActivateAct = E5Action(self.trUtf8('Log-Viewer'), 1333 self.logViewerActivateAct = E5Action(
1320 self.trUtf8('Lo&g-Viewer'), 1334 self.trUtf8('Log-Viewer'),
1321 QKeySequence(self.trUtf8("Alt+Shift+G")), 1335 self.trUtf8('Lo&g-Viewer'),
1322 0, self, 1336 QKeySequence(self.trUtf8("Alt+Shift+G")),
1323 'log_viewer_activate') 1337 0, self,
1338 'log_viewer_activate')
1324 self.logViewerActivateAct.setStatusTip(self.trUtf8( 1339 self.logViewerActivateAct.setStatusTip(self.trUtf8(
1325 "Switch the input focus to the Log-Viewer window.")) 1340 "Switch the input focus to the Log-Viewer window."))
1326 self.logViewerActivateAct.setWhatsThis(self.trUtf8( 1341 self.logViewerActivateAct.setWhatsThis(self.trUtf8(
1327 """<b>Activate Log-Viewer</b>""" 1342 """<b>Activate Log-Viewer</b>"""
1328 """<p>This switches the input focus to the Log-Viewer""" 1343 """<p>This switches the input focus to the Log-Viewer"""
1331 self.logViewerActivateAct.triggered[()].connect( 1346 self.logViewerActivateAct.triggered[()].connect(
1332 self.__activateLogViewer) 1347 self.__activateLogViewer)
1333 self.actions.append(self.logViewerActivateAct) 1348 self.actions.append(self.logViewerActivateAct)
1334 self.addAction(self.logViewerActivateAct) 1349 self.addAction(self.logViewerActivateAct)
1335 1350
1336 self.taskViewerActivateAct = E5Action(self.trUtf8('Task-Viewer'), 1351 self.taskViewerActivateAct = E5Action(
1337 self.trUtf8('&Task-Viewer'), 1352 self.trUtf8('Task-Viewer'),
1338 QKeySequence(self.trUtf8("Alt+Shift+T")), 1353 self.trUtf8('&Task-Viewer'),
1339 0, self, 1354 QKeySequence(self.trUtf8("Alt+Shift+T")),
1340 'task_viewer_activate') 1355 0, self,
1356 'task_viewer_activate')
1341 self.taskViewerActivateAct.setStatusTip(self.trUtf8( 1357 self.taskViewerActivateAct.setStatusTip(self.trUtf8(
1342 "Switch the input focus to the Task-Viewer window.")) 1358 "Switch the input focus to the Task-Viewer window."))
1343 self.taskViewerActivateAct.setWhatsThis(self.trUtf8( 1359 self.taskViewerActivateAct.setWhatsThis(self.trUtf8(
1344 """<b>Activate Task-Viewer</b>""" 1360 """<b>Activate Task-Viewer</b>"""
1345 """<p>This switches the input focus to the Task-Viewer""" 1361 """<p>This switches the input focus to the Task-Viewer"""
1391 """ If it is displayed then close it.</p>""" 1407 """ If it is displayed then close it.</p>"""
1392 )) 1408 ))
1393 self.rtAct.triggered[()].connect(self.__toggleRightToolbox) 1409 self.rtAct.triggered[()].connect(self.__toggleRightToolbox)
1394 self.actions.append(self.rtAct) 1410 self.actions.append(self.rtAct)
1395 1411
1396 self.htAct = E5Action(self.trUtf8('Horizontal Toolbox'), 1412 self.htAct = E5Action(
1397 self.trUtf8('&Horizontal Toolbox'), 0, 0, self, 1413 self.trUtf8('Horizontal Toolbox'),
1398 'horizontal_toolbox', True) 1414 self.trUtf8('&Horizontal Toolbox'), 0, 0, self,
1415 'horizontal_toolbox', True)
1399 self.htAct.setStatusTip(self.trUtf8( 1416 self.htAct.setStatusTip(self.trUtf8(
1400 'Toggle the Horizontal Toolbox window')) 1417 'Toggle the Horizontal Toolbox window'))
1401 self.htAct.setWhatsThis(self.trUtf8( 1418 self.htAct.setWhatsThis(self.trUtf8(
1402 """<b>Toggle the Horizontal Toolbox window</b>""" 1419 """<b>Toggle the Horizontal Toolbox window</b>"""
1403 """<p>If the Horizontal Toolbox window is hidden then display""" 1420 """<p>If the Horizontal Toolbox window is hidden then display"""
1404 """ it. If it is displayed then close it.</p>""" 1421 """ it. If it is displayed then close it.</p>"""
1405 )) 1422 ))
1406 self.htAct.triggered[()].connect(self.__toggleHorizontalToolbox) 1423 self.htAct.triggered[()].connect(self.__toggleHorizontalToolbox)
1407 self.actions.append(self.htAct) 1424 self.actions.append(self.htAct)
1408 1425
1409 self.lsbAct = E5Action(self.trUtf8('Left Sidebar'), 1426 self.lsbAct = E5Action(
1410 self.trUtf8('&Left Sidebar'), 0, 0, self, 'left_sidebar', True) 1427 self.trUtf8('Left Sidebar'),
1428 self.trUtf8('&Left Sidebar'),
1429 0, 0, self, 'left_sidebar', True)
1411 self.lsbAct.setStatusTip(self.trUtf8('Toggle the left sidebar window')) 1430 self.lsbAct.setStatusTip(self.trUtf8('Toggle the left sidebar window'))
1412 self.lsbAct.setWhatsThis(self.trUtf8( 1431 self.lsbAct.setWhatsThis(self.trUtf8(
1413 """<b>Toggle the left sidebar window</b>""" 1432 """<b>Toggle the left sidebar window</b>"""
1414 """<p>If the left sidebar window is hidden then display it.""" 1433 """<p>If the left sidebar window is hidden then display it."""
1415 """ If it is displayed then close it.</p>""" 1434 """ If it is displayed then close it.</p>"""
1417 self.lsbAct.triggered[()].connect(self.__toggleLeftSidebar) 1436 self.lsbAct.triggered[()].connect(self.__toggleLeftSidebar)
1418 self.actions.append(self.lsbAct) 1437 self.actions.append(self.lsbAct)
1419 1438
1420 self.rsbAct = E5Action( 1439 self.rsbAct = E5Action(
1421 self.trUtf8('Right Sidebar'), 1440 self.trUtf8('Right Sidebar'),
1422 self.trUtf8('&Right Sidebar'), 0, 0, self, 'right_sidebar', True) 1441 self.trUtf8('&Right Sidebar'),
1442 0, 0, self, 'right_sidebar', True)
1423 self.rsbAct.setStatusTip(self.trUtf8( 1443 self.rsbAct.setStatusTip(self.trUtf8(
1424 'Toggle the right sidebar window')) 1444 'Toggle the right sidebar window'))
1425 self.rsbAct.setWhatsThis(self.trUtf8( 1445 self.rsbAct.setWhatsThis(self.trUtf8(
1426 """<b>Toggle the right sidebar window</b>""" 1446 """<b>Toggle the right sidebar window</b>"""
1427 """<p>If the right sidebar window is hidden then display it.""" 1447 """<p>If the right sidebar window is hidden then display it."""
1428 """ If it is displayed then close it.</p>""" 1448 """ If it is displayed then close it.</p>"""
1429 )) 1449 ))
1430 self.rsbAct.triggered[()].connect(self.__toggleRightSidebar) 1450 self.rsbAct.triggered[()].connect(self.__toggleRightSidebar)
1431 self.actions.append(self.rsbAct) 1451 self.actions.append(self.rsbAct)
1432 1452
1433 self.bsbAct = E5Action(self.trUtf8('Bottom Sidebar'), 1453 self.bsbAct = E5Action(
1434 self.trUtf8('&Bottom Sidebar'), 0, 0, self, 1454 self.trUtf8('Bottom Sidebar'),
1435 'bottom_sidebar', True) 1455 self.trUtf8('&Bottom Sidebar'), 0, 0, self,
1456 'bottom_sidebar', True)
1436 self.bsbAct.setStatusTip(self.trUtf8( 1457 self.bsbAct.setStatusTip(self.trUtf8(
1437 'Toggle the bottom sidebar window')) 1458 'Toggle the bottom sidebar window'))
1438 self.bsbAct.setWhatsThis(self.trUtf8( 1459 self.bsbAct.setWhatsThis(self.trUtf8(
1439 """<b>Toggle the bottom sidebar window</b>""" 1460 """<b>Toggle the bottom sidebar window</b>"""
1440 """<p>If the bottom sidebar window is hidden then display it.""" 1461 """<p>If the bottom sidebar window is hidden then display it."""
1442 )) 1463 ))
1443 self.bsbAct.triggered[()].connect(self.__toggleBottomSidebar) 1464 self.bsbAct.triggered[()].connect(self.__toggleBottomSidebar)
1444 self.actions.append(self.bsbAct) 1465 self.actions.append(self.bsbAct)
1445 1466
1446 self.cooperationViewerActivateAct = E5Action( 1467 self.cooperationViewerActivateAct = E5Action(
1447 self.trUtf8('Cooperation-Viewer'), 1468 self.trUtf8('Cooperation-Viewer'),
1448 self.trUtf8('Co&operation-Viewer'), 1469 self.trUtf8('Co&operation-Viewer'),
1449 QKeySequence(self.trUtf8("Alt+Shift+O")), 1470 QKeySequence(self.trUtf8("Alt+Shift+O")),
1450 0, self, 1471 0, self,
1451 'cooperation_viewer_activate') 1472 'cooperation_viewer_activate')
1452 self.cooperationViewerActivateAct.setStatusTip(self.trUtf8( 1473 self.cooperationViewerActivateAct.setStatusTip(self.trUtf8(
1453 "Switch the input focus to the Cooperation-Viewer window.")) 1474 "Switch the input focus to the Cooperation-Viewer window."))
1454 self.cooperationViewerActivateAct.setWhatsThis(self.trUtf8( 1475 self.cooperationViewerActivateAct.setWhatsThis(self.trUtf8(
1455 """<b>Activate Cooperation-Viewer</b>""" 1476 """<b>Activate Cooperation-Viewer</b>"""
1456 """<p>This switches the input focus to the Cooperation-Viewer""" 1477 """<p>This switches the input focus to the Cooperation-Viewer"""
1460 self.activateCooperationViewer) 1481 self.activateCooperationViewer)
1461 self.actions.append(self.cooperationViewerActivateAct) 1482 self.actions.append(self.cooperationViewerActivateAct)
1462 self.addAction(self.cooperationViewerActivateAct) 1483 self.addAction(self.cooperationViewerActivateAct)
1463 1484
1464 self.ircActivateAct = E5Action( 1485 self.ircActivateAct = E5Action(
1465 self.trUtf8('IRC'), 1486 self.trUtf8('IRC'),
1466 self.trUtf8('&IRC'), 1487 self.trUtf8('&IRC'),
1467 QKeySequence(self.trUtf8("Meta+Shift+I")), 1488 QKeySequence(self.trUtf8("Meta+Shift+I")),
1468 0, self, 1489 0, self,
1469 'irc_widget_activate') 1490 'irc_widget_activate')
1470 self.ircActivateAct.setStatusTip(self.trUtf8( 1491 self.ircActivateAct.setStatusTip(self.trUtf8(
1471 "Switch the input focus to the IRC window.")) 1492 "Switch the input focus to the IRC window."))
1472 self.ircActivateAct.setWhatsThis(self.trUtf8( 1493 self.ircActivateAct.setWhatsThis(self.trUtf8(
1473 """<b>Activate IRC</b>""" 1494 """<b>Activate IRC</b>"""
1474 """<p>This switches the input focus to the IRC window.</p>""" 1495 """<p>This switches the input focus to the IRC window.</p>"""
1477 self.__activateIRC) 1498 self.__activateIRC)
1478 self.actions.append(self.ircActivateAct) 1499 self.actions.append(self.ircActivateAct)
1479 self.addAction(self.ircActivateAct) 1500 self.addAction(self.ircActivateAct)
1480 1501
1481 self.symbolsViewerActivateAct = E5Action( 1502 self.symbolsViewerActivateAct = E5Action(
1482 self.trUtf8('Symbols-Viewer'), 1503 self.trUtf8('Symbols-Viewer'),
1483 self.trUtf8('S&ymbols-Viewer'), 1504 self.trUtf8('S&ymbols-Viewer'),
1484 QKeySequence(self.trUtf8("Alt+Shift+Y")), 1505 QKeySequence(self.trUtf8("Alt+Shift+Y")),
1485 0, self, 1506 0, self,
1486 'symbols_viewer_activate') 1507 'symbols_viewer_activate')
1487 self.symbolsViewerActivateAct.setStatusTip(self.trUtf8( 1508 self.symbolsViewerActivateAct.setStatusTip(self.trUtf8(
1488 "Switch the input focus to the Symbols-Viewer window.")) 1509 "Switch the input focus to the Symbols-Viewer window."))
1489 self.symbolsViewerActivateAct.setWhatsThis(self.trUtf8( 1510 self.symbolsViewerActivateAct.setWhatsThis(self.trUtf8(
1490 """<b>Activate Symbols-Viewer</b>""" 1511 """<b>Activate Symbols-Viewer</b>"""
1491 """<p>This switches the input focus to the Symbols-Viewer""" 1512 """<p>This switches the input focus to the Symbols-Viewer"""
1495 self.__activateSymbolsViewer) 1516 self.__activateSymbolsViewer)
1496 self.actions.append(self.symbolsViewerActivateAct) 1517 self.actions.append(self.symbolsViewerActivateAct)
1497 self.addAction(self.symbolsViewerActivateAct) 1518 self.addAction(self.symbolsViewerActivateAct)
1498 1519
1499 self.numbersViewerActivateAct = E5Action( 1520 self.numbersViewerActivateAct = E5Action(
1500 self.trUtf8('Numbers-Viewer'), 1521 self.trUtf8('Numbers-Viewer'),
1501 self.trUtf8('Num&bers-Viewer'), 1522 self.trUtf8('Num&bers-Viewer'),
1502 QKeySequence(self.trUtf8("Alt+Shift+B")), 1523 QKeySequence(self.trUtf8("Alt+Shift+B")),
1503 0, self, 1524 0, self,
1504 'numbers_viewer_activate') 1525 'numbers_viewer_activate')
1505 self.numbersViewerActivateAct.setStatusTip(self.trUtf8( 1526 self.numbersViewerActivateAct.setStatusTip(self.trUtf8(
1506 "Switch the input focus to the Numbers-Viewer window.")) 1527 "Switch the input focus to the Numbers-Viewer window."))
1507 self.numbersViewerActivateAct.setWhatsThis(self.trUtf8( 1528 self.numbersViewerActivateAct.setWhatsThis(self.trUtf8(
1508 """<b>Activate Numbers-Viewer</b>""" 1529 """<b>Activate Numbers-Viewer</b>"""
1509 """<p>This switches the input focus to the Numbers-Viewer""" 1530 """<p>This switches the input focus to the Numbers-Viewer"""
1512 self.numbersViewerActivateAct.triggered[()].connect( 1533 self.numbersViewerActivateAct.triggered[()].connect(
1513 self.__activateNumbersViewer) 1534 self.__activateNumbersViewer)
1514 self.actions.append(self.numbersViewerActivateAct) 1535 self.actions.append(self.numbersViewerActivateAct)
1515 self.addAction(self.numbersViewerActivateAct) 1536 self.addAction(self.numbersViewerActivateAct)
1516 1537
1517 self.whatsThisAct = E5Action(self.trUtf8('What\'s This?'), 1538 self.whatsThisAct = E5Action(
1518 UI.PixmapCache.getIcon("whatsThis.png"), 1539 self.trUtf8('What\'s This?'),
1519 self.trUtf8('&What\'s This?'), 1540 UI.PixmapCache.getIcon("whatsThis.png"),
1520 QKeySequence(self.trUtf8("Shift+F1")), 1541 self.trUtf8('&What\'s This?'),
1521 0, self, 'whatsThis') 1542 QKeySequence(self.trUtf8("Shift+F1")),
1543 0, self, 'whatsThis')
1522 self.whatsThisAct.setStatusTip(self.trUtf8('Context sensitive help')) 1544 self.whatsThisAct.setStatusTip(self.trUtf8('Context sensitive help'))
1523 self.whatsThisAct.setWhatsThis(self.trUtf8( 1545 self.whatsThisAct.setWhatsThis(self.trUtf8(
1524 """<b>Display context sensitive help</b>""" 1546 """<b>Display context sensitive help</b>"""
1525 """<p>In What's This? mode, the mouse cursor shows an arrow with""" 1547 """<p>In What's This? mode, the mouse cursor shows an arrow with"""
1526 """ a question mark, and you can click on the interface elements""" 1548 """ a question mark, and you can click on the interface elements"""
1529 """ context help button in the titlebar.</p>""" 1551 """ context help button in the titlebar.</p>"""
1530 )) 1552 ))
1531 self.whatsThisAct.triggered[()].connect(self.__whatsThis) 1553 self.whatsThisAct.triggered[()].connect(self.__whatsThis)
1532 self.actions.append(self.whatsThisAct) 1554 self.actions.append(self.whatsThisAct)
1533 1555
1534 self.helpviewerAct = E5Action(self.trUtf8('Helpviewer'), 1556 self.helpviewerAct = E5Action(
1535 UI.PixmapCache.getIcon("help.png"), 1557 self.trUtf8('Helpviewer'),
1536 self.trUtf8('&Helpviewer...'), 1558 UI.PixmapCache.getIcon("help.png"),
1537 QKeySequence(self.trUtf8("F1")), 1559 self.trUtf8('&Helpviewer...'),
1538 0, self, 'helpviewer') 1560 QKeySequence(self.trUtf8("F1")),
1561 0, self, 'helpviewer')
1539 self.helpviewerAct.setStatusTip(self.trUtf8( 1562 self.helpviewerAct.setStatusTip(self.trUtf8(
1540 'Open the helpviewer window')) 1563 'Open the helpviewer window'))
1541 self.helpviewerAct.setWhatsThis(self.trUtf8( 1564 self.helpviewerAct.setWhatsThis(self.trUtf8(
1542 """<b>Helpviewer</b>""" 1565 """<b>Helpviewer</b>"""
1543 """<p>Display the eric5 web browser. This window will show""" 1566 """<p>Display the eric5 web browser. This window will show"""
1553 self.__initQtDocActions() 1576 self.__initQtDocActions()
1554 self.__initPythonDocActions() 1577 self.__initPythonDocActions()
1555 self.__initEricDocAction() 1578 self.__initEricDocAction()
1556 self.__initPySideDocAction() 1579 self.__initPySideDocAction()
1557 1580
1558 self.versionAct = E5Action(self.trUtf8('Show Versions'), 1581 self.versionAct = E5Action(
1559 self.trUtf8('Show &Versions'), 0, 0, self, 'show_versions') 1582 self.trUtf8('Show Versions'),
1583 self.trUtf8('Show &Versions'),
1584 0, 0, self, 'show_versions')
1560 self.versionAct.setStatusTip(self.trUtf8( 1585 self.versionAct.setStatusTip(self.trUtf8(
1561 'Display version information')) 1586 'Display version information'))
1562 self.versionAct.setWhatsThis(self.trUtf8( 1587 self.versionAct.setWhatsThis(self.trUtf8(
1563 """<b>Show Versions</b>""" 1588 """<b>Show Versions</b>"""
1564 """<p>Display version information.</p>""" 1589 """<p>Display version information.</p>"""
1590 )) 1615 ))
1591 self.showVersionsAct.triggered[()].connect( 1616 self.showVersionsAct.triggered[()].connect(
1592 self.showAvailableVersionsInfo) 1617 self.showAvailableVersionsInfo)
1593 self.actions.append(self.showVersionsAct) 1618 self.actions.append(self.showVersionsAct)
1594 1619
1595 self.reportBugAct = E5Action(self.trUtf8('Report Bug'), 1620 self.reportBugAct = E5Action(
1596 self.trUtf8('Report &Bug...'), 0, 0, self, 'report_bug') 1621 self.trUtf8('Report Bug'),
1622 self.trUtf8('Report &Bug...'),
1623 0, 0, self, 'report_bug')
1597 self.reportBugAct.setStatusTip(self.trUtf8('Report a bug')) 1624 self.reportBugAct.setStatusTip(self.trUtf8('Report a bug'))
1598 self.reportBugAct.setWhatsThis(self.trUtf8( 1625 self.reportBugAct.setWhatsThis(self.trUtf8(
1599 """<b>Report Bug...</b>""" 1626 """<b>Report Bug...</b>"""
1600 """<p>Opens a dialog to report a bug.</p>""" 1627 """<p>Opens a dialog to report a bug.</p>"""
1601 )) 1628 ))
1602 self.reportBugAct.triggered[()].connect(self.__reportBug) 1629 self.reportBugAct.triggered[()].connect(self.__reportBug)
1603 self.actions.append(self.reportBugAct) 1630 self.actions.append(self.reportBugAct)
1604 1631
1605 self.requestFeatureAct = E5Action( 1632 self.requestFeatureAct = E5Action(
1606 self.trUtf8('Request Feature'), 1633 self.trUtf8('Request Feature'),
1607 self.trUtf8('Request &Feature...'), 0, 0, self, 'request_feature') 1634 self.trUtf8('Request &Feature...'),
1635 0, 0, self, 'request_feature')
1608 self.requestFeatureAct.setStatusTip(self.trUtf8( 1636 self.requestFeatureAct.setStatusTip(self.trUtf8(
1609 'Send a feature request')) 1637 'Send a feature request'))
1610 self.requestFeatureAct.setWhatsThis(self.trUtf8( 1638 self.requestFeatureAct.setWhatsThis(self.trUtf8(
1611 """<b>Request Feature...</b>""" 1639 """<b>Request Feature...</b>"""
1612 """<p>Opens a dialog to send a feature request.</p>""" 1640 """<p>Opens a dialog to send a feature request.</p>"""
1614 self.requestFeatureAct.triggered[()].connect(self.__requestFeature) 1642 self.requestFeatureAct.triggered[()].connect(self.__requestFeature)
1615 self.actions.append(self.requestFeatureAct) 1643 self.actions.append(self.requestFeatureAct)
1616 1644
1617 self.utActGrp = createActionGroup(self) 1645 self.utActGrp = createActionGroup(self)
1618 1646
1619 self.utDialogAct = E5Action(self.trUtf8('Unittest'), 1647 self.utDialogAct = E5Action(
1620 UI.PixmapCache.getIcon("unittest.png"), 1648 self.trUtf8('Unittest'),
1621 self.trUtf8('&Unittest...'), 1649 UI.PixmapCache.getIcon("unittest.png"),
1622 0, 0, self.utActGrp, 'unittest') 1650 self.trUtf8('&Unittest...'),
1651 0, 0, self.utActGrp, 'unittest')
1623 self.utDialogAct.setStatusTip(self.trUtf8('Start unittest dialog')) 1652 self.utDialogAct.setStatusTip(self.trUtf8('Start unittest dialog'))
1624 self.utDialogAct.setWhatsThis(self.trUtf8( 1653 self.utDialogAct.setWhatsThis(self.trUtf8(
1625 """<b>Unittest</b>""" 1654 """<b>Unittest</b>"""
1626 """<p>Perform unit tests. The dialog gives you the""" 1655 """<p>Perform unit tests. The dialog gives you the"""
1627 """ ability to select and run a unittest suite.</p>""" 1656 """ ability to select and run a unittest suite.</p>"""
1628 )) 1657 ))
1629 self.utDialogAct.triggered[()].connect(self.__unittest) 1658 self.utDialogAct.triggered[()].connect(self.__unittest)
1630 self.actions.append(self.utDialogAct) 1659 self.actions.append(self.utDialogAct)
1631 1660
1632 self.utRestartAct = E5Action(self.trUtf8('Unittest Restart'), 1661 self.utRestartAct = E5Action(
1662 self.trUtf8('Unittest Restart'),
1633 UI.PixmapCache.getIcon("unittestRestart.png"), 1663 UI.PixmapCache.getIcon("unittestRestart.png"),
1634 self.trUtf8('&Restart Unittest...'), 1664 self.trUtf8('&Restart Unittest...'),
1635 0, 0, self.utActGrp, 'unittest_restart') 1665 0, 0, self.utActGrp, 'unittest_restart')
1636 self.utRestartAct.setStatusTip(self.trUtf8('Restart last unittest')) 1666 self.utRestartAct.setStatusTip(self.trUtf8('Restart last unittest'))
1637 self.utRestartAct.setWhatsThis(self.trUtf8( 1667 self.utRestartAct.setWhatsThis(self.trUtf8(
1640 )) 1670 ))
1641 self.utRestartAct.triggered[()].connect(self.__unittestRestart) 1671 self.utRestartAct.triggered[()].connect(self.__unittestRestart)
1642 self.utRestartAct.setEnabled(False) 1672 self.utRestartAct.setEnabled(False)
1643 self.actions.append(self.utRestartAct) 1673 self.actions.append(self.utRestartAct)
1644 1674
1645 self.utRerunFailedAct = E5Action(self.trUtf8('Unittest Rerun Failed'), 1675 self.utRerunFailedAct = E5Action(
1676 self.trUtf8('Unittest Rerun Failed'),
1646 UI.PixmapCache.getIcon("unittestRerunFailed.png"), 1677 UI.PixmapCache.getIcon("unittestRerunFailed.png"),
1647 self.trUtf8('Rerun Failed Tests...'), 1678 self.trUtf8('Rerun Failed Tests...'),
1648 0, 0, self.utActGrp, 'unittest_rerun_failed') 1679 0, 0, self.utActGrp, 'unittest_rerun_failed')
1649 self.utRerunFailedAct.setStatusTip(self.trUtf8( 1680 self.utRerunFailedAct.setStatusTip(self.trUtf8(
1650 'Rerun failed tests of the last run')) 1681 'Rerun failed tests of the last run'))
1655 )) 1686 ))
1656 self.utRerunFailedAct.triggered[()].connect(self.__unittestRerunFailed) 1687 self.utRerunFailedAct.triggered[()].connect(self.__unittestRerunFailed)
1657 self.utRerunFailedAct.setEnabled(False) 1688 self.utRerunFailedAct.setEnabled(False)
1658 self.actions.append(self.utRerunFailedAct) 1689 self.actions.append(self.utRerunFailedAct)
1659 1690
1660 self.utScriptAct = E5Action(self.trUtf8('Unittest Script'), 1691 self.utScriptAct = E5Action(
1692 self.trUtf8('Unittest Script'),
1661 UI.PixmapCache.getIcon("unittestScript.png"), 1693 UI.PixmapCache.getIcon("unittestScript.png"),
1662 self.trUtf8('Unittest &Script...'), 1694 self.trUtf8('Unittest &Script...'),
1663 0, 0, self.utActGrp, 'unittest_script') 1695 0, 0, self.utActGrp, 'unittest_script')
1664 self.utScriptAct.setStatusTip(self.trUtf8( 1696 self.utScriptAct.setStatusTip(self.trUtf8(
1665 'Run unittest with current script')) 1697 'Run unittest with current script'))
1669 )) 1701 ))
1670 self.utScriptAct.triggered[()].connect(self.__unittestScript) 1702 self.utScriptAct.triggered[()].connect(self.__unittestScript)
1671 self.utScriptAct.setEnabled(False) 1703 self.utScriptAct.setEnabled(False)
1672 self.actions.append(self.utScriptAct) 1704 self.actions.append(self.utScriptAct)
1673 1705
1674 self.utProjectAct = E5Action(self.trUtf8('Unittest Project'), 1706 self.utProjectAct = E5Action(
1707 self.trUtf8('Unittest Project'),
1675 UI.PixmapCache.getIcon("unittestProject.png"), 1708 UI.PixmapCache.getIcon("unittestProject.png"),
1676 self.trUtf8('Unittest &Project...'), 1709 self.trUtf8('Unittest &Project...'),
1677 0, 0, self.utActGrp, 'unittest_project') 1710 0, 0, self.utActGrp, 'unittest_project')
1678 self.utProjectAct.setStatusTip(self.trUtf8( 1711 self.utProjectAct.setStatusTip(self.trUtf8(
1679 'Run unittest with current project')) 1712 'Run unittest with current project'))
1685 self.utProjectAct.setEnabled(False) 1718 self.utProjectAct.setEnabled(False)
1686 self.actions.append(self.utProjectAct) 1719 self.actions.append(self.utProjectAct)
1687 1720
1688 # check for Qt4/Qt5 designer and linguist 1721 # check for Qt4/Qt5 designer and linguist
1689 if Utilities.isWindowsPlatform(): 1722 if Utilities.isWindowsPlatform():
1690 designerExe = os.path.join(Utilities.getQtBinariesPath(), 1723 designerExe = os.path.join(
1724 Utilities.getQtBinariesPath(),
1691 "{0}.exe".format(Utilities.generateQtToolName("designer"))) 1725 "{0}.exe".format(Utilities.generateQtToolName("designer")))
1692 elif Utilities.isMacPlatform(): 1726 elif Utilities.isMacPlatform():
1693 designerExe = Utilities.getQtMacBundle("designer") 1727 designerExe = Utilities.getQtMacBundle("designer")
1694 else: 1728 else:
1695 designerExe = os.path.join(Utilities.getQtBinariesPath(), 1729 designerExe = os.path.join(
1730 Utilities.getQtBinariesPath(),
1696 Utilities.generateQtToolName("designer")) 1731 Utilities.generateQtToolName("designer"))
1697 if os.path.exists(designerExe): 1732 if os.path.exists(designerExe):
1698 self.designer4Act = E5Action(self.trUtf8('Qt-Designer'), 1733 self.designer4Act = E5Action(
1699 UI.PixmapCache.getIcon("designer4.png"), 1734 self.trUtf8('Qt-Designer'),
1700 self.trUtf8('Qt-&Designer...'), 0, 0, self, 'qt_designer4') 1735 UI.PixmapCache.getIcon("designer4.png"),
1736 self.trUtf8('Qt-&Designer...'),
1737 0, 0, self, 'qt_designer4')
1701 self.designer4Act.setStatusTip(self.trUtf8('Start Qt-Designer')) 1738 self.designer4Act.setStatusTip(self.trUtf8('Start Qt-Designer'))
1702 self.designer4Act.setWhatsThis(self.trUtf8( 1739 self.designer4Act.setWhatsThis(self.trUtf8(
1703 """<b>Qt-Designer</b>""" 1740 """<b>Qt-Designer</b>"""
1704 """<p>Start Qt-Designer.</p>""" 1741 """<p>Start Qt-Designer.</p>"""
1705 )) 1742 ))
1707 self.actions.append(self.designer4Act) 1744 self.actions.append(self.designer4Act)
1708 else: 1745 else:
1709 self.designer4Act = None 1746 self.designer4Act = None
1710 1747
1711 if Utilities.isWindowsPlatform(): 1748 if Utilities.isWindowsPlatform():
1712 linguistExe = os.path.join(Utilities.getQtBinariesPath(), 1749 linguistExe = os.path.join(
1750 Utilities.getQtBinariesPath(),
1713 "{0}.exe".format(Utilities.generateQtToolName("linguist"))) 1751 "{0}.exe".format(Utilities.generateQtToolName("linguist")))
1714 elif Utilities.isMacPlatform(): 1752 elif Utilities.isMacPlatform():
1715 linguistExe = Utilities.getQtMacBundle("linguist") 1753 linguistExe = Utilities.getQtMacBundle("linguist")
1716 else: 1754 else:
1717 linguistExe = os.path.join(Utilities.getQtBinariesPath(), 1755 linguistExe = os.path.join(
1756 Utilities.getQtBinariesPath(),
1718 Utilities.generateQtToolName("linguist")) 1757 Utilities.generateQtToolName("linguist"))
1719 if os.path.exists(linguistExe): 1758 if os.path.exists(linguistExe):
1720 self.linguist4Act = E5Action(self.trUtf8('Qt-Linguist'), 1759 self.linguist4Act = E5Action(
1721 UI.PixmapCache.getIcon("linguist4.png"), 1760 self.trUtf8('Qt-Linguist'),
1722 self.trUtf8('Qt-&Linguist...'), 0, 0, self, 'qt_linguist4') 1761 UI.PixmapCache.getIcon("linguist4.png"),
1762 self.trUtf8('Qt-&Linguist...'),
1763 0, 0, self, 'qt_linguist4')
1723 self.linguist4Act.setStatusTip(self.trUtf8('Start Qt-Linguist')) 1764 self.linguist4Act.setStatusTip(self.trUtf8('Start Qt-Linguist'))
1724 self.linguist4Act.setWhatsThis(self.trUtf8( 1765 self.linguist4Act.setWhatsThis(self.trUtf8(
1725 """<b>Qt-Linguist</b>""" 1766 """<b>Qt-Linguist</b>"""
1726 """<p>Start Qt-Linguist.</p>""" 1767 """<p>Start Qt-Linguist.</p>"""
1727 )) 1768 ))
1728 self.linguist4Act.triggered[()].connect(self.__linguist4) 1769 self.linguist4Act.triggered[()].connect(self.__linguist4)
1729 self.actions.append(self.linguist4Act) 1770 self.actions.append(self.linguist4Act)
1730 else: 1771 else:
1731 self.linguist4Act = None 1772 self.linguist4Act = None
1732 1773
1733 self.uipreviewerAct = E5Action(self.trUtf8('UI Previewer'), 1774 self.uipreviewerAct = E5Action(
1734 UI.PixmapCache.getIcon("uiPreviewer.png"), 1775 self.trUtf8('UI Previewer'),
1735 self.trUtf8('&UI Previewer...'), 0, 0, self, 'ui_previewer') 1776 UI.PixmapCache.getIcon("uiPreviewer.png"),
1777 self.trUtf8('&UI Previewer...'),
1778 0, 0, self, 'ui_previewer')
1736 self.uipreviewerAct.setStatusTip(self.trUtf8('Start the UI Previewer')) 1779 self.uipreviewerAct.setStatusTip(self.trUtf8('Start the UI Previewer'))
1737 self.uipreviewerAct.setWhatsThis(self.trUtf8( 1780 self.uipreviewerAct.setWhatsThis(self.trUtf8(
1738 """<b>UI Previewer</b>""" 1781 """<b>UI Previewer</b>"""
1739 """<p>Start the UI Previewer.</p>""" 1782 """<p>Start the UI Previewer.</p>"""
1740 )) 1783 ))
1753 """<p>Start the Translations Previewer.</p>""" 1796 """<p>Start the Translations Previewer.</p>"""
1754 )) 1797 ))
1755 self.trpreviewerAct.triggered[()].connect(self.__TRPreviewer) 1798 self.trpreviewerAct.triggered[()].connect(self.__TRPreviewer)
1756 self.actions.append(self.trpreviewerAct) 1799 self.actions.append(self.trpreviewerAct)
1757 1800
1758 self.diffAct = E5Action(self.trUtf8('Compare Files'), 1801 self.diffAct = E5Action(
1759 UI.PixmapCache.getIcon("diffFiles.png"), 1802 self.trUtf8('Compare Files'),
1760 self.trUtf8('&Compare Files...'), 0, 0, self, 'diff_files') 1803 UI.PixmapCache.getIcon("diffFiles.png"),
1804 self.trUtf8('&Compare Files...'),
1805 0, 0, self, 'diff_files')
1761 self.diffAct.setStatusTip(self.trUtf8('Compare two files')) 1806 self.diffAct.setStatusTip(self.trUtf8('Compare two files'))
1762 self.diffAct.setWhatsThis(self.trUtf8( 1807 self.diffAct.setWhatsThis(self.trUtf8(
1763 """<b>Compare Files</b>""" 1808 """<b>Compare Files</b>"""
1764 """<p>Open a dialog to compare two files.</p>""" 1809 """<p>Open a dialog to compare two files.</p>"""
1765 )) 1810 ))
1766 self.diffAct.triggered[()].connect(self.__compareFiles) 1811 self.diffAct.triggered[()].connect(self.__compareFiles)
1767 self.actions.append(self.diffAct) 1812 self.actions.append(self.diffAct)
1768 1813
1769 self.compareAct = E5Action(self.trUtf8('Compare Files side by side'), 1814 self.compareAct = E5Action(
1770 UI.PixmapCache.getIcon("compareFiles.png"), 1815 self.trUtf8('Compare Files side by side'),
1771 self.trUtf8('Compare &Files side by side...'), 1816 UI.PixmapCache.getIcon("compareFiles.png"),
1772 0, 0, self, 'compare_files') 1817 self.trUtf8('Compare &Files side by side...'),
1818 0, 0, self, 'compare_files')
1773 self.compareAct.setStatusTip(self.trUtf8('Compare two files')) 1819 self.compareAct.setStatusTip(self.trUtf8('Compare two files'))
1774 self.compareAct.setWhatsThis(self.trUtf8( 1820 self.compareAct.setWhatsThis(self.trUtf8(
1775 """<b>Compare Files side by side</b>""" 1821 """<b>Compare Files side by side</b>"""
1776 """<p>Open a dialog to compare two files and show the result""" 1822 """<p>Open a dialog to compare two files and show the result"""
1777 """ side by side.</p>""" 1823 """ side by side.</p>"""
1778 )) 1824 ))
1779 self.compareAct.triggered[()].connect(self.__compareFilesSbs) 1825 self.compareAct.triggered[()].connect(self.__compareFilesSbs)
1780 self.actions.append(self.compareAct) 1826 self.actions.append(self.compareAct)
1781 1827
1782 self.sqlBrowserAct = E5Action(self.trUtf8('SQL Browser'), 1828 self.sqlBrowserAct = E5Action(
1783 UI.PixmapCache.getIcon("sqlBrowser.png"), 1829 self.trUtf8('SQL Browser'),
1784 self.trUtf8('SQL &Browser...'), 1830 UI.PixmapCache.getIcon("sqlBrowser.png"),
1785 0, 0, self, 'sql_browser') 1831 self.trUtf8('SQL &Browser...'),
1832 0, 0, self, 'sql_browser')
1786 self.sqlBrowserAct.setStatusTip(self.trUtf8('Browse a SQL database')) 1833 self.sqlBrowserAct.setStatusTip(self.trUtf8('Browse a SQL database'))
1787 self.sqlBrowserAct.setWhatsThis(self.trUtf8( 1834 self.sqlBrowserAct.setWhatsThis(self.trUtf8(
1788 """<b>SQL Browser</b>""" 1835 """<b>SQL Browser</b>"""
1789 """<p>Browse a SQL database.</p>""" 1836 """<p>Browse a SQL database.</p>"""
1790 )) 1837 ))
1791 self.sqlBrowserAct.triggered[()].connect(self.__sqlBrowser) 1838 self.sqlBrowserAct.triggered[()].connect(self.__sqlBrowser)
1792 self.actions.append(self.sqlBrowserAct) 1839 self.actions.append(self.sqlBrowserAct)
1793 1840
1794 self.miniEditorAct = E5Action(self.trUtf8('Mini Editor'), 1841 self.miniEditorAct = E5Action(
1795 UI.PixmapCache.getIcon("editor.png"), 1842 self.trUtf8('Mini Editor'),
1796 self.trUtf8('Mini &Editor...'), 1843 UI.PixmapCache.getIcon("editor.png"),
1797 0, 0, self, 'mini_editor') 1844 self.trUtf8('Mini &Editor...'),
1845 0, 0, self, 'mini_editor')
1798 self.miniEditorAct.setStatusTip(self.trUtf8('Mini Editor')) 1846 self.miniEditorAct.setStatusTip(self.trUtf8('Mini Editor'))
1799 self.miniEditorAct.setWhatsThis(self.trUtf8( 1847 self.miniEditorAct.setWhatsThis(self.trUtf8(
1800 """<b>Mini Editor</b>""" 1848 """<b>Mini Editor</b>"""
1801 """<p>Open a dialog with a simplified editor.</p>""" 1849 """<p>Open a dialog with a simplified editor.</p>"""
1802 )) 1850 ))
1803 self.miniEditorAct.triggered[()].connect(self.__openMiniEditor) 1851 self.miniEditorAct.triggered[()].connect(self.__openMiniEditor)
1804 self.actions.append(self.miniEditorAct) 1852 self.actions.append(self.miniEditorAct)
1805 1853
1806 self.webBrowserAct = E5Action(self.trUtf8('eric5 Web Browser'), 1854 self.webBrowserAct = E5Action(
1807 UI.PixmapCache.getIcon("ericWeb.png"), 1855 self.trUtf8('eric5 Web Browser'),
1808 self.trUtf8('eric5 &Web Browser...'), 1856 UI.PixmapCache.getIcon("ericWeb.png"),
1809 0, 0, self, 'web_browser') 1857 self.trUtf8('eric5 &Web Browser...'),
1858 0, 0, self, 'web_browser')
1810 self.webBrowserAct.setStatusTip(self.trUtf8( 1859 self.webBrowserAct.setStatusTip(self.trUtf8(
1811 'Start the eric5 Web Browser')) 1860 'Start the eric5 Web Browser'))
1812 self.webBrowserAct.setWhatsThis(self.trUtf8( 1861 self.webBrowserAct.setWhatsThis(self.trUtf8(
1813 """<b>eric5 Web Browser</b>""" 1862 """<b>eric5 Web Browser</b>"""
1814 """<p>Browse the Internet with the eric5 Web Browser.</p>""" 1863 """<p>Browse the Internet with the eric5 Web Browser.</p>"""
1815 )) 1864 ))
1816 self.webBrowserAct.triggered[()].connect(self.__startWebBrowser) 1865 self.webBrowserAct.triggered[()].connect(self.__startWebBrowser)
1817 self.actions.append(self.webBrowserAct) 1866 self.actions.append(self.webBrowserAct)
1818 1867
1819 self.iconEditorAct = E5Action(self.trUtf8('Icon Editor'), 1868 self.iconEditorAct = E5Action(
1820 UI.PixmapCache.getIcon("iconEditor.png"), 1869 self.trUtf8('Icon Editor'),
1821 self.trUtf8('&Icon Editor...'), 1870 UI.PixmapCache.getIcon("iconEditor.png"),
1822 0, 0, self, 'icon_editor') 1871 self.trUtf8('&Icon Editor...'),
1872 0, 0, self, 'icon_editor')
1823 self.iconEditorAct.setStatusTip(self.trUtf8( 1873 self.iconEditorAct.setStatusTip(self.trUtf8(
1824 'Start the eric5 Icon Editor')) 1874 'Start the eric5 Icon Editor'))
1825 self.iconEditorAct.setWhatsThis(self.trUtf8( 1875 self.iconEditorAct.setWhatsThis(self.trUtf8(
1826 """<b>Icon Editor</b>""" 1876 """<b>Icon Editor</b>"""
1827 """<p>Starts the eric5 Icon Editor for editing simple icons.</p>""" 1877 """<p>Starts the eric5 Icon Editor for editing simple icons.</p>"""
1828 )) 1878 ))
1829 self.iconEditorAct.triggered[()].connect(self.__editPixmap) 1879 self.iconEditorAct.triggered[()].connect(self.__editPixmap)
1830 self.actions.append(self.iconEditorAct) 1880 self.actions.append(self.iconEditorAct)
1831 1881
1832 self.snapshotAct = E5Action(self.trUtf8('Snapshot'), 1882 self.snapshotAct = E5Action(
1833 UI.PixmapCache.getIcon("ericSnap.png"), 1883 self.trUtf8('Snapshot'),
1834 self.trUtf8('&Snapshot...'), 1884 UI.PixmapCache.getIcon("ericSnap.png"),
1835 0, 0, self, 'snapshot') 1885 self.trUtf8('&Snapshot...'),
1886 0, 0, self, 'snapshot')
1836 self.snapshotAct.setStatusTip(self.trUtf8( 1887 self.snapshotAct.setStatusTip(self.trUtf8(
1837 'Take snapshots of a screen region')) 1888 'Take snapshots of a screen region'))
1838 self.snapshotAct.setWhatsThis(self.trUtf8( 1889 self.snapshotAct.setWhatsThis(self.trUtf8(
1839 """<b>Snapshot</b>""" 1890 """<b>Snapshot</b>"""
1840 """<p>This opens a dialog to take snapshots of a screen""" 1891 """<p>This opens a dialog to take snapshots of a screen"""
1841 """ region.</p>""" 1892 """ region.</p>"""
1842 )) 1893 ))
1843 self.snapshotAct.triggered[()].connect(self.__snapshot) 1894 self.snapshotAct.triggered[()].connect(self.__snapshot)
1844 self.actions.append(self.snapshotAct) 1895 self.actions.append(self.snapshotAct)
1845 1896
1846 self.prefAct = E5Action(self.trUtf8('Preferences'), 1897 self.prefAct = E5Action(
1847 UI.PixmapCache.getIcon("configure.png"), 1898 self.trUtf8('Preferences'),
1848 self.trUtf8('&Preferences...'), 0, 0, self, 'preferences') 1899 UI.PixmapCache.getIcon("configure.png"),
1900 self.trUtf8('&Preferences...'),
1901 0, 0, self, 'preferences')
1849 self.prefAct.setStatusTip(self.trUtf8( 1902 self.prefAct.setStatusTip(self.trUtf8(
1850 'Set the prefered configuration')) 1903 'Set the prefered configuration'))
1851 self.prefAct.setWhatsThis(self.trUtf8( 1904 self.prefAct.setWhatsThis(self.trUtf8(
1852 """<b>Preferences</b>""" 1905 """<b>Preferences</b>"""
1853 """<p>Set the configuration items of the application""" 1906 """<p>Set the configuration items of the application"""
1883 """<p>Import a previously exported configuration.</p>""" 1936 """<p>Import a previously exported configuration.</p>"""
1884 )) 1937 ))
1885 self.prefImportAct.triggered[()].connect(self.__importPreferences) 1938 self.prefImportAct.triggered[()].connect(self.__importPreferences)
1886 self.actions.append(self.prefImportAct) 1939 self.actions.append(self.prefImportAct)
1887 1940
1888 self.reloadAPIsAct = E5Action(self.trUtf8('Reload APIs'), 1941 self.reloadAPIsAct = E5Action(
1889 self.trUtf8('Reload &APIs'), 0, 0, self, 'reload_apis') 1942 self.trUtf8('Reload APIs'),
1943 self.trUtf8('Reload &APIs'),
1944 0, 0, self, 'reload_apis')
1890 self.reloadAPIsAct.setStatusTip(self.trUtf8( 1945 self.reloadAPIsAct.setStatusTip(self.trUtf8(
1891 'Reload the API information')) 1946 'Reload the API information'))
1892 self.reloadAPIsAct.setWhatsThis(self.trUtf8( 1947 self.reloadAPIsAct.setWhatsThis(self.trUtf8(
1893 """<b>Reload APIs</b>""" 1948 """<b>Reload APIs</b>"""
1894 """<p>Reload the API information.</p>""" 1949 """<p>Reload the API information.</p>"""
1910 )) 1965 ))
1911 self.showExternalToolsAct.triggered[()].connect( 1966 self.showExternalToolsAct.triggered[()].connect(
1912 self.__showExternalTools) 1967 self.__showExternalTools)
1913 self.actions.append(self.showExternalToolsAct) 1968 self.actions.append(self.showExternalToolsAct)
1914 1969
1915 self.configViewProfilesAct = E5Action(self.trUtf8('View Profiles'), 1970 self.configViewProfilesAct = E5Action(
1916 UI.PixmapCache.getIcon("configureViewProfiles.png"), 1971 self.trUtf8('View Profiles'),
1917 self.trUtf8('&View Profiles...'), 0, 0, self, 'view_profiles') 1972 UI.PixmapCache.getIcon("configureViewProfiles.png"),
1973 self.trUtf8('&View Profiles...'),
1974 0, 0, self, 'view_profiles')
1918 self.configViewProfilesAct.setStatusTip(self.trUtf8( 1975 self.configViewProfilesAct.setStatusTip(self.trUtf8(
1919 'Configure view profiles')) 1976 'Configure view profiles'))
1920 self.configViewProfilesAct.setWhatsThis(self.trUtf8( 1977 self.configViewProfilesAct.setWhatsThis(self.trUtf8(
1921 """<b>View Profiles</b>""" 1978 """<b>View Profiles</b>"""
1922 """<p>Configure the view profiles. With this dialog you may""" 1979 """<p>Configure the view profiles. With this dialog you may"""
1925 )) 1982 ))
1926 self.configViewProfilesAct.triggered[()].connect( 1983 self.configViewProfilesAct.triggered[()].connect(
1927 self.__configViewProfiles) 1984 self.__configViewProfiles)
1928 self.actions.append(self.configViewProfilesAct) 1985 self.actions.append(self.configViewProfilesAct)
1929 1986
1930 self.configToolBarsAct = E5Action(self.trUtf8('Toolbars'), 1987 self.configToolBarsAct = E5Action(
1931 UI.PixmapCache.getIcon("toolbarsConfigure.png"), 1988 self.trUtf8('Toolbars'),
1932 self.trUtf8('Tool&bars...'), 0, 0, self, 'configure_toolbars') 1989 UI.PixmapCache.getIcon("toolbarsConfigure.png"),
1990 self.trUtf8('Tool&bars...'),
1991 0, 0, self, 'configure_toolbars')
1933 self.configToolBarsAct.setStatusTip(self.trUtf8('Configure toolbars')) 1992 self.configToolBarsAct.setStatusTip(self.trUtf8('Configure toolbars'))
1934 self.configToolBarsAct.setWhatsThis(self.trUtf8( 1993 self.configToolBarsAct.setWhatsThis(self.trUtf8(
1935 """<b>Toolbars</b>""" 1994 """<b>Toolbars</b>"""
1936 """<p>Configure the toolbars. With this dialog you may""" 1995 """<p>Configure the toolbars. With this dialog you may"""
1937 """ change the actions shown on the various toolbars and""" 1996 """ change the actions shown on the various toolbars and"""
2025 self.viewmanagerActivateAct.triggered[()].connect( 2084 self.viewmanagerActivateAct.triggered[()].connect(
2026 self.__activateViewmanager) 2085 self.__activateViewmanager)
2027 self.actions.append(self.viewmanagerActivateAct) 2086 self.actions.append(self.viewmanagerActivateAct)
2028 self.addAction(self.viewmanagerActivateAct) 2087 self.addAction(self.viewmanagerActivateAct)
2029 2088
2030 self.nextTabAct = E5Action(self.trUtf8('Show next'), 2089 self.nextTabAct = E5Action(
2031 self.trUtf8('Show next'), 2090 self.trUtf8('Show next'),
2032 QKeySequence(self.trUtf8('Ctrl+Alt+Tab')), 0, 2091 self.trUtf8('Show next'),
2033 self, 'view_next_tab') 2092 QKeySequence(self.trUtf8('Ctrl+Alt+Tab')), 0,
2093 self, 'view_next_tab')
2034 self.nextTabAct.triggered[()].connect(self.__showNext) 2094 self.nextTabAct.triggered[()].connect(self.__showNext)
2035 self.actions.append(self.nextTabAct) 2095 self.actions.append(self.nextTabAct)
2036 self.addAction(self.nextTabAct) 2096 self.addAction(self.nextTabAct)
2037 2097
2038 self.prevTabAct = E5Action(self.trUtf8('Show previous'), 2098 self.prevTabAct = E5Action(
2039 self.trUtf8('Show previous'), 2099 self.trUtf8('Show previous'),
2040 QKeySequence(self.trUtf8('Shift+Ctrl+Alt+Tab')), 0, 2100 self.trUtf8('Show previous'),
2041 self, 'view_previous_tab') 2101 QKeySequence(self.trUtf8('Shift+Ctrl+Alt+Tab')), 0,
2102 self, 'view_previous_tab')
2042 self.prevTabAct.triggered[()].connect(self.__showPrevious) 2103 self.prevTabAct.triggered[()].connect(self.__showPrevious)
2043 self.actions.append(self.prevTabAct) 2104 self.actions.append(self.prevTabAct)
2044 self.addAction(self.prevTabAct) 2105 self.addAction(self.prevTabAct)
2045 2106
2046 self.switchTabAct = E5Action(self.trUtf8('Switch between tabs'), 2107 self.switchTabAct = E5Action(
2047 self.trUtf8('Switch between tabs'), 2108 self.trUtf8('Switch between tabs'),
2048 QKeySequence(self.trUtf8('Ctrl+1')), 0, 2109 self.trUtf8('Switch between tabs'),
2049 self, 'switch_tabs') 2110 QKeySequence(self.trUtf8('Ctrl+1')), 0,
2111 self, 'switch_tabs')
2050 self.switchTabAct.triggered[()].connect(self.__switchTab) 2112 self.switchTabAct.triggered[()].connect(self.__switchTab)
2051 self.actions.append(self.switchTabAct) 2113 self.actions.append(self.switchTabAct)
2052 self.addAction(self.switchTabAct) 2114 self.addAction(self.switchTabAct)
2053 2115
2054 self.pluginInfoAct = E5Action(self.trUtf8('Plugin Infos'), 2116 self.pluginInfoAct = E5Action(
2055 UI.PixmapCache.getIcon("plugin.png"), 2117 self.trUtf8('Plugin Infos'),
2056 self.trUtf8('&Plugin Infos...'), 0, 0, self, 'plugin_infos') 2118 UI.PixmapCache.getIcon("plugin.png"),
2119 self.trUtf8('&Plugin Infos...'), 0, 0, self, 'plugin_infos')
2057 self.pluginInfoAct.setStatusTip(self.trUtf8('Show Plugin Infos')) 2120 self.pluginInfoAct.setStatusTip(self.trUtf8('Show Plugin Infos'))
2058 self.pluginInfoAct.setWhatsThis(self.trUtf8( 2121 self.pluginInfoAct.setWhatsThis(self.trUtf8(
2059 """<b>Plugin Infos...</b>""" 2122 """<b>Plugin Infos...</b>"""
2060 """<p>This opens a dialog, that show some information about""" 2123 """<p>This opens a dialog, that show some information about"""
2061 """ loaded plugins.</p>""" 2124 """ loaded plugins.</p>"""
2667 self.sbPos.setWhatsThis(self.trUtf8( 2730 self.sbPos.setWhatsThis(self.trUtf8(
2668 """<p>This part of the status bar displays the cursor position""" 2731 """<p>This part of the status bar displays the cursor position"""
2669 """ of the current editor.</p>""" 2732 """ of the current editor.</p>"""
2670 )) 2733 ))
2671 2734
2672 self.sbZoom = E5ZoomWidget(UI.PixmapCache.getPixmap("zoomOut.png"), 2735 self.sbZoom = E5ZoomWidget(
2736 UI.PixmapCache.getPixmap("zoomOut.png"),
2673 UI.PixmapCache.getPixmap("zoomIn.png"), 2737 UI.PixmapCache.getPixmap("zoomIn.png"),
2674 UI.PixmapCache.getPixmap("zoomReset.png"), 2738 UI.PixmapCache.getPixmap("zoomReset.png"),
2675 self.__statusBar) 2739 self.__statusBar)
2676 self.__statusBar.addPermanentWidget(self.sbZoom) 2740 self.__statusBar.addPermanentWidget(self.sbZoom)
2677 self.sbZoom.setWhatsThis(self.trUtf8( 2741 self.sbZoom.setWhatsThis(self.trUtf8(
3900 prog = fn 3964 prog = fn
3901 else: 3965 else:
3902 E5MessageBox.critical( 3966 E5MessageBox.critical(
3903 self, 3967 self,
3904 self.trUtf8("Unittest Project"), 3968 self.trUtf8("Unittest Project"),
3905 self.trUtf8("There is no main script defined for the" 3969 self.trUtf8(
3970 "There is no main script defined for the"
3906 " current project. Aborting")) 3971 " current project. Aborting"))
3907 return 3972 return
3908 3973
3909 self.__createUnitTestDialog() 3974 self.__createUnitTestDialog()
3910 self.unittestDialog.insertProg(prog) 3975 self.unittestDialog.insertProg(prog)
3974 args.append(fn) 4039 args.append(fn)
3975 else: 4040 else:
3976 E5MessageBox.critical( 4041 E5MessageBox.critical(
3977 self, 4042 self,
3978 self.trUtf8('Problem'), 4043 self.trUtf8('Problem'),
3979 self.trUtf8('<p>The file <b>{0}</b> does not exist or' 4044 self.trUtf8(
4045 '<p>The file <b>{0}</b> does not exist or'
3980 ' is zero length.</p>') 4046 ' is zero length.</p>')
3981 .format(fn)) 4047 .format(fn))
3982 return 4048 return
3983 except EnvironmentError: 4049 except EnvironmentError:
3984 E5MessageBox.critical( 4050 E5MessageBox.critical(
3985 self, 4051 self,
3986 self.trUtf8('Problem'), 4052 self.trUtf8('Problem'),
3987 self.trUtf8('<p>The file <b>{0}</b> does not exist or' 4053 self.trUtf8(
4054 '<p>The file <b>{0}</b> does not exist or'
3988 ' is zero length.</p>') 4055 ' is zero length.</p>')
3989 .format(fn)) 4056 .format(fn))
3990 return 4057 return
3991 4058
3992 if Utilities.isMacPlatform(): 4059 if Utilities.isMacPlatform():
4039 args.append(fn) 4106 args.append(fn)
4040 else: 4107 else:
4041 E5MessageBox.critical( 4108 E5MessageBox.critical(
4042 self, 4109 self,
4043 self.trUtf8('Problem'), 4110 self.trUtf8('Problem'),
4044 self.trUtf8('<p>The file <b>{0}</b> does not exist or' 4111 self.trUtf8(
4112 '<p>The file <b>{0}</b> does not exist or'
4045 ' is zero length.</p>') 4113 ' is zero length.</p>')
4046 .format(fn)) 4114 .format(fn))
4047 return 4115 return
4048 except EnvironmentError: 4116 except EnvironmentError:
4049 E5MessageBox.critical( 4117 E5MessageBox.critical(
4050 self, 4118 self,
4051 self.trUtf8('Problem'), 4119 self.trUtf8('Problem'),
4052 self.trUtf8('<p>The file <b>{0}</b> does not exist or' 4120 self.trUtf8(
4121 '<p>The file <b>{0}</b> does not exist or'
4053 ' is zero length.</p>') 4122 ' is zero length.</p>')
4054 .format(fn)) 4123 .format(fn))
4055 return 4124 return
4056 4125
4057 if Utilities.isMacPlatform(): 4126 if Utilities.isMacPlatform():
4205 args.append(fn) 4274 args.append(fn)
4206 else: 4275 else:
4207 E5MessageBox.critical( 4276 E5MessageBox.critical(
4208 self, 4277 self,
4209 self.trUtf8('Problem'), 4278 self.trUtf8('Problem'),
4210 self.trUtf8('<p>The file <b>{0}</b> does not exist or' 4279 self.trUtf8(
4280 '<p>The file <b>{0}</b> does not exist or'
4211 ' is zero length.</p>') 4281 ' is zero length.</p>')
4212 .format(fn)) 4282 .format(fn))
4213 return 4283 return
4214 except EnvironmentError: 4284 except EnvironmentError:
4215 E5MessageBox.critical( 4285 E5MessageBox.critical(
4216 self, 4286 self,
4217 self.trUtf8('Problem'), 4287 self.trUtf8('Problem'),
4218 self.trUtf8('<p>The file <b>{0}</b> does not exist or' 4288 self.trUtf8(
4289 '<p>The file <b>{0}</b> does not exist or'
4219 ' is zero length.</p>') 4290 ' is zero length.</p>')
4220 .format(fn)) 4291 .format(fn))
4221 return 4292 return
4222 4293
4223 if not os.path.isfile(viewer) or \ 4294 if not os.path.isfile(viewer) or \
4516 Private slot to show the Python 3 documentation. 4587 Private slot to show the Python 3 documentation.
4517 """ 4588 """
4518 pythonDocDir = Preferences.getHelp("PythonDocDir") 4589 pythonDocDir = Preferences.getHelp("PythonDocDir")
4519 if not pythonDocDir: 4590 if not pythonDocDir:
4520 if Utilities.isWindowsPlatform(): 4591 if Utilities.isWindowsPlatform():
4521 pythonDocDir = Utilities.getEnvironmentEntry("PYTHON3DOCDIR", 4592 pythonDocDir = Utilities.getEnvironmentEntry(
4593 "PYTHON3DOCDIR",
4522 os.path.join(os.path.dirname(sys.executable), "doc")) 4594 os.path.join(os.path.dirname(sys.executable), "doc"))
4523 else: 4595 else:
4524 pythonDocDir = Utilities.getEnvironmentEntry("PYTHON3DOCDIR", 4596 pythonDocDir = Utilities.getEnvironmentEntry(
4597 "PYTHON3DOCDIR",
4525 '/usr/share/doc/packages/python/html') 4598 '/usr/share/doc/packages/python/html')
4526 if not pythonDocDir.startswith("http://") and \ 4599 if not pythonDocDir.startswith("http://") and \
4527 not pythonDocDir.startswith("https://"): 4600 not pythonDocDir.startswith("https://"):
4528 if pythonDocDir.startswith("file://"): 4601 if pythonDocDir.startswith("file://"):
4529 pythonDocDir = pythonDocDir[7:] 4602 pythonDocDir = pythonDocDir[7:]
4582 else: 4655 else:
4583 default = "" 4656 default = ""
4584 pythonDocDir = \ 4657 pythonDocDir = \
4585 Utilities.getEnvironmentEntry("PYTHON2DOCDIR", default) 4658 Utilities.getEnvironmentEntry("PYTHON2DOCDIR", default)
4586 else: 4659 else:
4587 pythonDocDir = Utilities.getEnvironmentEntry("PYTHON2DOCDIR", 4660 pythonDocDir = Utilities.getEnvironmentEntry(
4661 "PYTHON2DOCDIR",
4588 '/usr/share/doc/packages/python/html/python-docs-html') 4662 '/usr/share/doc/packages/python/html/python-docs-html')
4589 if not pythonDocDir.startswith("http://") and \ 4663 if not pythonDocDir.startswith("http://") and \
4590 not pythonDocDir.startswith("https://"): 4664 not pythonDocDir.startswith("https://"):
4591 if pythonDocDir.startswith("file://"): 4665 if pythonDocDir.startswith("file://"):
4592 pythonDocDir = pythonDocDir[7:] 4666 pythonDocDir = pythonDocDir[7:]
4812 4886
4813 def __showEricDoc(self): 4887 def __showEricDoc(self):
4814 """ 4888 """
4815 Private slot to show the Eric documentation. 4889 Private slot to show the Eric documentation.
4816 """ 4890 """
4817 home = Utilities.normjoinpath(getConfig('ericDocDir'), 4891 home = Utilities.normjoinpath(
4818 "Source", "index.html") 4892 getConfig('ericDocDir'), "Source", "index.html")
4819 4893
4820 if not home.startswith("http://") and \ 4894 if not home.startswith("http://") and \
4821 not home.startswith("https://") and \ 4895 not home.startswith("https://") and \
4822 not home.startswith("qthelp://"): 4896 not home.startswith("qthelp://"):
4823 if not os.path.exists(home): 4897 if not os.path.exists(home):
5098 def __configViewProfiles(self): 5172 def __configViewProfiles(self):
5099 """ 5173 """
5100 Private slot to configure the various view profiles. 5174 Private slot to configure the various view profiles.
5101 """ 5175 """
5102 from Preferences.ViewProfileDialog import ViewProfileDialog 5176 from Preferences.ViewProfileDialog import ViewProfileDialog
5103 dlg = ViewProfileDialog(self.layout, 5177 dlg = ViewProfileDialog(
5104 self.profiles['edit'][1], self.profiles['debug'][1]) 5178 self.layout, self.profiles['edit'][1], self.profiles['debug'][1])
5105 if dlg.exec_() == QDialog.Accepted: 5179 if dlg.exec_() == QDialog.Accepted:
5106 edit, debug = dlg.getVisibilities() 5180 edit, debug = dlg.getVisibilities()
5107 self.profiles['edit'][1] = edit 5181 self.profiles['edit'][1] = edit
5108 self.profiles['debug'][1] = debug 5182 self.profiles['debug'][1] = debug
5109 Preferences.setUI("ViewProfiles2", self.profiles) 5183 Preferences.setUI("ViewProfiles2", self.profiles)

eric ide

mercurial