3189:9a21c547de5f | 3190:a9a94491c4fd |
---|---|
201 self.project = Project(self) | 201 self.project = Project(self) |
202 | 202 |
203 from MultiProject.MultiProject import MultiProject | 203 from MultiProject.MultiProject import MultiProject |
204 self.multiProject = MultiProject(self.project, self) | 204 self.multiProject = MultiProject(self.project, self) |
205 | 205 |
206 splash.showMessage(self.trUtf8("Initializing Plugin Manager...")) | 206 splash.showMessage(self.tr("Initializing Plugin Manager...")) |
207 | 207 |
208 # Initialize the Plugin Manager (Plugins are initialized later | 208 # Initialize the Plugin Manager (Plugins are initialized later |
209 from PluginManager.PluginManager import PluginManager | 209 from PluginManager.PluginManager import PluginManager |
210 self.pluginManager = PluginManager(self, develPlugin=plugin) | 210 self.pluginManager = PluginManager(self, develPlugin=plugin) |
211 | 211 |
212 splash.showMessage(self.trUtf8("Generating Main User Interface...")) | 212 splash.showMessage(self.tr("Generating Main User Interface...")) |
213 | 213 |
214 # Create the main window now so that we can connect QActions to it. | 214 # Create the main window now so that we can connect QActions to it. |
215 logging.debug("Creating Layout...") | 215 logging.debug("Creating Layout...") |
216 self.__createLayout(debugServer) | 216 self.__createLayout(debugServer) |
217 self.__currentRightWidget = None | 217 self.__currentRightWidget = None |
239 self.findFilesDialog = None | 239 self.findFilesDialog = None |
240 self.replaceFilesDialog = None | 240 self.replaceFilesDialog = None |
241 self.__notification = None | 241 self.__notification = None |
242 | 242 |
243 # now setup the connections | 243 # now setup the connections |
244 splash.showMessage(self.trUtf8("Setting up connections...")) | 244 splash.showMessage(self.tr("Setting up connections...")) |
245 self.browser.sourceFile[str].connect( | 245 self.browser.sourceFile[str].connect( |
246 self.viewmanager.openSourceFile) | 246 self.viewmanager.openSourceFile) |
247 self.browser.sourceFile[str, int].connect( | 247 self.browser.sourceFile[str, int].connect( |
248 self.viewmanager.openSourceFile) | 248 self.viewmanager.openSourceFile) |
249 self.browser.sourceFile[str, int, str].connect( | 249 self.browser.sourceFile[str, int, str].connect( |
427 # create the toolbar manager object | 427 # create the toolbar manager object |
428 self.toolbarManager = E5ToolBarManager(self, self) | 428 self.toolbarManager = E5ToolBarManager(self, self) |
429 self.toolbarManager.setMainWindow(self) | 429 self.toolbarManager.setMainWindow(self) |
430 | 430 |
431 # Initialize the tool groups and list of started tools | 431 # Initialize the tool groups and list of started tools |
432 splash.showMessage(self.trUtf8("Initializing Tools...")) | 432 splash.showMessage(self.tr("Initializing Tools...")) |
433 self.toolGroups, self.currentToolGroup = Preferences.readToolGroups() | 433 self.toolGroups, self.currentToolGroup = Preferences.readToolGroups() |
434 self.toolProcs = [] | 434 self.toolProcs = [] |
435 self.__initExternalToolsActions() | 435 self.__initExternalToolsActions() |
436 | 436 |
437 # create a dummy help window for shortcuts handling | 437 # create a dummy help window for shortcuts handling |
438 from Helpviewer.HelpWindow import HelpWindow | 438 from Helpviewer.HelpWindow import HelpWindow |
439 self.dummyHelpViewer = \ | 439 self.dummyHelpViewer = \ |
440 HelpWindow(None, '.', None, 'help viewer', True, True) | 440 HelpWindow(None, '.', None, 'help viewer', True, True) |
441 | 441 |
442 # register all relevant objects | 442 # register all relevant objects |
443 splash.showMessage(self.trUtf8("Registering Objects...")) | 443 splash.showMessage(self.tr("Registering Objects...")) |
444 e5App().registerObject("UserInterface", self) | 444 e5App().registerObject("UserInterface", self) |
445 e5App().registerObject("DebugUI", self.debuggerUI) | 445 e5App().registerObject("DebugUI", self.debuggerUI) |
446 e5App().registerObject("DebugServer", debugServer) | 446 e5App().registerObject("DebugServer", debugServer) |
447 e5App().registerObject("ViewManager", self.viewmanager) | 447 e5App().registerObject("ViewManager", self.viewmanager) |
448 e5App().registerObject("Project", self.project) | 448 e5App().registerObject("Project", self.project) |
458 e5App().registerObject("IRC", self.irc) | 458 e5App().registerObject("IRC", self.irc) |
459 e5App().registerObject("Symbols", self.symbolsViewer) | 459 e5App().registerObject("Symbols", self.symbolsViewer) |
460 e5App().registerObject("Numbers", self.numbersViewer) | 460 e5App().registerObject("Numbers", self.numbersViewer) |
461 | 461 |
462 # Initialize the actions, menus, toolbars and statusbar | 462 # Initialize the actions, menus, toolbars and statusbar |
463 splash.showMessage(self.trUtf8("Initializing Actions...")) | 463 splash.showMessage(self.tr("Initializing Actions...")) |
464 self.__initActions() | 464 self.__initActions() |
465 splash.showMessage(self.trUtf8("Initializing Menus...")) | 465 splash.showMessage(self.tr("Initializing Menus...")) |
466 self.__initMenus() | 466 self.__initMenus() |
467 splash.showMessage(self.trUtf8("Initializing Toolbars...")) | 467 splash.showMessage(self.tr("Initializing Toolbars...")) |
468 self.__initToolbars() | 468 self.__initToolbars() |
469 splash.showMessage(self.trUtf8("Initializing Statusbar...")) | 469 splash.showMessage(self.tr("Initializing Statusbar...")) |
470 self.__initStatusbar() | 470 self.__initStatusbar() |
471 | 471 |
472 # connect the appFocusChanged signal after all actions are ready | 472 # connect the appFocusChanged signal after all actions are ready |
473 app.focusChanged.connect(self.viewmanager.appFocusChanged) | 473 app.focusChanged.connect(self.viewmanager.appFocusChanged) |
474 | 474 |
492 ## sys.stderr = self.stderr | 492 ## sys.stderr = self.stderr |
493 | 493 |
494 # now fire up the single application server | 494 # now fire up the single application server |
495 if Preferences.getUI("SingleApplicationMode"): | 495 if Preferences.getUI("SingleApplicationMode"): |
496 splash.showMessage( | 496 splash.showMessage( |
497 self.trUtf8("Initializing Single Application Server...")) | 497 self.tr("Initializing Single Application Server...")) |
498 self.SAServer = E5SingleApplicationServer() | 498 self.SAServer = E5SingleApplicationServer() |
499 else: | 499 else: |
500 self.SAServer = None | 500 self.SAServer = None |
501 | 501 |
502 # now finalize the plugin manager setup | 502 # now finalize the plugin manager setup |
503 self.pluginManager.finalizeSetup() | 503 self.pluginManager.finalizeSetup() |
504 # now activate plugins having autoload set to True | 504 # now activate plugins having autoload set to True |
505 splash.showMessage(self.trUtf8("Activating Plugins...")) | 505 splash.showMessage(self.tr("Activating Plugins...")) |
506 self.pluginManager.activatePlugins() | 506 self.pluginManager.activatePlugins() |
507 | 507 |
508 # now read the keyboard shortcuts for all the actions | 508 # now read the keyboard shortcuts for all the actions |
509 from Preferences import Shortcuts | 509 from Preferences import Shortcuts |
510 Shortcuts.readShortcuts() | 510 Shortcuts.readShortcuts() |
511 | 511 |
512 # restore toolbar manager state | 512 # restore toolbar manager state |
513 splash.showMessage(self.trUtf8("Restoring Toolbarmanager...")) | 513 splash.showMessage(self.tr("Restoring Toolbarmanager...")) |
514 self.toolbarManager.restoreState( | 514 self.toolbarManager.restoreState( |
515 Preferences.getUI("ToolbarManagerState")) | 515 Preferences.getUI("ToolbarManagerState")) |
516 | 516 |
517 # now activate the initial view profile | 517 # now activate the initial view profile |
518 splash.showMessage(self.trUtf8("Setting View Profile...")) | 518 splash.showMessage(self.tr("Setting View Profile...")) |
519 self.__setEditProfile() | 519 self.__setEditProfile() |
520 | 520 |
521 # now read the saved tasks | 521 # now read the saved tasks |
522 splash.showMessage(self.trUtf8("Reading Tasks...")) | 522 splash.showMessage(self.tr("Reading Tasks...")) |
523 self.__readTasks() | 523 self.__readTasks() |
524 | 524 |
525 # now read the saved templates | 525 # now read the saved templates |
526 splash.showMessage(self.trUtf8("Reading Templates...")) | 526 splash.showMessage(self.tr("Reading Templates...")) |
527 self.templateViewer.readTemplates() | 527 self.templateViewer.readTemplates() |
528 | 528 |
529 # now start the debug client | 529 # now start the debug client |
530 splash.showMessage(self.trUtf8("Starting Debugger...")) | 530 splash.showMessage(self.tr("Starting Debugger...")) |
531 debugServer.startClient(False) | 531 debugServer.startClient(False) |
532 | 532 |
533 # attributes for the network objects | 533 # attributes for the network objects |
534 self.__networkManager = QNetworkAccessManager(self) | 534 self.__networkManager = QNetworkAccessManager(self) |
535 self.__networkManager.proxyAuthenticationRequired.connect( | 535 self.__networkManager.proxyAuthenticationRequired.connect( |
615 | 615 |
616 # Create the left toolbox | 616 # Create the left toolbox |
617 self.lToolboxDock = self.__createDockWindow("lToolboxDock") | 617 self.lToolboxDock = self.__createDockWindow("lToolboxDock") |
618 self.lToolbox = E5VerticalToolBox(self.lToolboxDock) | 618 self.lToolbox = E5VerticalToolBox(self.lToolboxDock) |
619 self.__setupDockWindow(self.lToolboxDock, Qt.LeftDockWidgetArea, | 619 self.__setupDockWindow(self.lToolboxDock, Qt.LeftDockWidgetArea, |
620 self.lToolbox, self.trUtf8("Left Toolbox")) | 620 self.lToolbox, self.tr("Left Toolbox")) |
621 | 621 |
622 # Create the horizontal toolbox | 622 # Create the horizontal toolbox |
623 self.hToolboxDock = self.__createDockWindow("hToolboxDock") | 623 self.hToolboxDock = self.__createDockWindow("hToolboxDock") |
624 self.hToolbox = E5HorizontalToolBox(self.hToolboxDock) | 624 self.hToolbox = E5HorizontalToolBox(self.hToolboxDock) |
625 self.__setupDockWindow(self.hToolboxDock, Qt.BottomDockWidgetArea, | 625 self.__setupDockWindow(self.hToolboxDock, Qt.BottomDockWidgetArea, |
626 self.hToolbox, | 626 self.hToolbox, |
627 self.trUtf8("Horizontal Toolbox")) | 627 self.tr("Horizontal Toolbox")) |
628 | 628 |
629 # Create the right toolbox | 629 # Create the right toolbox |
630 self.rToolboxDock = self.__createDockWindow("rToolboxDock") | 630 self.rToolboxDock = self.__createDockWindow("rToolboxDock") |
631 self.rToolbox = E5VerticalToolBox(self.rToolboxDock) | 631 self.rToolbox = E5VerticalToolBox(self.rToolboxDock) |
632 self.__setupDockWindow(self.rToolboxDock, Qt.RightDockWidgetArea, | 632 self.__setupDockWindow(self.rToolboxDock, Qt.RightDockWidgetArea, |
633 self.rToolbox, self.trUtf8("Right Toolbox")) | 633 self.rToolbox, self.tr("Right Toolbox")) |
634 | 634 |
635 # Create the project browser | 635 # Create the project browser |
636 from Project.ProjectBrowser import ProjectBrowser | 636 from Project.ProjectBrowser import ProjectBrowser |
637 self.projectBrowser = ProjectBrowser( | 637 self.projectBrowser = ProjectBrowser( |
638 self.project, None, | 638 self.project, None, |
639 embeddedBrowser=(self.embeddedFileBrowser == 2)) | 639 embeddedBrowser=(self.embeddedFileBrowser == 2)) |
640 self.lToolbox.addItem(self.projectBrowser, | 640 self.lToolbox.addItem(self.projectBrowser, |
641 UI.PixmapCache.getIcon("projectViewer.png"), | 641 UI.PixmapCache.getIcon("projectViewer.png"), |
642 self.trUtf8("Project-Viewer")) | 642 self.tr("Project-Viewer")) |
643 | 643 |
644 # Create the multi project browser | 644 # Create the multi project browser |
645 from MultiProject.MultiProjectBrowser import MultiProjectBrowser | 645 from MultiProject.MultiProjectBrowser import MultiProjectBrowser |
646 self.multiProjectBrowser = MultiProjectBrowser(self.multiProject) | 646 self.multiProjectBrowser = MultiProjectBrowser(self.multiProject) |
647 self.lToolbox.addItem(self.multiProjectBrowser, | 647 self.lToolbox.addItem(self.multiProjectBrowser, |
648 UI.PixmapCache.getIcon("multiProjectViewer.png"), | 648 UI.PixmapCache.getIcon("multiProjectViewer.png"), |
649 self.trUtf8("Multiproject-Viewer")) | 649 self.tr("Multiproject-Viewer")) |
650 | 650 |
651 # Create the template viewer part of the user interface | 651 # Create the template viewer part of the user interface |
652 from Templates.TemplateViewer import TemplateViewer | 652 from Templates.TemplateViewer import TemplateViewer |
653 self.templateViewer = TemplateViewer(None, | 653 self.templateViewer = TemplateViewer(None, |
654 self.viewmanager) | 654 self.viewmanager) |
655 self.lToolbox.addItem(self.templateViewer, | 655 self.lToolbox.addItem(self.templateViewer, |
656 UI.PixmapCache.getIcon("templateViewer.png"), | 656 UI.PixmapCache.getIcon("templateViewer.png"), |
657 self.trUtf8("Template-Viewer")) | 657 self.tr("Template-Viewer")) |
658 | 658 |
659 # Create the debug viewer maybe without the embedded shell | 659 # Create the debug viewer maybe without the embedded shell |
660 from Debugger.DebugViewer import DebugViewer | 660 from Debugger.DebugViewer import DebugViewer |
661 self.debugViewer = DebugViewer( | 661 self.debugViewer = DebugViewer( |
662 debugServer, True, self.viewmanager, None, | 662 debugServer, True, self.viewmanager, None, |
663 embeddedShell=self.embeddedShell, | 663 embeddedShell=self.embeddedShell, |
664 embeddedBrowser=(self.embeddedFileBrowser == 1)) | 664 embeddedBrowser=(self.embeddedFileBrowser == 1)) |
665 self.rToolbox.addItem(self.debugViewer, | 665 self.rToolbox.addItem(self.debugViewer, |
666 UI.PixmapCache.getIcon("debugViewer.png"), | 666 UI.PixmapCache.getIcon("debugViewer.png"), |
667 self.trUtf8("Debug-Viewer")) | 667 self.tr("Debug-Viewer")) |
668 | 668 |
669 # Create the chat part of the user interface | 669 # Create the chat part of the user interface |
670 from Cooperation.ChatWidget import ChatWidget | 670 from Cooperation.ChatWidget import ChatWidget |
671 self.cooperation = ChatWidget(self) | 671 self.cooperation = ChatWidget(self) |
672 self.rToolbox.addItem(self.cooperation, | 672 self.rToolbox.addItem(self.cooperation, |
673 UI.PixmapCache.getIcon("cooperation.png"), | 673 UI.PixmapCache.getIcon("cooperation.png"), |
674 self.trUtf8("Cooperation")) | 674 self.tr("Cooperation")) |
675 | 675 |
676 # Create the IRC part of the user interface | 676 # Create the IRC part of the user interface |
677 from Network.IRC.IrcWidget import IrcWidget | 677 from Network.IRC.IrcWidget import IrcWidget |
678 self.irc = IrcWidget(self) | 678 self.irc = IrcWidget(self) |
679 self.rToolbox.addItem(self.irc, | 679 self.rToolbox.addItem(self.irc, |
680 UI.PixmapCache.getIcon("irc.png"), | 680 UI.PixmapCache.getIcon("irc.png"), |
681 self.trUtf8("IRC")) | 681 self.tr("IRC")) |
682 | 682 |
683 # Create the task viewer part of the user interface | 683 # Create the task viewer part of the user interface |
684 from Tasks.TaskViewer import TaskViewer | 684 from Tasks.TaskViewer import TaskViewer |
685 self.taskViewer = TaskViewer(None, self.project) | 685 self.taskViewer = TaskViewer(None, self.project) |
686 self.hToolbox.addItem(self.taskViewer, | 686 self.hToolbox.addItem(self.taskViewer, |
687 UI.PixmapCache.getIcon("task.png"), | 687 UI.PixmapCache.getIcon("task.png"), |
688 self.trUtf8("Task-Viewer")) | 688 self.tr("Task-Viewer")) |
689 | 689 |
690 # Create the log viewer part of the user interface | 690 # Create the log viewer part of the user interface |
691 from .LogView import LogViewer | 691 from .LogView import LogViewer |
692 self.logViewer = LogViewer() | 692 self.logViewer = LogViewer() |
693 self.hToolbox.addItem(self.logViewer, | 693 self.hToolbox.addItem(self.logViewer, |
694 UI.PixmapCache.getIcon("logViewer.png"), | 694 UI.PixmapCache.getIcon("logViewer.png"), |
695 self.trUtf8("Log-Viewer")) | 695 self.tr("Log-Viewer")) |
696 | 696 |
697 if self.embeddedShell: | 697 if self.embeddedShell: |
698 self.shell = self.debugViewer.shell | 698 self.shell = self.debugViewer.shell |
699 else: | 699 else: |
700 # Create the shell | 700 # Create the shell |
702 self.shellAssembly = \ | 702 self.shellAssembly = \ |
703 ShellAssembly(debugServer, self.viewmanager, True) | 703 ShellAssembly(debugServer, self.viewmanager, True) |
704 self.shell = self.shellAssembly.shell() | 704 self.shell = self.shellAssembly.shell() |
705 self.hToolbox.insertItem(0, self.shellAssembly, | 705 self.hToolbox.insertItem(0, self.shellAssembly, |
706 UI.PixmapCache.getIcon("shell.png"), | 706 UI.PixmapCache.getIcon("shell.png"), |
707 self.trUtf8("Shell")) | 707 self.tr("Shell")) |
708 | 708 |
709 if self.embeddedFileBrowser == 0: # separate window | 709 if self.embeddedFileBrowser == 0: # separate window |
710 # Create the file browser | 710 # Create the file browser |
711 from .Browser import Browser | 711 from .Browser import Browser |
712 self.browser = Browser() | 712 self.browser = Browser() |
713 self.lToolbox.addItem(self.browser, | 713 self.lToolbox.addItem(self.browser, |
714 UI.PixmapCache.getIcon("browser.png"), | 714 UI.PixmapCache.getIcon("browser.png"), |
715 self.trUtf8("File-Browser")) | 715 self.tr("File-Browser")) |
716 elif self.embeddedFileBrowser == 1: # embedded in debug browser | 716 elif self.embeddedFileBrowser == 1: # embedded in debug browser |
717 self.browser = self.debugViewer.browser | 717 self.browser = self.debugViewer.browser |
718 else: # embedded in project browser | 718 else: # embedded in project browser |
719 self.browser = self.projectBrowser.fileBrowser | 719 self.browser = self.projectBrowser.fileBrowser |
720 | 720 |
721 # Create the symbols viewer | 721 # Create the symbols viewer |
722 from .SymbolsWidget import SymbolsWidget | 722 from .SymbolsWidget import SymbolsWidget |
723 self.symbolsViewer = SymbolsWidget() | 723 self.symbolsViewer = SymbolsWidget() |
724 self.lToolbox.addItem(self.symbolsViewer, | 724 self.lToolbox.addItem(self.symbolsViewer, |
725 UI.PixmapCache.getIcon("symbols.png"), | 725 UI.PixmapCache.getIcon("symbols.png"), |
726 self.trUtf8("Symbols")) | 726 self.tr("Symbols")) |
727 | 727 |
728 # Create the numbers viewer | 728 # Create the numbers viewer |
729 from .NumbersWidget import NumbersWidget | 729 from .NumbersWidget import NumbersWidget |
730 self.numbersViewer = NumbersWidget() | 730 self.numbersViewer = NumbersWidget() |
731 self.hToolbox.addItem(self.numbersViewer, | 731 self.hToolbox.addItem(self.numbersViewer, |
732 UI.PixmapCache.getIcon("numbers.png"), | 732 UI.PixmapCache.getIcon("numbers.png"), |
733 self.trUtf8("Numbers")) | 733 self.tr("Numbers")) |
734 | 734 |
735 self.hToolbox.setCurrentIndex(0) | 735 self.hToolbox.setCurrentIndex(0) |
736 | 736 |
737 def __createSidebarsLayout(self, debugServer): | 737 def __createSidebarsLayout(self, debugServer): |
738 """ | 738 """ |
759 self.project, None, | 759 self.project, None, |
760 embeddedBrowser=(self.embeddedFileBrowser == 2)) | 760 embeddedBrowser=(self.embeddedFileBrowser == 2)) |
761 self.leftSidebar.addTab( | 761 self.leftSidebar.addTab( |
762 self.projectBrowser, | 762 self.projectBrowser, |
763 UI.PixmapCache.getIcon("projectViewer.png"), | 763 UI.PixmapCache.getIcon("projectViewer.png"), |
764 self.trUtf8("Project-Viewer")) | 764 self.tr("Project-Viewer")) |
765 | 765 |
766 # Create the multi project browser | 766 # Create the multi project browser |
767 logging.debug("Creating Multiproject Browser...") | 767 logging.debug("Creating Multiproject Browser...") |
768 from MultiProject.MultiProjectBrowser import MultiProjectBrowser | 768 from MultiProject.MultiProjectBrowser import MultiProjectBrowser |
769 self.multiProjectBrowser = MultiProjectBrowser(self.multiProject) | 769 self.multiProjectBrowser = MultiProjectBrowser(self.multiProject) |
770 self.leftSidebar.addTab( | 770 self.leftSidebar.addTab( |
771 self.multiProjectBrowser, | 771 self.multiProjectBrowser, |
772 UI.PixmapCache.getIcon("multiProjectViewer.png"), | 772 UI.PixmapCache.getIcon("multiProjectViewer.png"), |
773 self.trUtf8("Multiproject-Viewer")) | 773 self.tr("Multiproject-Viewer")) |
774 | 774 |
775 # Create the template viewer part of the user interface | 775 # Create the template viewer part of the user interface |
776 logging.debug("Creating Template Viewer...") | 776 logging.debug("Creating Template Viewer...") |
777 from Templates.TemplateViewer import TemplateViewer | 777 from Templates.TemplateViewer import TemplateViewer |
778 self.templateViewer = TemplateViewer(None, | 778 self.templateViewer = TemplateViewer(None, |
779 self.viewmanager) | 779 self.viewmanager) |
780 self.leftSidebar.addTab( | 780 self.leftSidebar.addTab( |
781 self.templateViewer, | 781 self.templateViewer, |
782 UI.PixmapCache.getIcon("templateViewer.png"), | 782 UI.PixmapCache.getIcon("templateViewer.png"), |
783 self.trUtf8("Template-Viewer")) | 783 self.tr("Template-Viewer")) |
784 | 784 |
785 # Create the debug viewer maybe without the embedded shell | 785 # Create the debug viewer maybe without the embedded shell |
786 logging.debug("Creating Debug Viewer...") | 786 logging.debug("Creating Debug Viewer...") |
787 from Debugger.DebugViewer import DebugViewer | 787 from Debugger.DebugViewer import DebugViewer |
788 self.debugViewer = DebugViewer( | 788 self.debugViewer = DebugViewer( |
789 debugServer, True, self.viewmanager, None, | 789 debugServer, True, self.viewmanager, None, |
790 embeddedShell=self.embeddedShell, | 790 embeddedShell=self.embeddedShell, |
791 embeddedBrowser=(self.embeddedFileBrowser == 1)) | 791 embeddedBrowser=(self.embeddedFileBrowser == 1)) |
792 self.rightSidebar.addTab( | 792 self.rightSidebar.addTab( |
793 self.debugViewer, UI.PixmapCache.getIcon("debugViewer.png"), | 793 self.debugViewer, UI.PixmapCache.getIcon("debugViewer.png"), |
794 self.trUtf8("Debug-Viewer")) | 794 self.tr("Debug-Viewer")) |
795 | 795 |
796 # Create the chat part of the user interface | 796 # Create the chat part of the user interface |
797 logging.debug("Creating Chat Widget...") | 797 logging.debug("Creating Chat Widget...") |
798 from Cooperation.ChatWidget import ChatWidget | 798 from Cooperation.ChatWidget import ChatWidget |
799 self.cooperation = ChatWidget(self) | 799 self.cooperation = ChatWidget(self) |
800 self.rightSidebar.addTab( | 800 self.rightSidebar.addTab( |
801 self.cooperation, UI.PixmapCache.getIcon("cooperation.png"), | 801 self.cooperation, UI.PixmapCache.getIcon("cooperation.png"), |
802 self.trUtf8("Cooperation")) | 802 self.tr("Cooperation")) |
803 | 803 |
804 # Create the IRC part of the user interface | 804 # Create the IRC part of the user interface |
805 logging.debug("Creating IRC Widget...") | 805 logging.debug("Creating IRC Widget...") |
806 from Network.IRC.IrcWidget import IrcWidget | 806 from Network.IRC.IrcWidget import IrcWidget |
807 self.irc = IrcWidget(self) | 807 self.irc = IrcWidget(self) |
808 self.rightSidebar.addTab( | 808 self.rightSidebar.addTab( |
809 self.irc, UI.PixmapCache.getIcon("irc.png"), self.trUtf8("IRC")) | 809 self.irc, UI.PixmapCache.getIcon("irc.png"), self.tr("IRC")) |
810 | 810 |
811 # Create the task viewer part of the user interface | 811 # Create the task viewer part of the user interface |
812 logging.debug("Creating Task Viewer...") | 812 logging.debug("Creating Task Viewer...") |
813 from Tasks.TaskViewer import TaskViewer | 813 from Tasks.TaskViewer import TaskViewer |
814 self.taskViewer = TaskViewer(None, self.project) | 814 self.taskViewer = TaskViewer(None, self.project) |
815 self.bottomSidebar.addTab(self.taskViewer, | 815 self.bottomSidebar.addTab(self.taskViewer, |
816 UI.PixmapCache.getIcon("task.png"), | 816 UI.PixmapCache.getIcon("task.png"), |
817 self.trUtf8("Task-Viewer")) | 817 self.tr("Task-Viewer")) |
818 | 818 |
819 # Create the log viewer part of the user interface | 819 # Create the log viewer part of the user interface |
820 logging.debug("Creating Log Viewer...") | 820 logging.debug("Creating Log Viewer...") |
821 from .LogView import LogViewer | 821 from .LogView import LogViewer |
822 self.logViewer = LogViewer() | 822 self.logViewer = LogViewer() |
823 self.bottomSidebar.addTab(self.logViewer, | 823 self.bottomSidebar.addTab(self.logViewer, |
824 UI.PixmapCache.getIcon("logViewer.png"), | 824 UI.PixmapCache.getIcon("logViewer.png"), |
825 self.trUtf8("Log-Viewer")) | 825 self.tr("Log-Viewer")) |
826 | 826 |
827 if self.embeddedShell: | 827 if self.embeddedShell: |
828 self.shell = self.debugViewer.shell | 828 self.shell = self.debugViewer.shell |
829 else: | 829 else: |
830 # Create the shell | 830 # Create the shell |
833 self.shellAssembly = \ | 833 self.shellAssembly = \ |
834 ShellAssembly(debugServer, self.viewmanager, True) | 834 ShellAssembly(debugServer, self.viewmanager, True) |
835 self.shell = self.shellAssembly.shell() | 835 self.shell = self.shellAssembly.shell() |
836 self.bottomSidebar.insertTab(0, self.shellAssembly, | 836 self.bottomSidebar.insertTab(0, self.shellAssembly, |
837 UI.PixmapCache.getIcon("shell.png"), | 837 UI.PixmapCache.getIcon("shell.png"), |
838 self.trUtf8("Shell")) | 838 self.tr("Shell")) |
839 | 839 |
840 if self.embeddedFileBrowser == 0: # separate window | 840 if self.embeddedFileBrowser == 0: # separate window |
841 # Create the file browser | 841 # Create the file browser |
842 logging.debug("Creating File Browser...") | 842 logging.debug("Creating File Browser...") |
843 from .Browser import Browser | 843 from .Browser import Browser |
844 self.browser = Browser() | 844 self.browser = Browser() |
845 self.leftSidebar.addTab(self.browser, | 845 self.leftSidebar.addTab(self.browser, |
846 UI.PixmapCache.getIcon("browser.png"), | 846 UI.PixmapCache.getIcon("browser.png"), |
847 self.trUtf8("File-Browser")) | 847 self.tr("File-Browser")) |
848 elif self.embeddedFileBrowser == 1: # embedded in debug browser | 848 elif self.embeddedFileBrowser == 1: # embedded in debug browser |
849 self.browser = self.debugViewer.browser | 849 self.browser = self.debugViewer.browser |
850 else: # embedded in project browser | 850 else: # embedded in project browser |
851 self.browser = self.projectBrowser.fileBrowser | 851 self.browser = self.projectBrowser.fileBrowser |
852 | 852 |
854 logging.debug("Creating Symbols Viewer...") | 854 logging.debug("Creating Symbols Viewer...") |
855 from .SymbolsWidget import SymbolsWidget | 855 from .SymbolsWidget import SymbolsWidget |
856 self.symbolsViewer = SymbolsWidget() | 856 self.symbolsViewer = SymbolsWidget() |
857 self.leftSidebar.addTab(self.symbolsViewer, | 857 self.leftSidebar.addTab(self.symbolsViewer, |
858 UI.PixmapCache.getIcon("symbols.png"), | 858 UI.PixmapCache.getIcon("symbols.png"), |
859 self.trUtf8("Symbols")) | 859 self.tr("Symbols")) |
860 | 860 |
861 # Create the numbers viewer | 861 # Create the numbers viewer |
862 logging.debug("Creating Numbers Viewer...") | 862 logging.debug("Creating Numbers Viewer...") |
863 from .NumbersWidget import NumbersWidget | 863 from .NumbersWidget import NumbersWidget |
864 self.numbersViewer = NumbersWidget() | 864 self.numbersViewer = NumbersWidget() |
865 self.bottomSidebar.addTab(self.numbersViewer, | 865 self.bottomSidebar.addTab(self.numbersViewer, |
866 UI.PixmapCache.getIcon("numbers.png"), | 866 UI.PixmapCache.getIcon("numbers.png"), |
867 self.trUtf8("Numbers")) | 867 self.tr("Numbers")) |
868 | 868 |
869 self.bottomSidebar.setCurrentIndex(0) | 869 self.bottomSidebar.setCurrentIndex(0) |
870 | 870 |
871 # create the central widget | 871 # create the central widget |
872 logging.debug("Creating central widget...") | 872 logging.debug("Creating central widget...") |
1144 self.capProject = project | 1144 self.capProject = project |
1145 | 1145 |
1146 if self.passiveMode: | 1146 if self.passiveMode: |
1147 if not self.capProject and not self.capEditor: | 1147 if not self.capProject and not self.capEditor: |
1148 self.setWindowTitle( | 1148 self.setWindowTitle( |
1149 self.trUtf8("{0} - Passive Mode").format(Program)) | 1149 self.tr("{0} - Passive Mode").format(Program)) |
1150 elif self.capProject and not self.capEditor: | 1150 elif self.capProject and not self.capEditor: |
1151 self.setWindowTitle(self.trUtf8("{0} - {1} - Passive Mode") | 1151 self.setWindowTitle(self.tr("{0} - {1} - Passive Mode") |
1152 .format(self.capProject, Program)) | 1152 .format(self.capProject, Program)) |
1153 elif not self.capProject and self.capEditor: | 1153 elif not self.capProject and self.capEditor: |
1154 self.setWindowTitle(self.trUtf8("{0} - {1} - Passive Mode") | 1154 self.setWindowTitle(self.tr("{0} - {1} - Passive Mode") |
1155 .format(self.capEditor, Program)) | 1155 .format(self.capEditor, Program)) |
1156 else: | 1156 else: |
1157 self.setWindowTitle( | 1157 self.setWindowTitle( |
1158 self.trUtf8("{0} - {1} - {2} - Passive Mode") | 1158 self.tr("{0} - {1} - {2} - Passive Mode") |
1159 .format(self.capProject, self.capEditor, Program)) | 1159 .format(self.capProject, self.capEditor, Program)) |
1160 else: | 1160 else: |
1161 if not self.capProject and not self.capEditor: | 1161 if not self.capProject and not self.capEditor: |
1162 self.setWindowTitle(Program) | 1162 self.setWindowTitle(Program) |
1163 elif self.capProject and not self.capEditor: | 1163 elif self.capProject and not self.capEditor: |
1176 """ | 1176 """ |
1177 self.actions = [] | 1177 self.actions = [] |
1178 self.wizardsActions = [] | 1178 self.wizardsActions = [] |
1179 | 1179 |
1180 self.exitAct = E5Action( | 1180 self.exitAct = E5Action( |
1181 self.trUtf8('Quit'), | 1181 self.tr('Quit'), |
1182 UI.PixmapCache.getIcon("exit.png"), | 1182 UI.PixmapCache.getIcon("exit.png"), |
1183 self.trUtf8('&Quit'), | 1183 self.tr('&Quit'), |
1184 QKeySequence(self.trUtf8("Ctrl+Q", "File|Quit")), | 1184 QKeySequence(self.tr("Ctrl+Q", "File|Quit")), |
1185 0, self, 'quit') | 1185 0, self, 'quit') |
1186 self.exitAct.setStatusTip(self.trUtf8('Quit the IDE')) | 1186 self.exitAct.setStatusTip(self.tr('Quit the IDE')) |
1187 self.exitAct.setWhatsThis(self.trUtf8( | 1187 self.exitAct.setWhatsThis(self.tr( |
1188 """<b>Quit the IDE</b>""" | 1188 """<b>Quit the IDE</b>""" |
1189 """<p>This quits the IDE. Any unsaved changes may be saved""" | 1189 """<p>This quits the IDE. Any unsaved changes may be saved""" |
1190 """ first. Any Python program being debugged will be stopped""" | 1190 """ first. Any Python program being debugged will be stopped""" |
1191 """ and the preferences will be written to disc.</p>""" | 1191 """ and the preferences will be written to disc.</p>""" |
1192 )) | 1192 )) |
1193 self.exitAct.triggered[()].connect(self.__quit) | 1193 self.exitAct.triggered[()].connect(self.__quit) |
1194 self.exitAct.setMenuRole(QAction.QuitRole) | 1194 self.exitAct.setMenuRole(QAction.QuitRole) |
1195 self.actions.append(self.exitAct) | 1195 self.actions.append(self.exitAct) |
1196 | 1196 |
1197 self.newWindowAct = E5Action( | 1197 self.newWindowAct = E5Action( |
1198 self.trUtf8('New Window'), | 1198 self.tr('New Window'), |
1199 UI.PixmapCache.getIcon("newWindow.png"), | 1199 UI.PixmapCache.getIcon("newWindow.png"), |
1200 self.trUtf8('New &Window'), | 1200 self.tr('New &Window'), |
1201 QKeySequence(self.trUtf8("Ctrl+Shift+N", "File|New Window")), | 1201 QKeySequence(self.tr("Ctrl+Shift+N", "File|New Window")), |
1202 0, self, 'new_window') | 1202 0, self, 'new_window') |
1203 self.newWindowAct.setStatusTip(self.trUtf8( | 1203 self.newWindowAct.setStatusTip(self.tr( |
1204 'Open a new eric5 instance')) | 1204 'Open a new eric5 instance')) |
1205 self.newWindowAct.setWhatsThis(self.trUtf8( | 1205 self.newWindowAct.setWhatsThis(self.tr( |
1206 """<b>New Window</b>""" | 1206 """<b>New Window</b>""" |
1207 """<p>This opens a new instance of the eric5 IDE.</p>""" | 1207 """<p>This opens a new instance of the eric5 IDE.</p>""" |
1208 )) | 1208 )) |
1209 self.newWindowAct.triggered[()].connect(self.__newWindow) | 1209 self.newWindowAct.triggered[()].connect(self.__newWindow) |
1210 self.actions.append(self.newWindowAct) | 1210 self.actions.append(self.newWindowAct) |
1212 not Preferences.getUI("SingleApplicationMode")) | 1212 not Preferences.getUI("SingleApplicationMode")) |
1213 | 1213 |
1214 self.viewProfileActGrp = createActionGroup(self, "viewprofiles", True) | 1214 self.viewProfileActGrp = createActionGroup(self, "viewprofiles", True) |
1215 | 1215 |
1216 self.setEditProfileAct = E5Action( | 1216 self.setEditProfileAct = E5Action( |
1217 self.trUtf8('Edit Profile'), | 1217 self.tr('Edit Profile'), |
1218 UI.PixmapCache.getIcon("viewProfileEdit.png"), | 1218 UI.PixmapCache.getIcon("viewProfileEdit.png"), |
1219 self.trUtf8('Edit Profile'), | 1219 self.tr('Edit Profile'), |
1220 0, 0, | 1220 0, 0, |
1221 self.viewProfileActGrp, 'edit_profile', True) | 1221 self.viewProfileActGrp, 'edit_profile', True) |
1222 self.setEditProfileAct.setStatusTip(self.trUtf8( | 1222 self.setEditProfileAct.setStatusTip(self.tr( |
1223 'Activate the edit view profile')) | 1223 'Activate the edit view profile')) |
1224 self.setEditProfileAct.setWhatsThis(self.trUtf8( | 1224 self.setEditProfileAct.setWhatsThis(self.tr( |
1225 """<b>Edit Profile</b>""" | 1225 """<b>Edit Profile</b>""" |
1226 """<p>Activate the "Edit View Profile". Windows being shown,""" | 1226 """<p>Activate the "Edit View Profile". Windows being shown,""" |
1227 """ if this profile is active, may be configured with the""" | 1227 """ if this profile is active, may be configured with the""" |
1228 """ "View Profile Configuration" dialog.</p>""" | 1228 """ "View Profile Configuration" dialog.</p>""" |
1229 )) | 1229 )) |
1230 self.setEditProfileAct.triggered[()].connect(self.__setEditProfile) | 1230 self.setEditProfileAct.triggered[()].connect(self.__setEditProfile) |
1231 self.actions.append(self.setEditProfileAct) | 1231 self.actions.append(self.setEditProfileAct) |
1232 | 1232 |
1233 self.setDebugProfileAct = E5Action( | 1233 self.setDebugProfileAct = E5Action( |
1234 self.trUtf8('Debug Profile'), | 1234 self.tr('Debug Profile'), |
1235 UI.PixmapCache.getIcon("viewProfileDebug.png"), | 1235 UI.PixmapCache.getIcon("viewProfileDebug.png"), |
1236 self.trUtf8('Debug Profile'), | 1236 self.tr('Debug Profile'), |
1237 0, 0, | 1237 0, 0, |
1238 self.viewProfileActGrp, 'debug_profile', True) | 1238 self.viewProfileActGrp, 'debug_profile', True) |
1239 self.setDebugProfileAct.setStatusTip( | 1239 self.setDebugProfileAct.setStatusTip( |
1240 self.trUtf8('Activate the debug view profile')) | 1240 self.tr('Activate the debug view profile')) |
1241 self.setDebugProfileAct.setWhatsThis(self.trUtf8( | 1241 self.setDebugProfileAct.setWhatsThis(self.tr( |
1242 """<b>Debug Profile</b>""" | 1242 """<b>Debug Profile</b>""" |
1243 """<p>Activate the "Debug View Profile". Windows being shown,""" | 1243 """<p>Activate the "Debug View Profile". Windows being shown,""" |
1244 """ if this profile is active, may be configured with the""" | 1244 """ if this profile is active, may be configured with the""" |
1245 """ "View Profile Configuration" dialog.</p>""" | 1245 """ "View Profile Configuration" dialog.</p>""" |
1246 )) | 1246 )) |
1247 self.setDebugProfileAct.triggered[()].connect(self.setDebugProfile) | 1247 self.setDebugProfileAct.triggered[()].connect(self.setDebugProfile) |
1248 self.actions.append(self.setDebugProfileAct) | 1248 self.actions.append(self.setDebugProfileAct) |
1249 | 1249 |
1250 self.pbActivateAct = E5Action( | 1250 self.pbActivateAct = E5Action( |
1251 self.trUtf8('Project-Viewer'), | 1251 self.tr('Project-Viewer'), |
1252 self.trUtf8('&Project-Viewer'), | 1252 self.tr('&Project-Viewer'), |
1253 QKeySequence(self.trUtf8("Alt+Shift+P")), | 1253 QKeySequence(self.tr("Alt+Shift+P")), |
1254 0, self, | 1254 0, self, |
1255 'project_viewer_activate') | 1255 'project_viewer_activate') |
1256 self.pbActivateAct.setStatusTip(self.trUtf8( | 1256 self.pbActivateAct.setStatusTip(self.tr( |
1257 "Switch the input focus to the Project-Viewer window.")) | 1257 "Switch the input focus to the Project-Viewer window.")) |
1258 self.pbActivateAct.setWhatsThis(self.trUtf8( | 1258 self.pbActivateAct.setWhatsThis(self.tr( |
1259 """<b>Activate Project-Viewer</b>""" | 1259 """<b>Activate Project-Viewer</b>""" |
1260 """<p>This switches the input focus to the Project-Viewer""" | 1260 """<p>This switches the input focus to the Project-Viewer""" |
1261 """ window.</p>""" | 1261 """ window.</p>""" |
1262 )) | 1262 )) |
1263 self.pbActivateAct.triggered[()].connect(self.__activateProjectBrowser) | 1263 self.pbActivateAct.triggered[()].connect(self.__activateProjectBrowser) |
1264 self.actions.append(self.pbActivateAct) | 1264 self.actions.append(self.pbActivateAct) |
1265 self.addAction(self.pbActivateAct) | 1265 self.addAction(self.pbActivateAct) |
1266 | 1266 |
1267 self.mpbActivateAct = E5Action( | 1267 self.mpbActivateAct = E5Action( |
1268 self.trUtf8('Multiproject-Viewer'), | 1268 self.tr('Multiproject-Viewer'), |
1269 self.trUtf8('&Multiproject-Viewer'), | 1269 self.tr('&Multiproject-Viewer'), |
1270 QKeySequence(self.trUtf8("Alt+Shift+M")), | 1270 QKeySequence(self.tr("Alt+Shift+M")), |
1271 0, self, | 1271 0, self, |
1272 'multi_project_viewer_activate') | 1272 'multi_project_viewer_activate') |
1273 self.mpbActivateAct.setStatusTip(self.trUtf8( | 1273 self.mpbActivateAct.setStatusTip(self.tr( |
1274 "Switch the input focus to the Multiproject-Viewer window.")) | 1274 "Switch the input focus to the Multiproject-Viewer window.")) |
1275 self.mpbActivateAct.setWhatsThis(self.trUtf8( | 1275 self.mpbActivateAct.setWhatsThis(self.tr( |
1276 """<b>Activate Multiproject-Viewer</b>""" | 1276 """<b>Activate Multiproject-Viewer</b>""" |
1277 """<p>This switches the input focus to the Multiproject-Viewer""" | 1277 """<p>This switches the input focus to the Multiproject-Viewer""" |
1278 """ window.</p>""" | 1278 """ window.</p>""" |
1279 )) | 1279 )) |
1280 self.mpbActivateAct.triggered[()].connect( | 1280 self.mpbActivateAct.triggered[()].connect( |
1281 self.__activateMultiProjectBrowser) | 1281 self.__activateMultiProjectBrowser) |
1282 self.actions.append(self.mpbActivateAct) | 1282 self.actions.append(self.mpbActivateAct) |
1283 self.addAction(self.mpbActivateAct) | 1283 self.addAction(self.mpbActivateAct) |
1284 | 1284 |
1285 self.debugViewerActivateAct = E5Action( | 1285 self.debugViewerActivateAct = E5Action( |
1286 self.trUtf8('Debug-Viewer'), | 1286 self.tr('Debug-Viewer'), |
1287 self.trUtf8('&Debug-Viewer'), | 1287 self.tr('&Debug-Viewer'), |
1288 QKeySequence(self.trUtf8("Alt+Shift+D")), | 1288 QKeySequence(self.tr("Alt+Shift+D")), |
1289 0, self, | 1289 0, self, |
1290 'debug_viewer_activate') | 1290 'debug_viewer_activate') |
1291 self.debugViewerActivateAct.setStatusTip(self.trUtf8( | 1291 self.debugViewerActivateAct.setStatusTip(self.tr( |
1292 "Switch the input focus to the Debug-Viewer window.")) | 1292 "Switch the input focus to the Debug-Viewer window.")) |
1293 self.debugViewerActivateAct.setWhatsThis(self.trUtf8( | 1293 self.debugViewerActivateAct.setWhatsThis(self.tr( |
1294 """<b>Activate Debug-Viewer</b>""" | 1294 """<b>Activate Debug-Viewer</b>""" |
1295 """<p>This switches the input focus to the Debug-Viewer""" | 1295 """<p>This switches the input focus to the Debug-Viewer""" |
1296 """ window.</p>""" | 1296 """ window.</p>""" |
1297 )) | 1297 )) |
1298 self.debugViewerActivateAct.triggered[()].connect( | 1298 self.debugViewerActivateAct.triggered[()].connect( |
1299 self.__activateDebugViewer) | 1299 self.__activateDebugViewer) |
1300 self.actions.append(self.debugViewerActivateAct) | 1300 self.actions.append(self.debugViewerActivateAct) |
1301 self.addAction(self.debugViewerActivateAct) | 1301 self.addAction(self.debugViewerActivateAct) |
1302 | 1302 |
1303 self.shellActivateAct = E5Action( | 1303 self.shellActivateAct = E5Action( |
1304 self.trUtf8('Shell'), | 1304 self.tr('Shell'), |
1305 self.trUtf8('&Shell'), | 1305 self.tr('&Shell'), |
1306 QKeySequence(self.trUtf8("Alt+Shift+S")), | 1306 QKeySequence(self.tr("Alt+Shift+S")), |
1307 0, self, | 1307 0, self, |
1308 'interprter_shell_activate') | 1308 'interprter_shell_activate') |
1309 self.shellActivateAct.setStatusTip(self.trUtf8( | 1309 self.shellActivateAct.setStatusTip(self.tr( |
1310 "Switch the input focus to the Shell window.")) | 1310 "Switch the input focus to the Shell window.")) |
1311 self.shellActivateAct.setWhatsThis(self.trUtf8( | 1311 self.shellActivateAct.setWhatsThis(self.tr( |
1312 """<b>Activate Shell</b>""" | 1312 """<b>Activate Shell</b>""" |
1313 """<p>This switches the input focus to the Shell window.</p>""" | 1313 """<p>This switches the input focus to the Shell window.</p>""" |
1314 )) | 1314 )) |
1315 self.shellActivateAct.triggered[()].connect(self.__activateShell) | 1315 self.shellActivateAct.triggered[()].connect(self.__activateShell) |
1316 self.actions.append(self.shellActivateAct) | 1316 self.actions.append(self.shellActivateAct) |
1317 self.addAction(self.shellActivateAct) | 1317 self.addAction(self.shellActivateAct) |
1318 | 1318 |
1319 self.browserActivateAct = E5Action( | 1319 self.browserActivateAct = E5Action( |
1320 self.trUtf8('File-Browser'), | 1320 self.tr('File-Browser'), |
1321 self.trUtf8('&File-Browser'), | 1321 self.tr('&File-Browser'), |
1322 QKeySequence(self.trUtf8("Alt+Shift+F")), | 1322 QKeySequence(self.tr("Alt+Shift+F")), |
1323 0, self, | 1323 0, self, |
1324 'file_browser_activate') | 1324 'file_browser_activate') |
1325 self.browserActivateAct.setStatusTip(self.trUtf8( | 1325 self.browserActivateAct.setStatusTip(self.tr( |
1326 "Switch the input focus to the File-Browser window.")) | 1326 "Switch the input focus to the File-Browser window.")) |
1327 self.browserActivateAct.setWhatsThis(self.trUtf8( | 1327 self.browserActivateAct.setWhatsThis(self.tr( |
1328 """<b>Activate File-Browser</b>""" | 1328 """<b>Activate File-Browser</b>""" |
1329 """<p>This switches the input focus to the File-Browser""" | 1329 """<p>This switches the input focus to the File-Browser""" |
1330 """ window.</p>""" | 1330 """ window.</p>""" |
1331 )) | 1331 )) |
1332 self.browserActivateAct.triggered[()].connect(self.__activateBrowser) | 1332 self.browserActivateAct.triggered[()].connect(self.__activateBrowser) |
1333 self.actions.append(self.browserActivateAct) | 1333 self.actions.append(self.browserActivateAct) |
1334 self.addAction(self.browserActivateAct) | 1334 self.addAction(self.browserActivateAct) |
1335 | 1335 |
1336 self.logViewerActivateAct = E5Action( | 1336 self.logViewerActivateAct = E5Action( |
1337 self.trUtf8('Log-Viewer'), | 1337 self.tr('Log-Viewer'), |
1338 self.trUtf8('Lo&g-Viewer'), | 1338 self.tr('Lo&g-Viewer'), |
1339 QKeySequence(self.trUtf8("Alt+Shift+G")), | 1339 QKeySequence(self.tr("Alt+Shift+G")), |
1340 0, self, | 1340 0, self, |
1341 'log_viewer_activate') | 1341 'log_viewer_activate') |
1342 self.logViewerActivateAct.setStatusTip(self.trUtf8( | 1342 self.logViewerActivateAct.setStatusTip(self.tr( |
1343 "Switch the input focus to the Log-Viewer window.")) | 1343 "Switch the input focus to the Log-Viewer window.")) |
1344 self.logViewerActivateAct.setWhatsThis(self.trUtf8( | 1344 self.logViewerActivateAct.setWhatsThis(self.tr( |
1345 """<b>Activate Log-Viewer</b>""" | 1345 """<b>Activate Log-Viewer</b>""" |
1346 """<p>This switches the input focus to the Log-Viewer""" | 1346 """<p>This switches the input focus to the Log-Viewer""" |
1347 """ window.</p>""" | 1347 """ window.</p>""" |
1348 )) | 1348 )) |
1349 self.logViewerActivateAct.triggered[()].connect( | 1349 self.logViewerActivateAct.triggered[()].connect( |
1350 self.__activateLogViewer) | 1350 self.__activateLogViewer) |
1351 self.actions.append(self.logViewerActivateAct) | 1351 self.actions.append(self.logViewerActivateAct) |
1352 self.addAction(self.logViewerActivateAct) | 1352 self.addAction(self.logViewerActivateAct) |
1353 | 1353 |
1354 self.taskViewerActivateAct = E5Action( | 1354 self.taskViewerActivateAct = E5Action( |
1355 self.trUtf8('Task-Viewer'), | 1355 self.tr('Task-Viewer'), |
1356 self.trUtf8('&Task-Viewer'), | 1356 self.tr('&Task-Viewer'), |
1357 QKeySequence(self.trUtf8("Alt+Shift+T")), | 1357 QKeySequence(self.tr("Alt+Shift+T")), |
1358 0, self, | 1358 0, self, |
1359 'task_viewer_activate') | 1359 'task_viewer_activate') |
1360 self.taskViewerActivateAct.setStatusTip(self.trUtf8( | 1360 self.taskViewerActivateAct.setStatusTip(self.tr( |
1361 "Switch the input focus to the Task-Viewer window.")) | 1361 "Switch the input focus to the Task-Viewer window.")) |
1362 self.taskViewerActivateAct.setWhatsThis(self.trUtf8( | 1362 self.taskViewerActivateAct.setWhatsThis(self.tr( |
1363 """<b>Activate Task-Viewer</b>""" | 1363 """<b>Activate Task-Viewer</b>""" |
1364 """<p>This switches the input focus to the Task-Viewer""" | 1364 """<p>This switches the input focus to the Task-Viewer""" |
1365 """ window.</p>""" | 1365 """ window.</p>""" |
1366 )) | 1366 )) |
1367 self.taskViewerActivateAct.triggered[()].connect( | 1367 self.taskViewerActivateAct.triggered[()].connect( |
1368 self.__activateTaskViewer) | 1368 self.__activateTaskViewer) |
1369 self.actions.append(self.taskViewerActivateAct) | 1369 self.actions.append(self.taskViewerActivateAct) |
1370 self.addAction(self.taskViewerActivateAct) | 1370 self.addAction(self.taskViewerActivateAct) |
1371 | 1371 |
1372 self.templateViewerActivateAct = E5Action( | 1372 self.templateViewerActivateAct = E5Action( |
1373 self.trUtf8('Template-Viewer'), | 1373 self.tr('Template-Viewer'), |
1374 self.trUtf8('Templ&ate-Viewer'), | 1374 self.tr('Templ&ate-Viewer'), |
1375 QKeySequence(self.trUtf8("Alt+Shift+A")), | 1375 QKeySequence(self.tr("Alt+Shift+A")), |
1376 0, self, | 1376 0, self, |
1377 'template_viewer_activate') | 1377 'template_viewer_activate') |
1378 self.templateViewerActivateAct.setStatusTip(self.trUtf8( | 1378 self.templateViewerActivateAct.setStatusTip(self.tr( |
1379 "Switch the input focus to the Template-Viewer window.")) | 1379 "Switch the input focus to the Template-Viewer window.")) |
1380 self.templateViewerActivateAct.setWhatsThis(self.trUtf8( | 1380 self.templateViewerActivateAct.setWhatsThis(self.tr( |
1381 """<b>Activate Template-Viewer</b>""" | 1381 """<b>Activate Template-Viewer</b>""" |
1382 """<p>This switches the input focus to the Template-Viewer""" | 1382 """<p>This switches the input focus to the Template-Viewer""" |
1383 """ window.</p>""" | 1383 """ window.</p>""" |
1384 )) | 1384 )) |
1385 self.templateViewerActivateAct.triggered[()].connect( | 1385 self.templateViewerActivateAct.triggered[()].connect( |
1386 self.__activateTemplateViewer) | 1386 self.__activateTemplateViewer) |
1387 self.actions.append(self.templateViewerActivateAct) | 1387 self.actions.append(self.templateViewerActivateAct) |
1388 self.addAction(self.templateViewerActivateAct) | 1388 self.addAction(self.templateViewerActivateAct) |
1389 | 1389 |
1390 self.ltAct = E5Action( | 1390 self.ltAct = E5Action( |
1391 self.trUtf8('Left Toolbox'), | 1391 self.tr('Left Toolbox'), |
1392 self.trUtf8('&Left Toolbox'), 0, 0, self, 'vertical_toolbox', True) | 1392 self.tr('&Left Toolbox'), 0, 0, self, 'vertical_toolbox', True) |
1393 self.ltAct.setStatusTip(self.trUtf8('Toggle the Left Toolbox window')) | 1393 self.ltAct.setStatusTip(self.tr('Toggle the Left Toolbox window')) |
1394 self.ltAct.setWhatsThis(self.trUtf8( | 1394 self.ltAct.setWhatsThis(self.tr( |
1395 """<b>Toggle the Left Toolbox window</b>""" | 1395 """<b>Toggle the Left Toolbox window</b>""" |
1396 """<p>If the Left Toolbox window is hidden then display it.""" | 1396 """<p>If the Left Toolbox window is hidden then display it.""" |
1397 """ If it is displayed then close it.</p>""" | 1397 """ If it is displayed then close it.</p>""" |
1398 )) | 1398 )) |
1399 self.ltAct.triggered[()].connect(self.__toggleLeftToolbox) | 1399 self.ltAct.triggered[()].connect(self.__toggleLeftToolbox) |
1400 self.actions.append(self.ltAct) | 1400 self.actions.append(self.ltAct) |
1401 | 1401 |
1402 self.rtAct = E5Action( | 1402 self.rtAct = E5Action( |
1403 self.trUtf8('Right Toolbox'), | 1403 self.tr('Right Toolbox'), |
1404 self.trUtf8('&Right Toolbox'), | 1404 self.tr('&Right Toolbox'), |
1405 0, 0, self, 'vertical_toolbox', True) | 1405 0, 0, self, 'vertical_toolbox', True) |
1406 self.rtAct.setStatusTip(self.trUtf8('Toggle the Right Toolbox window')) | 1406 self.rtAct.setStatusTip(self.tr('Toggle the Right Toolbox window')) |
1407 self.rtAct.setWhatsThis(self.trUtf8( | 1407 self.rtAct.setWhatsThis(self.tr( |
1408 """<b>Toggle the Right Toolbox window</b>""" | 1408 """<b>Toggle the Right Toolbox window</b>""" |
1409 """<p>If the Right Toolbox window is hidden then display it.""" | 1409 """<p>If the Right Toolbox window is hidden then display it.""" |
1410 """ If it is displayed then close it.</p>""" | 1410 """ If it is displayed then close it.</p>""" |
1411 )) | 1411 )) |
1412 self.rtAct.triggered[()].connect(self.__toggleRightToolbox) | 1412 self.rtAct.triggered[()].connect(self.__toggleRightToolbox) |
1413 self.actions.append(self.rtAct) | 1413 self.actions.append(self.rtAct) |
1414 | 1414 |
1415 self.htAct = E5Action( | 1415 self.htAct = E5Action( |
1416 self.trUtf8('Horizontal Toolbox'), | 1416 self.tr('Horizontal Toolbox'), |
1417 self.trUtf8('&Horizontal Toolbox'), 0, 0, self, | 1417 self.tr('&Horizontal Toolbox'), 0, 0, self, |
1418 'horizontal_toolbox', True) | 1418 'horizontal_toolbox', True) |
1419 self.htAct.setStatusTip(self.trUtf8( | 1419 self.htAct.setStatusTip(self.tr( |
1420 'Toggle the Horizontal Toolbox window')) | 1420 'Toggle the Horizontal Toolbox window')) |
1421 self.htAct.setWhatsThis(self.trUtf8( | 1421 self.htAct.setWhatsThis(self.tr( |
1422 """<b>Toggle the Horizontal Toolbox window</b>""" | 1422 """<b>Toggle the Horizontal Toolbox window</b>""" |
1423 """<p>If the Horizontal Toolbox window is hidden then display""" | 1423 """<p>If the Horizontal Toolbox window is hidden then display""" |
1424 """ it. If it is displayed then close it.</p>""" | 1424 """ it. If it is displayed then close it.</p>""" |
1425 )) | 1425 )) |
1426 self.htAct.triggered[()].connect(self.__toggleHorizontalToolbox) | 1426 self.htAct.triggered[()].connect(self.__toggleHorizontalToolbox) |
1427 self.actions.append(self.htAct) | 1427 self.actions.append(self.htAct) |
1428 | 1428 |
1429 self.lsbAct = E5Action( | 1429 self.lsbAct = E5Action( |
1430 self.trUtf8('Left Sidebar'), | 1430 self.tr('Left Sidebar'), |
1431 self.trUtf8('&Left Sidebar'), | 1431 self.tr('&Left Sidebar'), |
1432 0, 0, self, 'left_sidebar', True) | 1432 0, 0, self, 'left_sidebar', True) |
1433 self.lsbAct.setStatusTip(self.trUtf8('Toggle the left sidebar window')) | 1433 self.lsbAct.setStatusTip(self.tr('Toggle the left sidebar window')) |
1434 self.lsbAct.setWhatsThis(self.trUtf8( | 1434 self.lsbAct.setWhatsThis(self.tr( |
1435 """<b>Toggle the left sidebar window</b>""" | 1435 """<b>Toggle the left sidebar window</b>""" |
1436 """<p>If the left sidebar window is hidden then display it.""" | 1436 """<p>If the left sidebar window is hidden then display it.""" |
1437 """ If it is displayed then close it.</p>""" | 1437 """ If it is displayed then close it.</p>""" |
1438 )) | 1438 )) |
1439 self.lsbAct.triggered[()].connect(self.__toggleLeftSidebar) | 1439 self.lsbAct.triggered[()].connect(self.__toggleLeftSidebar) |
1440 self.actions.append(self.lsbAct) | 1440 self.actions.append(self.lsbAct) |
1441 | 1441 |
1442 self.rsbAct = E5Action( | 1442 self.rsbAct = E5Action( |
1443 self.trUtf8('Right Sidebar'), | 1443 self.tr('Right Sidebar'), |
1444 self.trUtf8('&Right Sidebar'), | 1444 self.tr('&Right Sidebar'), |
1445 0, 0, self, 'right_sidebar', True) | 1445 0, 0, self, 'right_sidebar', True) |
1446 self.rsbAct.setStatusTip(self.trUtf8( | 1446 self.rsbAct.setStatusTip(self.tr( |
1447 'Toggle the right sidebar window')) | 1447 'Toggle the right sidebar window')) |
1448 self.rsbAct.setWhatsThis(self.trUtf8( | 1448 self.rsbAct.setWhatsThis(self.tr( |
1449 """<b>Toggle the right sidebar window</b>""" | 1449 """<b>Toggle the right sidebar window</b>""" |
1450 """<p>If the right sidebar window is hidden then display it.""" | 1450 """<p>If the right sidebar window is hidden then display it.""" |
1451 """ If it is displayed then close it.</p>""" | 1451 """ If it is displayed then close it.</p>""" |
1452 )) | 1452 )) |
1453 self.rsbAct.triggered[()].connect(self.__toggleRightSidebar) | 1453 self.rsbAct.triggered[()].connect(self.__toggleRightSidebar) |
1454 self.actions.append(self.rsbAct) | 1454 self.actions.append(self.rsbAct) |
1455 | 1455 |
1456 self.bsbAct = E5Action( | 1456 self.bsbAct = E5Action( |
1457 self.trUtf8('Bottom Sidebar'), | 1457 self.tr('Bottom Sidebar'), |
1458 self.trUtf8('&Bottom Sidebar'), 0, 0, self, | 1458 self.tr('&Bottom Sidebar'), 0, 0, self, |
1459 'bottom_sidebar', True) | 1459 'bottom_sidebar', True) |
1460 self.bsbAct.setStatusTip(self.trUtf8( | 1460 self.bsbAct.setStatusTip(self.tr( |
1461 'Toggle the bottom sidebar window')) | 1461 'Toggle the bottom sidebar window')) |
1462 self.bsbAct.setWhatsThis(self.trUtf8( | 1462 self.bsbAct.setWhatsThis(self.tr( |
1463 """<b>Toggle the bottom sidebar window</b>""" | 1463 """<b>Toggle the bottom sidebar window</b>""" |
1464 """<p>If the bottom sidebar window is hidden then display it.""" | 1464 """<p>If the bottom sidebar window is hidden then display it.""" |
1465 """ If it is displayed then close it.</p>""" | 1465 """ If it is displayed then close it.</p>""" |
1466 )) | 1466 )) |
1467 self.bsbAct.triggered[()].connect(self.__toggleBottomSidebar) | 1467 self.bsbAct.triggered[()].connect(self.__toggleBottomSidebar) |
1468 self.actions.append(self.bsbAct) | 1468 self.actions.append(self.bsbAct) |
1469 | 1469 |
1470 self.cooperationViewerActivateAct = E5Action( | 1470 self.cooperationViewerActivateAct = E5Action( |
1471 self.trUtf8('Cooperation-Viewer'), | 1471 self.tr('Cooperation-Viewer'), |
1472 self.trUtf8('Co&operation-Viewer'), | 1472 self.tr('Co&operation-Viewer'), |
1473 QKeySequence(self.trUtf8("Alt+Shift+O")), | 1473 QKeySequence(self.tr("Alt+Shift+O")), |
1474 0, self, | 1474 0, self, |
1475 'cooperation_viewer_activate') | 1475 'cooperation_viewer_activate') |
1476 self.cooperationViewerActivateAct.setStatusTip(self.trUtf8( | 1476 self.cooperationViewerActivateAct.setStatusTip(self.tr( |
1477 "Switch the input focus to the Cooperation-Viewer window.")) | 1477 "Switch the input focus to the Cooperation-Viewer window.")) |
1478 self.cooperationViewerActivateAct.setWhatsThis(self.trUtf8( | 1478 self.cooperationViewerActivateAct.setWhatsThis(self.tr( |
1479 """<b>Activate Cooperation-Viewer</b>""" | 1479 """<b>Activate Cooperation-Viewer</b>""" |
1480 """<p>This switches the input focus to the Cooperation-Viewer""" | 1480 """<p>This switches the input focus to the Cooperation-Viewer""" |
1481 """ window.</p>""" | 1481 """ window.</p>""" |
1482 )) | 1482 )) |
1483 self.cooperationViewerActivateAct.triggered[()].connect( | 1483 self.cooperationViewerActivateAct.triggered[()].connect( |
1484 self.activateCooperationViewer) | 1484 self.activateCooperationViewer) |
1485 self.actions.append(self.cooperationViewerActivateAct) | 1485 self.actions.append(self.cooperationViewerActivateAct) |
1486 self.addAction(self.cooperationViewerActivateAct) | 1486 self.addAction(self.cooperationViewerActivateAct) |
1487 | 1487 |
1488 self.ircActivateAct = E5Action( | 1488 self.ircActivateAct = E5Action( |
1489 self.trUtf8('IRC'), | 1489 self.tr('IRC'), |
1490 self.trUtf8('&IRC'), | 1490 self.tr('&IRC'), |
1491 QKeySequence(self.trUtf8("Meta+Shift+I")), | 1491 QKeySequence(self.tr("Meta+Shift+I")), |
1492 0, self, | 1492 0, self, |
1493 'irc_widget_activate') | 1493 'irc_widget_activate') |
1494 self.ircActivateAct.setStatusTip(self.trUtf8( | 1494 self.ircActivateAct.setStatusTip(self.tr( |
1495 "Switch the input focus to the IRC window.")) | 1495 "Switch the input focus to the IRC window.")) |
1496 self.ircActivateAct.setWhatsThis(self.trUtf8( | 1496 self.ircActivateAct.setWhatsThis(self.tr( |
1497 """<b>Activate IRC</b>""" | 1497 """<b>Activate IRC</b>""" |
1498 """<p>This switches the input focus to the IRC window.</p>""" | 1498 """<p>This switches the input focus to the IRC window.</p>""" |
1499 )) | 1499 )) |
1500 self.ircActivateAct.triggered[()].connect( | 1500 self.ircActivateAct.triggered[()].connect( |
1501 self.__activateIRC) | 1501 self.__activateIRC) |
1502 self.actions.append(self.ircActivateAct) | 1502 self.actions.append(self.ircActivateAct) |
1503 self.addAction(self.ircActivateAct) | 1503 self.addAction(self.ircActivateAct) |
1504 | 1504 |
1505 self.symbolsViewerActivateAct = E5Action( | 1505 self.symbolsViewerActivateAct = E5Action( |
1506 self.trUtf8('Symbols-Viewer'), | 1506 self.tr('Symbols-Viewer'), |
1507 self.trUtf8('S&ymbols-Viewer'), | 1507 self.tr('S&ymbols-Viewer'), |
1508 QKeySequence(self.trUtf8("Alt+Shift+Y")), | 1508 QKeySequence(self.tr("Alt+Shift+Y")), |
1509 0, self, | 1509 0, self, |
1510 'symbols_viewer_activate') | 1510 'symbols_viewer_activate') |
1511 self.symbolsViewerActivateAct.setStatusTip(self.trUtf8( | 1511 self.symbolsViewerActivateAct.setStatusTip(self.tr( |
1512 "Switch the input focus to the Symbols-Viewer window.")) | 1512 "Switch the input focus to the Symbols-Viewer window.")) |
1513 self.symbolsViewerActivateAct.setWhatsThis(self.trUtf8( | 1513 self.symbolsViewerActivateAct.setWhatsThis(self.tr( |
1514 """<b>Activate Symbols-Viewer</b>""" | 1514 """<b>Activate Symbols-Viewer</b>""" |
1515 """<p>This switches the input focus to the Symbols-Viewer""" | 1515 """<p>This switches the input focus to the Symbols-Viewer""" |
1516 """ window.</p>""" | 1516 """ window.</p>""" |
1517 )) | 1517 )) |
1518 self.symbolsViewerActivateAct.triggered[()].connect( | 1518 self.symbolsViewerActivateAct.triggered[()].connect( |
1519 self.__activateSymbolsViewer) | 1519 self.__activateSymbolsViewer) |
1520 self.actions.append(self.symbolsViewerActivateAct) | 1520 self.actions.append(self.symbolsViewerActivateAct) |
1521 self.addAction(self.symbolsViewerActivateAct) | 1521 self.addAction(self.symbolsViewerActivateAct) |
1522 | 1522 |
1523 self.numbersViewerActivateAct = E5Action( | 1523 self.numbersViewerActivateAct = E5Action( |
1524 self.trUtf8('Numbers-Viewer'), | 1524 self.tr('Numbers-Viewer'), |
1525 self.trUtf8('Num&bers-Viewer'), | 1525 self.tr('Num&bers-Viewer'), |
1526 QKeySequence(self.trUtf8("Alt+Shift+B")), | 1526 QKeySequence(self.tr("Alt+Shift+B")), |
1527 0, self, | 1527 0, self, |
1528 'numbers_viewer_activate') | 1528 'numbers_viewer_activate') |
1529 self.numbersViewerActivateAct.setStatusTip(self.trUtf8( | 1529 self.numbersViewerActivateAct.setStatusTip(self.tr( |
1530 "Switch the input focus to the Numbers-Viewer window.")) | 1530 "Switch the input focus to the Numbers-Viewer window.")) |
1531 self.numbersViewerActivateAct.setWhatsThis(self.trUtf8( | 1531 self.numbersViewerActivateAct.setWhatsThis(self.tr( |
1532 """<b>Activate Numbers-Viewer</b>""" | 1532 """<b>Activate Numbers-Viewer</b>""" |
1533 """<p>This switches the input focus to the Numbers-Viewer""" | 1533 """<p>This switches the input focus to the Numbers-Viewer""" |
1534 """ window.</p>""" | 1534 """ window.</p>""" |
1535 )) | 1535 )) |
1536 self.numbersViewerActivateAct.triggered[()].connect( | 1536 self.numbersViewerActivateAct.triggered[()].connect( |
1537 self.__activateNumbersViewer) | 1537 self.__activateNumbersViewer) |
1538 self.actions.append(self.numbersViewerActivateAct) | 1538 self.actions.append(self.numbersViewerActivateAct) |
1539 self.addAction(self.numbersViewerActivateAct) | 1539 self.addAction(self.numbersViewerActivateAct) |
1540 | 1540 |
1541 self.whatsThisAct = E5Action( | 1541 self.whatsThisAct = E5Action( |
1542 self.trUtf8('What\'s This?'), | 1542 self.tr('What\'s This?'), |
1543 UI.PixmapCache.getIcon("whatsThis.png"), | 1543 UI.PixmapCache.getIcon("whatsThis.png"), |
1544 self.trUtf8('&What\'s This?'), | 1544 self.tr('&What\'s This?'), |
1545 QKeySequence(self.trUtf8("Shift+F1")), | 1545 QKeySequence(self.tr("Shift+F1")), |
1546 0, self, 'whatsThis') | 1546 0, self, 'whatsThis') |
1547 self.whatsThisAct.setStatusTip(self.trUtf8('Context sensitive help')) | 1547 self.whatsThisAct.setStatusTip(self.tr('Context sensitive help')) |
1548 self.whatsThisAct.setWhatsThis(self.trUtf8( | 1548 self.whatsThisAct.setWhatsThis(self.tr( |
1549 """<b>Display context sensitive help</b>""" | 1549 """<b>Display context sensitive help</b>""" |
1550 """<p>In What's This? mode, the mouse cursor shows an arrow with""" | 1550 """<p>In What's This? mode, the mouse cursor shows an arrow with""" |
1551 """ a question mark, and you can click on the interface elements""" | 1551 """ a question mark, and you can click on the interface elements""" |
1552 """ to get a short description of what they do and how to use""" | 1552 """ to get a short description of what they do and how to use""" |
1553 """ them. In dialogs, this feature can be accessed using the""" | 1553 """ them. In dialogs, this feature can be accessed using the""" |
1555 )) | 1555 )) |
1556 self.whatsThisAct.triggered[()].connect(self.__whatsThis) | 1556 self.whatsThisAct.triggered[()].connect(self.__whatsThis) |
1557 self.actions.append(self.whatsThisAct) | 1557 self.actions.append(self.whatsThisAct) |
1558 | 1558 |
1559 self.helpviewerAct = E5Action( | 1559 self.helpviewerAct = E5Action( |
1560 self.trUtf8('Helpviewer'), | 1560 self.tr('Helpviewer'), |
1561 UI.PixmapCache.getIcon("help.png"), | 1561 UI.PixmapCache.getIcon("help.png"), |
1562 self.trUtf8('&Helpviewer...'), | 1562 self.tr('&Helpviewer...'), |
1563 QKeySequence(self.trUtf8("F1")), | 1563 QKeySequence(self.tr("F1")), |
1564 0, self, 'helpviewer') | 1564 0, self, 'helpviewer') |
1565 self.helpviewerAct.setStatusTip(self.trUtf8( | 1565 self.helpviewerAct.setStatusTip(self.tr( |
1566 'Open the helpviewer window')) | 1566 'Open the helpviewer window')) |
1567 self.helpviewerAct.setWhatsThis(self.trUtf8( | 1567 self.helpviewerAct.setWhatsThis(self.tr( |
1568 """<b>Helpviewer</b>""" | 1568 """<b>Helpviewer</b>""" |
1569 """<p>Display the eric5 web browser. This window will show""" | 1569 """<p>Display the eric5 web browser. This window will show""" |
1570 """ HTML help files and help from Qt help collections. It has""" | 1570 """ HTML help files and help from Qt help collections. It has""" |
1571 """ the capability to navigate to links, set bookmarks, print""" | 1571 """ the capability to navigate to links, set bookmarks, print""" |
1572 """ the displayed help and some more features. You may use it to""" | 1572 """ the displayed help and some more features. You may use it to""" |
1580 self.__initPythonDocActions() | 1580 self.__initPythonDocActions() |
1581 self.__initEricDocAction() | 1581 self.__initEricDocAction() |
1582 self.__initPySideDocAction() | 1582 self.__initPySideDocAction() |
1583 | 1583 |
1584 self.versionAct = E5Action( | 1584 self.versionAct = E5Action( |
1585 self.trUtf8('Show Versions'), | 1585 self.tr('Show Versions'), |
1586 self.trUtf8('Show &Versions'), | 1586 self.tr('Show &Versions'), |
1587 0, 0, self, 'show_versions') | 1587 0, 0, self, 'show_versions') |
1588 self.versionAct.setStatusTip(self.trUtf8( | 1588 self.versionAct.setStatusTip(self.tr( |
1589 'Display version information')) | 1589 'Display version information')) |
1590 self.versionAct.setWhatsThis(self.trUtf8( | 1590 self.versionAct.setWhatsThis(self.tr( |
1591 """<b>Show Versions</b>""" | 1591 """<b>Show Versions</b>""" |
1592 """<p>Display version information.</p>""" | 1592 """<p>Display version information.</p>""" |
1593 )) | 1593 )) |
1594 self.versionAct.triggered[()].connect(self.__showVersions) | 1594 self.versionAct.triggered[()].connect(self.__showVersions) |
1595 self.actions.append(self.versionAct) | 1595 self.actions.append(self.versionAct) |
1596 | 1596 |
1597 self.checkUpdateAct = E5Action( | 1597 self.checkUpdateAct = E5Action( |
1598 self.trUtf8('Check for Updates'), | 1598 self.tr('Check for Updates'), |
1599 self.trUtf8('Check for &Updates...'), 0, 0, self, 'check_updates') | 1599 self.tr('Check for &Updates...'), 0, 0, self, 'check_updates') |
1600 self.checkUpdateAct.setStatusTip(self.trUtf8('Check for Updates')) | 1600 self.checkUpdateAct.setStatusTip(self.tr('Check for Updates')) |
1601 self.checkUpdateAct.setWhatsThis(self.trUtf8( | 1601 self.checkUpdateAct.setWhatsThis(self.tr( |
1602 """<b>Check for Updates...</b>""" | 1602 """<b>Check for Updates...</b>""" |
1603 """<p>Checks the internet for updates of eric5.</p>""" | 1603 """<p>Checks the internet for updates of eric5.</p>""" |
1604 )) | 1604 )) |
1605 self.checkUpdateAct.triggered[()].connect(self.performVersionCheck) | 1605 self.checkUpdateAct.triggered[()].connect(self.performVersionCheck) |
1606 self.actions.append(self.checkUpdateAct) | 1606 self.actions.append(self.checkUpdateAct) |
1607 | 1607 |
1608 self.showVersionsAct = E5Action( | 1608 self.showVersionsAct = E5Action( |
1609 self.trUtf8('Show downloadable versions'), | 1609 self.tr('Show downloadable versions'), |
1610 self.trUtf8('Show &downloadable versions...'), | 1610 self.tr('Show &downloadable versions...'), |
1611 0, 0, self, 'show_downloadable_versions') | 1611 0, 0, self, 'show_downloadable_versions') |
1612 self.showVersionsAct.setStatusTip( | 1612 self.showVersionsAct.setStatusTip( |
1613 self.trUtf8('Show the versions available for download')) | 1613 self.tr('Show the versions available for download')) |
1614 self.showVersionsAct.setWhatsThis(self.trUtf8( | 1614 self.showVersionsAct.setWhatsThis(self.tr( |
1615 """<b>Show downloadable versions...</b>""" | 1615 """<b>Show downloadable versions...</b>""" |
1616 """<p>Shows the eric5 versions available for download """ | 1616 """<p>Shows the eric5 versions available for download """ |
1617 """from the internet.</p>""" | 1617 """from the internet.</p>""" |
1618 )) | 1618 )) |
1619 self.showVersionsAct.triggered[()].connect( | 1619 self.showVersionsAct.triggered[()].connect( |
1620 self.showAvailableVersionsInfo) | 1620 self.showAvailableVersionsInfo) |
1621 self.actions.append(self.showVersionsAct) | 1621 self.actions.append(self.showVersionsAct) |
1622 | 1622 |
1623 self.showErrorLogAct = E5Action( | 1623 self.showErrorLogAct = E5Action( |
1624 self.trUtf8('Show Error Log'), | 1624 self.tr('Show Error Log'), |
1625 self.trUtf8('Show Error &Log...'), | 1625 self.tr('Show Error &Log...'), |
1626 0, 0, self, 'show_error_log') | 1626 0, 0, self, 'show_error_log') |
1627 self.showErrorLogAct.setStatusTip(self.trUtf8('Show Error Log')) | 1627 self.showErrorLogAct.setStatusTip(self.tr('Show Error Log')) |
1628 self.showErrorLogAct.setWhatsThis(self.trUtf8( | 1628 self.showErrorLogAct.setWhatsThis(self.tr( |
1629 """<b>Show Error Log...</b>""" | 1629 """<b>Show Error Log...</b>""" |
1630 """<p>Opens a dialog showing the most recent error log.</p>""" | 1630 """<p>Opens a dialog showing the most recent error log.</p>""" |
1631 )) | 1631 )) |
1632 self.showErrorLogAct.triggered[()].connect(self.__showErrorLog) | 1632 self.showErrorLogAct.triggered[()].connect(self.__showErrorLog) |
1633 self.actions.append(self.showErrorLogAct) | 1633 self.actions.append(self.showErrorLogAct) |
1634 | 1634 |
1635 self.reportBugAct = E5Action( | 1635 self.reportBugAct = E5Action( |
1636 self.trUtf8('Report Bug'), | 1636 self.tr('Report Bug'), |
1637 self.trUtf8('Report &Bug...'), | 1637 self.tr('Report &Bug...'), |
1638 0, 0, self, 'report_bug') | 1638 0, 0, self, 'report_bug') |
1639 self.reportBugAct.setStatusTip(self.trUtf8('Report a bug')) | 1639 self.reportBugAct.setStatusTip(self.tr('Report a bug')) |
1640 self.reportBugAct.setWhatsThis(self.trUtf8( | 1640 self.reportBugAct.setWhatsThis(self.tr( |
1641 """<b>Report Bug...</b>""" | 1641 """<b>Report Bug...</b>""" |
1642 """<p>Opens a dialog to report a bug.</p>""" | 1642 """<p>Opens a dialog to report a bug.</p>""" |
1643 )) | 1643 )) |
1644 self.reportBugAct.triggered[()].connect(self.__reportBug) | 1644 self.reportBugAct.triggered[()].connect(self.__reportBug) |
1645 self.actions.append(self.reportBugAct) | 1645 self.actions.append(self.reportBugAct) |
1646 | 1646 |
1647 self.requestFeatureAct = E5Action( | 1647 self.requestFeatureAct = E5Action( |
1648 self.trUtf8('Request Feature'), | 1648 self.tr('Request Feature'), |
1649 self.trUtf8('Request &Feature...'), | 1649 self.tr('Request &Feature...'), |
1650 0, 0, self, 'request_feature') | 1650 0, 0, self, 'request_feature') |
1651 self.requestFeatureAct.setStatusTip(self.trUtf8( | 1651 self.requestFeatureAct.setStatusTip(self.tr( |
1652 'Send a feature request')) | 1652 'Send a feature request')) |
1653 self.requestFeatureAct.setWhatsThis(self.trUtf8( | 1653 self.requestFeatureAct.setWhatsThis(self.tr( |
1654 """<b>Request Feature...</b>""" | 1654 """<b>Request Feature...</b>""" |
1655 """<p>Opens a dialog to send a feature request.</p>""" | 1655 """<p>Opens a dialog to send a feature request.</p>""" |
1656 )) | 1656 )) |
1657 self.requestFeatureAct.triggered[()].connect(self.__requestFeature) | 1657 self.requestFeatureAct.triggered[()].connect(self.__requestFeature) |
1658 self.actions.append(self.requestFeatureAct) | 1658 self.actions.append(self.requestFeatureAct) |
1659 | 1659 |
1660 self.utActGrp = createActionGroup(self) | 1660 self.utActGrp = createActionGroup(self) |
1661 | 1661 |
1662 self.utDialogAct = E5Action( | 1662 self.utDialogAct = E5Action( |
1663 self.trUtf8('Unittest'), | 1663 self.tr('Unittest'), |
1664 UI.PixmapCache.getIcon("unittest.png"), | 1664 UI.PixmapCache.getIcon("unittest.png"), |
1665 self.trUtf8('&Unittest...'), | 1665 self.tr('&Unittest...'), |
1666 0, 0, self.utActGrp, 'unittest') | 1666 0, 0, self.utActGrp, 'unittest') |
1667 self.utDialogAct.setStatusTip(self.trUtf8('Start unittest dialog')) | 1667 self.utDialogAct.setStatusTip(self.tr('Start unittest dialog')) |
1668 self.utDialogAct.setWhatsThis(self.trUtf8( | 1668 self.utDialogAct.setWhatsThis(self.tr( |
1669 """<b>Unittest</b>""" | 1669 """<b>Unittest</b>""" |
1670 """<p>Perform unit tests. The dialog gives you the""" | 1670 """<p>Perform unit tests. The dialog gives you the""" |
1671 """ ability to select and run a unittest suite.</p>""" | 1671 """ ability to select and run a unittest suite.</p>""" |
1672 )) | 1672 )) |
1673 self.utDialogAct.triggered[()].connect(self.__unittest) | 1673 self.utDialogAct.triggered[()].connect(self.__unittest) |
1674 self.actions.append(self.utDialogAct) | 1674 self.actions.append(self.utDialogAct) |
1675 | 1675 |
1676 self.utRestartAct = E5Action( | 1676 self.utRestartAct = E5Action( |
1677 self.trUtf8('Unittest Restart'), | 1677 self.tr('Unittest Restart'), |
1678 UI.PixmapCache.getIcon("unittestRestart.png"), | 1678 UI.PixmapCache.getIcon("unittestRestart.png"), |
1679 self.trUtf8('&Restart Unittest...'), | 1679 self.tr('&Restart Unittest...'), |
1680 0, 0, self.utActGrp, 'unittest_restart') | 1680 0, 0, self.utActGrp, 'unittest_restart') |
1681 self.utRestartAct.setStatusTip(self.trUtf8('Restart last unittest')) | 1681 self.utRestartAct.setStatusTip(self.tr('Restart last unittest')) |
1682 self.utRestartAct.setWhatsThis(self.trUtf8( | 1682 self.utRestartAct.setWhatsThis(self.tr( |
1683 """<b>Restart Unittest</b>""" | 1683 """<b>Restart Unittest</b>""" |
1684 """<p>Restart the unittest performed last.</p>""" | 1684 """<p>Restart the unittest performed last.</p>""" |
1685 )) | 1685 )) |
1686 self.utRestartAct.triggered[()].connect(self.__unittestRestart) | 1686 self.utRestartAct.triggered[()].connect(self.__unittestRestart) |
1687 self.utRestartAct.setEnabled(False) | 1687 self.utRestartAct.setEnabled(False) |
1688 self.actions.append(self.utRestartAct) | 1688 self.actions.append(self.utRestartAct) |
1689 | 1689 |
1690 self.utRerunFailedAct = E5Action( | 1690 self.utRerunFailedAct = E5Action( |
1691 self.trUtf8('Unittest Rerun Failed'), | 1691 self.tr('Unittest Rerun Failed'), |
1692 UI.PixmapCache.getIcon("unittestRerunFailed.png"), | 1692 UI.PixmapCache.getIcon("unittestRerunFailed.png"), |
1693 self.trUtf8('Rerun Failed Tests...'), | 1693 self.tr('Rerun Failed Tests...'), |
1694 0, 0, self.utActGrp, 'unittest_rerun_failed') | 1694 0, 0, self.utActGrp, 'unittest_rerun_failed') |
1695 self.utRerunFailedAct.setStatusTip(self.trUtf8( | 1695 self.utRerunFailedAct.setStatusTip(self.tr( |
1696 'Rerun failed tests of the last run')) | 1696 'Rerun failed tests of the last run')) |
1697 self.utRerunFailedAct.setWhatsThis(self.trUtf8( | 1697 self.utRerunFailedAct.setWhatsThis(self.tr( |
1698 """<b>Rerun Failed Tests</b>""" | 1698 """<b>Rerun Failed Tests</b>""" |
1699 """<p>Rerun all tests that failed during the last unittest""" | 1699 """<p>Rerun all tests that failed during the last unittest""" |
1700 """ run.</p>""" | 1700 """ run.</p>""" |
1701 )) | 1701 )) |
1702 self.utRerunFailedAct.triggered[()].connect(self.__unittestRerunFailed) | 1702 self.utRerunFailedAct.triggered[()].connect(self.__unittestRerunFailed) |
1703 self.utRerunFailedAct.setEnabled(False) | 1703 self.utRerunFailedAct.setEnabled(False) |
1704 self.actions.append(self.utRerunFailedAct) | 1704 self.actions.append(self.utRerunFailedAct) |
1705 | 1705 |
1706 self.utScriptAct = E5Action( | 1706 self.utScriptAct = E5Action( |
1707 self.trUtf8('Unittest Script'), | 1707 self.tr('Unittest Script'), |
1708 UI.PixmapCache.getIcon("unittestScript.png"), | 1708 UI.PixmapCache.getIcon("unittestScript.png"), |
1709 self.trUtf8('Unittest &Script...'), | 1709 self.tr('Unittest &Script...'), |
1710 0, 0, self.utActGrp, 'unittest_script') | 1710 0, 0, self.utActGrp, 'unittest_script') |
1711 self.utScriptAct.setStatusTip(self.trUtf8( | 1711 self.utScriptAct.setStatusTip(self.tr( |
1712 'Run unittest with current script')) | 1712 'Run unittest with current script')) |
1713 self.utScriptAct.setWhatsThis(self.trUtf8( | 1713 self.utScriptAct.setWhatsThis(self.tr( |
1714 """<b>Unittest Script</b>""" | 1714 """<b>Unittest Script</b>""" |
1715 """<p>Run unittest with current script.</p>""" | 1715 """<p>Run unittest with current script.</p>""" |
1716 )) | 1716 )) |
1717 self.utScriptAct.triggered[()].connect(self.__unittestScript) | 1717 self.utScriptAct.triggered[()].connect(self.__unittestScript) |
1718 self.utScriptAct.setEnabled(False) | 1718 self.utScriptAct.setEnabled(False) |
1719 self.actions.append(self.utScriptAct) | 1719 self.actions.append(self.utScriptAct) |
1720 | 1720 |
1721 self.utProjectAct = E5Action( | 1721 self.utProjectAct = E5Action( |
1722 self.trUtf8('Unittest Project'), | 1722 self.tr('Unittest Project'), |
1723 UI.PixmapCache.getIcon("unittestProject.png"), | 1723 UI.PixmapCache.getIcon("unittestProject.png"), |
1724 self.trUtf8('Unittest &Project...'), | 1724 self.tr('Unittest &Project...'), |
1725 0, 0, self.utActGrp, 'unittest_project') | 1725 0, 0, self.utActGrp, 'unittest_project') |
1726 self.utProjectAct.setStatusTip(self.trUtf8( | 1726 self.utProjectAct.setStatusTip(self.tr( |
1727 'Run unittest with current project')) | 1727 'Run unittest with current project')) |
1728 self.utProjectAct.setWhatsThis(self.trUtf8( | 1728 self.utProjectAct.setWhatsThis(self.tr( |
1729 """<b>Unittest Project</b>""" | 1729 """<b>Unittest Project</b>""" |
1730 """<p>Run unittest with current project.</p>""" | 1730 """<p>Run unittest with current project.</p>""" |
1731 )) | 1731 )) |
1732 self.utProjectAct.triggered[()].connect(self.__unittestProject) | 1732 self.utProjectAct.triggered[()].connect(self.__unittestProject) |
1733 self.utProjectAct.setEnabled(False) | 1733 self.utProjectAct.setEnabled(False) |
1744 designerExe = os.path.join( | 1744 designerExe = os.path.join( |
1745 Utilities.getQtBinariesPath(), | 1745 Utilities.getQtBinariesPath(), |
1746 Utilities.generateQtToolName("designer")) | 1746 Utilities.generateQtToolName("designer")) |
1747 if os.path.exists(designerExe): | 1747 if os.path.exists(designerExe): |
1748 self.designer4Act = E5Action( | 1748 self.designer4Act = E5Action( |
1749 self.trUtf8('Qt-Designer'), | 1749 self.tr('Qt-Designer'), |
1750 UI.PixmapCache.getIcon("designer4.png"), | 1750 UI.PixmapCache.getIcon("designer4.png"), |
1751 self.trUtf8('Qt-&Designer...'), | 1751 self.tr('Qt-&Designer...'), |
1752 0, 0, self, 'qt_designer4') | 1752 0, 0, self, 'qt_designer4') |
1753 self.designer4Act.setStatusTip(self.trUtf8('Start Qt-Designer')) | 1753 self.designer4Act.setStatusTip(self.tr('Start Qt-Designer')) |
1754 self.designer4Act.setWhatsThis(self.trUtf8( | 1754 self.designer4Act.setWhatsThis(self.tr( |
1755 """<b>Qt-Designer</b>""" | 1755 """<b>Qt-Designer</b>""" |
1756 """<p>Start Qt-Designer.</p>""" | 1756 """<p>Start Qt-Designer.</p>""" |
1757 )) | 1757 )) |
1758 self.designer4Act.triggered[()].connect(self.__designer4) | 1758 self.designer4Act.triggered[()].connect(self.__designer4) |
1759 self.actions.append(self.designer4Act) | 1759 self.actions.append(self.designer4Act) |
1770 linguistExe = os.path.join( | 1770 linguistExe = os.path.join( |
1771 Utilities.getQtBinariesPath(), | 1771 Utilities.getQtBinariesPath(), |
1772 Utilities.generateQtToolName("linguist")) | 1772 Utilities.generateQtToolName("linguist")) |
1773 if os.path.exists(linguistExe): | 1773 if os.path.exists(linguistExe): |
1774 self.linguist4Act = E5Action( | 1774 self.linguist4Act = E5Action( |
1775 self.trUtf8('Qt-Linguist'), | 1775 self.tr('Qt-Linguist'), |
1776 UI.PixmapCache.getIcon("linguist4.png"), | 1776 UI.PixmapCache.getIcon("linguist4.png"), |
1777 self.trUtf8('Qt-&Linguist...'), | 1777 self.tr('Qt-&Linguist...'), |
1778 0, 0, self, 'qt_linguist4') | 1778 0, 0, self, 'qt_linguist4') |
1779 self.linguist4Act.setStatusTip(self.trUtf8('Start Qt-Linguist')) | 1779 self.linguist4Act.setStatusTip(self.tr('Start Qt-Linguist')) |
1780 self.linguist4Act.setWhatsThis(self.trUtf8( | 1780 self.linguist4Act.setWhatsThis(self.tr( |
1781 """<b>Qt-Linguist</b>""" | 1781 """<b>Qt-Linguist</b>""" |
1782 """<p>Start Qt-Linguist.</p>""" | 1782 """<p>Start Qt-Linguist.</p>""" |
1783 )) | 1783 )) |
1784 self.linguist4Act.triggered[()].connect(self.__linguist4) | 1784 self.linguist4Act.triggered[()].connect(self.__linguist4) |
1785 self.actions.append(self.linguist4Act) | 1785 self.actions.append(self.linguist4Act) |
1786 else: | 1786 else: |
1787 self.linguist4Act = None | 1787 self.linguist4Act = None |
1788 | 1788 |
1789 self.uipreviewerAct = E5Action( | 1789 self.uipreviewerAct = E5Action( |
1790 self.trUtf8('UI Previewer'), | 1790 self.tr('UI Previewer'), |
1791 UI.PixmapCache.getIcon("uiPreviewer.png"), | 1791 UI.PixmapCache.getIcon("uiPreviewer.png"), |
1792 self.trUtf8('&UI Previewer...'), | 1792 self.tr('&UI Previewer...'), |
1793 0, 0, self, 'ui_previewer') | 1793 0, 0, self, 'ui_previewer') |
1794 self.uipreviewerAct.setStatusTip(self.trUtf8('Start the UI Previewer')) | 1794 self.uipreviewerAct.setStatusTip(self.tr('Start the UI Previewer')) |
1795 self.uipreviewerAct.setWhatsThis(self.trUtf8( | 1795 self.uipreviewerAct.setWhatsThis(self.tr( |
1796 """<b>UI Previewer</b>""" | 1796 """<b>UI Previewer</b>""" |
1797 """<p>Start the UI Previewer.</p>""" | 1797 """<p>Start the UI Previewer.</p>""" |
1798 )) | 1798 )) |
1799 self.uipreviewerAct.triggered[()].connect(self.__UIPreviewer) | 1799 self.uipreviewerAct.triggered[()].connect(self.__UIPreviewer) |
1800 self.actions.append(self.uipreviewerAct) | 1800 self.actions.append(self.uipreviewerAct) |
1801 | 1801 |
1802 self.trpreviewerAct = E5Action( | 1802 self.trpreviewerAct = E5Action( |
1803 self.trUtf8('Translations Previewer'), | 1803 self.tr('Translations Previewer'), |
1804 UI.PixmapCache.getIcon("trPreviewer.png"), | 1804 UI.PixmapCache.getIcon("trPreviewer.png"), |
1805 self.trUtf8('&Translations Previewer...'), | 1805 self.tr('&Translations Previewer...'), |
1806 0, 0, self, 'tr_previewer') | 1806 0, 0, self, 'tr_previewer') |
1807 self.trpreviewerAct.setStatusTip(self.trUtf8( | 1807 self.trpreviewerAct.setStatusTip(self.tr( |
1808 'Start the Translations Previewer')) | 1808 'Start the Translations Previewer')) |
1809 self.trpreviewerAct.setWhatsThis(self.trUtf8( | 1809 self.trpreviewerAct.setWhatsThis(self.tr( |
1810 """<b>Translations Previewer</b>""" | 1810 """<b>Translations Previewer</b>""" |
1811 """<p>Start the Translations Previewer.</p>""" | 1811 """<p>Start the Translations Previewer.</p>""" |
1812 )) | 1812 )) |
1813 self.trpreviewerAct.triggered[()].connect(self.__TRPreviewer) | 1813 self.trpreviewerAct.triggered[()].connect(self.__TRPreviewer) |
1814 self.actions.append(self.trpreviewerAct) | 1814 self.actions.append(self.trpreviewerAct) |
1815 | 1815 |
1816 self.diffAct = E5Action( | 1816 self.diffAct = E5Action( |
1817 self.trUtf8('Compare Files'), | 1817 self.tr('Compare Files'), |
1818 UI.PixmapCache.getIcon("diffFiles.png"), | 1818 UI.PixmapCache.getIcon("diffFiles.png"), |
1819 self.trUtf8('&Compare Files...'), | 1819 self.tr('&Compare Files...'), |
1820 0, 0, self, 'diff_files') | 1820 0, 0, self, 'diff_files') |
1821 self.diffAct.setStatusTip(self.trUtf8('Compare two files')) | 1821 self.diffAct.setStatusTip(self.tr('Compare two files')) |
1822 self.diffAct.setWhatsThis(self.trUtf8( | 1822 self.diffAct.setWhatsThis(self.tr( |
1823 """<b>Compare Files</b>""" | 1823 """<b>Compare Files</b>""" |
1824 """<p>Open a dialog to compare two files.</p>""" | 1824 """<p>Open a dialog to compare two files.</p>""" |
1825 )) | 1825 )) |
1826 self.diffAct.triggered[()].connect(self.__compareFiles) | 1826 self.diffAct.triggered[()].connect(self.__compareFiles) |
1827 self.actions.append(self.diffAct) | 1827 self.actions.append(self.diffAct) |
1828 | 1828 |
1829 self.compareAct = E5Action( | 1829 self.compareAct = E5Action( |
1830 self.trUtf8('Compare Files side by side'), | 1830 self.tr('Compare Files side by side'), |
1831 UI.PixmapCache.getIcon("compareFiles.png"), | 1831 UI.PixmapCache.getIcon("compareFiles.png"), |
1832 self.trUtf8('Compare &Files side by side...'), | 1832 self.tr('Compare &Files side by side...'), |
1833 0, 0, self, 'compare_files') | 1833 0, 0, self, 'compare_files') |
1834 self.compareAct.setStatusTip(self.trUtf8('Compare two files')) | 1834 self.compareAct.setStatusTip(self.tr('Compare two files')) |
1835 self.compareAct.setWhatsThis(self.trUtf8( | 1835 self.compareAct.setWhatsThis(self.tr( |
1836 """<b>Compare Files side by side</b>""" | 1836 """<b>Compare Files side by side</b>""" |
1837 """<p>Open a dialog to compare two files and show the result""" | 1837 """<p>Open a dialog to compare two files and show the result""" |
1838 """ side by side.</p>""" | 1838 """ side by side.</p>""" |
1839 )) | 1839 )) |
1840 self.compareAct.triggered[()].connect(self.__compareFilesSbs) | 1840 self.compareAct.triggered[()].connect(self.__compareFilesSbs) |
1841 self.actions.append(self.compareAct) | 1841 self.actions.append(self.compareAct) |
1842 | 1842 |
1843 self.sqlBrowserAct = E5Action( | 1843 self.sqlBrowserAct = E5Action( |
1844 self.trUtf8('SQL Browser'), | 1844 self.tr('SQL Browser'), |
1845 UI.PixmapCache.getIcon("sqlBrowser.png"), | 1845 UI.PixmapCache.getIcon("sqlBrowser.png"), |
1846 self.trUtf8('SQL &Browser...'), | 1846 self.tr('SQL &Browser...'), |
1847 0, 0, self, 'sql_browser') | 1847 0, 0, self, 'sql_browser') |
1848 self.sqlBrowserAct.setStatusTip(self.trUtf8('Browse a SQL database')) | 1848 self.sqlBrowserAct.setStatusTip(self.tr('Browse a SQL database')) |
1849 self.sqlBrowserAct.setWhatsThis(self.trUtf8( | 1849 self.sqlBrowserAct.setWhatsThis(self.tr( |
1850 """<b>SQL Browser</b>""" | 1850 """<b>SQL Browser</b>""" |
1851 """<p>Browse a SQL database.</p>""" | 1851 """<p>Browse a SQL database.</p>""" |
1852 )) | 1852 )) |
1853 self.sqlBrowserAct.triggered[()].connect(self.__sqlBrowser) | 1853 self.sqlBrowserAct.triggered[()].connect(self.__sqlBrowser) |
1854 self.actions.append(self.sqlBrowserAct) | 1854 self.actions.append(self.sqlBrowserAct) |
1855 | 1855 |
1856 self.miniEditorAct = E5Action( | 1856 self.miniEditorAct = E5Action( |
1857 self.trUtf8('Mini Editor'), | 1857 self.tr('Mini Editor'), |
1858 UI.PixmapCache.getIcon("editor.png"), | 1858 UI.PixmapCache.getIcon("editor.png"), |
1859 self.trUtf8('Mini &Editor...'), | 1859 self.tr('Mini &Editor...'), |
1860 0, 0, self, 'mini_editor') | 1860 0, 0, self, 'mini_editor') |
1861 self.miniEditorAct.setStatusTip(self.trUtf8('Mini Editor')) | 1861 self.miniEditorAct.setStatusTip(self.tr('Mini Editor')) |
1862 self.miniEditorAct.setWhatsThis(self.trUtf8( | 1862 self.miniEditorAct.setWhatsThis(self.tr( |
1863 """<b>Mini Editor</b>""" | 1863 """<b>Mini Editor</b>""" |
1864 """<p>Open a dialog with a simplified editor.</p>""" | 1864 """<p>Open a dialog with a simplified editor.</p>""" |
1865 )) | 1865 )) |
1866 self.miniEditorAct.triggered[()].connect(self.__openMiniEditor) | 1866 self.miniEditorAct.triggered[()].connect(self.__openMiniEditor) |
1867 self.actions.append(self.miniEditorAct) | 1867 self.actions.append(self.miniEditorAct) |
1868 | 1868 |
1869 self.webBrowserAct = E5Action( | 1869 self.webBrowserAct = E5Action( |
1870 self.trUtf8('eric5 Web Browser'), | 1870 self.tr('eric5 Web Browser'), |
1871 UI.PixmapCache.getIcon("ericWeb.png"), | 1871 UI.PixmapCache.getIcon("ericWeb.png"), |
1872 self.trUtf8('eric5 &Web Browser...'), | 1872 self.tr('eric5 &Web Browser...'), |
1873 0, 0, self, 'web_browser') | 1873 0, 0, self, 'web_browser') |
1874 self.webBrowserAct.setStatusTip(self.trUtf8( | 1874 self.webBrowserAct.setStatusTip(self.tr( |
1875 'Start the eric5 Web Browser')) | 1875 'Start the eric5 Web Browser')) |
1876 self.webBrowserAct.setWhatsThis(self.trUtf8( | 1876 self.webBrowserAct.setWhatsThis(self.tr( |
1877 """<b>eric5 Web Browser</b>""" | 1877 """<b>eric5 Web Browser</b>""" |
1878 """<p>Browse the Internet with the eric5 Web Browser.</p>""" | 1878 """<p>Browse the Internet with the eric5 Web Browser.</p>""" |
1879 )) | 1879 )) |
1880 self.webBrowserAct.triggered[()].connect(self.__startWebBrowser) | 1880 self.webBrowserAct.triggered[()].connect(self.__startWebBrowser) |
1881 self.actions.append(self.webBrowserAct) | 1881 self.actions.append(self.webBrowserAct) |
1882 | 1882 |
1883 self.iconEditorAct = E5Action( | 1883 self.iconEditorAct = E5Action( |
1884 self.trUtf8('Icon Editor'), | 1884 self.tr('Icon Editor'), |
1885 UI.PixmapCache.getIcon("iconEditor.png"), | 1885 UI.PixmapCache.getIcon("iconEditor.png"), |
1886 self.trUtf8('&Icon Editor...'), | 1886 self.tr('&Icon Editor...'), |
1887 0, 0, self, 'icon_editor') | 1887 0, 0, self, 'icon_editor') |
1888 self.iconEditorAct.setStatusTip(self.trUtf8( | 1888 self.iconEditorAct.setStatusTip(self.tr( |
1889 'Start the eric5 Icon Editor')) | 1889 'Start the eric5 Icon Editor')) |
1890 self.iconEditorAct.setWhatsThis(self.trUtf8( | 1890 self.iconEditorAct.setWhatsThis(self.tr( |
1891 """<b>Icon Editor</b>""" | 1891 """<b>Icon Editor</b>""" |
1892 """<p>Starts the eric5 Icon Editor for editing simple icons.</p>""" | 1892 """<p>Starts the eric5 Icon Editor for editing simple icons.</p>""" |
1893 )) | 1893 )) |
1894 self.iconEditorAct.triggered[()].connect(self.__editPixmap) | 1894 self.iconEditorAct.triggered[()].connect(self.__editPixmap) |
1895 self.actions.append(self.iconEditorAct) | 1895 self.actions.append(self.iconEditorAct) |
1896 | 1896 |
1897 self.snapshotAct = E5Action( | 1897 self.snapshotAct = E5Action( |
1898 self.trUtf8('Snapshot'), | 1898 self.tr('Snapshot'), |
1899 UI.PixmapCache.getIcon("ericSnap.png"), | 1899 UI.PixmapCache.getIcon("ericSnap.png"), |
1900 self.trUtf8('&Snapshot...'), | 1900 self.tr('&Snapshot...'), |
1901 0, 0, self, 'snapshot') | 1901 0, 0, self, 'snapshot') |
1902 self.snapshotAct.setStatusTip(self.trUtf8( | 1902 self.snapshotAct.setStatusTip(self.tr( |
1903 'Take snapshots of a screen region')) | 1903 'Take snapshots of a screen region')) |
1904 self.snapshotAct.setWhatsThis(self.trUtf8( | 1904 self.snapshotAct.setWhatsThis(self.tr( |
1905 """<b>Snapshot</b>""" | 1905 """<b>Snapshot</b>""" |
1906 """<p>This opens a dialog to take snapshots of a screen""" | 1906 """<p>This opens a dialog to take snapshots of a screen""" |
1907 """ region.</p>""" | 1907 """ region.</p>""" |
1908 )) | 1908 )) |
1909 self.snapshotAct.triggered[()].connect(self.__snapshot) | 1909 self.snapshotAct.triggered[()].connect(self.__snapshot) |
1910 self.actions.append(self.snapshotAct) | 1910 self.actions.append(self.snapshotAct) |
1911 | 1911 |
1912 self.prefAct = E5Action( | 1912 self.prefAct = E5Action( |
1913 self.trUtf8('Preferences'), | 1913 self.tr('Preferences'), |
1914 UI.PixmapCache.getIcon("configure.png"), | 1914 UI.PixmapCache.getIcon("configure.png"), |
1915 self.trUtf8('&Preferences...'), | 1915 self.tr('&Preferences...'), |
1916 0, 0, self, 'preferences') | 1916 0, 0, self, 'preferences') |
1917 self.prefAct.setStatusTip(self.trUtf8( | 1917 self.prefAct.setStatusTip(self.tr( |
1918 'Set the prefered configuration')) | 1918 'Set the prefered configuration')) |
1919 self.prefAct.setWhatsThis(self.trUtf8( | 1919 self.prefAct.setWhatsThis(self.tr( |
1920 """<b>Preferences</b>""" | 1920 """<b>Preferences</b>""" |
1921 """<p>Set the configuration items of the application""" | 1921 """<p>Set the configuration items of the application""" |
1922 """ with your prefered values.</p>""" | 1922 """ with your prefered values.</p>""" |
1923 )) | 1923 )) |
1924 self.prefAct.triggered[()].connect(self.showPreferences) | 1924 self.prefAct.triggered[()].connect(self.showPreferences) |
1925 self.prefAct.setMenuRole(QAction.PreferencesRole) | 1925 self.prefAct.setMenuRole(QAction.PreferencesRole) |
1926 self.actions.append(self.prefAct) | 1926 self.actions.append(self.prefAct) |
1927 | 1927 |
1928 self.prefExportAct = E5Action( | 1928 self.prefExportAct = E5Action( |
1929 self.trUtf8('Export Preferences'), | 1929 self.tr('Export Preferences'), |
1930 UI.PixmapCache.getIcon("configureExport.png"), | 1930 UI.PixmapCache.getIcon("configureExport.png"), |
1931 self.trUtf8('E&xport Preferences...'), | 1931 self.tr('E&xport Preferences...'), |
1932 0, 0, self, 'export_preferences') | 1932 0, 0, self, 'export_preferences') |
1933 self.prefExportAct.setStatusTip(self.trUtf8( | 1933 self.prefExportAct.setStatusTip(self.tr( |
1934 'Export the current configuration')) | 1934 'Export the current configuration')) |
1935 self.prefExportAct.setWhatsThis(self.trUtf8( | 1935 self.prefExportAct.setWhatsThis(self.tr( |
1936 """<b>Export Preferences</b>""" | 1936 """<b>Export Preferences</b>""" |
1937 """<p>Export the current configuration to a file.</p>""" | 1937 """<p>Export the current configuration to a file.</p>""" |
1938 )) | 1938 )) |
1939 self.prefExportAct.triggered[()].connect(self.__exportPreferences) | 1939 self.prefExportAct.triggered[()].connect(self.__exportPreferences) |
1940 self.actions.append(self.prefExportAct) | 1940 self.actions.append(self.prefExportAct) |
1941 | 1941 |
1942 self.prefImportAct = E5Action( | 1942 self.prefImportAct = E5Action( |
1943 self.trUtf8('Import Preferences'), | 1943 self.tr('Import Preferences'), |
1944 UI.PixmapCache.getIcon("configureImport.png"), | 1944 UI.PixmapCache.getIcon("configureImport.png"), |
1945 self.trUtf8('I&mport Preferences...'), | 1945 self.tr('I&mport Preferences...'), |
1946 0, 0, self, 'import_preferences') | 1946 0, 0, self, 'import_preferences') |
1947 self.prefImportAct.setStatusTip(self.trUtf8( | 1947 self.prefImportAct.setStatusTip(self.tr( |
1948 'Import a previously exported configuration')) | 1948 'Import a previously exported configuration')) |
1949 self.prefImportAct.setWhatsThis(self.trUtf8( | 1949 self.prefImportAct.setWhatsThis(self.tr( |
1950 """<b>Import Preferences</b>""" | 1950 """<b>Import Preferences</b>""" |
1951 """<p>Import a previously exported configuration.</p>""" | 1951 """<p>Import a previously exported configuration.</p>""" |
1952 )) | 1952 )) |
1953 self.prefImportAct.triggered[()].connect(self.__importPreferences) | 1953 self.prefImportAct.triggered[()].connect(self.__importPreferences) |
1954 self.actions.append(self.prefImportAct) | 1954 self.actions.append(self.prefImportAct) |
1955 | 1955 |
1956 self.reloadAPIsAct = E5Action( | 1956 self.reloadAPIsAct = E5Action( |
1957 self.trUtf8('Reload APIs'), | 1957 self.tr('Reload APIs'), |
1958 self.trUtf8('Reload &APIs'), | 1958 self.tr('Reload &APIs'), |
1959 0, 0, self, 'reload_apis') | 1959 0, 0, self, 'reload_apis') |
1960 self.reloadAPIsAct.setStatusTip(self.trUtf8( | 1960 self.reloadAPIsAct.setStatusTip(self.tr( |
1961 'Reload the API information')) | 1961 'Reload the API information')) |
1962 self.reloadAPIsAct.setWhatsThis(self.trUtf8( | 1962 self.reloadAPIsAct.setWhatsThis(self.tr( |
1963 """<b>Reload APIs</b>""" | 1963 """<b>Reload APIs</b>""" |
1964 """<p>Reload the API information.</p>""" | 1964 """<p>Reload the API information.</p>""" |
1965 )) | 1965 )) |
1966 self.reloadAPIsAct.triggered[()].connect(self.__reloadAPIs) | 1966 self.reloadAPIsAct.triggered[()].connect(self.__reloadAPIs) |
1967 self.actions.append(self.reloadAPIsAct) | 1967 self.actions.append(self.reloadAPIsAct) |
1968 | 1968 |
1969 self.showExternalToolsAct = E5Action( | 1969 self.showExternalToolsAct = E5Action( |
1970 self.trUtf8('Show external tools'), | 1970 self.tr('Show external tools'), |
1971 UI.PixmapCache.getIcon("showPrograms.png"), | 1971 UI.PixmapCache.getIcon("showPrograms.png"), |
1972 self.trUtf8('Show external &tools'), | 1972 self.tr('Show external &tools'), |
1973 0, 0, self, 'show_external_tools') | 1973 0, 0, self, 'show_external_tools') |
1974 self.showExternalToolsAct.setStatusTip(self.trUtf8( | 1974 self.showExternalToolsAct.setStatusTip(self.tr( |
1975 'Show external tools')) | 1975 'Show external tools')) |
1976 self.showExternalToolsAct.setWhatsThis(self.trUtf8( | 1976 self.showExternalToolsAct.setWhatsThis(self.tr( |
1977 """<b>Show external tools</b>""" | 1977 """<b>Show external tools</b>""" |
1978 """<p>Opens a dialog to show the path and versions of all""" | 1978 """<p>Opens a dialog to show the path and versions of all""" |
1979 """ extenal tools used by eric5.</p>""" | 1979 """ extenal tools used by eric5.</p>""" |
1980 )) | 1980 )) |
1981 self.showExternalToolsAct.triggered[()].connect( | 1981 self.showExternalToolsAct.triggered[()].connect( |
1982 self.__showExternalTools) | 1982 self.__showExternalTools) |
1983 self.actions.append(self.showExternalToolsAct) | 1983 self.actions.append(self.showExternalToolsAct) |
1984 | 1984 |
1985 self.configViewProfilesAct = E5Action( | 1985 self.configViewProfilesAct = E5Action( |
1986 self.trUtf8('View Profiles'), | 1986 self.tr('View Profiles'), |
1987 UI.PixmapCache.getIcon("configureViewProfiles.png"), | 1987 UI.PixmapCache.getIcon("configureViewProfiles.png"), |
1988 self.trUtf8('&View Profiles...'), | 1988 self.tr('&View Profiles...'), |
1989 0, 0, self, 'view_profiles') | 1989 0, 0, self, 'view_profiles') |
1990 self.configViewProfilesAct.setStatusTip(self.trUtf8( | 1990 self.configViewProfilesAct.setStatusTip(self.tr( |
1991 'Configure view profiles')) | 1991 'Configure view profiles')) |
1992 self.configViewProfilesAct.setWhatsThis(self.trUtf8( | 1992 self.configViewProfilesAct.setWhatsThis(self.tr( |
1993 """<b>View Profiles</b>""" | 1993 """<b>View Profiles</b>""" |
1994 """<p>Configure the view profiles. With this dialog you may""" | 1994 """<p>Configure the view profiles. With this dialog you may""" |
1995 """ set the visibility of the various windows for the""" | 1995 """ set the visibility of the various windows for the""" |
1996 """ predetermined view profiles.</p>""" | 1996 """ predetermined view profiles.</p>""" |
1997 )) | 1997 )) |
1998 self.configViewProfilesAct.triggered[()].connect( | 1998 self.configViewProfilesAct.triggered[()].connect( |
1999 self.__configViewProfiles) | 1999 self.__configViewProfiles) |
2000 self.actions.append(self.configViewProfilesAct) | 2000 self.actions.append(self.configViewProfilesAct) |
2001 | 2001 |
2002 self.configToolBarsAct = E5Action( | 2002 self.configToolBarsAct = E5Action( |
2003 self.trUtf8('Toolbars'), | 2003 self.tr('Toolbars'), |
2004 UI.PixmapCache.getIcon("toolbarsConfigure.png"), | 2004 UI.PixmapCache.getIcon("toolbarsConfigure.png"), |
2005 self.trUtf8('Tool&bars...'), | 2005 self.tr('Tool&bars...'), |
2006 0, 0, self, 'configure_toolbars') | 2006 0, 0, self, 'configure_toolbars') |
2007 self.configToolBarsAct.setStatusTip(self.trUtf8('Configure toolbars')) | 2007 self.configToolBarsAct.setStatusTip(self.tr('Configure toolbars')) |
2008 self.configToolBarsAct.setWhatsThis(self.trUtf8( | 2008 self.configToolBarsAct.setWhatsThis(self.tr( |
2009 """<b>Toolbars</b>""" | 2009 """<b>Toolbars</b>""" |
2010 """<p>Configure the toolbars. With this dialog you may""" | 2010 """<p>Configure the toolbars. With this dialog you may""" |
2011 """ change the actions shown on the various toolbars and""" | 2011 """ change the actions shown on the various toolbars and""" |
2012 """ define your own toolbars.</p>""" | 2012 """ define your own toolbars.</p>""" |
2013 )) | 2013 )) |
2014 self.configToolBarsAct.triggered[()].connect(self.__configToolBars) | 2014 self.configToolBarsAct.triggered[()].connect(self.__configToolBars) |
2015 self.actions.append(self.configToolBarsAct) | 2015 self.actions.append(self.configToolBarsAct) |
2016 | 2016 |
2017 self.shortcutsAct = E5Action( | 2017 self.shortcutsAct = E5Action( |
2018 self.trUtf8('Keyboard Shortcuts'), | 2018 self.tr('Keyboard Shortcuts'), |
2019 UI.PixmapCache.getIcon("configureShortcuts.png"), | 2019 UI.PixmapCache.getIcon("configureShortcuts.png"), |
2020 self.trUtf8('Keyboard &Shortcuts...'), | 2020 self.tr('Keyboard &Shortcuts...'), |
2021 0, 0, self, 'keyboard_shortcuts') | 2021 0, 0, self, 'keyboard_shortcuts') |
2022 self.shortcutsAct.setStatusTip(self.trUtf8( | 2022 self.shortcutsAct.setStatusTip(self.tr( |
2023 'Set the keyboard shortcuts')) | 2023 'Set the keyboard shortcuts')) |
2024 self.shortcutsAct.setWhatsThis(self.trUtf8( | 2024 self.shortcutsAct.setWhatsThis(self.tr( |
2025 """<b>Keyboard Shortcuts</b>""" | 2025 """<b>Keyboard Shortcuts</b>""" |
2026 """<p>Set the keyboard shortcuts of the application""" | 2026 """<p>Set the keyboard shortcuts of the application""" |
2027 """ with your prefered values.</p>""" | 2027 """ with your prefered values.</p>""" |
2028 )) | 2028 )) |
2029 self.shortcutsAct.triggered[()].connect(self.__configShortcuts) | 2029 self.shortcutsAct.triggered[()].connect(self.__configShortcuts) |
2030 self.actions.append(self.shortcutsAct) | 2030 self.actions.append(self.shortcutsAct) |
2031 | 2031 |
2032 self.exportShortcutsAct = E5Action( | 2032 self.exportShortcutsAct = E5Action( |
2033 self.trUtf8('Export Keyboard Shortcuts'), | 2033 self.tr('Export Keyboard Shortcuts'), |
2034 UI.PixmapCache.getIcon("exportShortcuts.png"), | 2034 UI.PixmapCache.getIcon("exportShortcuts.png"), |
2035 self.trUtf8('&Export Keyboard Shortcuts...'), | 2035 self.tr('&Export Keyboard Shortcuts...'), |
2036 0, 0, self, 'export_keyboard_shortcuts') | 2036 0, 0, self, 'export_keyboard_shortcuts') |
2037 self.exportShortcutsAct.setStatusTip(self.trUtf8( | 2037 self.exportShortcutsAct.setStatusTip(self.tr( |
2038 'Export the keyboard shortcuts')) | 2038 'Export the keyboard shortcuts')) |
2039 self.exportShortcutsAct.setWhatsThis(self.trUtf8( | 2039 self.exportShortcutsAct.setWhatsThis(self.tr( |
2040 """<b>Export Keyboard Shortcuts</b>""" | 2040 """<b>Export Keyboard Shortcuts</b>""" |
2041 """<p>Export the keyboard shortcuts of the application.</p>""" | 2041 """<p>Export the keyboard shortcuts of the application.</p>""" |
2042 )) | 2042 )) |
2043 self.exportShortcutsAct.triggered[()].connect(self.__exportShortcuts) | 2043 self.exportShortcutsAct.triggered[()].connect(self.__exportShortcuts) |
2044 self.actions.append(self.exportShortcutsAct) | 2044 self.actions.append(self.exportShortcutsAct) |
2045 | 2045 |
2046 self.importShortcutsAct = E5Action( | 2046 self.importShortcutsAct = E5Action( |
2047 self.trUtf8('Import Keyboard Shortcuts'), | 2047 self.tr('Import Keyboard Shortcuts'), |
2048 UI.PixmapCache.getIcon("importShortcuts.png"), | 2048 UI.PixmapCache.getIcon("importShortcuts.png"), |
2049 self.trUtf8('&Import Keyboard Shortcuts...'), | 2049 self.tr('&Import Keyboard Shortcuts...'), |
2050 0, 0, self, 'import_keyboard_shortcuts') | 2050 0, 0, self, 'import_keyboard_shortcuts') |
2051 self.importShortcutsAct.setStatusTip(self.trUtf8( | 2051 self.importShortcutsAct.setStatusTip(self.tr( |
2052 'Import the keyboard shortcuts')) | 2052 'Import the keyboard shortcuts')) |
2053 self.importShortcutsAct.setWhatsThis(self.trUtf8( | 2053 self.importShortcutsAct.setWhatsThis(self.tr( |
2054 """<b>Import Keyboard Shortcuts</b>""" | 2054 """<b>Import Keyboard Shortcuts</b>""" |
2055 """<p>Import the keyboard shortcuts of the application.</p>""" | 2055 """<p>Import the keyboard shortcuts of the application.</p>""" |
2056 )) | 2056 )) |
2057 self.importShortcutsAct.triggered[()].connect(self.__importShortcuts) | 2057 self.importShortcutsAct.triggered[()].connect(self.__importShortcuts) |
2058 self.actions.append(self.importShortcutsAct) | 2058 self.actions.append(self.importShortcutsAct) |
2059 | 2059 |
2060 if SSL_AVAILABLE: | 2060 if SSL_AVAILABLE: |
2061 self.certificatesAct = E5Action( | 2061 self.certificatesAct = E5Action( |
2062 self.trUtf8('Manage SSL Certificates'), | 2062 self.tr('Manage SSL Certificates'), |
2063 UI.PixmapCache.getIcon("certificates.png"), | 2063 UI.PixmapCache.getIcon("certificates.png"), |
2064 self.trUtf8('Manage SSL Certificates...'), | 2064 self.tr('Manage SSL Certificates...'), |
2065 0, 0, self, 'manage_ssl_certificates') | 2065 0, 0, self, 'manage_ssl_certificates') |
2066 self.certificatesAct.setStatusTip(self.trUtf8( | 2066 self.certificatesAct.setStatusTip(self.tr( |
2067 'Manage the saved SSL certificates')) | 2067 'Manage the saved SSL certificates')) |
2068 self.certificatesAct.setWhatsThis(self.trUtf8( | 2068 self.certificatesAct.setWhatsThis(self.tr( |
2069 """<b>Manage SSL Certificates...</b>""" | 2069 """<b>Manage SSL Certificates...</b>""" |
2070 """<p>Opens a dialog to manage the saved SSL certificates.""" | 2070 """<p>Opens a dialog to manage the saved SSL certificates.""" |
2071 """</p>""" | 2071 """</p>""" |
2072 )) | 2072 )) |
2073 self.certificatesAct.triggered[()].connect( | 2073 self.certificatesAct.triggered[()].connect( |
2074 self.__showCertificatesDialog) | 2074 self.__showCertificatesDialog) |
2075 self.actions.append(self.certificatesAct) | 2075 self.actions.append(self.certificatesAct) |
2076 | 2076 |
2077 self.editMessageFilterAct = E5Action( | 2077 self.editMessageFilterAct = E5Action( |
2078 self.trUtf8('Edit Message Filters'), | 2078 self.tr('Edit Message Filters'), |
2079 UI.PixmapCache.getIcon("warning.png"), | 2079 UI.PixmapCache.getIcon("warning.png"), |
2080 self.trUtf8('Edit Message Filters...'), | 2080 self.tr('Edit Message Filters...'), |
2081 0, 0, self, 'manage_message_filters') | 2081 0, 0, self, 'manage_message_filters') |
2082 self.editMessageFilterAct.setStatusTip(self.trUtf8( | 2082 self.editMessageFilterAct.setStatusTip(self.tr( |
2083 'Edit the message filters used to suppress unwanted messages')) | 2083 'Edit the message filters used to suppress unwanted messages')) |
2084 self.editMessageFilterAct.setWhatsThis(self.trUtf8( | 2084 self.editMessageFilterAct.setWhatsThis(self.tr( |
2085 """<b>Edit Message Filters</b>""" | 2085 """<b>Edit Message Filters</b>""" |
2086 """<p>Opens a dialog to edit the message filters used to""" | 2086 """<p>Opens a dialog to edit the message filters used to""" |
2087 """ suppress unwanted messages been shown in an error""" | 2087 """ suppress unwanted messages been shown in an error""" |
2088 """ window.</p>""" | 2088 """ window.</p>""" |
2089 )) | 2089 )) |
2090 self.editMessageFilterAct.triggered[()].connect( | 2090 self.editMessageFilterAct.triggered[()].connect( |
2091 E5ErrorMessage.editMessageFilters) | 2091 E5ErrorMessage.editMessageFilters) |
2092 self.actions.append(self.editMessageFilterAct) | 2092 self.actions.append(self.editMessageFilterAct) |
2093 | 2093 |
2094 self.viewmanagerActivateAct = E5Action( | 2094 self.viewmanagerActivateAct = E5Action( |
2095 self.trUtf8('Activate current editor'), | 2095 self.tr('Activate current editor'), |
2096 self.trUtf8('Activate current editor'), | 2096 self.tr('Activate current editor'), |
2097 QKeySequence(self.trUtf8("Alt+Shift+E")), | 2097 QKeySequence(self.tr("Alt+Shift+E")), |
2098 0, self, 'viewmanager_activate', 1) | 2098 0, self, 'viewmanager_activate', 1) |
2099 self.viewmanagerActivateAct.triggered[()].connect( | 2099 self.viewmanagerActivateAct.triggered[()].connect( |
2100 self.__activateViewmanager) | 2100 self.__activateViewmanager) |
2101 self.actions.append(self.viewmanagerActivateAct) | 2101 self.actions.append(self.viewmanagerActivateAct) |
2102 self.addAction(self.viewmanagerActivateAct) | 2102 self.addAction(self.viewmanagerActivateAct) |
2103 | 2103 |
2104 self.nextTabAct = E5Action( | 2104 self.nextTabAct = E5Action( |
2105 self.trUtf8('Show next'), | 2105 self.tr('Show next'), |
2106 self.trUtf8('Show next'), | 2106 self.tr('Show next'), |
2107 QKeySequence(self.trUtf8('Ctrl+Alt+Tab')), 0, | 2107 QKeySequence(self.tr('Ctrl+Alt+Tab')), 0, |
2108 self, 'view_next_tab') | 2108 self, 'view_next_tab') |
2109 self.nextTabAct.triggered[()].connect(self.__showNext) | 2109 self.nextTabAct.triggered[()].connect(self.__showNext) |
2110 self.actions.append(self.nextTabAct) | 2110 self.actions.append(self.nextTabAct) |
2111 self.addAction(self.nextTabAct) | 2111 self.addAction(self.nextTabAct) |
2112 | 2112 |
2113 self.prevTabAct = E5Action( | 2113 self.prevTabAct = E5Action( |
2114 self.trUtf8('Show previous'), | 2114 self.tr('Show previous'), |
2115 self.trUtf8('Show previous'), | 2115 self.tr('Show previous'), |
2116 QKeySequence(self.trUtf8('Shift+Ctrl+Alt+Tab')), 0, | 2116 QKeySequence(self.tr('Shift+Ctrl+Alt+Tab')), 0, |
2117 self, 'view_previous_tab') | 2117 self, 'view_previous_tab') |
2118 self.prevTabAct.triggered[()].connect(self.__showPrevious) | 2118 self.prevTabAct.triggered[()].connect(self.__showPrevious) |
2119 self.actions.append(self.prevTabAct) | 2119 self.actions.append(self.prevTabAct) |
2120 self.addAction(self.prevTabAct) | 2120 self.addAction(self.prevTabAct) |
2121 | 2121 |
2122 self.switchTabAct = E5Action( | 2122 self.switchTabAct = E5Action( |
2123 self.trUtf8('Switch between tabs'), | 2123 self.tr('Switch between tabs'), |
2124 self.trUtf8('Switch between tabs'), | 2124 self.tr('Switch between tabs'), |
2125 QKeySequence(self.trUtf8('Ctrl+1')), 0, | 2125 QKeySequence(self.tr('Ctrl+1')), 0, |
2126 self, 'switch_tabs') | 2126 self, 'switch_tabs') |
2127 self.switchTabAct.triggered[()].connect(self.__switchTab) | 2127 self.switchTabAct.triggered[()].connect(self.__switchTab) |
2128 self.actions.append(self.switchTabAct) | 2128 self.actions.append(self.switchTabAct) |
2129 self.addAction(self.switchTabAct) | 2129 self.addAction(self.switchTabAct) |
2130 | 2130 |
2131 self.pluginInfoAct = E5Action( | 2131 self.pluginInfoAct = E5Action( |
2132 self.trUtf8('Plugin Infos'), | 2132 self.tr('Plugin Infos'), |
2133 UI.PixmapCache.getIcon("plugin.png"), | 2133 UI.PixmapCache.getIcon("plugin.png"), |
2134 self.trUtf8('&Plugin Infos...'), 0, 0, self, 'plugin_infos') | 2134 self.tr('&Plugin Infos...'), 0, 0, self, 'plugin_infos') |
2135 self.pluginInfoAct.setStatusTip(self.trUtf8('Show Plugin Infos')) | 2135 self.pluginInfoAct.setStatusTip(self.tr('Show Plugin Infos')) |
2136 self.pluginInfoAct.setWhatsThis(self.trUtf8( | 2136 self.pluginInfoAct.setWhatsThis(self.tr( |
2137 """<b>Plugin Infos...</b>""" | 2137 """<b>Plugin Infos...</b>""" |
2138 """<p>This opens a dialog, that show some information about""" | 2138 """<p>This opens a dialog, that show some information about""" |
2139 """ loaded plugins.</p>""" | 2139 """ loaded plugins.</p>""" |
2140 )) | 2140 )) |
2141 self.pluginInfoAct.triggered[()].connect(self.__showPluginInfo) | 2141 self.pluginInfoAct.triggered[()].connect(self.__showPluginInfo) |
2142 self.actions.append(self.pluginInfoAct) | 2142 self.actions.append(self.pluginInfoAct) |
2143 | 2143 |
2144 self.pluginInstallAct = E5Action( | 2144 self.pluginInstallAct = E5Action( |
2145 self.trUtf8('Install Plugins'), | 2145 self.tr('Install Plugins'), |
2146 UI.PixmapCache.getIcon("pluginInstall.png"), | 2146 UI.PixmapCache.getIcon("pluginInstall.png"), |
2147 self.trUtf8('&Install Plugins...'), | 2147 self.tr('&Install Plugins...'), |
2148 0, 0, self, 'plugin_install') | 2148 0, 0, self, 'plugin_install') |
2149 self.pluginInstallAct.setStatusTip(self.trUtf8('Install Plugins')) | 2149 self.pluginInstallAct.setStatusTip(self.tr('Install Plugins')) |
2150 self.pluginInstallAct.setWhatsThis(self.trUtf8( | 2150 self.pluginInstallAct.setWhatsThis(self.tr( |
2151 """<b>Install Plugins...</b>""" | 2151 """<b>Install Plugins...</b>""" |
2152 """<p>This opens a dialog to install or update plugins.</p>""" | 2152 """<p>This opens a dialog to install or update plugins.</p>""" |
2153 )) | 2153 )) |
2154 self.pluginInstallAct.triggered[()].connect(self.__installPlugins) | 2154 self.pluginInstallAct.triggered[()].connect(self.__installPlugins) |
2155 self.actions.append(self.pluginInstallAct) | 2155 self.actions.append(self.pluginInstallAct) |
2156 | 2156 |
2157 self.pluginDeinstallAct = E5Action( | 2157 self.pluginDeinstallAct = E5Action( |
2158 self.trUtf8('Uninstall Plugin'), | 2158 self.tr('Uninstall Plugin'), |
2159 UI.PixmapCache.getIcon("pluginUninstall.png"), | 2159 UI.PixmapCache.getIcon("pluginUninstall.png"), |
2160 self.trUtf8('&Uninstall Plugin...'), | 2160 self.tr('&Uninstall Plugin...'), |
2161 0, 0, self, 'plugin_deinstall') | 2161 0, 0, self, 'plugin_deinstall') |
2162 self.pluginDeinstallAct.setStatusTip(self.trUtf8('Uninstall Plugin')) | 2162 self.pluginDeinstallAct.setStatusTip(self.tr('Uninstall Plugin')) |
2163 self.pluginDeinstallAct.setWhatsThis(self.trUtf8( | 2163 self.pluginDeinstallAct.setWhatsThis(self.tr( |
2164 """<b>Uninstall Plugin...</b>""" | 2164 """<b>Uninstall Plugin...</b>""" |
2165 """<p>This opens a dialog to uninstall a plugin.</p>""" | 2165 """<p>This opens a dialog to uninstall a plugin.</p>""" |
2166 )) | 2166 )) |
2167 self.pluginDeinstallAct.triggered[()].connect(self.__deinstallPlugin) | 2167 self.pluginDeinstallAct.triggered[()].connect(self.__deinstallPlugin) |
2168 self.actions.append(self.pluginDeinstallAct) | 2168 self.actions.append(self.pluginDeinstallAct) |
2169 | 2169 |
2170 self.pluginRepoAct = E5Action( | 2170 self.pluginRepoAct = E5Action( |
2171 self.trUtf8('Plugin Repository'), | 2171 self.tr('Plugin Repository'), |
2172 UI.PixmapCache.getIcon("pluginRepository.png"), | 2172 UI.PixmapCache.getIcon("pluginRepository.png"), |
2173 self.trUtf8('Plugin &Repository...'), | 2173 self.tr('Plugin &Repository...'), |
2174 0, 0, self, 'plugin_repository') | 2174 0, 0, self, 'plugin_repository') |
2175 self.pluginRepoAct.setStatusTip(self.trUtf8( | 2175 self.pluginRepoAct.setStatusTip(self.tr( |
2176 'Show Plugins available for download')) | 2176 'Show Plugins available for download')) |
2177 self.pluginRepoAct.setWhatsThis(self.trUtf8( | 2177 self.pluginRepoAct.setWhatsThis(self.tr( |
2178 """<b>Plugin Repository...</b>""" | 2178 """<b>Plugin Repository...</b>""" |
2179 """<p>This opens a dialog, that shows a list of plugins """ | 2179 """<p>This opens a dialog, that shows a list of plugins """ |
2180 """available on the Internet.</p>""" | 2180 """available on the Internet.</p>""" |
2181 )) | 2181 )) |
2182 self.pluginRepoAct.triggered[()].connect(self.showPluginsAvailable) | 2182 self.pluginRepoAct.triggered[()].connect(self.showPluginsAvailable) |
2197 def __initQtDocActions(self): | 2197 def __initQtDocActions(self): |
2198 """ | 2198 """ |
2199 Private slot to initialize the action to show the Qt documentation. | 2199 Private slot to initialize the action to show the Qt documentation. |
2200 """ | 2200 """ |
2201 self.qt4DocAct = E5Action( | 2201 self.qt4DocAct = E5Action( |
2202 self.trUtf8('Qt4 Documentation'), | 2202 self.tr('Qt4 Documentation'), |
2203 self.trUtf8('Qt&4 Documentation'), | 2203 self.tr('Qt&4 Documentation'), |
2204 0, 0, self, 'qt4_documentation') | 2204 0, 0, self, 'qt4_documentation') |
2205 self.qt4DocAct.setStatusTip(self.trUtf8('Open Qt4 Documentation')) | 2205 self.qt4DocAct.setStatusTip(self.tr('Open Qt4 Documentation')) |
2206 self.qt4DocAct.setWhatsThis(self.trUtf8( | 2206 self.qt4DocAct.setWhatsThis(self.tr( |
2207 """<b>Qt4 Documentation</b>""" | 2207 """<b>Qt4 Documentation</b>""" |
2208 """<p>Display the Qt4 Documentation. Dependent upon your""" | 2208 """<p>Display the Qt4 Documentation. Dependent upon your""" |
2209 """ settings, this will either show the help in Eric's internal""" | 2209 """ settings, this will either show the help in Eric's internal""" |
2210 """ help viewer, or execute a web browser or Qt Assistant. </p>""" | 2210 """ help viewer, or execute a web browser or Qt Assistant. </p>""" |
2211 )) | 2211 )) |
2212 self.qt4DocAct.triggered[()].connect(self.__showQt4Doc) | 2212 self.qt4DocAct.triggered[()].connect(self.__showQt4Doc) |
2213 self.actions.append(self.qt4DocAct) | 2213 self.actions.append(self.qt4DocAct) |
2214 | 2214 |
2215 self.qt5DocAct = E5Action( | 2215 self.qt5DocAct = E5Action( |
2216 self.trUtf8('Qt5 Documentation'), | 2216 self.tr('Qt5 Documentation'), |
2217 self.trUtf8('Qt&5 Documentation'), | 2217 self.tr('Qt&5 Documentation'), |
2218 0, 0, self, 'qt5_documentation') | 2218 0, 0, self, 'qt5_documentation') |
2219 self.qt5DocAct.setStatusTip(self.trUtf8('Open Qt5 Documentation')) | 2219 self.qt5DocAct.setStatusTip(self.tr('Open Qt5 Documentation')) |
2220 self.qt5DocAct.setWhatsThis(self.trUtf8( | 2220 self.qt5DocAct.setWhatsThis(self.tr( |
2221 """<b>Qt5 Documentation</b>""" | 2221 """<b>Qt5 Documentation</b>""" |
2222 """<p>Display the Qt5 Documentation. Dependent upon your""" | 2222 """<p>Display the Qt5 Documentation. Dependent upon your""" |
2223 """ settings, this will either show the help in Eric's internal""" | 2223 """ settings, this will either show the help in Eric's internal""" |
2224 """ help viewer, or execute a web browser or Qt Assistant. </p>""" | 2224 """ help viewer, or execute a web browser or Qt Assistant. </p>""" |
2225 )) | 2225 )) |
2226 self.qt5DocAct.triggered[()].connect(self.__showQt5Doc) | 2226 self.qt5DocAct.triggered[()].connect(self.__showQt5Doc) |
2227 self.actions.append(self.qt5DocAct) | 2227 self.actions.append(self.qt5DocAct) |
2228 | 2228 |
2229 self.pyqt4DocAct = E5Action( | 2229 self.pyqt4DocAct = E5Action( |
2230 self.trUtf8('PyQt4 Documentation'), | 2230 self.tr('PyQt4 Documentation'), |
2231 self.trUtf8('PyQt&4 Documentation'), | 2231 self.tr('PyQt&4 Documentation'), |
2232 0, 0, self, 'pyqt4_documentation') | 2232 0, 0, self, 'pyqt4_documentation') |
2233 self.pyqt4DocAct.setStatusTip(self.trUtf8('Open PyQt4 Documentation')) | 2233 self.pyqt4DocAct.setStatusTip(self.tr('Open PyQt4 Documentation')) |
2234 self.pyqt4DocAct.setWhatsThis(self.trUtf8( | 2234 self.pyqt4DocAct.setWhatsThis(self.tr( |
2235 """<b>PyQt4 Documentation</b>""" | 2235 """<b>PyQt4 Documentation</b>""" |
2236 """<p>Display the PyQt4 Documentation. Dependent upon your""" | 2236 """<p>Display the PyQt4 Documentation. Dependent upon your""" |
2237 """ settings, this will either show the help in Eric's internal""" | 2237 """ settings, this will either show the help in Eric's internal""" |
2238 """ help viewer, or execute a web browser or Qt Assistant. </p>""" | 2238 """ help viewer, or execute a web browser or Qt Assistant. </p>""" |
2239 )) | 2239 )) |
2241 self.actions.append(self.pyqt4DocAct) | 2241 self.actions.append(self.pyqt4DocAct) |
2242 | 2242 |
2243 try: | 2243 try: |
2244 import PyQt5 # __IGNORE_WARNING__ | 2244 import PyQt5 # __IGNORE_WARNING__ |
2245 self.pyqt5DocAct = E5Action( | 2245 self.pyqt5DocAct = E5Action( |
2246 self.trUtf8('PyQt5 Documentation'), | 2246 self.tr('PyQt5 Documentation'), |
2247 self.trUtf8('PyQt&5 Documentation'), | 2247 self.tr('PyQt&5 Documentation'), |
2248 0, 0, self, 'pyqt5_documentation') | 2248 0, 0, self, 'pyqt5_documentation') |
2249 self.pyqt5DocAct.setStatusTip(self.trUtf8( | 2249 self.pyqt5DocAct.setStatusTip(self.tr( |
2250 'Open PyQt5 Documentation')) | 2250 'Open PyQt5 Documentation')) |
2251 self.pyqt5DocAct.setWhatsThis(self.trUtf8( | 2251 self.pyqt5DocAct.setWhatsThis(self.tr( |
2252 """<b>PyQt5 Documentation</b>""" | 2252 """<b>PyQt5 Documentation</b>""" |
2253 """<p>Display the PyQt5 Documentation. Dependent upon your""" | 2253 """<p>Display the PyQt5 Documentation. Dependent upon your""" |
2254 """ settings, this will either show the help in Eric's""" | 2254 """ settings, this will either show the help in Eric's""" |
2255 """ internal help viewer, or execute a web browser or""" | 2255 """ internal help viewer, or execute a web browser or""" |
2256 """ Qt Assistant. </p>""" | 2256 """ Qt Assistant. </p>""" |
2264 """ | 2264 """ |
2265 Private slot to initialize the actions to show the Python | 2265 Private slot to initialize the actions to show the Python |
2266 documentation. | 2266 documentation. |
2267 """ | 2267 """ |
2268 self.pythonDocAct = E5Action( | 2268 self.pythonDocAct = E5Action( |
2269 self.trUtf8('Python 3 Documentation'), | 2269 self.tr('Python 3 Documentation'), |
2270 self.trUtf8('Python &3 Documentation'), | 2270 self.tr('Python &3 Documentation'), |
2271 0, 0, self, 'python3_documentation') | 2271 0, 0, self, 'python3_documentation') |
2272 self.pythonDocAct.setStatusTip(self.trUtf8( | 2272 self.pythonDocAct.setStatusTip(self.tr( |
2273 'Open Python 3 Documentation')) | 2273 'Open Python 3 Documentation')) |
2274 self.pythonDocAct.setWhatsThis(self.trUtf8( | 2274 self.pythonDocAct.setWhatsThis(self.tr( |
2275 """<b>Python 3 Documentation</b>""" | 2275 """<b>Python 3 Documentation</b>""" |
2276 """<p>Display the Python 3 documentation. If no documentation""" | 2276 """<p>Display the Python 3 documentation. If no documentation""" |
2277 """ directory is configured, the location of the Python 3""" | 2277 """ directory is configured, the location of the Python 3""" |
2278 """ documentation is assumed to be the doc directory underneath""" | 2278 """ documentation is assumed to be the doc directory underneath""" |
2279 """ the location of the Python 3 executable on Windows and""" | 2279 """ the location of the Python 3 executable on Windows and""" |
2282 )) | 2282 )) |
2283 self.pythonDocAct.triggered[()].connect(self.__showPythonDoc) | 2283 self.pythonDocAct.triggered[()].connect(self.__showPythonDoc) |
2284 self.actions.append(self.pythonDocAct) | 2284 self.actions.append(self.pythonDocAct) |
2285 | 2285 |
2286 self.python2DocAct = E5Action( | 2286 self.python2DocAct = E5Action( |
2287 self.trUtf8('Python 2 Documentation'), | 2287 self.tr('Python 2 Documentation'), |
2288 self.trUtf8('Python &2 Documentation'), | 2288 self.tr('Python &2 Documentation'), |
2289 0, 0, self, 'python2_documentation') | 2289 0, 0, self, 'python2_documentation') |
2290 self.python2DocAct.setStatusTip(self.trUtf8( | 2290 self.python2DocAct.setStatusTip(self.tr( |
2291 'Open Python 2 Documentation')) | 2291 'Open Python 2 Documentation')) |
2292 self.python2DocAct.setWhatsThis(self.trUtf8( | 2292 self.python2DocAct.setWhatsThis(self.tr( |
2293 """<b>Python 2 Documentation</b>""" | 2293 """<b>Python 2 Documentation</b>""" |
2294 """<p>Display the Python 2 documentation. If no documentation""" | 2294 """<p>Display the Python 2 documentation. If no documentation""" |
2295 """ directory is configured, the location of the Python 2""" | 2295 """ directory is configured, the location of the Python 2""" |
2296 """ documentation is assumed to be the doc directory underneath""" | 2296 """ documentation is assumed to be the doc directory underneath""" |
2297 """ the location of the configured Python 2 executable on""" | 2297 """ the location of the configured Python 2 executable on""" |
2306 def __initEricDocAction(self): | 2306 def __initEricDocAction(self): |
2307 """ | 2307 """ |
2308 Private slot to initialize the action to show the eric5 documentation. | 2308 Private slot to initialize the action to show the eric5 documentation. |
2309 """ | 2309 """ |
2310 self.ericDocAct = E5Action( | 2310 self.ericDocAct = E5Action( |
2311 self.trUtf8("Eric API Documentation"), | 2311 self.tr("Eric API Documentation"), |
2312 self.trUtf8('&Eric API Documentation'), | 2312 self.tr('&Eric API Documentation'), |
2313 0, 0, self, 'eric_documentation') | 2313 0, 0, self, 'eric_documentation') |
2314 self.ericDocAct.setStatusTip(self.trUtf8( | 2314 self.ericDocAct.setStatusTip(self.tr( |
2315 "Open Eric API Documentation")) | 2315 "Open Eric API Documentation")) |
2316 self.ericDocAct.setWhatsThis(self.trUtf8( | 2316 self.ericDocAct.setWhatsThis(self.tr( |
2317 """<b>Eric API Documentation</b>""" | 2317 """<b>Eric API Documentation</b>""" |
2318 """<p>Display the Eric API documentation. The location for the""" | 2318 """<p>Display the Eric API documentation. The location for the""" |
2319 """ documentation is the Documentation/Source subdirectory of""" | 2319 """ documentation is the Documentation/Source subdirectory of""" |
2320 """ the eric5 installation directory.</p>""" | 2320 """ the eric5 installation directory.</p>""" |
2321 )) | 2321 )) |
2327 Private slot to initialize the action to show the PySide documentation. | 2327 Private slot to initialize the action to show the PySide documentation. |
2328 """ | 2328 """ |
2329 pyside2, pyside3 = Utilities.checkPyside() | 2329 pyside2, pyside3 = Utilities.checkPyside() |
2330 if pyside2 or pyside3: | 2330 if pyside2 or pyside3: |
2331 self.pysideDocAct = E5Action( | 2331 self.pysideDocAct = E5Action( |
2332 self.trUtf8('PySide Documentation'), | 2332 self.tr('PySide Documentation'), |
2333 self.trUtf8('Py&Side Documentation'), | 2333 self.tr('Py&Side Documentation'), |
2334 0, 0, self, 'pyside_documentation') | 2334 0, 0, self, 'pyside_documentation') |
2335 self.pysideDocAct.setStatusTip(self.trUtf8( | 2335 self.pysideDocAct.setStatusTip(self.tr( |
2336 'Open PySide Documentation')) | 2336 'Open PySide Documentation')) |
2337 self.pysideDocAct.setWhatsThis(self.trUtf8( | 2337 self.pysideDocAct.setWhatsThis(self.tr( |
2338 """<b>PySide Documentation</b>""" | 2338 """<b>PySide Documentation</b>""" |
2339 """<p>Display the PySide Documentation. Dependent upon your""" | 2339 """<p>Display the PySide Documentation. Dependent upon your""" |
2340 """ settings, this will either show the help in Eric's""" | 2340 """ settings, this will either show the help in Eric's""" |
2341 """ internal help viewer, or execute a web browser or""" | 2341 """ internal help viewer, or execute a web browser or""" |
2342 """ Qt Assistant. </p>""" | 2342 """ Qt Assistant. </p>""" |
2371 self.__menus["start"], self.__menus["debug"] = \ | 2371 self.__menus["start"], self.__menus["debug"] = \ |
2372 self.debuggerUI.initMenus() | 2372 self.debuggerUI.initMenus() |
2373 mb.addMenu(self.__menus["start"]) | 2373 mb.addMenu(self.__menus["start"]) |
2374 mb.addMenu(self.__menus["debug"]) | 2374 mb.addMenu(self.__menus["debug"]) |
2375 | 2375 |
2376 self.__menus["unittest"] = QMenu(self.trUtf8('&Unittest'), self) | 2376 self.__menus["unittest"] = QMenu(self.tr('&Unittest'), self) |
2377 self.__menus["unittest"].setTearOffEnabled(True) | 2377 self.__menus["unittest"].setTearOffEnabled(True) |
2378 mb.addMenu(self.__menus["unittest"]) | 2378 mb.addMenu(self.__menus["unittest"]) |
2379 self.__menus["unittest"].addAction(self.utDialogAct) | 2379 self.__menus["unittest"].addAction(self.utDialogAct) |
2380 self.__menus["unittest"].addSeparator() | 2380 self.__menus["unittest"].addSeparator() |
2381 self.__menus["unittest"].addAction(self.utRestartAct) | 2381 self.__menus["unittest"].addAction(self.utRestartAct) |
2388 mb.addMenu(self.__menus["multiproject"]) | 2388 mb.addMenu(self.__menus["multiproject"]) |
2389 | 2389 |
2390 self.__menus["project"] = self.project.initMenu() | 2390 self.__menus["project"] = self.project.initMenu() |
2391 mb.addMenu(self.__menus["project"]) | 2391 mb.addMenu(self.__menus["project"]) |
2392 | 2392 |
2393 self.__menus["extras"] = QMenu(self.trUtf8('E&xtras'), self) | 2393 self.__menus["extras"] = QMenu(self.tr('E&xtras'), self) |
2394 self.__menus["extras"].setTearOffEnabled(True) | 2394 self.__menus["extras"].setTearOffEnabled(True) |
2395 self.__menus["extras"].aboutToShow.connect(self.__showExtrasMenu) | 2395 self.__menus["extras"].aboutToShow.connect(self.__showExtrasMenu) |
2396 mb.addMenu(self.__menus["extras"]) | 2396 mb.addMenu(self.__menus["extras"]) |
2397 self.viewmanager.addToExtrasMenu(self.__menus["extras"]) | 2397 self.viewmanager.addToExtrasMenu(self.__menus["extras"]) |
2398 self.__menus["wizards"] = QMenu(self.trUtf8('Wi&zards'), self) | 2398 self.__menus["wizards"] = QMenu(self.tr('Wi&zards'), self) |
2399 self.__menus["wizards"].setTearOffEnabled(True) | 2399 self.__menus["wizards"].setTearOffEnabled(True) |
2400 self.__menus["wizards"].aboutToShow.connect(self.__showWizardsMenu) | 2400 self.__menus["wizards"].aboutToShow.connect(self.__showWizardsMenu) |
2401 self.wizardsMenuAct = self.__menus["extras"].addMenu( | 2401 self.wizardsMenuAct = self.__menus["extras"].addMenu( |
2402 self.__menus["wizards"]) | 2402 self.__menus["wizards"]) |
2403 self.wizardsMenuAct.setEnabled(False) | 2403 self.wizardsMenuAct.setEnabled(False) |
2404 self.__menus["macros"] = self.viewmanager.initMacroMenu() | 2404 self.__menus["macros"] = self.viewmanager.initMacroMenu() |
2405 self.__menus["extras"].addMenu(self.__menus["macros"]) | 2405 self.__menus["extras"].addMenu(self.__menus["macros"]) |
2406 self.__menus["tools"] = QMenu(self.trUtf8('&Tools'), self) | 2406 self.__menus["tools"] = QMenu(self.tr('&Tools'), self) |
2407 self.__menus["tools"].aboutToShow.connect(self.__showToolsMenu) | 2407 self.__menus["tools"].aboutToShow.connect(self.__showToolsMenu) |
2408 self.__menus["tools"].triggered.connect(self.__toolExecute) | 2408 self.__menus["tools"].triggered.connect(self.__toolExecute) |
2409 self.toolGroupsMenu = QMenu(self.trUtf8("Select Tool Group"), self) | 2409 self.toolGroupsMenu = QMenu(self.tr("Select Tool Group"), self) |
2410 self.toolGroupsMenu.aboutToShow.connect(self.__showToolGroupsMenu) | 2410 self.toolGroupsMenu.aboutToShow.connect(self.__showToolGroupsMenu) |
2411 self.toolGroupsMenu.triggered.connect(self.__toolGroupSelected) | 2411 self.toolGroupsMenu.triggered.connect(self.__toolGroupSelected) |
2412 self.toolGroupsMenuTriggered = False | 2412 self.toolGroupsMenuTriggered = False |
2413 self.__menus["extras"].addMenu(self.__menus["tools"]) | 2413 self.__menus["extras"].addMenu(self.__menus["tools"]) |
2414 | 2414 |
2415 self.__menus["settings"] = QMenu(self.trUtf8('Se&ttings'), self) | 2415 self.__menus["settings"] = QMenu(self.tr('Se&ttings'), self) |
2416 mb.addMenu(self.__menus["settings"]) | 2416 mb.addMenu(self.__menus["settings"]) |
2417 self.__menus["settings"].setTearOffEnabled(True) | 2417 self.__menus["settings"].setTearOffEnabled(True) |
2418 self.__menus["settings"].addAction(self.prefAct) | 2418 self.__menus["settings"].addAction(self.prefAct) |
2419 self.__menus["settings"].addAction(self.prefExportAct) | 2419 self.__menus["settings"].addAction(self.prefExportAct) |
2420 self.__menus["settings"].addAction(self.prefImportAct) | 2420 self.__menus["settings"].addAction(self.prefImportAct) |
2433 self.__menus["settings"].addSeparator() | 2433 self.__menus["settings"].addSeparator() |
2434 self.__menus["settings"].addAction(self.certificatesAct) | 2434 self.__menus["settings"].addAction(self.certificatesAct) |
2435 self.__menus["settings"].addSeparator() | 2435 self.__menus["settings"].addSeparator() |
2436 self.__menus["settings"].addAction(self.editMessageFilterAct) | 2436 self.__menus["settings"].addAction(self.editMessageFilterAct) |
2437 | 2437 |
2438 self.__menus["window"] = QMenu(self.trUtf8('&Window'), self) | 2438 self.__menus["window"] = QMenu(self.tr('&Window'), self) |
2439 mb.addMenu(self.__menus["window"]) | 2439 mb.addMenu(self.__menus["window"]) |
2440 self.__menus["window"].setTearOffEnabled(True) | 2440 self.__menus["window"].setTearOffEnabled(True) |
2441 self.__menus["window"].aboutToShow.connect(self.__showWindowMenu) | 2441 self.__menus["window"].aboutToShow.connect(self.__showWindowMenu) |
2442 | 2442 |
2443 self.__menus["subwindow"] = QMenu(self.trUtf8("&Windows"), | 2443 self.__menus["subwindow"] = QMenu(self.tr("&Windows"), |
2444 self.__menus["window"]) | 2444 self.__menus["window"]) |
2445 self.__menus["subwindow"].setTearOffEnabled(True) | 2445 self.__menus["subwindow"].setTearOffEnabled(True) |
2446 # left side | 2446 # left side |
2447 self.__menus["subwindow"].addAction(self.pbActivateAct) | 2447 self.__menus["subwindow"].addAction(self.pbActivateAct) |
2448 self.__menus["subwindow"].addAction(self.mpbActivateAct) | 2448 self.__menus["subwindow"].addAction(self.mpbActivateAct) |
2458 self.__menus["subwindow"].addAction(self.debugViewerActivateAct) | 2458 self.__menus["subwindow"].addAction(self.debugViewerActivateAct) |
2459 self.__menus["subwindow"].addAction(self.cooperationViewerActivateAct) | 2459 self.__menus["subwindow"].addAction(self.cooperationViewerActivateAct) |
2460 self.__menus["subwindow"].addAction(self.ircActivateAct) | 2460 self.__menus["subwindow"].addAction(self.ircActivateAct) |
2461 | 2461 |
2462 self.__menus["toolbars"] = \ | 2462 self.__menus["toolbars"] = \ |
2463 QMenu(self.trUtf8("&Toolbars"), self.__menus["window"]) | 2463 QMenu(self.tr("&Toolbars"), self.__menus["window"]) |
2464 self.__menus["toolbars"].setTearOffEnabled(True) | 2464 self.__menus["toolbars"].setTearOffEnabled(True) |
2465 self.__menus["toolbars"].aboutToShow.connect(self.__showToolbarsMenu) | 2465 self.__menus["toolbars"].aboutToShow.connect(self.__showToolbarsMenu) |
2466 self.__menus["toolbars"].triggered.connect(self.__TBMenuTriggered) | 2466 self.__menus["toolbars"].triggered.connect(self.__TBMenuTriggered) |
2467 | 2467 |
2468 self.__showWindowMenu() # to initialize these actions | 2468 self.__showWindowMenu() # to initialize these actions |
2469 | 2469 |
2470 self.__menus["bookmarks"] = self.viewmanager.initBookmarkMenu() | 2470 self.__menus["bookmarks"] = self.viewmanager.initBookmarkMenu() |
2471 mb.addMenu(self.__menus["bookmarks"]) | 2471 mb.addMenu(self.__menus["bookmarks"]) |
2472 self.__menus["bookmarks"].setTearOffEnabled(True) | 2472 self.__menus["bookmarks"].setTearOffEnabled(True) |
2473 | 2473 |
2474 self.__menus["plugins"] = QMenu(self.trUtf8('P&lugins'), self) | 2474 self.__menus["plugins"] = QMenu(self.tr('P&lugins'), self) |
2475 mb.addMenu(self.__menus["plugins"]) | 2475 mb.addMenu(self.__menus["plugins"]) |
2476 self.__menus["plugins"].setTearOffEnabled(True) | 2476 self.__menus["plugins"].setTearOffEnabled(True) |
2477 self.__menus["plugins"].addAction(self.pluginInfoAct) | 2477 self.__menus["plugins"].addAction(self.pluginInfoAct) |
2478 self.__menus["plugins"].addAction(self.pluginInstallAct) | 2478 self.__menus["plugins"].addAction(self.pluginInstallAct) |
2479 self.__menus["plugins"].addAction(self.pluginDeinstallAct) | 2479 self.__menus["plugins"].addAction(self.pluginDeinstallAct) |
2480 self.__menus["plugins"].addSeparator() | 2480 self.__menus["plugins"].addSeparator() |
2481 self.__menus["plugins"].addAction(self.pluginRepoAct) | 2481 self.__menus["plugins"].addAction(self.pluginRepoAct) |
2482 self.__menus["plugins"].addSeparator() | 2482 self.__menus["plugins"].addSeparator() |
2483 self.__menus["plugins"].addAction( | 2483 self.__menus["plugins"].addAction( |
2484 self.trUtf8("Configure..."), self.__pluginsConfigure) | 2484 self.tr("Configure..."), self.__pluginsConfigure) |
2485 | 2485 |
2486 mb.addSeparator() | 2486 mb.addSeparator() |
2487 | 2487 |
2488 self.__menus["help"] = QMenu(self.trUtf8('&Help'), self) | 2488 self.__menus["help"] = QMenu(self.tr('&Help'), self) |
2489 mb.addMenu(self.__menus["help"]) | 2489 mb.addMenu(self.__menus["help"]) |
2490 self.__menus["help"].setTearOffEnabled(True) | 2490 self.__menus["help"].setTearOffEnabled(True) |
2491 self.__menus["help"].addAction(self.helpviewerAct) | 2491 self.__menus["help"].addAction(self.helpviewerAct) |
2492 self.__menus["help"].addSeparator() | 2492 self.__menus["help"].addSeparator() |
2493 self.__menus["help"].addAction(self.ericDocAct) | 2493 self.__menus["help"].addAction(self.ericDocAct) |
2531 self.toolbarManager) | 2531 self.toolbarManager) |
2532 viewtb = self.viewmanager.initViewToolbar(self.toolbarManager) | 2532 viewtb = self.viewmanager.initViewToolbar(self.toolbarManager) |
2533 starttb, debugtb = self.debuggerUI.initToolbars(self.toolbarManager) | 2533 starttb, debugtb = self.debuggerUI.initToolbars(self.toolbarManager) |
2534 multiprojecttb = self.multiProject.initToolbar(self.toolbarManager) | 2534 multiprojecttb = self.multiProject.initToolbar(self.toolbarManager) |
2535 projecttb = self.project.initToolbar(self.toolbarManager) | 2535 projecttb = self.project.initToolbar(self.toolbarManager) |
2536 toolstb = QToolBar(self.trUtf8("Tools"), self) | 2536 toolstb = QToolBar(self.tr("Tools"), self) |
2537 unittesttb = QToolBar(self.trUtf8("Unittest"), self) | 2537 unittesttb = QToolBar(self.tr("Unittest"), self) |
2538 bookmarktb = self.viewmanager.initBookmarkToolbar(self.toolbarManager) | 2538 bookmarktb = self.viewmanager.initBookmarkToolbar(self.toolbarManager) |
2539 spellingtb = self.viewmanager.initSpellingToolbar(self.toolbarManager) | 2539 spellingtb = self.viewmanager.initSpellingToolbar(self.toolbarManager) |
2540 settingstb = QToolBar(self.trUtf8("Settings"), self) | 2540 settingstb = QToolBar(self.tr("Settings"), self) |
2541 helptb = QToolBar(self.trUtf8("Help"), self) | 2541 helptb = QToolBar(self.tr("Help"), self) |
2542 profilestb = QToolBar(self.trUtf8("Profiles"), self) | 2542 profilestb = QToolBar(self.tr("Profiles"), self) |
2543 pluginstb = QToolBar(self.trUtf8("Plugins"), self) | 2543 pluginstb = QToolBar(self.tr("Plugins"), self) |
2544 | 2544 |
2545 toolstb.setIconSize(Config.ToolBarIconSize) | 2545 toolstb.setIconSize(Config.ToolBarIconSize) |
2546 unittesttb.setIconSize(Config.ToolBarIconSize) | 2546 unittesttb.setIconSize(Config.ToolBarIconSize) |
2547 settingstb.setIconSize(Config.ToolBarIconSize) | 2547 settingstb.setIconSize(Config.ToolBarIconSize) |
2548 helptb.setIconSize(Config.ToolBarIconSize) | 2548 helptb.setIconSize(Config.ToolBarIconSize) |
2554 settingstb.setObjectName("SettingsToolbar") | 2554 settingstb.setObjectName("SettingsToolbar") |
2555 helptb.setObjectName("HelpToolbar") | 2555 helptb.setObjectName("HelpToolbar") |
2556 profilestb.setObjectName("ProfilesToolbar") | 2556 profilestb.setObjectName("ProfilesToolbar") |
2557 pluginstb.setObjectName("PluginsToolbar") | 2557 pluginstb.setObjectName("PluginsToolbar") |
2558 | 2558 |
2559 toolstb.setToolTip(self.trUtf8("Tools")) | 2559 toolstb.setToolTip(self.tr("Tools")) |
2560 unittesttb.setToolTip(self.trUtf8("Unittest")) | 2560 unittesttb.setToolTip(self.tr("Unittest")) |
2561 settingstb.setToolTip(self.trUtf8("Settings")) | 2561 settingstb.setToolTip(self.tr("Settings")) |
2562 helptb.setToolTip(self.trUtf8("Help")) | 2562 helptb.setToolTip(self.tr("Help")) |
2563 profilestb.setToolTip(self.trUtf8("Profiles")) | 2563 profilestb.setToolTip(self.tr("Profiles")) |
2564 pluginstb.setToolTip(self.trUtf8("Plugins")) | 2564 pluginstb.setToolTip(self.tr("Plugins")) |
2565 | 2565 |
2566 filetb.addSeparator() | 2566 filetb.addSeparator() |
2567 filetb.addAction(self.exitAct) | 2567 filetb.addAction(self.exitAct) |
2568 act = filetb.actions()[0] | 2568 act = filetb.actions()[0] |
2569 sep = filetb.insertSeparator(act) | 2569 sep = filetb.insertSeparator(act) |
2706 self.__statusBar = self.statusBar() | 2706 self.__statusBar = self.statusBar() |
2707 self.__statusBar.setSizeGripEnabled(True) | 2707 self.__statusBar.setSizeGripEnabled(True) |
2708 | 2708 |
2709 self.sbLanguage = QLabel(self.__statusBar) | 2709 self.sbLanguage = QLabel(self.__statusBar) |
2710 self.__statusBar.addPermanentWidget(self.sbLanguage) | 2710 self.__statusBar.addPermanentWidget(self.sbLanguage) |
2711 self.sbLanguage.setWhatsThis(self.trUtf8( | 2711 self.sbLanguage.setWhatsThis(self.tr( |
2712 """<p>This part of the status bar displays the""" | 2712 """<p>This part of the status bar displays the""" |
2713 """ current editors language.</p>""" | 2713 """ current editors language.</p>""" |
2714 )) | 2714 )) |
2715 | 2715 |
2716 self.sbEncoding = QLabel(self.__statusBar) | 2716 self.sbEncoding = QLabel(self.__statusBar) |
2717 self.__statusBar.addPermanentWidget(self.sbEncoding) | 2717 self.__statusBar.addPermanentWidget(self.sbEncoding) |
2718 self.sbEncoding.setWhatsThis(self.trUtf8( | 2718 self.sbEncoding.setWhatsThis(self.tr( |
2719 """<p>This part of the status bar displays the""" | 2719 """<p>This part of the status bar displays the""" |
2720 """ current editors encoding.</p>""" | 2720 """ current editors encoding.</p>""" |
2721 )) | 2721 )) |
2722 | 2722 |
2723 self.sbEol = QLabel(self.__statusBar) | 2723 self.sbEol = QLabel(self.__statusBar) |
2724 self.__statusBar.addPermanentWidget(self.sbEol) | 2724 self.__statusBar.addPermanentWidget(self.sbEol) |
2725 self.sbEol.setWhatsThis(self.trUtf8( | 2725 self.sbEol.setWhatsThis(self.tr( |
2726 """<p>This part of the status bar displays the""" | 2726 """<p>This part of the status bar displays the""" |
2727 """ current editors eol setting.</p>""" | 2727 """ current editors eol setting.</p>""" |
2728 )) | 2728 )) |
2729 | 2729 |
2730 self.sbWritable = QLabel(self.__statusBar) | 2730 self.sbWritable = QLabel(self.__statusBar) |
2731 self.__statusBar.addPermanentWidget(self.sbWritable) | 2731 self.__statusBar.addPermanentWidget(self.sbWritable) |
2732 self.sbWritable.setWhatsThis(self.trUtf8( | 2732 self.sbWritable.setWhatsThis(self.tr( |
2733 """<p>This part of the status bar displays an indication of the""" | 2733 """<p>This part of the status bar displays an indication of the""" |
2734 """ current editors files writability.</p>""" | 2734 """ current editors files writability.</p>""" |
2735 )) | 2735 )) |
2736 | 2736 |
2737 self.sbLine = QLabel(self.__statusBar) | 2737 self.sbLine = QLabel(self.__statusBar) |
2738 self.__statusBar.addPermanentWidget(self.sbLine) | 2738 self.__statusBar.addPermanentWidget(self.sbLine) |
2739 self.sbLine.setWhatsThis(self.trUtf8( | 2739 self.sbLine.setWhatsThis(self.tr( |
2740 """<p>This part of the status bar displays the line number of""" | 2740 """<p>This part of the status bar displays the line number of""" |
2741 """ the current editor.</p>""" | 2741 """ the current editor.</p>""" |
2742 )) | 2742 )) |
2743 | 2743 |
2744 self.sbPos = QLabel(self.__statusBar) | 2744 self.sbPos = QLabel(self.__statusBar) |
2745 self.__statusBar.addPermanentWidget(self.sbPos) | 2745 self.__statusBar.addPermanentWidget(self.sbPos) |
2746 self.sbPos.setWhatsThis(self.trUtf8( | 2746 self.sbPos.setWhatsThis(self.tr( |
2747 """<p>This part of the status bar displays the cursor position""" | 2747 """<p>This part of the status bar displays the cursor position""" |
2748 """ of the current editor.</p>""" | 2748 """ of the current editor.</p>""" |
2749 )) | 2749 )) |
2750 | 2750 |
2751 self.sbZoom = E5ZoomWidget( | 2751 self.sbZoom = E5ZoomWidget( |
2752 UI.PixmapCache.getPixmap("zoomOut.png"), | 2752 UI.PixmapCache.getPixmap("zoomOut.png"), |
2753 UI.PixmapCache.getPixmap("zoomIn.png"), | 2753 UI.PixmapCache.getPixmap("zoomIn.png"), |
2754 UI.PixmapCache.getPixmap("zoomReset.png"), | 2754 UI.PixmapCache.getPixmap("zoomReset.png"), |
2755 self.__statusBar) | 2755 self.__statusBar) |
2756 self.__statusBar.addPermanentWidget(self.sbZoom) | 2756 self.__statusBar.addPermanentWidget(self.sbZoom) |
2757 self.sbZoom.setWhatsThis(self.trUtf8( | 2757 self.sbZoom.setWhatsThis(self.tr( |
2758 """<p>This part of the status bar allows zooming the current""" | 2758 """<p>This part of the status bar allows zooming the current""" |
2759 """ editor, shell or terminal.</p>""" | 2759 """ editor, shell or terminal.</p>""" |
2760 )) | 2760 )) |
2761 | 2761 |
2762 self.viewmanager.setSbInfo( | 2762 self.viewmanager.setSbInfo( |
2771 """ | 2771 """ |
2772 Private slot to create actions for the configured external tools. | 2772 Private slot to create actions for the configured external tools. |
2773 """ | 2773 """ |
2774 self.toolGroupActions = {} | 2774 self.toolGroupActions = {} |
2775 for toolGroup in self.toolGroups: | 2775 for toolGroup in self.toolGroups: |
2776 category = self.trUtf8("External Tools/{0}").format(toolGroup[0]) | 2776 category = self.tr("External Tools/{0}").format(toolGroup[0]) |
2777 for tool in toolGroup[1]: | 2777 for tool in toolGroup[1]: |
2778 if tool['menutext'] != '--': | 2778 if tool['menutext'] != '--': |
2779 act = QAction(UI.PixmapCache.getIcon(tool['icon']), | 2779 act = QAction(UI.PixmapCache.getIcon(tool['icon']), |
2780 tool['menutext'], self) | 2780 tool['menutext'], self) |
2781 act.setObjectName("{0}@@{1}".format(toolGroup[0], | 2781 act.setObjectName("{0}@@{1}".format(toolGroup[0], |
2811 self.toolGroupActions[key].triggered[()].disconnect( | 2811 self.toolGroupActions[key].triggered[()].disconnect( |
2812 self.__toolActionTriggered) | 2812 self.__toolActionTriggered) |
2813 del self.toolGroupActions[key] | 2813 del self.toolGroupActions[key] |
2814 | 2814 |
2815 # step 4: add all newly configured tools | 2815 # step 4: add all newly configured tools |
2816 category = self.trUtf8("External Tools/{0}").format(toolGroup[0]) | 2816 category = self.tr("External Tools/{0}").format(toolGroup[0]) |
2817 for tool in toolGroup[1]: | 2817 for tool in toolGroup[1]: |
2818 if tool['menutext'] != '--': | 2818 if tool['menutext'] != '--': |
2819 key = "{0}@@{1}".format(toolGroup[0], tool['menutext']) | 2819 key = "{0}@@{1}".format(toolGroup[0], tool['menutext']) |
2820 if key not in groupActionKeys: | 2820 if key not in groupActionKeys: |
2821 act = QAction(UI.PixmapCache.getIcon(tool['icon']), | 2821 act = QAction(UI.PixmapCache.getIcon(tool['icon']), |
2908 import sipconfig | 2908 import sipconfig |
2909 sip_version_str = sipconfig.Configuration().sip_version_str | 2909 sip_version_str = sipconfig.Configuration().sip_version_str |
2910 except ImportError: | 2910 except ImportError: |
2911 sip_version_str = "sip version not available" | 2911 sip_version_str = "sip version not available" |
2912 | 2912 |
2913 versionText = self.trUtf8( | 2913 versionText = self.tr( |
2914 """<h3>Version Numbers</h3>""" | 2914 """<h3>Version Numbers</h3>""" |
2915 """<table>""") | 2915 """<table>""") |
2916 versionText += """<tr><td><b>Python</b></td><td>{0}</td></tr>"""\ | 2916 versionText += """<tr><td><b>Python</b></td><td>{0}</td></tr>"""\ |
2917 .format(sys.version.split()[0]) | 2917 .format(sys.version.split()[0]) |
2918 versionText += """<tr><td><b>Qt</b></td><td>{0}</td></tr>"""\ | 2918 versionText += """<tr><td><b>Qt</b></td><td>{0}</td></tr>"""\ |
2929 .format(qWebKitVersion()) | 2929 .format(qWebKitVersion()) |
2930 except ImportError: | 2930 except ImportError: |
2931 pass | 2931 pass |
2932 versionText += """<tr><td><b>{0}</b></td><td>{1}</td></tr>"""\ | 2932 versionText += """<tr><td><b>{0}</b></td><td>{1}</td></tr>"""\ |
2933 .format(Program, Version) | 2933 .format(Program, Version) |
2934 versionText += self.trUtf8("""</table>""") | 2934 versionText += self.tr("""</table>""") |
2935 | 2935 |
2936 E5MessageBox.about(self, Program, versionText) | 2936 E5MessageBox.about(self, Program, versionText) |
2937 | 2937 |
2938 def __reportBug(self): | 2938 def __reportBug(self): |
2939 """ | 2939 """ |
2961 else: | 2961 else: |
2962 if Preferences.getUser("Email") == "" or \ | 2962 if Preferences.getUser("Email") == "" or \ |
2963 Preferences.getUser("MailServer") == "": | 2963 Preferences.getUser("MailServer") == "": |
2964 E5MessageBox.critical( | 2964 E5MessageBox.critical( |
2965 self, | 2965 self, |
2966 self.trUtf8("Report Bug"), | 2966 self.tr("Report Bug"), |
2967 self.trUtf8( | 2967 self.tr( |
2968 """Email address or mail server address is empty.""" | 2968 """Email address or mail server address is empty.""" |
2969 """ Please configure your Email settings in the""" | 2969 """ Please configure your Email settings in the""" |
2970 """ Preferences Dialog.""")) | 2970 """ Preferences Dialog.""")) |
2971 self.showPreferences("emailPage") | 2971 self.showPreferences("emailPage") |
2972 return | 2972 return |
3234 """ | 3234 """ |
3235 Private method to restart the application. | 3235 Private method to restart the application. |
3236 """ | 3236 """ |
3237 res = E5MessageBox.yesNo( | 3237 res = E5MessageBox.yesNo( |
3238 self, | 3238 self, |
3239 self.trUtf8("Restart application"), | 3239 self.tr("Restart application"), |
3240 self.trUtf8( | 3240 self.tr( |
3241 """The application needs to be restarted. Do it now?"""), | 3241 """The application needs to be restarted. Do it now?"""), |
3242 yesDefault=True) | 3242 yesDefault=True) |
3243 | 3243 |
3244 if res and self.__shutdown(): | 3244 if res and self.__shutdown(): |
3245 e5App().closeAllWindows() | 3245 e5App().closeAllWindows() |
3267 """ | 3267 """ |
3268 self.__menus["tools"].clear() | 3268 self.__menus["tools"].clear() |
3269 | 3269 |
3270 self.__menus["tools"].addMenu(self.toolGroupsMenu) | 3270 self.__menus["tools"].addMenu(self.toolGroupsMenu) |
3271 act = self.__menus["tools"].addAction( | 3271 act = self.__menus["tools"].addAction( |
3272 self.trUtf8("Configure Tool Groups ..."), | 3272 self.tr("Configure Tool Groups ..."), |
3273 self.__toolGroupsConfiguration) | 3273 self.__toolGroupsConfiguration) |
3274 act.setData(-1) | 3274 act.setData(-1) |
3275 act = self.__menus["tools"].addAction( | 3275 act = self.__menus["tools"].addAction( |
3276 self.trUtf8("Configure current Tool Group ..."), | 3276 self.tr("Configure current Tool Group ..."), |
3277 self.__toolsConfiguration) | 3277 self.__toolsConfiguration) |
3278 act.setData(-2) | 3278 act.setData(-2) |
3279 self.__menus["tools"].addSeparator() | 3279 self.__menus["tools"].addSeparator() |
3280 | 3280 |
3281 if self.currentToolGroup == -1: | 3281 if self.currentToolGroup == -1: |
3320 Private slot to display the Tool Groups menu. | 3320 Private slot to display the Tool Groups menu. |
3321 """ | 3321 """ |
3322 self.toolGroupsMenu.clear() | 3322 self.toolGroupsMenu.clear() |
3323 | 3323 |
3324 # add the default entry | 3324 # add the default entry |
3325 act = self.toolGroupsMenu.addAction(self.trUtf8("&Builtin Tools")) | 3325 act = self.toolGroupsMenu.addAction(self.tr("&Builtin Tools")) |
3326 act.setData(-1) | 3326 act.setData(-1) |
3327 if self.currentToolGroup == -1: | 3327 if self.currentToolGroup == -1: |
3328 font = act.font() | 3328 font = act.font() |
3329 font.setBold(True) | 3329 font.setBold(True) |
3330 act.setFont(font) | 3330 act.setFont(font) |
3331 | 3331 |
3332 # add the plugins entry | 3332 # add the plugins entry |
3333 act = self.toolGroupsMenu.addAction(self.trUtf8("&Plugin Tools")) | 3333 act = self.toolGroupsMenu.addAction(self.tr("&Plugin Tools")) |
3334 act.setData(-2) | 3334 act.setData(-2) |
3335 if self.currentToolGroup == -2: | 3335 if self.currentToolGroup == -2: |
3336 font = act.font() | 3336 font = act.font() |
3337 font.setBold(True) | 3337 font.setBold(True) |
3338 act.setFont(font) | 3338 act.setFont(font) |
3418 act.setCheckable(True) | 3418 act.setCheckable(True) |
3419 act.setData(name) | 3419 act.setData(name) |
3420 act.setChecked(not tb.isHidden()) | 3420 act.setChecked(not tb.isHidden()) |
3421 self.__menus["toolbars"].addSeparator() | 3421 self.__menus["toolbars"].addSeparator() |
3422 self.__toolbarsShowAllAct = \ | 3422 self.__toolbarsShowAllAct = \ |
3423 self.__menus["toolbars"].addAction(self.trUtf8("&Show all")) | 3423 self.__menus["toolbars"].addAction(self.tr("&Show all")) |
3424 self.__toolbarsHideAllAct = \ | 3424 self.__toolbarsHideAllAct = \ |
3425 self.__menus["toolbars"].addAction(self.trUtf8("&Hide all")) | 3425 self.__menus["toolbars"].addAction(self.tr("&Hide all")) |
3426 | 3426 |
3427 def __TBMenuTriggered(self, act): | 3427 def __TBMenuTriggered(self, act): |
3428 """ | 3428 """ |
3429 Private method to handle the toggle of a toolbar. | 3429 Private method to handle the toggle of a toolbar. |
3430 | 3430 |
4002 else: | 4002 else: |
4003 prog = fn | 4003 prog = fn |
4004 else: | 4004 else: |
4005 E5MessageBox.critical( | 4005 E5MessageBox.critical( |
4006 self, | 4006 self, |
4007 self.trUtf8("Unittest Project"), | 4007 self.tr("Unittest Project"), |
4008 self.trUtf8( | 4008 self.tr( |
4009 "There is no main script defined for the" | 4009 "There is no main script defined for the" |
4010 " current project. Aborting")) | 4010 " current project. Aborting")) |
4011 return | 4011 return |
4012 | 4012 |
4013 self.__createUnitTestDialog() | 4013 self.__createUnitTestDialog() |
4065 pass | 4065 pass |
4066 | 4066 |
4067 if version == 3: | 4067 if version == 3: |
4068 E5MessageBox.information( | 4068 E5MessageBox.information( |
4069 self, | 4069 self, |
4070 self.trUtf8("Qt 3 support"), | 4070 self.tr("Qt 3 support"), |
4071 self.trUtf8("""Qt v.3 is not supported by eric5.""")) | 4071 self.tr("""Qt v.3 is not supported by eric5.""")) |
4072 return | 4072 return |
4073 | 4073 |
4074 args = [] | 4074 args = [] |
4075 if fn is not None: | 4075 if fn is not None: |
4076 try: | 4076 try: |
4077 if os.path.isfile(fn) and os.path.getsize(fn): | 4077 if os.path.isfile(fn) and os.path.getsize(fn): |
4078 args.append(fn) | 4078 args.append(fn) |
4079 else: | 4079 else: |
4080 E5MessageBox.critical( | 4080 E5MessageBox.critical( |
4081 self, | 4081 self, |
4082 self.trUtf8('Problem'), | 4082 self.tr('Problem'), |
4083 self.trUtf8( | 4083 self.tr( |
4084 '<p>The file <b>{0}</b> does not exist or' | 4084 '<p>The file <b>{0}</b> does not exist or' |
4085 ' is zero length.</p>') | 4085 ' is zero length.</p>') |
4086 .format(fn)) | 4086 .format(fn)) |
4087 return | 4087 return |
4088 except EnvironmentError: | 4088 except EnvironmentError: |
4089 E5MessageBox.critical( | 4089 E5MessageBox.critical( |
4090 self, | 4090 self, |
4091 self.trUtf8('Problem'), | 4091 self.tr('Problem'), |
4092 self.trUtf8( | 4092 self.tr( |
4093 '<p>The file <b>{0}</b> does not exist or' | 4093 '<p>The file <b>{0}</b> does not exist or' |
4094 ' is zero length.</p>') | 4094 ' is zero length.</p>') |
4095 .format(fn)) | 4095 .format(fn)) |
4096 return | 4096 return |
4097 | 4097 |
4108 | 4108 |
4109 proc = QProcess() | 4109 proc = QProcess() |
4110 if not proc.startDetached(designer, args): | 4110 if not proc.startDetached(designer, args): |
4111 E5MessageBox.critical( | 4111 E5MessageBox.critical( |
4112 self, | 4112 self, |
4113 self.trUtf8('Process Generation Error'), | 4113 self.tr('Process Generation Error'), |
4114 self.trUtf8( | 4114 self.tr( |
4115 '<p>Could not start Qt-Designer.<br>' | 4115 '<p>Could not start Qt-Designer.<br>' |
4116 'Ensure that it is available as <b>{0}</b>.</p>' | 4116 'Ensure that it is available as <b>{0}</b>.</p>' |
4117 ).format(designer)) | 4117 ).format(designer)) |
4118 | 4118 |
4119 def __designer4(self): | 4119 def __designer4(self): |
4130 @param version indication for the requested version (Qt 4) (integer) | 4130 @param version indication for the requested version (Qt 4) (integer) |
4131 """ | 4131 """ |
4132 if version < 4: | 4132 if version < 4: |
4133 E5MessageBox.information( | 4133 E5MessageBox.information( |
4134 self, | 4134 self, |
4135 self.trUtf8("Qt 3 support"), | 4135 self.tr("Qt 3 support"), |
4136 self.trUtf8("""Qt v.3 is not supported by eric5.""")) | 4136 self.tr("""Qt v.3 is not supported by eric5.""")) |
4137 return | 4137 return |
4138 | 4138 |
4139 args = [] | 4139 args = [] |
4140 if fn is not None: | 4140 if fn is not None: |
4141 fn = fn.replace('.qm', '.ts') | 4141 fn = fn.replace('.qm', '.ts') |
4144 fn not in args: | 4144 fn not in args: |
4145 args.append(fn) | 4145 args.append(fn) |
4146 else: | 4146 else: |
4147 E5MessageBox.critical( | 4147 E5MessageBox.critical( |
4148 self, | 4148 self, |
4149 self.trUtf8('Problem'), | 4149 self.tr('Problem'), |
4150 self.trUtf8( | 4150 self.tr( |
4151 '<p>The file <b>{0}</b> does not exist or' | 4151 '<p>The file <b>{0}</b> does not exist or' |
4152 ' is zero length.</p>') | 4152 ' is zero length.</p>') |
4153 .format(fn)) | 4153 .format(fn)) |
4154 return | 4154 return |
4155 except EnvironmentError: | 4155 except EnvironmentError: |
4156 E5MessageBox.critical( | 4156 E5MessageBox.critical( |
4157 self, | 4157 self, |
4158 self.trUtf8('Problem'), | 4158 self.tr('Problem'), |
4159 self.trUtf8( | 4159 self.tr( |
4160 '<p>The file <b>{0}</b> does not exist or' | 4160 '<p>The file <b>{0}</b> does not exist or' |
4161 ' is zero length.</p>') | 4161 ' is zero length.</p>') |
4162 .format(fn)) | 4162 .format(fn)) |
4163 return | 4163 return |
4164 | 4164 |
4175 | 4175 |
4176 proc = QProcess() | 4176 proc = QProcess() |
4177 if not proc.startDetached(linguist, args): | 4177 if not proc.startDetached(linguist, args): |
4178 E5MessageBox.critical( | 4178 E5MessageBox.critical( |
4179 self, | 4179 self, |
4180 self.trUtf8('Process Generation Error'), | 4180 self.tr('Process Generation Error'), |
4181 self.trUtf8( | 4181 self.tr( |
4182 '<p>Could not start Qt-Linguist.<br>' | 4182 '<p>Could not start Qt-Linguist.<br>' |
4183 'Ensure that it is available as <b>{0}</b>.</p>' | 4183 'Ensure that it is available as <b>{0}</b>.</p>' |
4184 ).format(linguist)) | 4184 ).format(linguist)) |
4185 | 4185 |
4186 def __linguist4(self, fn=None): | 4186 def __linguist4(self, fn=None): |
4199 @param version indication for the requested version (Qt 4) (integer) | 4199 @param version indication for the requested version (Qt 4) (integer) |
4200 """ | 4200 """ |
4201 if version < 4: | 4201 if version < 4: |
4202 E5MessageBox.information( | 4202 E5MessageBox.information( |
4203 self, | 4203 self, |
4204 self.trUtf8("Qt 3 support"), | 4204 self.tr("Qt 3 support"), |
4205 self.trUtf8("""Qt v.3 is not supported by eric5.""")) | 4205 self.tr("""Qt v.3 is not supported by eric5.""")) |
4206 return | 4206 return |
4207 | 4207 |
4208 args = [] | 4208 args = [] |
4209 if home: | 4209 if home: |
4210 if version == 4: | 4210 if version == 4: |
4224 | 4224 |
4225 proc = QProcess() | 4225 proc = QProcess() |
4226 if not proc.startDetached(assistant, args): | 4226 if not proc.startDetached(assistant, args): |
4227 E5MessageBox.critical( | 4227 E5MessageBox.critical( |
4228 self, | 4228 self, |
4229 self.trUtf8('Process Generation Error'), | 4229 self.tr('Process Generation Error'), |
4230 self.trUtf8( | 4230 self.tr( |
4231 '<p>Could not start Qt-Assistant.<br>' | 4231 '<p>Could not start Qt-Assistant.<br>' |
4232 'Ensure that it is available as <b>{0}</b>.</p>' | 4232 'Ensure that it is available as <b>{0}</b>.</p>' |
4233 ).format(assistant)) | 4233 ).format(assistant)) |
4234 | 4234 |
4235 def __assistant4(self): | 4235 def __assistant4(self): |
4252 """ | 4252 """ |
4253 customViewer = Preferences.getHelp("CustomViewer") | 4253 customViewer = Preferences.getHelp("CustomViewer") |
4254 if not customViewer: | 4254 if not customViewer: |
4255 E5MessageBox.information( | 4255 E5MessageBox.information( |
4256 self, | 4256 self, |
4257 self.trUtf8("Help"), | 4257 self.tr("Help"), |
4258 self.trUtf8( | 4258 self.tr( |
4259 """Currently no custom viewer is selected.""" | 4259 """Currently no custom viewer is selected.""" |
4260 """ Please use the preferences dialog to specify one.""")) | 4260 """ Please use the preferences dialog to specify one.""")) |
4261 return | 4261 return |
4262 | 4262 |
4263 proc = QProcess() | 4263 proc = QProcess() |
4266 args.append(home) | 4266 args.append(home) |
4267 | 4267 |
4268 if not proc.startDetached(customViewer, args): | 4268 if not proc.startDetached(customViewer, args): |
4269 E5MessageBox.critical( | 4269 E5MessageBox.critical( |
4270 self, | 4270 self, |
4271 self.trUtf8('Process Generation Error'), | 4271 self.tr('Process Generation Error'), |
4272 self.trUtf8( | 4272 self.tr( |
4273 '<p>Could not start custom viewer.<br>' | 4273 '<p>Could not start custom viewer.<br>' |
4274 'Ensure that it is available as <b>{0}</b>.</p>' | 4274 'Ensure that it is available as <b>{0}</b>.</p>' |
4275 ).format(customViewer)) | 4275 ).format(customViewer)) |
4276 | 4276 |
4277 def __chmViewer(self, home=None): | 4277 def __chmViewer(self, home=None): |
4286 args.append(home) | 4286 args.append(home) |
4287 | 4287 |
4288 if not proc.startDetached("hh", args): | 4288 if not proc.startDetached("hh", args): |
4289 E5MessageBox.critical( | 4289 E5MessageBox.critical( |
4290 self, | 4290 self, |
4291 self.trUtf8('Process Generation Error'), | 4291 self.tr('Process Generation Error'), |
4292 self.trUtf8( | 4292 self.tr( |
4293 '<p>Could not start the help viewer.<br>' | 4293 '<p>Could not start the help viewer.<br>' |
4294 'Ensure that it is available as <b>hh</b>.</p>' | 4294 'Ensure that it is available as <b>hh</b>.</p>' |
4295 )) | 4295 )) |
4296 | 4296 |
4297 def __UIPreviewer(self, fn=None): | 4297 def __UIPreviewer(self, fn=None): |
4312 if os.path.isfile(fn) and os.path.getsize(fn): | 4312 if os.path.isfile(fn) and os.path.getsize(fn): |
4313 args.append(fn) | 4313 args.append(fn) |
4314 else: | 4314 else: |
4315 E5MessageBox.critical( | 4315 E5MessageBox.critical( |
4316 self, | 4316 self, |
4317 self.trUtf8('Problem'), | 4317 self.tr('Problem'), |
4318 self.trUtf8( | 4318 self.tr( |
4319 '<p>The file <b>{0}</b> does not exist or' | 4319 '<p>The file <b>{0}</b> does not exist or' |
4320 ' is zero length.</p>') | 4320 ' is zero length.</p>') |
4321 .format(fn)) | 4321 .format(fn)) |
4322 return | 4322 return |
4323 except EnvironmentError: | 4323 except EnvironmentError: |
4324 E5MessageBox.critical( | 4324 E5MessageBox.critical( |
4325 self, | 4325 self, |
4326 self.trUtf8('Problem'), | 4326 self.tr('Problem'), |
4327 self.trUtf8( | 4327 self.tr( |
4328 '<p>The file <b>{0}</b> does not exist or' | 4328 '<p>The file <b>{0}</b> does not exist or' |
4329 ' is zero length.</p>') | 4329 ' is zero length.</p>') |
4330 .format(fn)) | 4330 .format(fn)) |
4331 return | 4331 return |
4332 | 4332 |
4333 if not os.path.isfile(viewer) or \ | 4333 if not os.path.isfile(viewer) or \ |
4334 not proc.startDetached(sys.executable, args): | 4334 not proc.startDetached(sys.executable, args): |
4335 E5MessageBox.critical( | 4335 E5MessageBox.critical( |
4336 self, | 4336 self, |
4337 self.trUtf8('Process Generation Error'), | 4337 self.tr('Process Generation Error'), |
4338 self.trUtf8( | 4338 self.tr( |
4339 '<p>Could not start UI Previewer.<br>' | 4339 '<p>Could not start UI Previewer.<br>' |
4340 'Ensure that it is available as <b>{0}</b>.</p>' | 4340 'Ensure that it is available as <b>{0}</b>.</p>' |
4341 ).format(viewer)) | 4341 ).format(viewer)) |
4342 | 4342 |
4343 def __TRPreviewer(self, fileNames=None, ignore=False): | 4343 def __TRPreviewer(self, fileNames=None, ignore=False): |
4363 args.append(fn) | 4363 args.append(fn) |
4364 else: | 4364 else: |
4365 if not ignore: | 4365 if not ignore: |
4366 E5MessageBox.critical( | 4366 E5MessageBox.critical( |
4367 self, | 4367 self, |
4368 self.trUtf8('Problem'), | 4368 self.tr('Problem'), |
4369 self.trUtf8( | 4369 self.tr( |
4370 '<p>The file <b>{0}</b> does not exist or' | 4370 '<p>The file <b>{0}</b> does not exist or' |
4371 ' is zero length.</p>') | 4371 ' is zero length.</p>') |
4372 .format(fn)) | 4372 .format(fn)) |
4373 return | 4373 return |
4374 except EnvironmentError: | 4374 except EnvironmentError: |
4375 if not ignore: | 4375 if not ignore: |
4376 E5MessageBox.critical( | 4376 E5MessageBox.critical( |
4377 self, | 4377 self, |
4378 self.trUtf8('Problem'), | 4378 self.tr('Problem'), |
4379 self.trUtf8( | 4379 self.tr( |
4380 '<p>The file <b>{0}</b> does not exist or' | 4380 '<p>The file <b>{0}</b> does not exist or' |
4381 ' is zero length.</p>') | 4381 ' is zero length.</p>') |
4382 .format(fn)) | 4382 .format(fn)) |
4383 return | 4383 return |
4384 | 4384 |
4385 if not os.path.isfile(viewer) or \ | 4385 if not os.path.isfile(viewer) or \ |
4386 not proc.startDetached(sys.executable, args): | 4386 not proc.startDetached(sys.executable, args): |
4387 E5MessageBox.critical( | 4387 E5MessageBox.critical( |
4388 self, | 4388 self, |
4389 self.trUtf8('Process Generation Error'), | 4389 self.tr('Process Generation Error'), |
4390 self.trUtf8( | 4390 self.tr( |
4391 '<p>Could not start Translation Previewer.<br>' | 4391 '<p>Could not start Translation Previewer.<br>' |
4392 'Ensure that it is available as <b>{0}</b>.</p>' | 4392 'Ensure that it is available as <b>{0}</b>.</p>' |
4393 ).format(viewer)) | 4393 ).format(viewer)) |
4394 | 4394 |
4395 def __sqlBrowser(self): | 4395 def __sqlBrowser(self): |
4405 | 4405 |
4406 if not os.path.isfile(browser) or \ | 4406 if not os.path.isfile(browser) or \ |
4407 not proc.startDetached(sys.executable, args): | 4407 not proc.startDetached(sys.executable, args): |
4408 E5MessageBox.critical( | 4408 E5MessageBox.critical( |
4409 self, | 4409 self, |
4410 self.trUtf8('Process Generation Error'), | 4410 self.tr('Process Generation Error'), |
4411 self.trUtf8( | 4411 self.tr( |
4412 '<p>Could not start SQL Browser.<br>' | 4412 '<p>Could not start SQL Browser.<br>' |
4413 'Ensure that it is available as <b>{0}</b>.</p>' | 4413 'Ensure that it is available as <b>{0}</b>.</p>' |
4414 ).format(browser)) | 4414 ).format(browser)) |
4415 | 4415 |
4416 def __editPixmap(self, fn=""): | 4416 def __editPixmap(self, fn=""): |
4457 | 4457 |
4458 if not os.path.isfile(snap) or \ | 4458 if not os.path.isfile(snap) or \ |
4459 not proc.startDetached(sys.executable, args): | 4459 not proc.startDetached(sys.executable, args): |
4460 E5MessageBox.critical( | 4460 E5MessageBox.critical( |
4461 self, | 4461 self, |
4462 self.trUtf8('Process Generation Error'), | 4462 self.tr('Process Generation Error'), |
4463 self.trUtf8( | 4463 self.tr( |
4464 '<p>Could not start Snapshot tool.<br>' | 4464 '<p>Could not start Snapshot tool.<br>' |
4465 'Ensure that it is available as <b>{0}</b>.</p>' | 4465 'Ensure that it is available as <b>{0}</b>.</p>' |
4466 ).format(snap)) | 4466 ).format(snap)) |
4467 | 4467 |
4468 def __toolActionTriggered(self): | 4468 def __toolActionTriggered(self): |
4478 self.__startToolProcess(tool) | 4478 self.__startToolProcess(tool) |
4479 return | 4479 return |
4480 | 4480 |
4481 E5MessageBox.information( | 4481 E5MessageBox.information( |
4482 self, | 4482 self, |
4483 self.trUtf8("External Tools"), | 4483 self.tr("External Tools"), |
4484 self.trUtf8( | 4484 self.tr( |
4485 """No tool entry found for external tool '{0}' """ | 4485 """No tool entry found for external tool '{0}' """ |
4486 """in tool group '{1}'.""") | 4486 """in tool group '{1}'.""") |
4487 .format(toolMenuText, toolGroupName)) | 4487 .format(toolMenuText, toolGroupName)) |
4488 return | 4488 return |
4489 | 4489 |
4490 E5MessageBox.information( | 4490 E5MessageBox.information( |
4491 self, | 4491 self, |
4492 self.trUtf8("External Tools"), | 4492 self.tr("External Tools"), |
4493 self.trUtf8("""No toolgroup entry '{0}' found.""") | 4493 self.tr("""No toolgroup entry '{0}' found.""") |
4494 .format(toolGroupName) | 4494 .format(toolGroupName) |
4495 ) | 4495 ) |
4496 | 4496 |
4497 def __toolExecute(self, act): | 4497 def __toolExecute(self, act): |
4498 """ | 4498 """ |
4524 procData = (None,) | 4524 procData = (None,) |
4525 program = tool['executable'] | 4525 program = tool['executable'] |
4526 args = [] | 4526 args = [] |
4527 argv = Utilities.parseOptionString(tool['arguments']) | 4527 argv = Utilities.parseOptionString(tool['arguments']) |
4528 args.extend(argv) | 4528 args.extend(argv) |
4529 t = self.trUtf8("Starting process '{0} {1}'.\n")\ | 4529 t = self.tr("Starting process '{0} {1}'.\n")\ |
4530 .format(program, tool['arguments']) | 4530 .format(program, tool['arguments']) |
4531 self.appendToStdout(t) | 4531 self.appendToStdout(t) |
4532 | 4532 |
4533 proc.finished.connect(self.__toolFinished) | 4533 proc.finished.connect(self.__toolFinished) |
4534 if tool['redirect'] != 'no': | 4534 if tool['redirect'] != 'no': |
4542 | 4542 |
4543 proc.start(program, args) | 4543 proc.start(program, args) |
4544 if not proc.waitForStarted(): | 4544 if not proc.waitForStarted(): |
4545 E5MessageBox.critical( | 4545 E5MessageBox.critical( |
4546 self, | 4546 self, |
4547 self.trUtf8('Process Generation Error'), | 4547 self.tr('Process Generation Error'), |
4548 self.trUtf8( | 4548 self.tr( |
4549 '<p>Could not start the tool entry <b>{0}</b>.<br>' | 4549 '<p>Could not start the tool entry <b>{0}</b>.<br>' |
4550 'Ensure that it is available as <b>{1}</b>.</p>') | 4550 'Ensure that it is available as <b>{1}</b>.</p>') |
4551 .format(tool['menutext'], tool['executable'])) | 4551 .format(tool['menutext'], tool['executable'])) |
4552 else: | 4552 else: |
4553 self.toolProcs.append((program, proc, procData)) | 4553 self.toolProcs.append((program, proc, procData)) |
4616 toolProcData[0].endUndoAction() | 4616 toolProcData[0].endUndoAction() |
4617 | 4617 |
4618 # now delete the exited procs from the list of running processes | 4618 # now delete the exited procs from the list of running processes |
4619 for proc in exitedProcs: | 4619 for proc in exitedProcs: |
4620 self.toolProcs.remove(proc) | 4620 self.toolProcs.remove(proc) |
4621 t = self.trUtf8("Process '{0}' has exited.\n").format(proc[0]) | 4621 t = self.tr("Process '{0}' has exited.\n").format(proc[0]) |
4622 self.appendToStdout(t) | 4622 self.appendToStdout(t) |
4623 | 4623 |
4624 def __showPythonDoc(self): | 4624 def __showPythonDoc(self): |
4625 """ | 4625 """ |
4626 Private slot to show the Python 3 documentation. | 4626 Private slot to show the Python 3 documentation. |
4652 home = pythonDocDir | 4652 home = pythonDocDir |
4653 | 4653 |
4654 if not os.path.exists(home): | 4654 if not os.path.exists(home): |
4655 E5MessageBox.warning( | 4655 E5MessageBox.warning( |
4656 self, | 4656 self, |
4657 self.trUtf8("Documentation Missing"), | 4657 self.tr("Documentation Missing"), |
4658 self.trUtf8("""<p>The documentation starting point""" | 4658 self.tr("""<p>The documentation starting point""" |
4659 """ "<b>{0}</b>" could not be found.</p>""") | 4659 """ "<b>{0}</b>" could not be found.</p>""") |
4660 .format(home)) | 4660 .format(home)) |
4661 return | 4661 return |
4662 | 4662 |
4663 if not home.endswith(".chm"): | 4663 if not home.endswith(".chm"): |
4664 if Utilities.isWindowsPlatform(): | 4664 if Utilities.isWindowsPlatform(): |
4709 home = pythonDocDir | 4709 home = pythonDocDir |
4710 | 4710 |
4711 if not os.path.exists(home): | 4711 if not os.path.exists(home): |
4712 E5MessageBox.warning( | 4712 E5MessageBox.warning( |
4713 self, | 4713 self, |
4714 self.trUtf8("Documentation Missing"), | 4714 self.tr("Documentation Missing"), |
4715 self.trUtf8("""<p>The documentation starting point""" | 4715 self.tr("""<p>The documentation starting point""" |
4716 """ "<b>{0}</b>" could not be found.</p>""") | 4716 """ "<b>{0}</b>" could not be found.</p>""") |
4717 .format(home)) | 4717 .format(home)) |
4718 return | 4718 return |
4719 | 4719 |
4720 if not home.endswith(".chm"): | 4720 if not home.endswith(".chm"): |
4721 if Utilities.isWindowsPlatform(): | 4721 if Utilities.isWindowsPlatform(): |
4778 home = qtDocDir | 4778 home = qtDocDir |
4779 | 4779 |
4780 if not os.path.exists(home): | 4780 if not os.path.exists(home): |
4781 E5MessageBox.warning( | 4781 E5MessageBox.warning( |
4782 self, | 4782 self, |
4783 self.trUtf8("Documentation Missing"), | 4783 self.tr("Documentation Missing"), |
4784 self.trUtf8("""<p>The documentation starting point""" | 4784 self.tr("""<p>The documentation starting point""" |
4785 """ "<b>{0}</b>" could not be found.</p>""") | 4785 """ "<b>{0}</b>" could not be found.</p>""") |
4786 .format(home)) | 4786 .format(home)) |
4787 return | 4787 return |
4788 | 4788 |
4789 if Utilities.isWindowsPlatform(): | 4789 if Utilities.isWindowsPlatform(): |
4790 home = "file:///" + Utilities.fromNativeSeparators(home) | 4790 home = "file:///" + Utilities.fromNativeSeparators(home) |
4810 pyqt4DocDir = Utilities.getEnvironmentEntry("PYQT4DOCDIR", None) | 4810 pyqt4DocDir = Utilities.getEnvironmentEntry("PYQT4DOCDIR", None) |
4811 | 4811 |
4812 if not pyqt4DocDir: | 4812 if not pyqt4DocDir: |
4813 E5MessageBox.warning( | 4813 E5MessageBox.warning( |
4814 self, | 4814 self, |
4815 self.trUtf8("Documentation"), | 4815 self.tr("Documentation"), |
4816 self.trUtf8("""<p>The PyQt4 documentation starting point""" | 4816 self.tr("""<p>The PyQt4 documentation starting point""" |
4817 """ has not been configured.</p>""")) | 4817 """ has not been configured.</p>""")) |
4818 return | 4818 return |
4819 | 4819 |
4820 if not pyqt4DocDir.startswith("http://") and \ | 4820 if not pyqt4DocDir.startswith("http://") and \ |
4821 not pyqt4DocDir.startswith("https://"): | 4821 not pyqt4DocDir.startswith("https://"): |
4822 home = "" | 4822 home = "" |
4836 home = pyqt4DocDir | 4836 home = pyqt4DocDir |
4837 | 4837 |
4838 if not home or not os.path.exists(home): | 4838 if not home or not os.path.exists(home): |
4839 E5MessageBox.warning( | 4839 E5MessageBox.warning( |
4840 self, | 4840 self, |
4841 self.trUtf8("Documentation Missing"), | 4841 self.tr("Documentation Missing"), |
4842 self.trUtf8("""<p>The documentation starting point""" | 4842 self.tr("""<p>The documentation starting point""" |
4843 """ "<b>{0}</b>" could not be found.</p>""") | 4843 """ "<b>{0}</b>" could not be found.</p>""") |
4844 .format(home)) | 4844 .format(home)) |
4845 return | 4845 return |
4846 | 4846 |
4847 if Utilities.isWindowsPlatform(): | 4847 if Utilities.isWindowsPlatform(): |
4848 home = "file:///" + Utilities.fromNativeSeparators(home) | 4848 home = "file:///" + Utilities.fromNativeSeparators(home) |
4870 pyqt5DocDir = Utilities.getEnvironmentEntry("PYQT5DOCDIR", None) | 4870 pyqt5DocDir = Utilities.getEnvironmentEntry("PYQT5DOCDIR", None) |
4871 | 4871 |
4872 if not pyqt5DocDir: | 4872 if not pyqt5DocDir: |
4873 E5MessageBox.warning( | 4873 E5MessageBox.warning( |
4874 self, | 4874 self, |
4875 self.trUtf8("Documentation"), | 4875 self.tr("Documentation"), |
4876 self.trUtf8("""<p>The PyQt5 documentation starting point""" | 4876 self.tr("""<p>The PyQt5 documentation starting point""" |
4877 """ has not been configured.</p>""")) | 4877 """ has not been configured.</p>""")) |
4878 return | 4878 return |
4879 | 4879 |
4880 if not pyqt5DocDir.startswith("http://") and \ | 4880 if not pyqt5DocDir.startswith("http://") and \ |
4881 not pyqt5DocDir.startswith("https://"): | 4881 not pyqt5DocDir.startswith("https://"): |
4882 home = "" | 4882 home = "" |
4898 home = pyqt5DocDir | 4898 home = pyqt5DocDir |
4899 | 4899 |
4900 if not home or not os.path.exists(home): | 4900 if not home or not os.path.exists(home): |
4901 E5MessageBox.warning( | 4901 E5MessageBox.warning( |
4902 self, | 4902 self, |
4903 self.trUtf8("Documentation Missing"), | 4903 self.tr("Documentation Missing"), |
4904 self.trUtf8("""<p>The documentation starting point""" | 4904 self.tr("""<p>The documentation starting point""" |
4905 """ "<b>{0}</b>" could not be found.</p>""") | 4905 """ "<b>{0}</b>" could not be found.</p>""") |
4906 .format(home)) | 4906 .format(home)) |
4907 return | 4907 return |
4908 | 4908 |
4909 if Utilities.isWindowsPlatform(): | 4909 if Utilities.isWindowsPlatform(): |
4910 home = "file:///" + Utilities.fromNativeSeparators(home) | 4910 home = "file:///" + Utilities.fromNativeSeparators(home) |
4934 not home.startswith("https://") and \ | 4934 not home.startswith("https://") and \ |
4935 not home.startswith("qthelp://"): | 4935 not home.startswith("qthelp://"): |
4936 if not os.path.exists(home): | 4936 if not os.path.exists(home): |
4937 E5MessageBox.warning( | 4937 E5MessageBox.warning( |
4938 self, | 4938 self, |
4939 self.trUtf8("Documentation Missing"), | 4939 self.tr("Documentation Missing"), |
4940 self.trUtf8("""<p>The documentation starting point""" | 4940 self.tr("""<p>The documentation starting point""" |
4941 """ "<b>{0}</b>" could not be found.</p>""") | 4941 """ "<b>{0}</b>" could not be found.</p>""") |
4942 .format(home)) | 4942 .format(home)) |
4943 return | 4943 return |
4944 | 4944 |
4945 if Utilities.isWindowsPlatform(): | 4945 if Utilities.isWindowsPlatform(): |
4946 home = "file:///" + Utilities.fromNativeSeparators(home) | 4946 home = "file:///" + Utilities.fromNativeSeparators(home) |
4966 pysideDocDir = Utilities.getEnvironmentEntry("PYSIDEDOCDIR", None) | 4966 pysideDocDir = Utilities.getEnvironmentEntry("PYSIDEDOCDIR", None) |
4967 | 4967 |
4968 if not pysideDocDir: | 4968 if not pysideDocDir: |
4969 E5MessageBox.warning( | 4969 E5MessageBox.warning( |
4970 self, | 4970 self, |
4971 self.trUtf8("Documentation"), | 4971 self.tr("Documentation"), |
4972 self.trUtf8("""<p>The PySide documentation starting point""" | 4972 self.tr("""<p>The PySide documentation starting point""" |
4973 """ has not been configured.</p>""")) | 4973 """ has not been configured.</p>""")) |
4974 return | 4974 return |
4975 | 4975 |
4976 if not pysideDocDir.startswith("http://") and \ | 4976 if not pysideDocDir.startswith("http://") and \ |
4977 not pysideDocDir.startswith("https://"): | 4977 not pysideDocDir.startswith("https://"): |
4978 if pysideDocDir.startswith("file://"): | 4978 if pysideDocDir.startswith("file://"): |
4982 else: | 4982 else: |
4983 home = pysideDocDir | 4983 home = pysideDocDir |
4984 if not os.path.exists(home): | 4984 if not os.path.exists(home): |
4985 E5MessageBox.warning( | 4985 E5MessageBox.warning( |
4986 self, | 4986 self, |
4987 self.trUtf8("Documentation Missing"), | 4987 self.tr("Documentation Missing"), |
4988 self.trUtf8("""<p>The documentation starting point""" | 4988 self.tr("""<p>The documentation starting point""" |
4989 """ "<b>{0}</b>" could not be found.</p>""") | 4989 """ "<b>{0}</b>" could not be found.</p>""") |
4990 .format(home)) | 4990 .format(home)) |
4991 return | 4991 return |
4992 | 4992 |
4993 if Utilities.isWindowsPlatform(): | 4993 if Utilities.isWindowsPlatform(): |
4994 home = "file:///" + Utilities.fromNativeSeparators(home) | 4994 home = "file:///" + Utilities.fromNativeSeparators(home) |
5075 """ | 5075 """ |
5076 started = QDesktopServices.openUrl(QUrl(home)) | 5076 started = QDesktopServices.openUrl(QUrl(home)) |
5077 if not started: | 5077 if not started: |
5078 E5MessageBox.critical( | 5078 E5MessageBox.critical( |
5079 self, | 5079 self, |
5080 self.trUtf8('Open Browser'), | 5080 self.tr('Open Browser'), |
5081 self.trUtf8('Could not start a web browser')) | 5081 self.tr('Could not start a web browser')) |
5082 | 5082 |
5083 def getHelpViewer(self, preview=False): | 5083 def getHelpViewer(self, preview=False): |
5084 """ | 5084 """ |
5085 Public method to get a reference to the help window instance. | 5085 Public method to get a reference to the help window instance. |
5086 | 5086 |
5249 """ | 5249 """ |
5250 Private slot to export the keyboard shortcuts. | 5250 Private slot to export the keyboard shortcuts. |
5251 """ | 5251 """ |
5252 fn, selectedFilter = E5FileDialog.getSaveFileNameAndFilter( | 5252 fn, selectedFilter = E5FileDialog.getSaveFileNameAndFilter( |
5253 None, | 5253 None, |
5254 self.trUtf8("Export Keyboard Shortcuts"), | 5254 self.tr("Export Keyboard Shortcuts"), |
5255 "", | 5255 "", |
5256 self.trUtf8("Keyboard shortcut file (*.e4k)"), | 5256 self.tr("Keyboard shortcut file (*.e4k)"), |
5257 "", | 5257 "", |
5258 E5FileDialog.Options(E5FileDialog.DontConfirmOverwrite)) | 5258 E5FileDialog.Options(E5FileDialog.DontConfirmOverwrite)) |
5259 | 5259 |
5260 if not fn: | 5260 if not fn: |
5261 return | 5261 return |
5273 """ | 5273 """ |
5274 Private slot to import the keyboard shortcuts. | 5274 Private slot to import the keyboard shortcuts. |
5275 """ | 5275 """ |
5276 fn = E5FileDialog.getOpenFileName( | 5276 fn = E5FileDialog.getOpenFileName( |
5277 None, | 5277 None, |
5278 self.trUtf8("Import Keyboard Shortcuts"), | 5278 self.tr("Import Keyboard Shortcuts"), |
5279 "", | 5279 "", |
5280 self.trUtf8("Keyboard shortcut file (*.e4k)")) | 5280 self.tr("Keyboard shortcut file (*.e4k)")) |
5281 | 5281 |
5282 if fn: | 5282 if fn: |
5283 from Preferences import Shortcuts | 5283 from Preferences import Shortcuts |
5284 Shortcuts.importShortcuts(fn) | 5284 Shortcuts.importShortcuts(fn) |
5285 | 5285 |
5408 f = QFile(fn) | 5408 f = QFile(fn) |
5409 ok = f.open(QIODevice.WriteOnly) | 5409 ok = f.open(QIODevice.WriteOnly) |
5410 if not ok: | 5410 if not ok: |
5411 E5MessageBox.critical( | 5411 E5MessageBox.critical( |
5412 self, | 5412 self, |
5413 self.trUtf8("Save tasks"), | 5413 self.tr("Save tasks"), |
5414 self.trUtf8( | 5414 self.tr( |
5415 "<p>The tasks file <b>{0}</b> could not be written.</p>") | 5415 "<p>The tasks file <b>{0}</b> could not be written.</p>") |
5416 .format(fn)) | 5416 .format(fn)) |
5417 return | 5417 return |
5418 | 5418 |
5419 from E5XML.TasksWriter import TasksWriter | 5419 from E5XML.TasksWriter import TasksWriter |
5434 reader.readXML() | 5434 reader.readXML() |
5435 f.close() | 5435 f.close() |
5436 else: | 5436 else: |
5437 E5MessageBox.critical( | 5437 E5MessageBox.critical( |
5438 self, | 5438 self, |
5439 self.trUtf8("Read tasks"), | 5439 self.tr("Read tasks"), |
5440 self.trUtf8( | 5440 self.tr( |
5441 "<p>The tasks file <b>{0}</b> could not be read.</p>") | 5441 "<p>The tasks file <b>{0}</b> could not be read.</p>") |
5442 .format(fn)) | 5442 .format(fn)) |
5443 | 5443 |
5444 def __writeSession(self): | 5444 def __writeSession(self): |
5445 """ | 5445 """ |
5452 SessionWriter(f, None).writeXML() | 5452 SessionWriter(f, None).writeXML() |
5453 f.close() | 5453 f.close() |
5454 else: | 5454 else: |
5455 E5MessageBox.critical( | 5455 E5MessageBox.critical( |
5456 self, | 5456 self, |
5457 self.trUtf8("Save session"), | 5457 self.tr("Save session"), |
5458 self.trUtf8( | 5458 self.tr( |
5459 "<p>The session file <b>{0}</b> could not be written.</p>") | 5459 "<p>The session file <b>{0}</b> could not be written.</p>") |
5460 .format(fn)) | 5460 .format(fn)) |
5461 | 5461 |
5462 def __readSession(self): | 5462 def __readSession(self): |
5463 """ | 5463 """ |
5465 """ | 5465 """ |
5466 fn = os.path.join(Utilities.getConfigDir(), "eric5session.e4s") | 5466 fn = os.path.join(Utilities.getConfigDir(), "eric5session.e4s") |
5467 if not os.path.exists(fn): | 5467 if not os.path.exists(fn): |
5468 E5MessageBox.critical( | 5468 E5MessageBox.critical( |
5469 self, | 5469 self, |
5470 self.trUtf8("Read session"), | 5470 self.tr("Read session"), |
5471 self.trUtf8( | 5471 self.tr( |
5472 "<p>The session file <b>{0}</b> could not be read.</p>") | 5472 "<p>The session file <b>{0}</b> could not be read.</p>") |
5473 .format(fn)) | 5473 .format(fn)) |
5474 return | 5474 return |
5475 | 5475 |
5476 f = QFile(fn) | 5476 f = QFile(fn) |
5480 reader.readXML() | 5480 reader.readXML() |
5481 f.close() | 5481 f.close() |
5482 else: | 5482 else: |
5483 E5MessageBox.critical( | 5483 E5MessageBox.critical( |
5484 self, | 5484 self, |
5485 self.trUtf8("Read session"), | 5485 self.tr("Read session"), |
5486 self.trUtf8( | 5486 self.tr( |
5487 "<p>The session file <b>{0}</b> could not be read.</p>") | 5487 "<p>The session file <b>{0}</b> could not be read.</p>") |
5488 .format(fn)) | 5488 .format(fn)) |
5489 | 5489 |
5490 def showFindFileByNameDialog(self): | 5490 def showFindFileByNameDialog(self): |
5491 """ | 5491 """ |
5669 if QFileInfo(fname).isFile(): | 5669 if QFileInfo(fname).isFile(): |
5670 self.viewmanager.openSourceFile(fname) | 5670 self.viewmanager.openSourceFile(fname) |
5671 else: | 5671 else: |
5672 E5MessageBox.information( | 5672 E5MessageBox.information( |
5673 self, | 5673 self, |
5674 self.trUtf8("Drop Error"), | 5674 self.tr("Drop Error"), |
5675 self.trUtf8("""<p><b>{0}</b> is not a file.</p>""") | 5675 self.tr("""<p><b>{0}</b> is not a file.</p>""") |
5676 .format(fname)) | 5676 .format(fname)) |
5677 | 5677 |
5678 self.inDragDrop = False | 5678 self.inDragDrop = False |
5679 | 5679 |
5680 ########################################################## | 5680 ########################################################## |
5810 url = QUrl(self.__httpAlternatives[alternative]) | 5810 url = QUrl(self.__httpAlternatives[alternative]) |
5811 self.__versionCheckCanceled = False | 5811 self.__versionCheckCanceled = False |
5812 if manual: | 5812 if manual: |
5813 if self.__versionCheckProgress is None: | 5813 if self.__versionCheckProgress is None: |
5814 self.__versionCheckProgress = E5ProgressDialog( | 5814 self.__versionCheckProgress = E5ProgressDialog( |
5815 "", self.trUtf8("&Cancel"), | 5815 "", self.tr("&Cancel"), |
5816 0, len(self.__httpAlternatives), | 5816 0, len(self.__httpAlternatives), |
5817 self.trUtf8("%v/%m"), self) | 5817 self.tr("%v/%m"), self) |
5818 self.__versionCheckProgress.setMinimumDuration(0) | 5818 self.__versionCheckProgress.setMinimumDuration(0) |
5819 self.__versionCheckProgress.canceled.connect( | 5819 self.__versionCheckProgress.canceled.connect( |
5820 self.__versionsDownloadCanceled) | 5820 self.__versionsDownloadCanceled) |
5821 self.__versionCheckProgress.setLabelText( | 5821 self.__versionCheckProgress.setLabelText( |
5822 self.trUtf8("Trying host {0}").format(url.host())) | 5822 self.tr("Trying host {0}").format(url.host())) |
5823 self.__versionCheckProgress.setValue(alternative) | 5823 self.__versionCheckProgress.setValue(alternative) |
5824 request = QNetworkRequest(url) | 5824 request = QNetworkRequest(url) |
5825 request.setAttribute(QNetworkRequest.CacheLoadControlAttribute, | 5825 request.setAttribute(QNetworkRequest.CacheLoadControlAttribute, |
5826 QNetworkRequest.AlwaysNetwork) | 5826 QNetworkRequest.AlwaysNetwork) |
5827 reply = self.__networkManager.get(request) | 5827 reply = self.__networkManager.get(request) |
5862 Preferences.Prefs.settings.setValue( | 5862 Preferences.Prefs.settings.setValue( |
5863 "Updates/FirstFailedCheckDate", firstFailure) | 5863 "Updates/FirstFailedCheckDate", firstFailure) |
5864 if self.manualUpdatesCheck: | 5864 if self.manualUpdatesCheck: |
5865 E5MessageBox.warning( | 5865 E5MessageBox.warning( |
5866 self, | 5866 self, |
5867 self.trUtf8("Error getting versions information"), | 5867 self.tr("Error getting versions information"), |
5868 self.trUtf8("""The versions information could not be""" | 5868 self.tr("""The versions information could not be""" |
5869 """ downloaded.""" | 5869 """ downloaded.""" |
5870 """ Please go online and try again.""")) | 5870 """ Please go online and try again.""")) |
5871 elif failedDuration > 7: | 5871 elif failedDuration > 7: |
5872 E5MessageBox.warning( | 5872 E5MessageBox.warning( |
5873 self, | 5873 self, |
5874 self.trUtf8("Error getting versions information"), | 5874 self.tr("Error getting versions information"), |
5875 self.trUtf8("""The versions information could not be""" | 5875 self.tr("""The versions information could not be""" |
5876 """ downloaded for the last 7 days.""" | 5876 """ downloaded for the last 7 days.""" |
5877 """ Please go online and try again.""")) | 5877 """ Please go online and try again.""")) |
5878 return | 5878 return |
5879 else: | 5879 else: |
5880 self.performVersionCheck(self.manualUpdatesCheck, | 5880 self.performVersionCheck(self.manualUpdatesCheck, |
5881 self.httpAlternative, | 5881 self.httpAlternative, |
5882 self.showAvailableVersions) | 5882 self.showAvailableVersions) |
5924 if "-snapshot-" in Version: | 5924 if "-snapshot-" in Version: |
5925 # check snapshot version | 5925 # check snapshot version |
5926 if versions[2][0] == "5" and versions[2] > Version: | 5926 if versions[2][0] == "5" and versions[2] > Version: |
5927 res = E5MessageBox.yesNo( | 5927 res = E5MessageBox.yesNo( |
5928 self, | 5928 self, |
5929 self.trUtf8("Update available"), | 5929 self.tr("Update available"), |
5930 self.trUtf8( | 5930 self.tr( |
5931 """The update to <b>{0}</b> of eric5 is""" | 5931 """The update to <b>{0}</b> of eric5 is""" |
5932 """ available at <b>{1}</b>. Would you like to""" | 5932 """ available at <b>{1}</b>. Would you like to""" |
5933 """ get it?""") | 5933 """ get it?""") |
5934 .format(versions[2], versions[3]), | 5934 .format(versions[2], versions[3]), |
5935 yesDefault=True) | 5935 yesDefault=True) |
5936 url = res and versions[3] or '' | 5936 url = res and versions[3] or '' |
5937 elif versions[0] > Version: | 5937 elif versions[0] > Version: |
5938 res = E5MessageBox.yesNo( | 5938 res = E5MessageBox.yesNo( |
5939 self, | 5939 self, |
5940 self.trUtf8("Update available"), | 5940 self.tr("Update available"), |
5941 self.trUtf8( | 5941 self.tr( |
5942 """The update to <b>{0}</b> of eric5 is""" | 5942 """The update to <b>{0}</b> of eric5 is""" |
5943 """ available at <b>{1}</b>. Would you like to""" | 5943 """ available at <b>{1}</b>. Would you like to""" |
5944 """ get it?""") | 5944 """ get it?""") |
5945 .format(versions[0], versions[1]), | 5945 .format(versions[0], versions[1]), |
5946 yesDefault=True) | 5946 yesDefault=True) |
5947 url = res and versions[1] or '' | 5947 url = res and versions[1] or '' |
5948 else: | 5948 else: |
5949 if self.manualUpdatesCheck: | 5949 if self.manualUpdatesCheck: |
5950 E5MessageBox.information( | 5950 E5MessageBox.information( |
5951 self, | 5951 self, |
5952 self.trUtf8("Eric5 is up to date"), | 5952 self.tr("Eric5 is up to date"), |
5953 self.trUtf8( | 5953 self.tr( |
5954 """You are using the latest version of""" | 5954 """You are using the latest version of""" |
5955 """ eric5""")) | 5955 """ eric5""")) |
5956 else: | 5956 else: |
5957 # check release version | 5957 # check release version |
5958 if versions[0] > Version: | 5958 if versions[0] > Version: |
5959 res = E5MessageBox.yesNo( | 5959 res = E5MessageBox.yesNo( |
5960 self, | 5960 self, |
5961 self.trUtf8("Update available"), | 5961 self.tr("Update available"), |
5962 self.trUtf8( | 5962 self.tr( |
5963 """The update to <b>{0}</b> of eric5 is""" | 5963 """The update to <b>{0}</b> of eric5 is""" |
5964 """ available at <b>{1}</b>. Would you like""" | 5964 """ available at <b>{1}</b>. Would you like""" |
5965 """ to get it?""") | 5965 """ to get it?""") |
5966 .format(versions[0], versions[1]), | 5966 .format(versions[0], versions[1]), |
5967 yesDefault=True) | 5967 yesDefault=True) |
5968 url = res and versions[1] or '' | 5968 url = res and versions[1] or '' |
5969 else: | 5969 else: |
5970 if self.manualUpdatesCheck: | 5970 if self.manualUpdatesCheck: |
5971 E5MessageBox.information( | 5971 E5MessageBox.information( |
5972 self, | 5972 self, |
5973 self.trUtf8("Eric5 is up to date"), | 5973 self.tr("Eric5 is up to date"), |
5974 self.trUtf8( | 5974 self.tr( |
5975 """You are using the latest version of""" | 5975 """You are using the latest version of""" |
5976 """ eric5""")) | 5976 """ eric5""")) |
5977 except IndexError: | 5977 except IndexError: |
5978 E5MessageBox.warning( | 5978 E5MessageBox.warning( |
5979 self, | 5979 self, |
5980 self.trUtf8("Error during updates check"), | 5980 self.tr("Error during updates check"), |
5981 self.trUtf8("""Could not perform updates check.""")) | 5981 self.tr("""Could not perform updates check.""")) |
5982 | 5982 |
5983 if url: | 5983 if url: |
5984 QDesktopServices.openUrl(QUrl(url)) | 5984 QDesktopServices.openUrl(QUrl(url)) |
5985 | 5985 |
5986 def __versionsDownloadCanceled(self): | 5986 def __versionsDownloadCanceled(self): |
5996 Private method to show the versions available for download. | 5996 Private method to show the versions available for download. |
5997 | 5997 |
5998 @param versions contents of the downloaded versions file (list of | 5998 @param versions contents of the downloaded versions file (list of |
5999 strings) | 5999 strings) |
6000 """ | 6000 """ |
6001 versionText = self.trUtf8( | 6001 versionText = self.tr( |
6002 """<h3>Available versions</h3>""" | 6002 """<h3>Available versions</h3>""" |
6003 """<table>""") | 6003 """<table>""") |
6004 line = 0 | 6004 line = 0 |
6005 while line < len(versions): | 6005 while line < len(versions): |
6006 if versions[line] == "---": | 6006 if versions[line] == "---": |
6010 """</td></tr>""".format( | 6010 """</td></tr>""".format( |
6011 versions[line], versions[line + 1], | 6011 versions[line], versions[line + 1], |
6012 'sourceforge' in versions[line + 1] and | 6012 'sourceforge' in versions[line + 1] and |
6013 "SourceForge" or versions[line + 1]) | 6013 "SourceForge" or versions[line + 1]) |
6014 line += 2 | 6014 line += 2 |
6015 versionText += self.trUtf8("""</table>""") | 6015 versionText += self.tr("""</table>""") |
6016 | 6016 |
6017 E5MessageBox.about(self, Program, versionText) | 6017 E5MessageBox.about(self, Program, versionText) |
6018 | 6018 |
6019 def __sslErrors(self, reply, errors): | 6019 def __sslErrors(self, reply, errors): |
6020 """ | 6020 """ |
6039 if not Preferences.isConfigured(): | 6039 if not Preferences.isConfigured(): |
6040 self.__initDebugToolbarsLayout() | 6040 self.__initDebugToolbarsLayout() |
6041 | 6041 |
6042 E5MessageBox.information( | 6042 E5MessageBox.information( |
6043 self, | 6043 self, |
6044 self.trUtf8("First time usage"), | 6044 self.tr("First time usage"), |
6045 self.trUtf8("""eric5 has not been configured yet. """ | 6045 self.tr("""eric5 has not been configured yet. """ |
6046 """The configuration dialog will be started.""")) | 6046 """The configuration dialog will be started.""")) |
6047 self.showPreferences() | 6047 self.showPreferences() |
6048 | 6048 |
6049 def checkProjectsWorkspace(self): | 6049 def checkProjectsWorkspace(self): |
6050 """ | 6050 """ |
6051 Public method to check, if a projects workspace has been configured. If | 6051 Public method to check, if a projects workspace has been configured. If |
6058 workspace = Preferences.getMultiProject("Workspace") | 6058 workspace = Preferences.getMultiProject("Workspace") |
6059 if workspace == "": | 6059 if workspace == "": |
6060 default = Utilities.getHomeDir() | 6060 default = Utilities.getHomeDir() |
6061 workspace = E5FileDialog.getExistingDirectory( | 6061 workspace = E5FileDialog.getExistingDirectory( |
6062 None, | 6062 None, |
6063 self.trUtf8("Select Workspace Directory"), | 6063 self.tr("Select Workspace Directory"), |
6064 default, | 6064 default, |
6065 E5FileDialog.Options(E5FileDialog.Option(0))) | 6065 E5FileDialog.Options(E5FileDialog.Option(0))) |
6066 Preferences.setMultiProject("Workspace", workspace) | 6066 Preferences.setMultiProject("Workspace", workspace) |
6067 | 6067 |
6068 def versionIsNewer(self, required, snapshot=None): | 6068 def versionIsNewer(self, required, snapshot=None): |