UI/UserInterface.py

branch
Py2 comp.
changeset 3058
0a02c433f52d
parent 3057
10516539f238
parent 3030
4a0a82ddd9d2
child 3060
5883ce99ee12
equal deleted inserted replaced
3057:10516539f238 3058:0a02c433f52d
635 self.__setupDockWindow(self.rToolboxDock, Qt.RightDockWidgetArea, 635 self.__setupDockWindow(self.rToolboxDock, Qt.RightDockWidgetArea,
636 self.rToolbox, self.trUtf8("Right Toolbox")) 636 self.rToolbox, self.trUtf8("Right Toolbox"))
637 637
638 # Create the project browser 638 # Create the project browser
639 from Project.ProjectBrowser import ProjectBrowser 639 from Project.ProjectBrowser import ProjectBrowser
640 self.projectBrowser = ProjectBrowser(self.project, None, 640 self.projectBrowser = ProjectBrowser(
641 self.project, None,
641 embeddedBrowser=(self.embeddedFileBrowser == 2)) 642 embeddedBrowser=(self.embeddedFileBrowser == 2))
642 self.lToolbox.addItem(self.projectBrowser, 643 self.lToolbox.addItem(self.projectBrowser,
643 UI.PixmapCache.getIcon("projectViewer.png"), 644 UI.PixmapCache.getIcon("projectViewer.png"),
644 self.trUtf8("Project-Viewer")) 645 self.trUtf8("Project-Viewer"))
645 646
658 UI.PixmapCache.getIcon("templateViewer.png"), 659 UI.PixmapCache.getIcon("templateViewer.png"),
659 self.trUtf8("Template-Viewer")) 660 self.trUtf8("Template-Viewer"))
660 661
661 # Create the debug viewer maybe without the embedded shell 662 # Create the debug viewer maybe without the embedded shell
662 from Debugger.DebugViewer import DebugViewer 663 from Debugger.DebugViewer import DebugViewer
663 self.debugViewer = DebugViewer(debugServer, True, self.viewmanager, 664 self.debugViewer = DebugViewer(
664 None, 665 debugServer, True, self.viewmanager, None,
665 embeddedShell=self.embeddedShell, 666 embeddedShell=self.embeddedShell,
666 embeddedBrowser=(self.embeddedFileBrowser == 1)) 667 embeddedBrowser=(self.embeddedFileBrowser == 1))
667 self.rToolbox.addItem(self.debugViewer, 668 self.rToolbox.addItem(self.debugViewer,
668 UI.PixmapCache.getIcon("debugViewer.png"), 669 UI.PixmapCache.getIcon("debugViewer.png"),
669 self.trUtf8("Debug-Viewer")) 670 self.trUtf8("Debug-Viewer"))
755 self.rightSidebar = E5SideBar(E5SideBar.East, delay) 756 self.rightSidebar = E5SideBar(E5SideBar.East, delay)
756 757
757 # Create the project browser 758 # Create the project browser
758 logging.debug("Creating Project Browser...") 759 logging.debug("Creating Project Browser...")
759 from Project.ProjectBrowser import ProjectBrowser 760 from Project.ProjectBrowser import ProjectBrowser
760 self.projectBrowser = ProjectBrowser(self.project, None, 761 self.projectBrowser = ProjectBrowser(
762 self.project, None,
761 embeddedBrowser=(self.embeddedFileBrowser == 2)) 763 embeddedBrowser=(self.embeddedFileBrowser == 2))
762 self.leftSidebar.addTab(self.projectBrowser, 764 self.leftSidebar.addTab(
763 UI.PixmapCache.getIcon("projectViewer.png"), 765 self.projectBrowser,
764 self.trUtf8("Project-Viewer")) 766 UI.PixmapCache.getIcon("projectViewer.png"),
767 self.trUtf8("Project-Viewer"))
765 768
766 # Create the multi project browser 769 # Create the multi project browser
767 logging.debug("Creating Multiproject Browser...") 770 logging.debug("Creating Multiproject Browser...")
768 from MultiProject.MultiProjectBrowser import MultiProjectBrowser 771 from MultiProject.MultiProjectBrowser import MultiProjectBrowser
769 self.multiProjectBrowser = MultiProjectBrowser(self.multiProject) 772 self.multiProjectBrowser = MultiProjectBrowser(self.multiProject)
770 self.leftSidebar.addTab(self.multiProjectBrowser, 773 self.leftSidebar.addTab(
771 UI.PixmapCache.getIcon("multiProjectViewer.png"), 774 self.multiProjectBrowser,
772 self.trUtf8("Multiproject-Viewer")) 775 UI.PixmapCache.getIcon("multiProjectViewer.png"),
776 self.trUtf8("Multiproject-Viewer"))
773 777
774 # Create the template viewer part of the user interface 778 # Create the template viewer part of the user interface
775 logging.debug("Creating Template Viewer...") 779 logging.debug("Creating Template Viewer...")
776 from Templates.TemplateViewer import TemplateViewer 780 from Templates.TemplateViewer import TemplateViewer
777 self.templateViewer = TemplateViewer(None, 781 self.templateViewer = TemplateViewer(None,
778 self.viewmanager) 782 self.viewmanager)
779 self.leftSidebar.addTab(self.templateViewer, 783 self.leftSidebar.addTab(
780 UI.PixmapCache.getIcon("templateViewer.png"), 784 self.templateViewer,
781 self.trUtf8("Template-Viewer")) 785 UI.PixmapCache.getIcon("templateViewer.png"),
786 self.trUtf8("Template-Viewer"))
782 787
783 # Create the debug viewer maybe without the embedded shell 788 # Create the debug viewer maybe without the embedded shell
784 logging.debug("Creating Debug Viewer...") 789 logging.debug("Creating Debug Viewer...")
785 from Debugger.DebugViewer import DebugViewer 790 from Debugger.DebugViewer import DebugViewer
786 self.debugViewer = DebugViewer(debugServer, True, self.viewmanager, 791 self.debugViewer = DebugViewer(
787 None, 792 debugServer, True, self.viewmanager, None,
788 embeddedShell=self.embeddedShell, 793 embeddedShell=self.embeddedShell,
789 embeddedBrowser=(self.embeddedFileBrowser == 1)) 794 embeddedBrowser=(self.embeddedFileBrowser == 1))
790 self.rightSidebar.addTab( 795 self.rightSidebar.addTab(
791 self.debugViewer, UI.PixmapCache.getIcon("debugViewer.png"), 796 self.debugViewer, UI.PixmapCache.getIcon("debugViewer.png"),
792 self.trUtf8("Debug-Viewer")) 797 self.trUtf8("Debug-Viewer"))
801 806
802 # Create the IRC part of the user interface 807 # Create the IRC part of the user interface
803 logging.debug("Creating IRC Widget...") 808 logging.debug("Creating IRC Widget...")
804 from Network.IRC.IrcWidget import IrcWidget 809 from Network.IRC.IrcWidget import IrcWidget
805 self.irc = IrcWidget(self) 810 self.irc = IrcWidget(self)
806 self.rightSidebar.addTab(self.irc, 811 self.rightSidebar.addTab(
807 UI.PixmapCache.getIcon("irc.png"), self.trUtf8("IRC")) 812 self.irc, UI.PixmapCache.getIcon("irc.png"), self.trUtf8("IRC"))
808 813
809 # Create the task viewer part of the user interface 814 # Create the task viewer part of the user interface
810 logging.debug("Creating Task Viewer...") 815 logging.debug("Creating Task Viewer...")
811 from Tasks.TaskViewer import TaskViewer 816 from Tasks.TaskViewer import TaskViewer
812 self.taskViewer = TaskViewer(None, self.project) 817 self.taskViewer = TaskViewer(None, self.project)
1173 Private method to define the user interface actions. 1178 Private method to define the user interface actions.
1174 """ 1179 """
1175 self.actions = [] 1180 self.actions = []
1176 self.wizardsActions = [] 1181 self.wizardsActions = []
1177 1182
1178 self.exitAct = E5Action(self.trUtf8('Quit'), 1183 self.exitAct = E5Action(
1179 UI.PixmapCache.getIcon("exit.png"), 1184 self.trUtf8('Quit'),
1180 self.trUtf8('&Quit'), 1185 UI.PixmapCache.getIcon("exit.png"),
1181 QKeySequence(self.trUtf8("Ctrl+Q", "File|Quit")), 1186 self.trUtf8('&Quit'),
1182 0, self, 'quit') 1187 QKeySequence(self.trUtf8("Ctrl+Q", "File|Quit")),
1188 0, self, 'quit')
1183 self.exitAct.setStatusTip(self.trUtf8('Quit the IDE')) 1189 self.exitAct.setStatusTip(self.trUtf8('Quit the IDE'))
1184 self.exitAct.setWhatsThis(self.trUtf8( 1190 self.exitAct.setWhatsThis(self.trUtf8(
1185 """<b>Quit the IDE</b>""" 1191 """<b>Quit the IDE</b>"""
1186 """<p>This quits the IDE. Any unsaved changes may be saved""" 1192 """<p>This quits the IDE. Any unsaved changes may be saved"""
1187 """ first. Any Python program being debugged will be stopped""" 1193 """ first. Any Python program being debugged will be stopped"""
1189 )) 1195 ))
1190 self.exitAct.triggered[()].connect(self.__quit) 1196 self.exitAct.triggered[()].connect(self.__quit)
1191 self.exitAct.setMenuRole(QAction.QuitRole) 1197 self.exitAct.setMenuRole(QAction.QuitRole)
1192 self.actions.append(self.exitAct) 1198 self.actions.append(self.exitAct)
1193 1199
1194 self.newWindowAct = E5Action(self.trUtf8('New Window'), 1200 self.newWindowAct = E5Action(
1195 UI.PixmapCache.getIcon("newWindow.png"), 1201 self.trUtf8('New Window'),
1196 self.trUtf8('New &Window'), 1202 UI.PixmapCache.getIcon("newWindow.png"),
1197 QKeySequence(self.trUtf8("Ctrl+Shift+N", "File|New Window")), 1203 self.trUtf8('New &Window'),
1198 0, self, 'new_window') 1204 QKeySequence(self.trUtf8("Ctrl+Shift+N", "File|New Window")),
1205 0, self, 'new_window')
1199 self.newWindowAct.setStatusTip(self.trUtf8( 1206 self.newWindowAct.setStatusTip(self.trUtf8(
1200 'Open a new eric5 instance')) 1207 'Open a new eric5 instance'))
1201 self.newWindowAct.setWhatsThis(self.trUtf8( 1208 self.newWindowAct.setWhatsThis(self.trUtf8(
1202 """<b>New Window</b>""" 1209 """<b>New Window</b>"""
1203 """<p>This opens a new instance of the eric5 IDE.</p>""" 1210 """<p>This opens a new instance of the eric5 IDE.</p>"""
1207 self.newWindowAct.setEnabled( 1214 self.newWindowAct.setEnabled(
1208 not Preferences.getUI("SingleApplicationMode")) 1215 not Preferences.getUI("SingleApplicationMode"))
1209 1216
1210 self.viewProfileActGrp = createActionGroup(self, "viewprofiles", True) 1217 self.viewProfileActGrp = createActionGroup(self, "viewprofiles", True)
1211 1218
1212 self.setEditProfileAct = E5Action(self.trUtf8('Edit Profile'), 1219 self.setEditProfileAct = E5Action(
1213 UI.PixmapCache.getIcon("viewProfileEdit.png"), 1220 self.trUtf8('Edit Profile'),
1214 self.trUtf8('Edit Profile'), 1221 UI.PixmapCache.getIcon("viewProfileEdit.png"),
1215 0, 0, 1222 self.trUtf8('Edit Profile'),
1216 self.viewProfileActGrp, 'edit_profile', True) 1223 0, 0,
1224 self.viewProfileActGrp, 'edit_profile', True)
1217 self.setEditProfileAct.setStatusTip(self.trUtf8( 1225 self.setEditProfileAct.setStatusTip(self.trUtf8(
1218 'Activate the edit view profile')) 1226 'Activate the edit view profile'))
1219 self.setEditProfileAct.setWhatsThis(self.trUtf8( 1227 self.setEditProfileAct.setWhatsThis(self.trUtf8(
1220 """<b>Edit Profile</b>""" 1228 """<b>Edit Profile</b>"""
1221 """<p>Activate the "Edit View Profile". Windows being shown,""" 1229 """<p>Activate the "Edit View Profile". Windows being shown,"""
1223 """ "View Profile Configuration" dialog.</p>""" 1231 """ "View Profile Configuration" dialog.</p>"""
1224 )) 1232 ))
1225 self.setEditProfileAct.triggered[()].connect(self.__setEditProfile) 1233 self.setEditProfileAct.triggered[()].connect(self.__setEditProfile)
1226 self.actions.append(self.setEditProfileAct) 1234 self.actions.append(self.setEditProfileAct)
1227 1235
1228 self.setDebugProfileAct = E5Action(self.trUtf8('Debug Profile'), 1236 self.setDebugProfileAct = E5Action(
1229 UI.PixmapCache.getIcon("viewProfileDebug.png"), 1237 self.trUtf8('Debug Profile'),
1230 self.trUtf8('Debug Profile'), 1238 UI.PixmapCache.getIcon("viewProfileDebug.png"),
1231 0, 0, 1239 self.trUtf8('Debug Profile'),
1232 self.viewProfileActGrp, 'debug_profile', True) 1240 0, 0,
1241 self.viewProfileActGrp, 'debug_profile', True)
1233 self.setDebugProfileAct.setStatusTip( 1242 self.setDebugProfileAct.setStatusTip(
1234 self.trUtf8('Activate the debug view profile')) 1243 self.trUtf8('Activate the debug view profile'))
1235 self.setDebugProfileAct.setWhatsThis(self.trUtf8( 1244 self.setDebugProfileAct.setWhatsThis(self.trUtf8(
1236 """<b>Debug Profile</b>""" 1245 """<b>Debug Profile</b>"""
1237 """<p>Activate the "Debug View Profile". Windows being shown,""" 1246 """<p>Activate the "Debug View Profile". Windows being shown,"""
1239 """ "View Profile Configuration" dialog.</p>""" 1248 """ "View Profile Configuration" dialog.</p>"""
1240 )) 1249 ))
1241 self.setDebugProfileAct.triggered[()].connect(self.setDebugProfile) 1250 self.setDebugProfileAct.triggered[()].connect(self.setDebugProfile)
1242 self.actions.append(self.setDebugProfileAct) 1251 self.actions.append(self.setDebugProfileAct)
1243 1252
1244 self.pbActivateAct = E5Action(self.trUtf8('Project-Viewer'), 1253 self.pbActivateAct = E5Action(
1245 self.trUtf8('&Project-Viewer'), 1254 self.trUtf8('Project-Viewer'),
1246 QKeySequence(self.trUtf8("Alt+Shift+P")), 1255 self.trUtf8('&Project-Viewer'),
1247 0, self, 1256 QKeySequence(self.trUtf8("Alt+Shift+P")),
1248 'project_viewer_activate') 1257 0, self,
1258 'project_viewer_activate')
1249 self.pbActivateAct.setStatusTip(self.trUtf8( 1259 self.pbActivateAct.setStatusTip(self.trUtf8(
1250 "Switch the input focus to the Project-Viewer window.")) 1260 "Switch the input focus to the Project-Viewer window."))
1251 self.pbActivateAct.setWhatsThis(self.trUtf8( 1261 self.pbActivateAct.setWhatsThis(self.trUtf8(
1252 """<b>Activate Project-Viewer</b>""" 1262 """<b>Activate Project-Viewer</b>"""
1253 """<p>This switches the input focus to the Project-Viewer""" 1263 """<p>This switches the input focus to the Project-Viewer"""
1255 )) 1265 ))
1256 self.pbActivateAct.triggered[()].connect(self.__activateProjectBrowser) 1266 self.pbActivateAct.triggered[()].connect(self.__activateProjectBrowser)
1257 self.actions.append(self.pbActivateAct) 1267 self.actions.append(self.pbActivateAct)
1258 self.addAction(self.pbActivateAct) 1268 self.addAction(self.pbActivateAct)
1259 1269
1260 self.mpbActivateAct = E5Action(self.trUtf8('Multiproject-Viewer'), 1270 self.mpbActivateAct = E5Action(
1261 self.trUtf8('&Multiproject-Viewer'), 1271 self.trUtf8('Multiproject-Viewer'),
1262 QKeySequence(self.trUtf8("Alt+Shift+M")), 1272 self.trUtf8('&Multiproject-Viewer'),
1263 0, self, 1273 QKeySequence(self.trUtf8("Alt+Shift+M")),
1264 'multi_project_viewer_activate') 1274 0, self,
1275 'multi_project_viewer_activate')
1265 self.mpbActivateAct.setStatusTip(self.trUtf8( 1276 self.mpbActivateAct.setStatusTip(self.trUtf8(
1266 "Switch the input focus to the Multiproject-Viewer window.")) 1277 "Switch the input focus to the Multiproject-Viewer window."))
1267 self.mpbActivateAct.setWhatsThis(self.trUtf8( 1278 self.mpbActivateAct.setWhatsThis(self.trUtf8(
1268 """<b>Activate Multiproject-Viewer</b>""" 1279 """<b>Activate Multiproject-Viewer</b>"""
1269 """<p>This switches the input focus to the Multiproject-Viewer""" 1280 """<p>This switches the input focus to the Multiproject-Viewer"""
1272 self.mpbActivateAct.triggered[()].connect( 1283 self.mpbActivateAct.triggered[()].connect(
1273 self.__activateMultiProjectBrowser) 1284 self.__activateMultiProjectBrowser)
1274 self.actions.append(self.mpbActivateAct) 1285 self.actions.append(self.mpbActivateAct)
1275 self.addAction(self.mpbActivateAct) 1286 self.addAction(self.mpbActivateAct)
1276 1287
1277 self.debugViewerActivateAct = E5Action(self.trUtf8('Debug-Viewer'), 1288 self.debugViewerActivateAct = E5Action(
1278 self.trUtf8('&Debug-Viewer'), 1289 self.trUtf8('Debug-Viewer'),
1279 QKeySequence(self.trUtf8("Alt+Shift+D")), 1290 self.trUtf8('&Debug-Viewer'),
1280 0, self, 1291 QKeySequence(self.trUtf8("Alt+Shift+D")),
1281 'debug_viewer_activate') 1292 0, self,
1293 'debug_viewer_activate')
1282 self.debugViewerActivateAct.setStatusTip(self.trUtf8( 1294 self.debugViewerActivateAct.setStatusTip(self.trUtf8(
1283 "Switch the input focus to the Debug-Viewer window.")) 1295 "Switch the input focus to the Debug-Viewer window."))
1284 self.debugViewerActivateAct.setWhatsThis(self.trUtf8( 1296 self.debugViewerActivateAct.setWhatsThis(self.trUtf8(
1285 """<b>Activate Debug-Viewer</b>""" 1297 """<b>Activate Debug-Viewer</b>"""
1286 """<p>This switches the input focus to the Debug-Viewer""" 1298 """<p>This switches the input focus to the Debug-Viewer"""
1289 self.debugViewerActivateAct.triggered[()].connect( 1301 self.debugViewerActivateAct.triggered[()].connect(
1290 self.__activateDebugViewer) 1302 self.__activateDebugViewer)
1291 self.actions.append(self.debugViewerActivateAct) 1303 self.actions.append(self.debugViewerActivateAct)
1292 self.addAction(self.debugViewerActivateAct) 1304 self.addAction(self.debugViewerActivateAct)
1293 1305
1294 self.shellActivateAct = E5Action(self.trUtf8('Shell'), 1306 self.shellActivateAct = E5Action(
1295 self.trUtf8('&Shell'), 1307 self.trUtf8('Shell'),
1296 QKeySequence(self.trUtf8("Alt+Shift+S")), 1308 self.trUtf8('&Shell'),
1297 0, self, 1309 QKeySequence(self.trUtf8("Alt+Shift+S")),
1298 'interprter_shell_activate') 1310 0, self,
1311 'interprter_shell_activate')
1299 self.shellActivateAct.setStatusTip(self.trUtf8( 1312 self.shellActivateAct.setStatusTip(self.trUtf8(
1300 "Switch the input focus to the Shell window.")) 1313 "Switch the input focus to the Shell window."))
1301 self.shellActivateAct.setWhatsThis(self.trUtf8( 1314 self.shellActivateAct.setWhatsThis(self.trUtf8(
1302 """<b>Activate Shell</b>""" 1315 """<b>Activate Shell</b>"""
1303 """<p>This switches the input focus to the Shell window.</p>""" 1316 """<p>This switches the input focus to the Shell window.</p>"""
1304 )) 1317 ))
1305 self.shellActivateAct.triggered[()].connect(self.__activateShell) 1318 self.shellActivateAct.triggered[()].connect(self.__activateShell)
1306 self.actions.append(self.shellActivateAct) 1319 self.actions.append(self.shellActivateAct)
1307 self.addAction(self.shellActivateAct) 1320 self.addAction(self.shellActivateAct)
1308 1321
1309 self.browserActivateAct = E5Action(self.trUtf8('File-Browser'), 1322 self.browserActivateAct = E5Action(
1310 self.trUtf8('&File-Browser'), 1323 self.trUtf8('File-Browser'),
1311 QKeySequence(self.trUtf8("Alt+Shift+F")), 1324 self.trUtf8('&File-Browser'),
1312 0, self, 1325 QKeySequence(self.trUtf8("Alt+Shift+F")),
1313 'file_browser_activate') 1326 0, self,
1327 'file_browser_activate')
1314 self.browserActivateAct.setStatusTip(self.trUtf8( 1328 self.browserActivateAct.setStatusTip(self.trUtf8(
1315 "Switch the input focus to the File-Browser window.")) 1329 "Switch the input focus to the File-Browser window."))
1316 self.browserActivateAct.setWhatsThis(self.trUtf8( 1330 self.browserActivateAct.setWhatsThis(self.trUtf8(
1317 """<b>Activate File-Browser</b>""" 1331 """<b>Activate File-Browser</b>"""
1318 """<p>This switches the input focus to the File-Browser""" 1332 """<p>This switches the input focus to the File-Browser"""
1320 )) 1334 ))
1321 self.browserActivateAct.triggered[()].connect(self.__activateBrowser) 1335 self.browserActivateAct.triggered[()].connect(self.__activateBrowser)
1322 self.actions.append(self.browserActivateAct) 1336 self.actions.append(self.browserActivateAct)
1323 self.addAction(self.browserActivateAct) 1337 self.addAction(self.browserActivateAct)
1324 1338
1325 self.logViewerActivateAct = E5Action(self.trUtf8('Log-Viewer'), 1339 self.logViewerActivateAct = E5Action(
1326 self.trUtf8('Lo&g-Viewer'), 1340 self.trUtf8('Log-Viewer'),
1327 QKeySequence(self.trUtf8("Alt+Shift+G")), 1341 self.trUtf8('Lo&g-Viewer'),
1328 0, self, 1342 QKeySequence(self.trUtf8("Alt+Shift+G")),
1329 'log_viewer_activate') 1343 0, self,
1344 'log_viewer_activate')
1330 self.logViewerActivateAct.setStatusTip(self.trUtf8( 1345 self.logViewerActivateAct.setStatusTip(self.trUtf8(
1331 "Switch the input focus to the Log-Viewer window.")) 1346 "Switch the input focus to the Log-Viewer window."))
1332 self.logViewerActivateAct.setWhatsThis(self.trUtf8( 1347 self.logViewerActivateAct.setWhatsThis(self.trUtf8(
1333 """<b>Activate Log-Viewer</b>""" 1348 """<b>Activate Log-Viewer</b>"""
1334 """<p>This switches the input focus to the Log-Viewer""" 1349 """<p>This switches the input focus to the Log-Viewer"""
1337 self.logViewerActivateAct.triggered[()].connect( 1352 self.logViewerActivateAct.triggered[()].connect(
1338 self.__activateLogViewer) 1353 self.__activateLogViewer)
1339 self.actions.append(self.logViewerActivateAct) 1354 self.actions.append(self.logViewerActivateAct)
1340 self.addAction(self.logViewerActivateAct) 1355 self.addAction(self.logViewerActivateAct)
1341 1356
1342 self.taskViewerActivateAct = E5Action(self.trUtf8('Task-Viewer'), 1357 self.taskViewerActivateAct = E5Action(
1343 self.trUtf8('&Task-Viewer'), 1358 self.trUtf8('Task-Viewer'),
1344 QKeySequence(self.trUtf8("Alt+Shift+T")), 1359 self.trUtf8('&Task-Viewer'),
1345 0, self, 1360 QKeySequence(self.trUtf8("Alt+Shift+T")),
1346 'task_viewer_activate') 1361 0, self,
1362 'task_viewer_activate')
1347 self.taskViewerActivateAct.setStatusTip(self.trUtf8( 1363 self.taskViewerActivateAct.setStatusTip(self.trUtf8(
1348 "Switch the input focus to the Task-Viewer window.")) 1364 "Switch the input focus to the Task-Viewer window."))
1349 self.taskViewerActivateAct.setWhatsThis(self.trUtf8( 1365 self.taskViewerActivateAct.setWhatsThis(self.trUtf8(
1350 """<b>Activate Task-Viewer</b>""" 1366 """<b>Activate Task-Viewer</b>"""
1351 """<p>This switches the input focus to the Task-Viewer""" 1367 """<p>This switches the input focus to the Task-Viewer"""
1397 """ If it is displayed then close it.</p>""" 1413 """ If it is displayed then close it.</p>"""
1398 )) 1414 ))
1399 self.rtAct.triggered[()].connect(self.__toggleRightToolbox) 1415 self.rtAct.triggered[()].connect(self.__toggleRightToolbox)
1400 self.actions.append(self.rtAct) 1416 self.actions.append(self.rtAct)
1401 1417
1402 self.htAct = E5Action(self.trUtf8('Horizontal Toolbox'), 1418 self.htAct = E5Action(
1403 self.trUtf8('&Horizontal Toolbox'), 0, 0, self, 1419 self.trUtf8('Horizontal Toolbox'),
1404 'horizontal_toolbox', True) 1420 self.trUtf8('&Horizontal Toolbox'), 0, 0, self,
1421 'horizontal_toolbox', True)
1405 self.htAct.setStatusTip(self.trUtf8( 1422 self.htAct.setStatusTip(self.trUtf8(
1406 'Toggle the Horizontal Toolbox window')) 1423 'Toggle the Horizontal Toolbox window'))
1407 self.htAct.setWhatsThis(self.trUtf8( 1424 self.htAct.setWhatsThis(self.trUtf8(
1408 """<b>Toggle the Horizontal Toolbox window</b>""" 1425 """<b>Toggle the Horizontal Toolbox window</b>"""
1409 """<p>If the Horizontal Toolbox window is hidden then display""" 1426 """<p>If the Horizontal Toolbox window is hidden then display"""
1410 """ it. If it is displayed then close it.</p>""" 1427 """ it. If it is displayed then close it.</p>"""
1411 )) 1428 ))
1412 self.htAct.triggered[()].connect(self.__toggleHorizontalToolbox) 1429 self.htAct.triggered[()].connect(self.__toggleHorizontalToolbox)
1413 self.actions.append(self.htAct) 1430 self.actions.append(self.htAct)
1414 1431
1415 self.lsbAct = E5Action(self.trUtf8('Left Sidebar'), 1432 self.lsbAct = E5Action(
1416 self.trUtf8('&Left Sidebar'), 0, 0, self, 'left_sidebar', True) 1433 self.trUtf8('Left Sidebar'),
1434 self.trUtf8('&Left Sidebar'),
1435 0, 0, self, 'left_sidebar', True)
1417 self.lsbAct.setStatusTip(self.trUtf8('Toggle the left sidebar window')) 1436 self.lsbAct.setStatusTip(self.trUtf8('Toggle the left sidebar window'))
1418 self.lsbAct.setWhatsThis(self.trUtf8( 1437 self.lsbAct.setWhatsThis(self.trUtf8(
1419 """<b>Toggle the left sidebar window</b>""" 1438 """<b>Toggle the left sidebar window</b>"""
1420 """<p>If the left sidebar window is hidden then display it.""" 1439 """<p>If the left sidebar window is hidden then display it."""
1421 """ If it is displayed then close it.</p>""" 1440 """ If it is displayed then close it.</p>"""
1423 self.lsbAct.triggered[()].connect(self.__toggleLeftSidebar) 1442 self.lsbAct.triggered[()].connect(self.__toggleLeftSidebar)
1424 self.actions.append(self.lsbAct) 1443 self.actions.append(self.lsbAct)
1425 1444
1426 self.rsbAct = E5Action( 1445 self.rsbAct = E5Action(
1427 self.trUtf8('Right Sidebar'), 1446 self.trUtf8('Right Sidebar'),
1428 self.trUtf8('&Right Sidebar'), 0, 0, self, 'right_sidebar', True) 1447 self.trUtf8('&Right Sidebar'),
1448 0, 0, self, 'right_sidebar', True)
1429 self.rsbAct.setStatusTip(self.trUtf8( 1449 self.rsbAct.setStatusTip(self.trUtf8(
1430 'Toggle the right sidebar window')) 1450 'Toggle the right sidebar window'))
1431 self.rsbAct.setWhatsThis(self.trUtf8( 1451 self.rsbAct.setWhatsThis(self.trUtf8(
1432 """<b>Toggle the right sidebar window</b>""" 1452 """<b>Toggle the right sidebar window</b>"""
1433 """<p>If the right sidebar window is hidden then display it.""" 1453 """<p>If the right sidebar window is hidden then display it."""
1434 """ If it is displayed then close it.</p>""" 1454 """ If it is displayed then close it.</p>"""
1435 )) 1455 ))
1436 self.rsbAct.triggered[()].connect(self.__toggleRightSidebar) 1456 self.rsbAct.triggered[()].connect(self.__toggleRightSidebar)
1437 self.actions.append(self.rsbAct) 1457 self.actions.append(self.rsbAct)
1438 1458
1439 self.bsbAct = E5Action(self.trUtf8('Bottom Sidebar'), 1459 self.bsbAct = E5Action(
1440 self.trUtf8('&Bottom Sidebar'), 0, 0, self, 1460 self.trUtf8('Bottom Sidebar'),
1441 'bottom_sidebar', True) 1461 self.trUtf8('&Bottom Sidebar'), 0, 0, self,
1462 'bottom_sidebar', True)
1442 self.bsbAct.setStatusTip(self.trUtf8( 1463 self.bsbAct.setStatusTip(self.trUtf8(
1443 'Toggle the bottom sidebar window')) 1464 'Toggle the bottom sidebar window'))
1444 self.bsbAct.setWhatsThis(self.trUtf8( 1465 self.bsbAct.setWhatsThis(self.trUtf8(
1445 """<b>Toggle the bottom sidebar window</b>""" 1466 """<b>Toggle the bottom sidebar window</b>"""
1446 """<p>If the bottom sidebar window is hidden then display it.""" 1467 """<p>If the bottom sidebar window is hidden then display it."""
1448 )) 1469 ))
1449 self.bsbAct.triggered[()].connect(self.__toggleBottomSidebar) 1470 self.bsbAct.triggered[()].connect(self.__toggleBottomSidebar)
1450 self.actions.append(self.bsbAct) 1471 self.actions.append(self.bsbAct)
1451 1472
1452 self.cooperationViewerActivateAct = E5Action( 1473 self.cooperationViewerActivateAct = E5Action(
1453 self.trUtf8('Cooperation-Viewer'), 1474 self.trUtf8('Cooperation-Viewer'),
1454 self.trUtf8('Co&operation-Viewer'), 1475 self.trUtf8('Co&operation-Viewer'),
1455 QKeySequence(self.trUtf8("Alt+Shift+O")), 1476 QKeySequence(self.trUtf8("Alt+Shift+O")),
1456 0, self, 1477 0, self,
1457 'cooperation_viewer_activate') 1478 'cooperation_viewer_activate')
1458 self.cooperationViewerActivateAct.setStatusTip(self.trUtf8( 1479 self.cooperationViewerActivateAct.setStatusTip(self.trUtf8(
1459 "Switch the input focus to the Cooperation-Viewer window.")) 1480 "Switch the input focus to the Cooperation-Viewer window."))
1460 self.cooperationViewerActivateAct.setWhatsThis(self.trUtf8( 1481 self.cooperationViewerActivateAct.setWhatsThis(self.trUtf8(
1461 """<b>Activate Cooperation-Viewer</b>""" 1482 """<b>Activate Cooperation-Viewer</b>"""
1462 """<p>This switches the input focus to the Cooperation-Viewer""" 1483 """<p>This switches the input focus to the Cooperation-Viewer"""
1466 self.activateCooperationViewer) 1487 self.activateCooperationViewer)
1467 self.actions.append(self.cooperationViewerActivateAct) 1488 self.actions.append(self.cooperationViewerActivateAct)
1468 self.addAction(self.cooperationViewerActivateAct) 1489 self.addAction(self.cooperationViewerActivateAct)
1469 1490
1470 self.ircActivateAct = E5Action( 1491 self.ircActivateAct = E5Action(
1471 self.trUtf8('IRC'), 1492 self.trUtf8('IRC'),
1472 self.trUtf8('&IRC'), 1493 self.trUtf8('&IRC'),
1473 QKeySequence(self.trUtf8("Meta+Shift+I")), 1494 QKeySequence(self.trUtf8("Meta+Shift+I")),
1474 0, self, 1495 0, self,
1475 'irc_widget_activate') 1496 'irc_widget_activate')
1476 self.ircActivateAct.setStatusTip(self.trUtf8( 1497 self.ircActivateAct.setStatusTip(self.trUtf8(
1477 "Switch the input focus to the IRC window.")) 1498 "Switch the input focus to the IRC window."))
1478 self.ircActivateAct.setWhatsThis(self.trUtf8( 1499 self.ircActivateAct.setWhatsThis(self.trUtf8(
1479 """<b>Activate IRC</b>""" 1500 """<b>Activate IRC</b>"""
1480 """<p>This switches the input focus to the IRC window.</p>""" 1501 """<p>This switches the input focus to the IRC window.</p>"""
1483 self.__activateIRC) 1504 self.__activateIRC)
1484 self.actions.append(self.ircActivateAct) 1505 self.actions.append(self.ircActivateAct)
1485 self.addAction(self.ircActivateAct) 1506 self.addAction(self.ircActivateAct)
1486 1507
1487 self.symbolsViewerActivateAct = E5Action( 1508 self.symbolsViewerActivateAct = E5Action(
1488 self.trUtf8('Symbols-Viewer'), 1509 self.trUtf8('Symbols-Viewer'),
1489 self.trUtf8('S&ymbols-Viewer'), 1510 self.trUtf8('S&ymbols-Viewer'),
1490 QKeySequence(self.trUtf8("Alt+Shift+Y")), 1511 QKeySequence(self.trUtf8("Alt+Shift+Y")),
1491 0, self, 1512 0, self,
1492 'symbols_viewer_activate') 1513 'symbols_viewer_activate')
1493 self.symbolsViewerActivateAct.setStatusTip(self.trUtf8( 1514 self.symbolsViewerActivateAct.setStatusTip(self.trUtf8(
1494 "Switch the input focus to the Symbols-Viewer window.")) 1515 "Switch the input focus to the Symbols-Viewer window."))
1495 self.symbolsViewerActivateAct.setWhatsThis(self.trUtf8( 1516 self.symbolsViewerActivateAct.setWhatsThis(self.trUtf8(
1496 """<b>Activate Symbols-Viewer</b>""" 1517 """<b>Activate Symbols-Viewer</b>"""
1497 """<p>This switches the input focus to the Symbols-Viewer""" 1518 """<p>This switches the input focus to the Symbols-Viewer"""
1501 self.__activateSymbolsViewer) 1522 self.__activateSymbolsViewer)
1502 self.actions.append(self.symbolsViewerActivateAct) 1523 self.actions.append(self.symbolsViewerActivateAct)
1503 self.addAction(self.symbolsViewerActivateAct) 1524 self.addAction(self.symbolsViewerActivateAct)
1504 1525
1505 self.numbersViewerActivateAct = E5Action( 1526 self.numbersViewerActivateAct = E5Action(
1506 self.trUtf8('Numbers-Viewer'), 1527 self.trUtf8('Numbers-Viewer'),
1507 self.trUtf8('Num&bers-Viewer'), 1528 self.trUtf8('Num&bers-Viewer'),
1508 QKeySequence(self.trUtf8("Alt+Shift+B")), 1529 QKeySequence(self.trUtf8("Alt+Shift+B")),
1509 0, self, 1530 0, self,
1510 'numbers_viewer_activate') 1531 'numbers_viewer_activate')
1511 self.numbersViewerActivateAct.setStatusTip(self.trUtf8( 1532 self.numbersViewerActivateAct.setStatusTip(self.trUtf8(
1512 "Switch the input focus to the Numbers-Viewer window.")) 1533 "Switch the input focus to the Numbers-Viewer window."))
1513 self.numbersViewerActivateAct.setWhatsThis(self.trUtf8( 1534 self.numbersViewerActivateAct.setWhatsThis(self.trUtf8(
1514 """<b>Activate Numbers-Viewer</b>""" 1535 """<b>Activate Numbers-Viewer</b>"""
1515 """<p>This switches the input focus to the Numbers-Viewer""" 1536 """<p>This switches the input focus to the Numbers-Viewer"""
1518 self.numbersViewerActivateAct.triggered[()].connect( 1539 self.numbersViewerActivateAct.triggered[()].connect(
1519 self.__activateNumbersViewer) 1540 self.__activateNumbersViewer)
1520 self.actions.append(self.numbersViewerActivateAct) 1541 self.actions.append(self.numbersViewerActivateAct)
1521 self.addAction(self.numbersViewerActivateAct) 1542 self.addAction(self.numbersViewerActivateAct)
1522 1543
1523 self.whatsThisAct = E5Action(self.trUtf8('What\'s This?'), 1544 self.whatsThisAct = E5Action(
1524 UI.PixmapCache.getIcon("whatsThis.png"), 1545 self.trUtf8('What\'s This?'),
1525 self.trUtf8('&What\'s This?'), 1546 UI.PixmapCache.getIcon("whatsThis.png"),
1526 QKeySequence(self.trUtf8("Shift+F1")), 1547 self.trUtf8('&What\'s This?'),
1527 0, self, 'whatsThis') 1548 QKeySequence(self.trUtf8("Shift+F1")),
1549 0, self, 'whatsThis')
1528 self.whatsThisAct.setStatusTip(self.trUtf8('Context sensitive help')) 1550 self.whatsThisAct.setStatusTip(self.trUtf8('Context sensitive help'))
1529 self.whatsThisAct.setWhatsThis(self.trUtf8( 1551 self.whatsThisAct.setWhatsThis(self.trUtf8(
1530 """<b>Display context sensitive help</b>""" 1552 """<b>Display context sensitive help</b>"""
1531 """<p>In What's This? mode, the mouse cursor shows an arrow with""" 1553 """<p>In What's This? mode, the mouse cursor shows an arrow with"""
1532 """ a question mark, and you can click on the interface elements""" 1554 """ a question mark, and you can click on the interface elements"""
1535 """ context help button in the titlebar.</p>""" 1557 """ context help button in the titlebar.</p>"""
1536 )) 1558 ))
1537 self.whatsThisAct.triggered[()].connect(self.__whatsThis) 1559 self.whatsThisAct.triggered[()].connect(self.__whatsThis)
1538 self.actions.append(self.whatsThisAct) 1560 self.actions.append(self.whatsThisAct)
1539 1561
1540 self.helpviewerAct = E5Action(self.trUtf8('Helpviewer'), 1562 self.helpviewerAct = E5Action(
1541 UI.PixmapCache.getIcon("help.png"), 1563 self.trUtf8('Helpviewer'),
1542 self.trUtf8('&Helpviewer...'), 1564 UI.PixmapCache.getIcon("help.png"),
1543 QKeySequence(self.trUtf8("F1")), 1565 self.trUtf8('&Helpviewer...'),
1544 0, self, 'helpviewer') 1566 QKeySequence(self.trUtf8("F1")),
1567 0, self, 'helpviewer')
1545 self.helpviewerAct.setStatusTip(self.trUtf8( 1568 self.helpviewerAct.setStatusTip(self.trUtf8(
1546 'Open the helpviewer window')) 1569 'Open the helpviewer window'))
1547 self.helpviewerAct.setWhatsThis(self.trUtf8( 1570 self.helpviewerAct.setWhatsThis(self.trUtf8(
1548 """<b>Helpviewer</b>""" 1571 """<b>Helpviewer</b>"""
1549 """<p>Display the eric5 web browser. This window will show""" 1572 """<p>Display the eric5 web browser. This window will show"""
1559 self.__initQtDocActions() 1582 self.__initQtDocActions()
1560 self.__initPythonDocActions() 1583 self.__initPythonDocActions()
1561 self.__initEricDocAction() 1584 self.__initEricDocAction()
1562 self.__initPySideDocAction() 1585 self.__initPySideDocAction()
1563 1586
1564 self.versionAct = E5Action(self.trUtf8('Show Versions'), 1587 self.versionAct = E5Action(
1565 self.trUtf8('Show &Versions'), 0, 0, self, 'show_versions') 1588 self.trUtf8('Show Versions'),
1589 self.trUtf8('Show &Versions'),
1590 0, 0, self, 'show_versions')
1566 self.versionAct.setStatusTip(self.trUtf8( 1591 self.versionAct.setStatusTip(self.trUtf8(
1567 'Display version information')) 1592 'Display version information'))
1568 self.versionAct.setWhatsThis(self.trUtf8( 1593 self.versionAct.setWhatsThis(self.trUtf8(
1569 """<b>Show Versions</b>""" 1594 """<b>Show Versions</b>"""
1570 """<p>Display version information.</p>""" 1595 """<p>Display version information.</p>"""
1596 )) 1621 ))
1597 self.showVersionsAct.triggered[()].connect( 1622 self.showVersionsAct.triggered[()].connect(
1598 self.showAvailableVersionsInfo) 1623 self.showAvailableVersionsInfo)
1599 self.actions.append(self.showVersionsAct) 1624 self.actions.append(self.showVersionsAct)
1600 1625
1601 self.reportBugAct = E5Action(self.trUtf8('Report Bug'), 1626 self.reportBugAct = E5Action(
1602 self.trUtf8('Report &Bug...'), 0, 0, self, 'report_bug') 1627 self.trUtf8('Report Bug'),
1628 self.trUtf8('Report &Bug...'),
1629 0, 0, self, 'report_bug')
1603 self.reportBugAct.setStatusTip(self.trUtf8('Report a bug')) 1630 self.reportBugAct.setStatusTip(self.trUtf8('Report a bug'))
1604 self.reportBugAct.setWhatsThis(self.trUtf8( 1631 self.reportBugAct.setWhatsThis(self.trUtf8(
1605 """<b>Report Bug...</b>""" 1632 """<b>Report Bug...</b>"""
1606 """<p>Opens a dialog to report a bug.</p>""" 1633 """<p>Opens a dialog to report a bug.</p>"""
1607 )) 1634 ))
1608 self.reportBugAct.triggered[()].connect(self.__reportBug) 1635 self.reportBugAct.triggered[()].connect(self.__reportBug)
1609 self.actions.append(self.reportBugAct) 1636 self.actions.append(self.reportBugAct)
1610 1637
1611 self.requestFeatureAct = E5Action( 1638 self.requestFeatureAct = E5Action(
1612 self.trUtf8('Request Feature'), 1639 self.trUtf8('Request Feature'),
1613 self.trUtf8('Request &Feature...'), 0, 0, self, 'request_feature') 1640 self.trUtf8('Request &Feature...'),
1641 0, 0, self, 'request_feature')
1614 self.requestFeatureAct.setStatusTip(self.trUtf8( 1642 self.requestFeatureAct.setStatusTip(self.trUtf8(
1615 'Send a feature request')) 1643 'Send a feature request'))
1616 self.requestFeatureAct.setWhatsThis(self.trUtf8( 1644 self.requestFeatureAct.setWhatsThis(self.trUtf8(
1617 """<b>Request Feature...</b>""" 1645 """<b>Request Feature...</b>"""
1618 """<p>Opens a dialog to send a feature request.</p>""" 1646 """<p>Opens a dialog to send a feature request.</p>"""
1620 self.requestFeatureAct.triggered[()].connect(self.__requestFeature) 1648 self.requestFeatureAct.triggered[()].connect(self.__requestFeature)
1621 self.actions.append(self.requestFeatureAct) 1649 self.actions.append(self.requestFeatureAct)
1622 1650
1623 self.utActGrp = createActionGroup(self) 1651 self.utActGrp = createActionGroup(self)
1624 1652
1625 self.utDialogAct = E5Action(self.trUtf8('Unittest'), 1653 self.utDialogAct = E5Action(
1626 UI.PixmapCache.getIcon("unittest.png"), 1654 self.trUtf8('Unittest'),
1627 self.trUtf8('&Unittest...'), 1655 UI.PixmapCache.getIcon("unittest.png"),
1628 0, 0, self.utActGrp, 'unittest') 1656 self.trUtf8('&Unittest...'),
1657 0, 0, self.utActGrp, 'unittest')
1629 self.utDialogAct.setStatusTip(self.trUtf8('Start unittest dialog')) 1658 self.utDialogAct.setStatusTip(self.trUtf8('Start unittest dialog'))
1630 self.utDialogAct.setWhatsThis(self.trUtf8( 1659 self.utDialogAct.setWhatsThis(self.trUtf8(
1631 """<b>Unittest</b>""" 1660 """<b>Unittest</b>"""
1632 """<p>Perform unit tests. The dialog gives you the""" 1661 """<p>Perform unit tests. The dialog gives you the"""
1633 """ ability to select and run a unittest suite.</p>""" 1662 """ ability to select and run a unittest suite.</p>"""
1634 )) 1663 ))
1635 self.utDialogAct.triggered[()].connect(self.__unittest) 1664 self.utDialogAct.triggered[()].connect(self.__unittest)
1636 self.actions.append(self.utDialogAct) 1665 self.actions.append(self.utDialogAct)
1637 1666
1638 self.utRestartAct = E5Action(self.trUtf8('Unittest Restart'), 1667 self.utRestartAct = E5Action(
1668 self.trUtf8('Unittest Restart'),
1639 UI.PixmapCache.getIcon("unittestRestart.png"), 1669 UI.PixmapCache.getIcon("unittestRestart.png"),
1640 self.trUtf8('&Restart Unittest...'), 1670 self.trUtf8('&Restart Unittest...'),
1641 0, 0, self.utActGrp, 'unittest_restart') 1671 0, 0, self.utActGrp, 'unittest_restart')
1642 self.utRestartAct.setStatusTip(self.trUtf8('Restart last unittest')) 1672 self.utRestartAct.setStatusTip(self.trUtf8('Restart last unittest'))
1643 self.utRestartAct.setWhatsThis(self.trUtf8( 1673 self.utRestartAct.setWhatsThis(self.trUtf8(
1646 )) 1676 ))
1647 self.utRestartAct.triggered[()].connect(self.__unittestRestart) 1677 self.utRestartAct.triggered[()].connect(self.__unittestRestart)
1648 self.utRestartAct.setEnabled(False) 1678 self.utRestartAct.setEnabled(False)
1649 self.actions.append(self.utRestartAct) 1679 self.actions.append(self.utRestartAct)
1650 1680
1651 self.utRerunFailedAct = E5Action(self.trUtf8('Unittest Rerun Failed'), 1681 self.utRerunFailedAct = E5Action(
1682 self.trUtf8('Unittest Rerun Failed'),
1652 UI.PixmapCache.getIcon("unittestRerunFailed.png"), 1683 UI.PixmapCache.getIcon("unittestRerunFailed.png"),
1653 self.trUtf8('Rerun Failed Tests...'), 1684 self.trUtf8('Rerun Failed Tests...'),
1654 0, 0, self.utActGrp, 'unittest_rerun_failed') 1685 0, 0, self.utActGrp, 'unittest_rerun_failed')
1655 self.utRerunFailedAct.setStatusTip(self.trUtf8( 1686 self.utRerunFailedAct.setStatusTip(self.trUtf8(
1656 'Rerun failed tests of the last run')) 1687 'Rerun failed tests of the last run'))
1661 )) 1692 ))
1662 self.utRerunFailedAct.triggered[()].connect(self.__unittestRerunFailed) 1693 self.utRerunFailedAct.triggered[()].connect(self.__unittestRerunFailed)
1663 self.utRerunFailedAct.setEnabled(False) 1694 self.utRerunFailedAct.setEnabled(False)
1664 self.actions.append(self.utRerunFailedAct) 1695 self.actions.append(self.utRerunFailedAct)
1665 1696
1666 self.utScriptAct = E5Action(self.trUtf8('Unittest Script'), 1697 self.utScriptAct = E5Action(
1698 self.trUtf8('Unittest Script'),
1667 UI.PixmapCache.getIcon("unittestScript.png"), 1699 UI.PixmapCache.getIcon("unittestScript.png"),
1668 self.trUtf8('Unittest &Script...'), 1700 self.trUtf8('Unittest &Script...'),
1669 0, 0, self.utActGrp, 'unittest_script') 1701 0, 0, self.utActGrp, 'unittest_script')
1670 self.utScriptAct.setStatusTip(self.trUtf8( 1702 self.utScriptAct.setStatusTip(self.trUtf8(
1671 'Run unittest with current script')) 1703 'Run unittest with current script'))
1675 )) 1707 ))
1676 self.utScriptAct.triggered[()].connect(self.__unittestScript) 1708 self.utScriptAct.triggered[()].connect(self.__unittestScript)
1677 self.utScriptAct.setEnabled(False) 1709 self.utScriptAct.setEnabled(False)
1678 self.actions.append(self.utScriptAct) 1710 self.actions.append(self.utScriptAct)
1679 1711
1680 self.utProjectAct = E5Action(self.trUtf8('Unittest Project'), 1712 self.utProjectAct = E5Action(
1713 self.trUtf8('Unittest Project'),
1681 UI.PixmapCache.getIcon("unittestProject.png"), 1714 UI.PixmapCache.getIcon("unittestProject.png"),
1682 self.trUtf8('Unittest &Project...'), 1715 self.trUtf8('Unittest &Project...'),
1683 0, 0, self.utActGrp, 'unittest_project') 1716 0, 0, self.utActGrp, 'unittest_project')
1684 self.utProjectAct.setStatusTip(self.trUtf8( 1717 self.utProjectAct.setStatusTip(self.trUtf8(
1685 'Run unittest with current project')) 1718 'Run unittest with current project'))
1691 self.utProjectAct.setEnabled(False) 1724 self.utProjectAct.setEnabled(False)
1692 self.actions.append(self.utProjectAct) 1725 self.actions.append(self.utProjectAct)
1693 1726
1694 # check for Qt4/Qt5 designer and linguist 1727 # check for Qt4/Qt5 designer and linguist
1695 if Utilities.isWindowsPlatform(): 1728 if Utilities.isWindowsPlatform():
1696 designerExe = os.path.join(Utilities.getQtBinariesPath(), 1729 designerExe = os.path.join(
1730 Utilities.getQtBinariesPath(),
1697 "{0}.exe".format(Utilities.generateQtToolName("designer"))) 1731 "{0}.exe".format(Utilities.generateQtToolName("designer")))
1698 elif Utilities.isMacPlatform(): 1732 elif Utilities.isMacPlatform():
1699 designerExe = Utilities.getQtMacBundle("designer") 1733 designerExe = Utilities.getQtMacBundle("designer")
1700 else: 1734 else:
1701 designerExe = os.path.join(Utilities.getQtBinariesPath(), 1735 designerExe = os.path.join(
1736 Utilities.getQtBinariesPath(),
1702 Utilities.generateQtToolName("designer")) 1737 Utilities.generateQtToolName("designer"))
1703 if os.path.exists(designerExe): 1738 if os.path.exists(designerExe):
1704 self.designer4Act = E5Action(self.trUtf8('Qt-Designer'), 1739 self.designer4Act = E5Action(
1705 UI.PixmapCache.getIcon("designer4.png"), 1740 self.trUtf8('Qt-Designer'),
1706 self.trUtf8('Qt-&Designer...'), 0, 0, self, 'qt_designer4') 1741 UI.PixmapCache.getIcon("designer4.png"),
1742 self.trUtf8('Qt-&Designer...'),
1743 0, 0, self, 'qt_designer4')
1707 self.designer4Act.setStatusTip(self.trUtf8('Start Qt-Designer')) 1744 self.designer4Act.setStatusTip(self.trUtf8('Start Qt-Designer'))
1708 self.designer4Act.setWhatsThis(self.trUtf8( 1745 self.designer4Act.setWhatsThis(self.trUtf8(
1709 """<b>Qt-Designer</b>""" 1746 """<b>Qt-Designer</b>"""
1710 """<p>Start Qt-Designer.</p>""" 1747 """<p>Start Qt-Designer.</p>"""
1711 )) 1748 ))
1713 self.actions.append(self.designer4Act) 1750 self.actions.append(self.designer4Act)
1714 else: 1751 else:
1715 self.designer4Act = None 1752 self.designer4Act = None
1716 1753
1717 if Utilities.isWindowsPlatform(): 1754 if Utilities.isWindowsPlatform():
1718 linguistExe = os.path.join(Utilities.getQtBinariesPath(), 1755 linguistExe = os.path.join(
1756 Utilities.getQtBinariesPath(),
1719 "{0}.exe".format(Utilities.generateQtToolName("linguist"))) 1757 "{0}.exe".format(Utilities.generateQtToolName("linguist")))
1720 elif Utilities.isMacPlatform(): 1758 elif Utilities.isMacPlatform():
1721 linguistExe = Utilities.getQtMacBundle("linguist") 1759 linguistExe = Utilities.getQtMacBundle("linguist")
1722 else: 1760 else:
1723 linguistExe = os.path.join(Utilities.getQtBinariesPath(), 1761 linguistExe = os.path.join(
1762 Utilities.getQtBinariesPath(),
1724 Utilities.generateQtToolName("linguist")) 1763 Utilities.generateQtToolName("linguist"))
1725 if os.path.exists(linguistExe): 1764 if os.path.exists(linguistExe):
1726 self.linguist4Act = E5Action(self.trUtf8('Qt-Linguist'), 1765 self.linguist4Act = E5Action(
1727 UI.PixmapCache.getIcon("linguist4.png"), 1766 self.trUtf8('Qt-Linguist'),
1728 self.trUtf8('Qt-&Linguist...'), 0, 0, self, 'qt_linguist4') 1767 UI.PixmapCache.getIcon("linguist4.png"),
1768 self.trUtf8('Qt-&Linguist...'),
1769 0, 0, self, 'qt_linguist4')
1729 self.linguist4Act.setStatusTip(self.trUtf8('Start Qt-Linguist')) 1770 self.linguist4Act.setStatusTip(self.trUtf8('Start Qt-Linguist'))
1730 self.linguist4Act.setWhatsThis(self.trUtf8( 1771 self.linguist4Act.setWhatsThis(self.trUtf8(
1731 """<b>Qt-Linguist</b>""" 1772 """<b>Qt-Linguist</b>"""
1732 """<p>Start Qt-Linguist.</p>""" 1773 """<p>Start Qt-Linguist.</p>"""
1733 )) 1774 ))
1734 self.linguist4Act.triggered[()].connect(self.__linguist4) 1775 self.linguist4Act.triggered[()].connect(self.__linguist4)
1735 self.actions.append(self.linguist4Act) 1776 self.actions.append(self.linguist4Act)
1736 else: 1777 else:
1737 self.linguist4Act = None 1778 self.linguist4Act = None
1738 1779
1739 self.uipreviewerAct = E5Action(self.trUtf8('UI Previewer'), 1780 self.uipreviewerAct = E5Action(
1740 UI.PixmapCache.getIcon("uiPreviewer.png"), 1781 self.trUtf8('UI Previewer'),
1741 self.trUtf8('&UI Previewer...'), 0, 0, self, 'ui_previewer') 1782 UI.PixmapCache.getIcon("uiPreviewer.png"),
1783 self.trUtf8('&UI Previewer...'),
1784 0, 0, self, 'ui_previewer')
1742 self.uipreviewerAct.setStatusTip(self.trUtf8('Start the UI Previewer')) 1785 self.uipreviewerAct.setStatusTip(self.trUtf8('Start the UI Previewer'))
1743 self.uipreviewerAct.setWhatsThis(self.trUtf8( 1786 self.uipreviewerAct.setWhatsThis(self.trUtf8(
1744 """<b>UI Previewer</b>""" 1787 """<b>UI Previewer</b>"""
1745 """<p>Start the UI Previewer.</p>""" 1788 """<p>Start the UI Previewer.</p>"""
1746 )) 1789 ))
1759 """<p>Start the Translations Previewer.</p>""" 1802 """<p>Start the Translations Previewer.</p>"""
1760 )) 1803 ))
1761 self.trpreviewerAct.triggered[()].connect(self.__TRPreviewer) 1804 self.trpreviewerAct.triggered[()].connect(self.__TRPreviewer)
1762 self.actions.append(self.trpreviewerAct) 1805 self.actions.append(self.trpreviewerAct)
1763 1806
1764 self.diffAct = E5Action(self.trUtf8('Compare Files'), 1807 self.diffAct = E5Action(
1765 UI.PixmapCache.getIcon("diffFiles.png"), 1808 self.trUtf8('Compare Files'),
1766 self.trUtf8('&Compare Files...'), 0, 0, self, 'diff_files') 1809 UI.PixmapCache.getIcon("diffFiles.png"),
1810 self.trUtf8('&Compare Files...'),
1811 0, 0, self, 'diff_files')
1767 self.diffAct.setStatusTip(self.trUtf8('Compare two files')) 1812 self.diffAct.setStatusTip(self.trUtf8('Compare two files'))
1768 self.diffAct.setWhatsThis(self.trUtf8( 1813 self.diffAct.setWhatsThis(self.trUtf8(
1769 """<b>Compare Files</b>""" 1814 """<b>Compare Files</b>"""
1770 """<p>Open a dialog to compare two files.</p>""" 1815 """<p>Open a dialog to compare two files.</p>"""
1771 )) 1816 ))
1772 self.diffAct.triggered[()].connect(self.__compareFiles) 1817 self.diffAct.triggered[()].connect(self.__compareFiles)
1773 self.actions.append(self.diffAct) 1818 self.actions.append(self.diffAct)
1774 1819
1775 self.compareAct = E5Action(self.trUtf8('Compare Files side by side'), 1820 self.compareAct = E5Action(
1776 UI.PixmapCache.getIcon("compareFiles.png"), 1821 self.trUtf8('Compare Files side by side'),
1777 self.trUtf8('Compare &Files side by side...'), 1822 UI.PixmapCache.getIcon("compareFiles.png"),
1778 0, 0, self, 'compare_files') 1823 self.trUtf8('Compare &Files side by side...'),
1824 0, 0, self, 'compare_files')
1779 self.compareAct.setStatusTip(self.trUtf8('Compare two files')) 1825 self.compareAct.setStatusTip(self.trUtf8('Compare two files'))
1780 self.compareAct.setWhatsThis(self.trUtf8( 1826 self.compareAct.setWhatsThis(self.trUtf8(
1781 """<b>Compare Files side by side</b>""" 1827 """<b>Compare Files side by side</b>"""
1782 """<p>Open a dialog to compare two files and show the result""" 1828 """<p>Open a dialog to compare two files and show the result"""
1783 """ side by side.</p>""" 1829 """ side by side.</p>"""
1784 )) 1830 ))
1785 self.compareAct.triggered[()].connect(self.__compareFilesSbs) 1831 self.compareAct.triggered[()].connect(self.__compareFilesSbs)
1786 self.actions.append(self.compareAct) 1832 self.actions.append(self.compareAct)
1787 1833
1788 self.sqlBrowserAct = E5Action(self.trUtf8('SQL Browser'), 1834 self.sqlBrowserAct = E5Action(
1789 UI.PixmapCache.getIcon("sqlBrowser.png"), 1835 self.trUtf8('SQL Browser'),
1790 self.trUtf8('SQL &Browser...'), 1836 UI.PixmapCache.getIcon("sqlBrowser.png"),
1791 0, 0, self, 'sql_browser') 1837 self.trUtf8('SQL &Browser...'),
1838 0, 0, self, 'sql_browser')
1792 self.sqlBrowserAct.setStatusTip(self.trUtf8('Browse a SQL database')) 1839 self.sqlBrowserAct.setStatusTip(self.trUtf8('Browse a SQL database'))
1793 self.sqlBrowserAct.setWhatsThis(self.trUtf8( 1840 self.sqlBrowserAct.setWhatsThis(self.trUtf8(
1794 """<b>SQL Browser</b>""" 1841 """<b>SQL Browser</b>"""
1795 """<p>Browse a SQL database.</p>""" 1842 """<p>Browse a SQL database.</p>"""
1796 )) 1843 ))
1797 self.sqlBrowserAct.triggered[()].connect(self.__sqlBrowser) 1844 self.sqlBrowserAct.triggered[()].connect(self.__sqlBrowser)
1798 self.actions.append(self.sqlBrowserAct) 1845 self.actions.append(self.sqlBrowserAct)
1799 1846
1800 self.miniEditorAct = E5Action(self.trUtf8('Mini Editor'), 1847 self.miniEditorAct = E5Action(
1801 UI.PixmapCache.getIcon("editor.png"), 1848 self.trUtf8('Mini Editor'),
1802 self.trUtf8('Mini &Editor...'), 1849 UI.PixmapCache.getIcon("editor.png"),
1803 0, 0, self, 'mini_editor') 1850 self.trUtf8('Mini &Editor...'),
1851 0, 0, self, 'mini_editor')
1804 self.miniEditorAct.setStatusTip(self.trUtf8('Mini Editor')) 1852 self.miniEditorAct.setStatusTip(self.trUtf8('Mini Editor'))
1805 self.miniEditorAct.setWhatsThis(self.trUtf8( 1853 self.miniEditorAct.setWhatsThis(self.trUtf8(
1806 """<b>Mini Editor</b>""" 1854 """<b>Mini Editor</b>"""
1807 """<p>Open a dialog with a simplified editor.</p>""" 1855 """<p>Open a dialog with a simplified editor.</p>"""
1808 )) 1856 ))
1809 self.miniEditorAct.triggered[()].connect(self.__openMiniEditor) 1857 self.miniEditorAct.triggered[()].connect(self.__openMiniEditor)
1810 self.actions.append(self.miniEditorAct) 1858 self.actions.append(self.miniEditorAct)
1811 1859
1812 self.webBrowserAct = E5Action(self.trUtf8('eric5 Web Browser'), 1860 self.webBrowserAct = E5Action(
1813 UI.PixmapCache.getIcon("ericWeb.png"), 1861 self.trUtf8('eric5 Web Browser'),
1814 self.trUtf8('eric5 &Web Browser...'), 1862 UI.PixmapCache.getIcon("ericWeb.png"),
1815 0, 0, self, 'web_browser') 1863 self.trUtf8('eric5 &Web Browser...'),
1864 0, 0, self, 'web_browser')
1816 self.webBrowserAct.setStatusTip(self.trUtf8( 1865 self.webBrowserAct.setStatusTip(self.trUtf8(
1817 'Start the eric5 Web Browser')) 1866 'Start the eric5 Web Browser'))
1818 self.webBrowserAct.setWhatsThis(self.trUtf8( 1867 self.webBrowserAct.setWhatsThis(self.trUtf8(
1819 """<b>eric5 Web Browser</b>""" 1868 """<b>eric5 Web Browser</b>"""
1820 """<p>Browse the Internet with the eric5 Web Browser.</p>""" 1869 """<p>Browse the Internet with the eric5 Web Browser.</p>"""
1821 )) 1870 ))
1822 self.webBrowserAct.triggered[()].connect(self.__startWebBrowser) 1871 self.webBrowserAct.triggered[()].connect(self.__startWebBrowser)
1823 self.actions.append(self.webBrowserAct) 1872 self.actions.append(self.webBrowserAct)
1824 1873
1825 self.iconEditorAct = E5Action(self.trUtf8('Icon Editor'), 1874 self.iconEditorAct = E5Action(
1826 UI.PixmapCache.getIcon("iconEditor.png"), 1875 self.trUtf8('Icon Editor'),
1827 self.trUtf8('&Icon Editor...'), 1876 UI.PixmapCache.getIcon("iconEditor.png"),
1828 0, 0, self, 'icon_editor') 1877 self.trUtf8('&Icon Editor...'),
1878 0, 0, self, 'icon_editor')
1829 self.iconEditorAct.setStatusTip(self.trUtf8( 1879 self.iconEditorAct.setStatusTip(self.trUtf8(
1830 'Start the eric5 Icon Editor')) 1880 'Start the eric5 Icon Editor'))
1831 self.iconEditorAct.setWhatsThis(self.trUtf8( 1881 self.iconEditorAct.setWhatsThis(self.trUtf8(
1832 """<b>Icon Editor</b>""" 1882 """<b>Icon Editor</b>"""
1833 """<p>Starts the eric5 Icon Editor for editing simple icons.</p>""" 1883 """<p>Starts the eric5 Icon Editor for editing simple icons.</p>"""
1834 )) 1884 ))
1835 self.iconEditorAct.triggered[()].connect(self.__editPixmap) 1885 self.iconEditorAct.triggered[()].connect(self.__editPixmap)
1836 self.actions.append(self.iconEditorAct) 1886 self.actions.append(self.iconEditorAct)
1837 1887
1838 self.snapshotAct = E5Action(self.trUtf8('Snapshot'), 1888 self.snapshotAct = E5Action(
1839 UI.PixmapCache.getIcon("ericSnap.png"), 1889 self.trUtf8('Snapshot'),
1840 self.trUtf8('&Snapshot...'), 1890 UI.PixmapCache.getIcon("ericSnap.png"),
1841 0, 0, self, 'snapshot') 1891 self.trUtf8('&Snapshot...'),
1892 0, 0, self, 'snapshot')
1842 self.snapshotAct.setStatusTip(self.trUtf8( 1893 self.snapshotAct.setStatusTip(self.trUtf8(
1843 'Take snapshots of a screen region')) 1894 'Take snapshots of a screen region'))
1844 self.snapshotAct.setWhatsThis(self.trUtf8( 1895 self.snapshotAct.setWhatsThis(self.trUtf8(
1845 """<b>Snapshot</b>""" 1896 """<b>Snapshot</b>"""
1846 """<p>This opens a dialog to take snapshots of a screen""" 1897 """<p>This opens a dialog to take snapshots of a screen"""
1847 """ region.</p>""" 1898 """ region.</p>"""
1848 )) 1899 ))
1849 self.snapshotAct.triggered[()].connect(self.__snapshot) 1900 self.snapshotAct.triggered[()].connect(self.__snapshot)
1850 self.actions.append(self.snapshotAct) 1901 self.actions.append(self.snapshotAct)
1851 1902
1852 self.prefAct = E5Action(self.trUtf8('Preferences'), 1903 self.prefAct = E5Action(
1853 UI.PixmapCache.getIcon("configure.png"), 1904 self.trUtf8('Preferences'),
1854 self.trUtf8('&Preferences...'), 0, 0, self, 'preferences') 1905 UI.PixmapCache.getIcon("configure.png"),
1906 self.trUtf8('&Preferences...'),
1907 0, 0, self, 'preferences')
1855 self.prefAct.setStatusTip(self.trUtf8( 1908 self.prefAct.setStatusTip(self.trUtf8(
1856 'Set the prefered configuration')) 1909 'Set the prefered configuration'))
1857 self.prefAct.setWhatsThis(self.trUtf8( 1910 self.prefAct.setWhatsThis(self.trUtf8(
1858 """<b>Preferences</b>""" 1911 """<b>Preferences</b>"""
1859 """<p>Set the configuration items of the application""" 1912 """<p>Set the configuration items of the application"""
1889 """<p>Import a previously exported configuration.</p>""" 1942 """<p>Import a previously exported configuration.</p>"""
1890 )) 1943 ))
1891 self.prefImportAct.triggered[()].connect(self.__importPreferences) 1944 self.prefImportAct.triggered[()].connect(self.__importPreferences)
1892 self.actions.append(self.prefImportAct) 1945 self.actions.append(self.prefImportAct)
1893 1946
1894 self.reloadAPIsAct = E5Action(self.trUtf8('Reload APIs'), 1947 self.reloadAPIsAct = E5Action(
1895 self.trUtf8('Reload &APIs'), 0, 0, self, 'reload_apis') 1948 self.trUtf8('Reload APIs'),
1949 self.trUtf8('Reload &APIs'),
1950 0, 0, self, 'reload_apis')
1896 self.reloadAPIsAct.setStatusTip(self.trUtf8( 1951 self.reloadAPIsAct.setStatusTip(self.trUtf8(
1897 'Reload the API information')) 1952 'Reload the API information'))
1898 self.reloadAPIsAct.setWhatsThis(self.trUtf8( 1953 self.reloadAPIsAct.setWhatsThis(self.trUtf8(
1899 """<b>Reload APIs</b>""" 1954 """<b>Reload APIs</b>"""
1900 """<p>Reload the API information.</p>""" 1955 """<p>Reload the API information.</p>"""
1916 )) 1971 ))
1917 self.showExternalToolsAct.triggered[()].connect( 1972 self.showExternalToolsAct.triggered[()].connect(
1918 self.__showExternalTools) 1973 self.__showExternalTools)
1919 self.actions.append(self.showExternalToolsAct) 1974 self.actions.append(self.showExternalToolsAct)
1920 1975
1921 self.configViewProfilesAct = E5Action(self.trUtf8('View Profiles'), 1976 self.configViewProfilesAct = E5Action(
1922 UI.PixmapCache.getIcon("configureViewProfiles.png"), 1977 self.trUtf8('View Profiles'),
1923 self.trUtf8('&View Profiles...'), 0, 0, self, 'view_profiles') 1978 UI.PixmapCache.getIcon("configureViewProfiles.png"),
1979 self.trUtf8('&View Profiles...'),
1980 0, 0, self, 'view_profiles')
1924 self.configViewProfilesAct.setStatusTip(self.trUtf8( 1981 self.configViewProfilesAct.setStatusTip(self.trUtf8(
1925 'Configure view profiles')) 1982 'Configure view profiles'))
1926 self.configViewProfilesAct.setWhatsThis(self.trUtf8( 1983 self.configViewProfilesAct.setWhatsThis(self.trUtf8(
1927 """<b>View Profiles</b>""" 1984 """<b>View Profiles</b>"""
1928 """<p>Configure the view profiles. With this dialog you may""" 1985 """<p>Configure the view profiles. With this dialog you may"""
1931 )) 1988 ))
1932 self.configViewProfilesAct.triggered[()].connect( 1989 self.configViewProfilesAct.triggered[()].connect(
1933 self.__configViewProfiles) 1990 self.__configViewProfiles)
1934 self.actions.append(self.configViewProfilesAct) 1991 self.actions.append(self.configViewProfilesAct)
1935 1992
1936 self.configToolBarsAct = E5Action(self.trUtf8('Toolbars'), 1993 self.configToolBarsAct = E5Action(
1937 UI.PixmapCache.getIcon("toolbarsConfigure.png"), 1994 self.trUtf8('Toolbars'),
1938 self.trUtf8('Tool&bars...'), 0, 0, self, 'configure_toolbars') 1995 UI.PixmapCache.getIcon("toolbarsConfigure.png"),
1996 self.trUtf8('Tool&bars...'),
1997 0, 0, self, 'configure_toolbars')
1939 self.configToolBarsAct.setStatusTip(self.trUtf8('Configure toolbars')) 1998 self.configToolBarsAct.setStatusTip(self.trUtf8('Configure toolbars'))
1940 self.configToolBarsAct.setWhatsThis(self.trUtf8( 1999 self.configToolBarsAct.setWhatsThis(self.trUtf8(
1941 """<b>Toolbars</b>""" 2000 """<b>Toolbars</b>"""
1942 """<p>Configure the toolbars. With this dialog you may""" 2001 """<p>Configure the toolbars. With this dialog you may"""
1943 """ change the actions shown on the various toolbars and""" 2002 """ change the actions shown on the various toolbars and"""
2031 self.viewmanagerActivateAct.triggered[()].connect( 2090 self.viewmanagerActivateAct.triggered[()].connect(
2032 self.__activateViewmanager) 2091 self.__activateViewmanager)
2033 self.actions.append(self.viewmanagerActivateAct) 2092 self.actions.append(self.viewmanagerActivateAct)
2034 self.addAction(self.viewmanagerActivateAct) 2093 self.addAction(self.viewmanagerActivateAct)
2035 2094
2036 self.nextTabAct = E5Action(self.trUtf8('Show next'), 2095 self.nextTabAct = E5Action(
2037 self.trUtf8('Show next'), 2096 self.trUtf8('Show next'),
2038 QKeySequence(self.trUtf8('Ctrl+Alt+Tab')), 0, 2097 self.trUtf8('Show next'),
2039 self, 'view_next_tab') 2098 QKeySequence(self.trUtf8('Ctrl+Alt+Tab')), 0,
2099 self, 'view_next_tab')
2040 self.nextTabAct.triggered[()].connect(self.__showNext) 2100 self.nextTabAct.triggered[()].connect(self.__showNext)
2041 self.actions.append(self.nextTabAct) 2101 self.actions.append(self.nextTabAct)
2042 self.addAction(self.nextTabAct) 2102 self.addAction(self.nextTabAct)
2043 2103
2044 self.prevTabAct = E5Action(self.trUtf8('Show previous'), 2104 self.prevTabAct = E5Action(
2045 self.trUtf8('Show previous'), 2105 self.trUtf8('Show previous'),
2046 QKeySequence(self.trUtf8('Shift+Ctrl+Alt+Tab')), 0, 2106 self.trUtf8('Show previous'),
2047 self, 'view_previous_tab') 2107 QKeySequence(self.trUtf8('Shift+Ctrl+Alt+Tab')), 0,
2108 self, 'view_previous_tab')
2048 self.prevTabAct.triggered[()].connect(self.__showPrevious) 2109 self.prevTabAct.triggered[()].connect(self.__showPrevious)
2049 self.actions.append(self.prevTabAct) 2110 self.actions.append(self.prevTabAct)
2050 self.addAction(self.prevTabAct) 2111 self.addAction(self.prevTabAct)
2051 2112
2052 self.switchTabAct = E5Action(self.trUtf8('Switch between tabs'), 2113 self.switchTabAct = E5Action(
2053 self.trUtf8('Switch between tabs'), 2114 self.trUtf8('Switch between tabs'),
2054 QKeySequence(self.trUtf8('Ctrl+1')), 0, 2115 self.trUtf8('Switch between tabs'),
2055 self, 'switch_tabs') 2116 QKeySequence(self.trUtf8('Ctrl+1')), 0,
2117 self, 'switch_tabs')
2056 self.switchTabAct.triggered[()].connect(self.__switchTab) 2118 self.switchTabAct.triggered[()].connect(self.__switchTab)
2057 self.actions.append(self.switchTabAct) 2119 self.actions.append(self.switchTabAct)
2058 self.addAction(self.switchTabAct) 2120 self.addAction(self.switchTabAct)
2059 2121
2060 self.pluginInfoAct = E5Action(self.trUtf8('Plugin Infos'), 2122 self.pluginInfoAct = E5Action(
2061 UI.PixmapCache.getIcon("plugin.png"), 2123 self.trUtf8('Plugin Infos'),
2062 self.trUtf8('&Plugin Infos...'), 0, 0, self, 'plugin_infos') 2124 UI.PixmapCache.getIcon("plugin.png"),
2125 self.trUtf8('&Plugin Infos...'), 0, 0, self, 'plugin_infos')
2063 self.pluginInfoAct.setStatusTip(self.trUtf8('Show Plugin Infos')) 2126 self.pluginInfoAct.setStatusTip(self.trUtf8('Show Plugin Infos'))
2064 self.pluginInfoAct.setWhatsThis(self.trUtf8( 2127 self.pluginInfoAct.setWhatsThis(self.trUtf8(
2065 """<b>Plugin Infos...</b>""" 2128 """<b>Plugin Infos...</b>"""
2066 """<p>This opens a dialog, that show some information about""" 2129 """<p>This opens a dialog, that show some information about"""
2067 """ loaded plugins.</p>""" 2130 """ loaded plugins.</p>"""
2673 self.sbPos.setWhatsThis(self.trUtf8( 2736 self.sbPos.setWhatsThis(self.trUtf8(
2674 """<p>This part of the status bar displays the cursor position""" 2737 """<p>This part of the status bar displays the cursor position"""
2675 """ of the current editor.</p>""" 2738 """ of the current editor.</p>"""
2676 )) 2739 ))
2677 2740
2678 self.sbZoom = E5ZoomWidget(UI.PixmapCache.getPixmap("zoomOut.png"), 2741 self.sbZoom = E5ZoomWidget(
2742 UI.PixmapCache.getPixmap("zoomOut.png"),
2679 UI.PixmapCache.getPixmap("zoomIn.png"), 2743 UI.PixmapCache.getPixmap("zoomIn.png"),
2680 UI.PixmapCache.getPixmap("zoomReset.png"), 2744 UI.PixmapCache.getPixmap("zoomReset.png"),
2681 self.__statusBar) 2745 self.__statusBar)
2682 self.__statusBar.addPermanentWidget(self.sbZoom) 2746 self.__statusBar.addPermanentWidget(self.sbZoom)
2683 self.sbZoom.setWhatsThis(self.trUtf8( 2747 self.sbZoom.setWhatsThis(self.trUtf8(
2884 if Preferences.getUser("UseSystemEmailClient"): 2948 if Preferences.getUser("UseSystemEmailClient"):
2885 self.__showSystemEmailClient(mode, attachFile, deleteAttachFile) 2949 self.__showSystemEmailClient(mode, attachFile, deleteAttachFile)
2886 else: 2950 else:
2887 if Preferences.getUser("Email") == "" or \ 2951 if Preferences.getUser("Email") == "" or \
2888 Preferences.getUser("MailServer") == "": 2952 Preferences.getUser("MailServer") == "":
2889 E5MessageBox.critical(self, 2953 E5MessageBox.critical(
2954 self,
2890 self.trUtf8("Report Bug"), 2955 self.trUtf8("Report Bug"),
2891 self.trUtf8( 2956 self.trUtf8(
2892 """Email address or mail server address is empty.""" 2957 """Email address or mail server address is empty."""
2893 """ Please configure your Email settings in the""" 2958 """ Please configure your Email settings in the"""
2894 """ Preferences Dialog.""")) 2959 """ Preferences Dialog."""))
3902 if os.path.exists(tfn): 3967 if os.path.exists(tfn):
3903 prog = tfn 3968 prog = tfn
3904 else: 3969 else:
3905 prog = fn 3970 prog = fn
3906 else: 3971 else:
3907 E5MessageBox.critical(self, 3972 E5MessageBox.critical(
3973 self,
3908 self.trUtf8("Unittest Project"), 3974 self.trUtf8("Unittest Project"),
3909 self.trUtf8("There is no main script defined for the" 3975 self.trUtf8(
3976 "There is no main script defined for the"
3910 " current project. Aborting")) 3977 " current project. Aborting"))
3911 return 3978 return
3912 3979
3913 self.__createUnitTestDialog() 3980 self.__createUnitTestDialog()
3914 self.unittestDialog.insertProg(prog) 3981 self.unittestDialog.insertProg(prog)
3963 version = 3 4030 version = 3
3964 except IOError: 4031 except IOError:
3965 pass 4032 pass
3966 4033
3967 if version == 3: 4034 if version == 3:
3968 E5MessageBox.information(self, 4035 E5MessageBox.information(
4036 self,
3969 self.trUtf8("Qt 3 support"), 4037 self.trUtf8("Qt 3 support"),
3970 self.trUtf8("""Qt v.3 is not supported by eric5.""")) 4038 self.trUtf8("""Qt v.3 is not supported by eric5."""))
3971 return 4039 return
3972 4040
3973 args = [] 4041 args = []
3974 if fn is not None: 4042 if fn is not None:
3975 try: 4043 try:
3976 if os.path.isfile(fn) and os.path.getsize(fn): 4044 if os.path.isfile(fn) and os.path.getsize(fn):
3977 args.append(fn) 4045 args.append(fn)
3978 else: 4046 else:
3979 E5MessageBox.critical(self, 4047 E5MessageBox.critical(
4048 self,
3980 self.trUtf8('Problem'), 4049 self.trUtf8('Problem'),
3981 self.trUtf8('<p>The file <b>{0}</b> does not exist or' 4050 self.trUtf8(
4051 '<p>The file <b>{0}</b> does not exist or'
3982 ' is zero length.</p>') 4052 ' is zero length.</p>')
3983 .format(fn)) 4053 .format(fn))
3984 return 4054 return
3985 except EnvironmentError: 4055 except EnvironmentError:
3986 E5MessageBox.critical(self, 4056 E5MessageBox.critical(
4057 self,
3987 self.trUtf8('Problem'), 4058 self.trUtf8('Problem'),
3988 self.trUtf8('<p>The file <b>{0}</b> does not exist or' 4059 self.trUtf8(
4060 '<p>The file <b>{0}</b> does not exist or'
3989 ' is zero length.</p>') 4061 ' is zero length.</p>')
3990 .format(fn)) 4062 .format(fn))
3991 return 4063 return
3992 4064
3993 if Utilities.isMacPlatform(): 4065 if Utilities.isMacPlatform():
4001 if Utilities.isWindowsPlatform(): 4073 if Utilities.isWindowsPlatform():
4002 designer += '.exe' 4074 designer += '.exe'
4003 4075
4004 proc = QProcess() 4076 proc = QProcess()
4005 if not proc.startDetached(designer, args): 4077 if not proc.startDetached(designer, args):
4006 E5MessageBox.critical(self, 4078 E5MessageBox.critical(
4079 self,
4007 self.trUtf8('Process Generation Error'), 4080 self.trUtf8('Process Generation Error'),
4008 self.trUtf8( 4081 self.trUtf8(
4009 '<p>Could not start Qt-Designer.<br>' 4082 '<p>Could not start Qt-Designer.<br>'
4010 'Ensure that it is available as <b>{0}</b>.</p>' 4083 'Ensure that it is available as <b>{0}</b>.</p>'
4011 ).format(designer)) 4084 ).format(designer))
4022 4095
4023 @param fn filename of the translation file to be opened 4096 @param fn filename of the translation file to be opened
4024 @param version indication for the requested version (Qt 4) (integer) 4097 @param version indication for the requested version (Qt 4) (integer)
4025 """ 4098 """
4026 if version < 4: 4099 if version < 4:
4027 E5MessageBox.information(self, 4100 E5MessageBox.information(
4101 self,
4028 self.trUtf8("Qt 3 support"), 4102 self.trUtf8("Qt 3 support"),
4029 self.trUtf8("""Qt v.3 is not supported by eric5.""")) 4103 self.trUtf8("""Qt v.3 is not supported by eric5."""))
4030 return 4104 return
4031 4105
4032 args = [] 4106 args = []
4035 try: 4109 try:
4036 if os.path.isfile(fn) and os.path.getsize(fn) and \ 4110 if os.path.isfile(fn) and os.path.getsize(fn) and \
4037 fn not in args: 4111 fn not in args:
4038 args.append(fn) 4112 args.append(fn)
4039 else: 4113 else:
4040 E5MessageBox.critical(self, 4114 E5MessageBox.critical(
4115 self,
4041 self.trUtf8('Problem'), 4116 self.trUtf8('Problem'),
4042 self.trUtf8('<p>The file <b>{0}</b> does not exist or' 4117 self.trUtf8(
4118 '<p>The file <b>{0}</b> does not exist or'
4043 ' is zero length.</p>') 4119 ' is zero length.</p>')
4044 .format(fn)) 4120 .format(fn))
4045 return 4121 return
4046 except EnvironmentError: 4122 except EnvironmentError:
4047 E5MessageBox.critical(self, 4123 E5MessageBox.critical(
4124 self,
4048 self.trUtf8('Problem'), 4125 self.trUtf8('Problem'),
4049 self.trUtf8('<p>The file <b>{0}</b> does not exist or' 4126 self.trUtf8(
4127 '<p>The file <b>{0}</b> does not exist or'
4050 ' is zero length.</p>') 4128 ' is zero length.</p>')
4051 .format(fn)) 4129 .format(fn))
4052 return 4130 return
4053 4131
4054 if Utilities.isMacPlatform(): 4132 if Utilities.isMacPlatform():
4062 if Utilities.isWindowsPlatform(): 4140 if Utilities.isWindowsPlatform():
4063 linguist += '.exe' 4141 linguist += '.exe'
4064 4142
4065 proc = QProcess() 4143 proc = QProcess()
4066 if not proc.startDetached(linguist, args): 4144 if not proc.startDetached(linguist, args):
4067 E5MessageBox.critical(self, 4145 E5MessageBox.critical(
4146 self,
4068 self.trUtf8('Process Generation Error'), 4147 self.trUtf8('Process Generation Error'),
4069 self.trUtf8( 4148 self.trUtf8(
4070 '<p>Could not start Qt-Linguist.<br>' 4149 '<p>Could not start Qt-Linguist.<br>'
4071 'Ensure that it is available as <b>{0}</b>.</p>' 4150 'Ensure that it is available as <b>{0}</b>.</p>'
4072 ).format(linguist)) 4151 ).format(linguist))
4085 4164
4086 @param home full pathname of a file to display (string) 4165 @param home full pathname of a file to display (string)
4087 @param version indication for the requested version (Qt 4) (integer) 4166 @param version indication for the requested version (Qt 4) (integer)
4088 """ 4167 """
4089 if version < 4: 4168 if version < 4:
4090 E5MessageBox.information(self, 4169 E5MessageBox.information(
4170 self,
4091 self.trUtf8("Qt 3 support"), 4171 self.trUtf8("Qt 3 support"),
4092 self.trUtf8("""Qt v.3 is not supported by eric5.""")) 4172 self.trUtf8("""Qt v.3 is not supported by eric5."""))
4093 return 4173 return
4094 4174
4095 args = [] 4175 args = []
4109 if Utilities.isWindowsPlatform(): 4189 if Utilities.isWindowsPlatform():
4110 assistant += '.exe' 4190 assistant += '.exe'
4111 4191
4112 proc = QProcess() 4192 proc = QProcess()
4113 if not proc.startDetached(assistant, args): 4193 if not proc.startDetached(assistant, args):
4114 E5MessageBox.critical(self, 4194 E5MessageBox.critical(
4195 self,
4115 self.trUtf8('Process Generation Error'), 4196 self.trUtf8('Process Generation Error'),
4116 self.trUtf8( 4197 self.trUtf8(
4117 '<p>Could not start Qt-Assistant.<br>' 4198 '<p>Could not start Qt-Assistant.<br>'
4118 'Ensure that it is available as <b>{0}</b>.</p>' 4199 'Ensure that it is available as <b>{0}</b>.</p>'
4119 ).format(assistant)) 4200 ).format(assistant))
4136 4217
4137 @param home full pathname of a file to display (string) 4218 @param home full pathname of a file to display (string)
4138 """ 4219 """
4139 customViewer = Preferences.getHelp("CustomViewer") 4220 customViewer = Preferences.getHelp("CustomViewer")
4140 if not customViewer: 4221 if not customViewer:
4141 E5MessageBox.information(self, 4222 E5MessageBox.information(
4223 self,
4142 self.trUtf8("Help"), 4224 self.trUtf8("Help"),
4143 self.trUtf8( 4225 self.trUtf8(
4144 """Currently no custom viewer is selected.""" 4226 """Currently no custom viewer is selected."""
4145 """ Please use the preferences dialog to specify one.""")) 4227 """ Please use the preferences dialog to specify one."""))
4146 return 4228 return
4149 args = [] 4231 args = []
4150 if home: 4232 if home:
4151 args.append(home) 4233 args.append(home)
4152 4234
4153 if not proc.startDetached(customViewer, args): 4235 if not proc.startDetached(customViewer, args):
4154 E5MessageBox.critical(self, 4236 E5MessageBox.critical(
4237 self,
4155 self.trUtf8('Process Generation Error'), 4238 self.trUtf8('Process Generation Error'),
4156 self.trUtf8( 4239 self.trUtf8(
4157 '<p>Could not start custom viewer.<br>' 4240 '<p>Could not start custom viewer.<br>'
4158 'Ensure that it is available as <b>{0}</b>.</p>' 4241 'Ensure that it is available as <b>{0}</b>.</p>'
4159 ).format(customViewer)) 4242 ).format(customViewer))
4168 proc = QProcess() 4251 proc = QProcess()
4169 args = [] 4252 args = []
4170 args.append(home) 4253 args.append(home)
4171 4254
4172 if not proc.startDetached("hh", args): 4255 if not proc.startDetached("hh", args):
4173 E5MessageBox.critical(self, 4256 E5MessageBox.critical(
4257 self,
4174 self.trUtf8('Process Generation Error'), 4258 self.trUtf8('Process Generation Error'),
4175 self.trUtf8( 4259 self.trUtf8(
4176 '<p>Could not start the help viewer.<br>' 4260 '<p>Could not start the help viewer.<br>'
4177 'Ensure that it is available as <b>hh</b>.</p>' 4261 'Ensure that it is available as <b>hh</b>.</p>'
4178 )) 4262 ))
4193 if fn is not None: 4277 if fn is not None:
4194 try: 4278 try:
4195 if os.path.isfile(fn) and os.path.getsize(fn): 4279 if os.path.isfile(fn) and os.path.getsize(fn):
4196 args.append(fn) 4280 args.append(fn)
4197 else: 4281 else:
4198 E5MessageBox.critical(self, 4282 E5MessageBox.critical(
4283 self,
4199 self.trUtf8('Problem'), 4284 self.trUtf8('Problem'),
4200 self.trUtf8('<p>The file <b>{0}</b> does not exist or' 4285 self.trUtf8(
4286 '<p>The file <b>{0}</b> does not exist or'
4201 ' is zero length.</p>') 4287 ' is zero length.</p>')
4202 .format(fn)) 4288 .format(fn))
4203 return 4289 return
4204 except EnvironmentError: 4290 except EnvironmentError:
4205 E5MessageBox.critical(self, 4291 E5MessageBox.critical(
4292 self,
4206 self.trUtf8('Problem'), 4293 self.trUtf8('Problem'),
4207 self.trUtf8('<p>The file <b>{0}</b> does not exist or' 4294 self.trUtf8(
4295 '<p>The file <b>{0}</b> does not exist or'
4208 ' is zero length.</p>') 4296 ' is zero length.</p>')
4209 .format(fn)) 4297 .format(fn))
4210 return 4298 return
4211 4299
4212 if not os.path.isfile(viewer) or \ 4300 if not os.path.isfile(viewer) or \
4240 try: 4328 try:
4241 if os.path.isfile(fn) and os.path.getsize(fn): 4329 if os.path.isfile(fn) and os.path.getsize(fn):
4242 args.append(fn) 4330 args.append(fn)
4243 else: 4331 else:
4244 if not ignore: 4332 if not ignore:
4245 E5MessageBox.critical(self, 4333 E5MessageBox.critical(
4334 self,
4246 self.trUtf8('Problem'), 4335 self.trUtf8('Problem'),
4247 self.trUtf8( 4336 self.trUtf8(
4248 '<p>The file <b>{0}</b> does not exist or' 4337 '<p>The file <b>{0}</b> does not exist or'
4249 ' is zero length.</p>') 4338 ' is zero length.</p>')
4250 .format(fn)) 4339 .format(fn))
4251 return 4340 return
4252 except EnvironmentError: 4341 except EnvironmentError:
4253 if not ignore: 4342 if not ignore:
4254 E5MessageBox.critical(self, 4343 E5MessageBox.critical(
4344 self,
4255 self.trUtf8('Problem'), 4345 self.trUtf8('Problem'),
4256 self.trUtf8( 4346 self.trUtf8(
4257 '<p>The file <b>{0}</b> does not exist or' 4347 '<p>The file <b>{0}</b> does not exist or'
4258 ' is zero length.</p>') 4348 ' is zero length.</p>')
4259 .format(fn)) 4349 .format(fn))
4417 if aw is not None: 4507 if aw is not None:
4418 aw.beginUndoAction() 4508 aw.beginUndoAction()
4419 4509
4420 proc.start(program, args) 4510 proc.start(program, args)
4421 if not proc.waitForStarted(): 4511 if not proc.waitForStarted():
4422 E5MessageBox.critical(self, 4512 E5MessageBox.critical(
4513 self,
4423 self.trUtf8('Process Generation Error'), 4514 self.trUtf8('Process Generation Error'),
4424 self.trUtf8( 4515 self.trUtf8(
4425 '<p>Could not start the tool entry <b>{0}</b>.<br>' 4516 '<p>Could not start the tool entry <b>{0}</b>.<br>'
4426 'Ensure that it is available as <b>{1}</b>.</p>')\ 4517 'Ensure that it is available as <b>{1}</b>.</p>')\
4427 .format(tool['menutext'], tool['executable'])) 4518 .format(tool['menutext'], tool['executable']))
4502 Private slot to show the Python 3 documentation. 4593 Private slot to show the Python 3 documentation.
4503 """ 4594 """
4504 pythonDocDir = Preferences.getHelp("PythonDocDir") 4595 pythonDocDir = Preferences.getHelp("PythonDocDir")
4505 if not pythonDocDir: 4596 if not pythonDocDir:
4506 if Utilities.isWindowsPlatform(): 4597 if Utilities.isWindowsPlatform():
4507 pythonDocDir = Utilities.getEnvironmentEntry("PYTHON3DOCDIR", 4598 pythonDocDir = Utilities.getEnvironmentEntry(
4599 "PYTHON3DOCDIR",
4508 os.path.join(os.path.dirname(sys.executable), "doc")) 4600 os.path.join(os.path.dirname(sys.executable), "doc"))
4509 else: 4601 else:
4510 pythonDocDir = Utilities.getEnvironmentEntry("PYTHON3DOCDIR", 4602 pythonDocDir = Utilities.getEnvironmentEntry(
4603 "PYTHON3DOCDIR",
4511 '/usr/share/doc/packages/python/html') 4604 '/usr/share/doc/packages/python/html')
4512 if not pythonDocDir.startswith("http://") and \ 4605 if not pythonDocDir.startswith("http://") and \
4513 not pythonDocDir.startswith("https://"): 4606 not pythonDocDir.startswith("https://"):
4514 if pythonDocDir.startswith("file://"): 4607 if pythonDocDir.startswith("file://"):
4515 pythonDocDir = pythonDocDir[7:] 4608 pythonDocDir = pythonDocDir[7:]
4524 pythonDocDir, "python{0}.chm".format(vers)) 4617 pythonDocDir, "python{0}.chm".format(vers))
4525 else: 4618 else:
4526 home = pythonDocDir 4619 home = pythonDocDir
4527 4620
4528 if not os.path.exists(home): 4621 if not os.path.exists(home):
4529 E5MessageBox.warning(self, 4622 E5MessageBox.warning(
4623 self,
4530 self.trUtf8("Documentation Missing"), 4624 self.trUtf8("Documentation Missing"),
4531 self.trUtf8("""<p>The documentation starting point""" 4625 self.trUtf8("""<p>The documentation starting point"""
4532 """ "<b>{0}</b>" could not be found.</p>""")\ 4626 """ "<b>{0}</b>" could not be found.</p>""")\
4533 .format(home)) 4627 .format(home))
4534 return 4628 return
4567 else: 4661 else:
4568 default = "" 4662 default = ""
4569 pythonDocDir = \ 4663 pythonDocDir = \
4570 Utilities.getEnvironmentEntry("PYTHON2DOCDIR", default) 4664 Utilities.getEnvironmentEntry("PYTHON2DOCDIR", default)
4571 else: 4665 else:
4572 pythonDocDir = Utilities.getEnvironmentEntry("PYTHON2DOCDIR", 4666 pythonDocDir = Utilities.getEnvironmentEntry(
4667 "PYTHON2DOCDIR",
4573 '/usr/share/doc/packages/python/html/python-docs-html') 4668 '/usr/share/doc/packages/python/html/python-docs-html')
4574 if not pythonDocDir.startswith("http://") and \ 4669 if not pythonDocDir.startswith("http://") and \
4575 not pythonDocDir.startswith("https://"): 4670 not pythonDocDir.startswith("https://"):
4576 if pythonDocDir.startswith("file://"): 4671 if pythonDocDir.startswith("file://"):
4577 pythonDocDir = pythonDocDir[7:] 4672 pythonDocDir = pythonDocDir[7:]
4579 home = Utilities.normjoinpath(pythonDocDir, 'index.html') 4674 home = Utilities.normjoinpath(pythonDocDir, 'index.html')
4580 else: 4675 else:
4581 home = pythonDocDir 4676 home = pythonDocDir
4582 4677
4583 if not os.path.exists(home): 4678 if not os.path.exists(home):
4584 E5MessageBox.warning(self, 4679 E5MessageBox.warning(
4680 self,
4585 self.trUtf8("Documentation Missing"), 4681 self.trUtf8("Documentation Missing"),
4586 self.trUtf8("""<p>The documentation starting point""" 4682 self.trUtf8("""<p>The documentation starting point"""
4587 """ "<b>{0}</b>" could not be found.</p>""")\ 4683 """ "<b>{0}</b>" could not be found.</p>""")\
4588 .format(home)) 4684 .format(home))
4589 return 4685 return
4647 home = Utilities.normjoinpath(qtDocDir, 'index.html') 4743 home = Utilities.normjoinpath(qtDocDir, 'index.html')
4648 else: 4744 else:
4649 home = qtDocDir 4745 home = qtDocDir
4650 4746
4651 if not os.path.exists(home): 4747 if not os.path.exists(home):
4652 E5MessageBox.warning(self, 4748 E5MessageBox.warning(
4749 self,
4653 self.trUtf8("Documentation Missing"), 4750 self.trUtf8("Documentation Missing"),
4654 self.trUtf8("""<p>The documentation starting point""" 4751 self.trUtf8("""<p>The documentation starting point"""
4655 """ "<b>{0}</b>" could not be found.</p>""")\ 4752 """ "<b>{0}</b>" could not be found.</p>""")\
4656 .format(home)) 4753 .format(home))
4657 return 4754 return
4678 pyqt4DocDir = Preferences.getHelp("PyQt4DocDir") 4775 pyqt4DocDir = Preferences.getHelp("PyQt4DocDir")
4679 if not pyqt4DocDir: 4776 if not pyqt4DocDir:
4680 pyqt4DocDir = Utilities.getEnvironmentEntry("PYQT4DOCDIR", None) 4777 pyqt4DocDir = Utilities.getEnvironmentEntry("PYQT4DOCDIR", None)
4681 4778
4682 if not pyqt4DocDir: 4779 if not pyqt4DocDir:
4683 E5MessageBox.warning(self, 4780 E5MessageBox.warning(
4781 self,
4684 self.trUtf8("Documentation"), 4782 self.trUtf8("Documentation"),
4685 self.trUtf8("""<p>The PyQt4 documentation starting point""" 4783 self.trUtf8("""<p>The PyQt4 documentation starting point"""
4686 """ has not been configured.</p>""")) 4784 """ has not been configured.</p>"""))
4687 return 4785 return
4688 4786
4703 break 4801 break
4704 else: 4802 else:
4705 home = pyqt4DocDir 4803 home = pyqt4DocDir
4706 4804
4707 if not home or not os.path.exists(home): 4805 if not home or not os.path.exists(home):
4708 E5MessageBox.warning(self, 4806 E5MessageBox.warning(
4807 self,
4709 self.trUtf8("Documentation Missing"), 4808 self.trUtf8("Documentation Missing"),
4710 self.trUtf8("""<p>The documentation starting point""" 4809 self.trUtf8("""<p>The documentation starting point"""
4711 """ "<b>{0}</b>" could not be found.</p>""")\ 4810 """ "<b>{0}</b>" could not be found.</p>""")\
4712 .format(home)) 4811 .format(home))
4713 return 4812 return
4736 pyqt5DocDir = Preferences.getHelp("PyQt5DocDir") 4835 pyqt5DocDir = Preferences.getHelp("PyQt5DocDir")
4737 if not pyqt5DocDir: 4836 if not pyqt5DocDir:
4738 pyqt5DocDir = Utilities.getEnvironmentEntry("PYQT5DOCDIR", None) 4837 pyqt5DocDir = Utilities.getEnvironmentEntry("PYQT5DOCDIR", None)
4739 4838
4740 if not pyqt5DocDir: 4839 if not pyqt5DocDir:
4741 E5MessageBox.warning(self, 4840 E5MessageBox.warning(
4841 self,
4742 self.trUtf8("Documentation"), 4842 self.trUtf8("Documentation"),
4743 self.trUtf8("""<p>The PyQt5 documentation starting point""" 4843 self.trUtf8("""<p>The PyQt5 documentation starting point"""
4744 """ has not been configured.</p>""")) 4844 """ has not been configured.</p>"""))
4745 return 4845 return
4746 4846
4763 break 4863 break
4764 else: 4864 else:
4765 home = pyqt5DocDir 4865 home = pyqt5DocDir
4766 4866
4767 if not home or not os.path.exists(home): 4867 if not home or not os.path.exists(home):
4768 E5MessageBox.warning(self, 4868 E5MessageBox.warning(
4869 self,
4769 self.trUtf8("Documentation Missing"), 4870 self.trUtf8("Documentation Missing"),
4770 self.trUtf8("""<p>The documentation starting point""" 4871 self.trUtf8("""<p>The documentation starting point"""
4771 """ "<b>{0}</b>" could not be found.</p>""")\ 4872 """ "<b>{0}</b>" could not be found.</p>""")\
4772 .format(home)) 4873 .format(home))
4773 return 4874 return
4791 4892
4792 def __showEricDoc(self): 4893 def __showEricDoc(self):
4793 """ 4894 """
4794 Private slot to show the Eric documentation. 4895 Private slot to show the Eric documentation.
4795 """ 4896 """
4796 home = Utilities.normjoinpath(getConfig('ericDocDir'), 4897 home = Utilities.normjoinpath(
4797 "Source", "index.html") 4898 getConfig('ericDocDir'), "Source", "index.html")
4798 4899
4799 if not home.startswith("http://") and \ 4900 if not home.startswith("http://") and \
4800 not home.startswith("https://") and \ 4901 not home.startswith("https://") and \
4801 not home.startswith("qthelp://"): 4902 not home.startswith("qthelp://"):
4802 if not os.path.exists(home): 4903 if not os.path.exists(home):
4803 E5MessageBox.warning(self, 4904 E5MessageBox.warning(
4905 self,
4804 self.trUtf8("Documentation Missing"), 4906 self.trUtf8("Documentation Missing"),
4805 self.trUtf8("""<p>The documentation starting point""" 4907 self.trUtf8("""<p>The documentation starting point"""
4806 """ "<b>{0}</b>" could not be found.</p>""")\ 4908 """ "<b>{0}</b>" could not be found.</p>""")\
4807 .format(home)) 4909 .format(home))
4808 return 4910 return
4829 pysideDocDir = Preferences.getHelp("PySideDocDir") 4931 pysideDocDir = Preferences.getHelp("PySideDocDir")
4830 if not pysideDocDir: 4932 if not pysideDocDir:
4831 pysideDocDir = Utilities.getEnvironmentEntry("PYSIDEDOCDIR", None) 4933 pysideDocDir = Utilities.getEnvironmentEntry("PYSIDEDOCDIR", None)
4832 4934
4833 if not pysideDocDir: 4935 if not pysideDocDir:
4834 E5MessageBox.warning(self, 4936 E5MessageBox.warning(
4937 self,
4835 self.trUtf8("Documentation"), 4938 self.trUtf8("Documentation"),
4836 self.trUtf8("""<p>The PySide documentation starting point""" 4939 self.trUtf8("""<p>The PySide documentation starting point"""
4837 """ has not been configured.</p>""")) 4940 """ has not been configured.</p>"""))
4838 return 4941 return
4839 4942
4844 if not os.path.splitext(pysideDocDir)[1]: 4947 if not os.path.splitext(pysideDocDir)[1]:
4845 home = Utilities.normjoinpath(pysideDocDir, 'index.html') 4948 home = Utilities.normjoinpath(pysideDocDir, 'index.html')
4846 else: 4949 else:
4847 home = pysideDocDir 4950 home = pysideDocDir
4848 if not os.path.exists(home): 4951 if not os.path.exists(home):
4849 E5MessageBox.warning(self, 4952 E5MessageBox.warning(
4953 self,
4850 self.trUtf8("Documentation Missing"), 4954 self.trUtf8("Documentation Missing"),
4851 self.trUtf8("""<p>The documentation starting point""" 4955 self.trUtf8("""<p>The documentation starting point"""
4852 """ "<b>{0}</b>" could not be found.</p>""")\ 4956 """ "<b>{0}</b>" could not be found.</p>""")\
4853 .format(home)) 4957 .format(home))
4854 return 4958 return
4936 5040
4937 @param home full pathname of a file to display (string) 5041 @param home full pathname of a file to display (string)
4938 """ 5042 """
4939 started = QDesktopServices.openUrl(QUrl(home)) 5043 started = QDesktopServices.openUrl(QUrl(home))
4940 if not started: 5044 if not started:
4941 E5MessageBox.critical(self, 5045 E5MessageBox.critical(
5046 self,
4942 self.trUtf8('Open Browser'), 5047 self.trUtf8('Open Browser'),
4943 self.trUtf8('Could not start a web browser')) 5048 self.trUtf8('Could not start a web browser'))
4944 5049
4945 def getHelpViewer(self, preview=False): 5050 def getHelpViewer(self, preview=False):
4946 """ 5051 """
5073 def __configViewProfiles(self): 5178 def __configViewProfiles(self):
5074 """ 5179 """
5075 Private slot to configure the various view profiles. 5180 Private slot to configure the various view profiles.
5076 """ 5181 """
5077 from Preferences.ViewProfileDialog import ViewProfileDialog 5182 from Preferences.ViewProfileDialog import ViewProfileDialog
5078 dlg = ViewProfileDialog(self.layout, 5183 dlg = ViewProfileDialog(
5079 self.profiles['edit'][1], self.profiles['debug'][1]) 5184 self.layout, self.profiles['edit'][1], self.profiles['debug'][1])
5080 if dlg.exec_() == QDialog.Accepted: 5185 if dlg.exec_() == QDialog.Accepted:
5081 edit, debug = dlg.getVisibilities() 5186 edit, debug = dlg.getVisibilities()
5082 self.profiles['edit'][1] = edit 5187 self.profiles['edit'][1] = edit
5083 self.profiles['debug'][1] = debug 5188 self.profiles['debug'][1] = debug
5084 Preferences.setUI("ViewProfiles2", self.profiles) 5189 Preferences.setUI("ViewProfiles2", self.profiles)
5268 """ 5373 """
5269 fn = os.path.join(Utilities.getConfigDir(), "eric5tasks.e4t") 5374 fn = os.path.join(Utilities.getConfigDir(), "eric5tasks.e4t")
5270 f = QFile(fn) 5375 f = QFile(fn)
5271 ok = f.open(QIODevice.WriteOnly) 5376 ok = f.open(QIODevice.WriteOnly)
5272 if not ok: 5377 if not ok:
5273 E5MessageBox.critical(self, 5378 E5MessageBox.critical(
5379 self,
5274 self.trUtf8("Save tasks"), 5380 self.trUtf8("Save tasks"),
5275 self.trUtf8( 5381 self.trUtf8(
5276 "<p>The tasks file <b>{0}</b> could not be written.</p>") 5382 "<p>The tasks file <b>{0}</b> could not be written.</p>")
5277 .format(fn)) 5383 .format(fn))
5278 return 5384 return
5293 from E5XML.TasksReader import TasksReader 5399 from E5XML.TasksReader import TasksReader
5294 reader = TasksReader(f, viewer=self.taskViewer) 5400 reader = TasksReader(f, viewer=self.taskViewer)
5295 reader.readXML() 5401 reader.readXML()
5296 f.close() 5402 f.close()
5297 else: 5403 else:
5298 E5MessageBox.critical(self, 5404 E5MessageBox.critical(
5405 self,
5299 self.trUtf8("Read tasks"), 5406 self.trUtf8("Read tasks"),
5300 self.trUtf8( 5407 self.trUtf8(
5301 "<p>The tasks file <b>{0}</b> could not be read.</p>") 5408 "<p>The tasks file <b>{0}</b> could not be read.</p>")
5302 .format(fn)) 5409 .format(fn))
5303 5410
5310 if f.open(QIODevice.WriteOnly): 5417 if f.open(QIODevice.WriteOnly):
5311 from E5XML.SessionWriter import SessionWriter 5418 from E5XML.SessionWriter import SessionWriter
5312 SessionWriter(f, None).writeXML() 5419 SessionWriter(f, None).writeXML()
5313 f.close() 5420 f.close()
5314 else: 5421 else:
5315 E5MessageBox.critical(self, 5422 E5MessageBox.critical(
5423 self,
5316 self.trUtf8("Save session"), 5424 self.trUtf8("Save session"),
5317 self.trUtf8( 5425 self.trUtf8(
5318 "<p>The session file <b>{0}</b> could not be written.</p>") 5426 "<p>The session file <b>{0}</b> could not be written.</p>")
5319 .format(fn)) 5427 .format(fn))
5320 5428
5322 """ 5430 """
5323 Private slot to read in the session file (.e4s). 5431 Private slot to read in the session file (.e4s).
5324 """ 5432 """
5325 fn = os.path.join(Utilities.getConfigDir(), "eric5session.e4s") 5433 fn = os.path.join(Utilities.getConfigDir(), "eric5session.e4s")
5326 if not os.path.exists(fn): 5434 if not os.path.exists(fn):
5327 E5MessageBox.critical(self, 5435 E5MessageBox.critical(
5436 self,
5328 self.trUtf8("Read session"), 5437 self.trUtf8("Read session"),
5329 self.trUtf8( 5438 self.trUtf8(
5330 "<p>The session file <b>{0}</b> could not be read.</p>")\ 5439 "<p>The session file <b>{0}</b> could not be read.</p>")\
5331 .format(fn)) 5440 .format(fn))
5332 return 5441 return
5336 from E5XML.SessionReader import SessionReader 5445 from E5XML.SessionReader import SessionReader
5337 reader = SessionReader(f, True) 5446 reader = SessionReader(f, True)
5338 reader.readXML() 5447 reader.readXML()
5339 f.close() 5448 f.close()
5340 else: 5449 else:
5341 E5MessageBox.critical(self, 5450 E5MessageBox.critical(
5451 self,
5342 self.trUtf8("Read session"), 5452 self.trUtf8("Read session"),
5343 self.trUtf8( 5453 self.trUtf8(
5344 "<p>The session file <b>{0}</b> could not be read.</p>")\ 5454 "<p>The session file <b>{0}</b> could not be read.</p>")\
5345 .format(fn)) 5455 .format(fn))
5346 5456
5518 fname = url.toLocalFile() 5628 fname = url.toLocalFile()
5519 if fname: 5629 if fname:
5520 if QFileInfo(fname).isFile(): 5630 if QFileInfo(fname).isFile():
5521 self.viewmanager.openSourceFile(fname) 5631 self.viewmanager.openSourceFile(fname)
5522 else: 5632 else:
5523 E5MessageBox.information(self, 5633 E5MessageBox.information(
5634 self,
5524 self.trUtf8("Drop Error"), 5635 self.trUtf8("Drop Error"),
5525 self.trUtf8("""<p><b>{0}</b> is not a file.</p>""") 5636 self.trUtf8("""<p><b>{0}</b> is not a file.</p>""")
5526 .format(fname)) 5637 .format(fname))
5527 5638
5528 self.inDragDrop = False 5639 self.inDragDrop = False
5708 "Updates/FirstFailedCheckDate", QDate.currentDate()) 5819 "Updates/FirstFailedCheckDate", QDate.currentDate())
5709 failedDuration = firstFailure.daysTo(QDate.currentDate()) 5820 failedDuration = firstFailure.daysTo(QDate.currentDate())
5710 Preferences.Prefs.settings.setValue( 5821 Preferences.Prefs.settings.setValue(
5711 "Updates/FirstFailedCheckDate", firstFailure) 5822 "Updates/FirstFailedCheckDate", firstFailure)
5712 if self.manualUpdatesCheck: 5823 if self.manualUpdatesCheck:
5713 E5MessageBox.warning(self, 5824 E5MessageBox.warning(
5825 self,
5714 self.trUtf8("Error getting versions information"), 5826 self.trUtf8("Error getting versions information"),
5715 self.trUtf8("""The versions information could not be""" 5827 self.trUtf8("""The versions information could not be"""
5716 """ downloaded.""" 5828 """ downloaded."""
5717 """ Please go online and try again.""")) 5829 """ Please go online and try again."""))
5718 elif failedDuration > 7: 5830 elif failedDuration > 7:
5719 E5MessageBox.warning(self, 5831 E5MessageBox.warning(
5832 self,
5720 self.trUtf8("Error getting versions information"), 5833 self.trUtf8("Error getting versions information"),
5721 self.trUtf8("""The versions information could not be""" 5834 self.trUtf8("""The versions information could not be"""
5722 """ downloaded for the last 7 days.""" 5835 """ downloaded for the last 7 days."""
5723 """ Please go online and try again.""")) 5836 """ Please go online and try again."""))
5724 return 5837 return
5819 self.trUtf8("Eric5 is up to date"), 5932 self.trUtf8("Eric5 is up to date"),
5820 self.trUtf8( 5933 self.trUtf8(
5821 """You are using the latest version of""" 5934 """You are using the latest version of"""
5822 """ eric5""")) 5935 """ eric5"""))
5823 except IndexError: 5936 except IndexError:
5824 E5MessageBox.warning(self, 5937 E5MessageBox.warning(
5938 self,
5825 self.trUtf8("Error during updates check"), 5939 self.trUtf8("Error during updates check"),
5826 self.trUtf8("""Could not perform updates check.""")) 5940 self.trUtf8("""Could not perform updates check."""))
5827 5941
5828 if url: 5942 if url:
5829 QDesktopServices.openUrl(QUrl(url)) 5943 QDesktopServices.openUrl(QUrl(url))
5882 the configuration dialog is shown. 5996 the configuration dialog is shown.
5883 """ 5997 """
5884 if not Preferences.isConfigured(): 5998 if not Preferences.isConfigured():
5885 self.__initDebugToolbarsLayout() 5999 self.__initDebugToolbarsLayout()
5886 6000
5887 E5MessageBox.information(self, 6001 E5MessageBox.information(
6002 self,
5888 self.trUtf8("First time usage"), 6003 self.trUtf8("First time usage"),
5889 self.trUtf8("""eric5 has not been configured yet. """ 6004 self.trUtf8("""eric5 has not been configured yet. """
5890 """The configuration dialog will be started.""")) 6005 """The configuration dialog will be started."""))
5891 self.showPreferences() 6006 self.showPreferences()
5892 6007

eric ide

mercurial