34 |
34 |
35 from .Info import Version, VersionOnly, BugAddress, Program, FeatureAddress |
35 from .Info import Version, VersionOnly, BugAddress, Program, FeatureAddress |
36 from . import Config |
36 from . import Config |
37 from .NotificationWidget import NotificationTypes |
37 from .NotificationWidget import NotificationTypes |
38 |
38 |
39 from E5Gui.E5SingleApplication import E5SingleApplicationServer |
39 from E5Gui.EricSingleApplication import EricSingleApplicationServer |
40 from E5Gui.E5Action import E5Action, createActionGroup |
40 from E5Gui.EricAction import EricAction, createActionGroup |
41 from E5Gui.E5ToolBarManager import E5ToolBarManager |
41 from E5Gui.EricToolBarManager import EricToolBarManager |
42 from E5Gui import E5MessageBox, E5FileDialog, E5ErrorMessage |
42 from E5Gui import EricMessageBox, EricFileDialog, EricErrorMessage |
43 from E5Gui.E5Application import e5App |
43 from E5Gui.EricApplication import ericApp |
44 from E5Gui.E5MainWindow import E5MainWindow |
44 from E5Gui.EricMainWindow import EricMainWindow |
45 from E5Gui.E5ZoomWidget import E5ZoomWidget |
45 from E5Gui.EricZoomWidget import EricZoomWidget |
46 from E5Gui.E5ProgressDialog import E5ProgressDialog |
46 from E5Gui.EricProgressDialog import EricProgressDialog |
47 from E5Gui.E5ClickableLabel import E5ClickableLabel |
47 from E5Gui.EricClickableLabel import EricClickableLabel |
48 |
48 |
49 import Preferences |
49 import Preferences |
50 import Utilities |
50 import Utilities |
51 import Globals |
51 import Globals |
52 |
52 |
240 self.profiles = Preferences.getUI("ViewProfiles") |
240 self.profiles = Preferences.getUI("ViewProfiles") |
241 |
241 |
242 # Generate the conda interface |
242 # Generate the conda interface |
243 from CondaInterface.Conda import Conda |
243 from CondaInterface.Conda import Conda |
244 self.condaInterface = Conda(self) |
244 self.condaInterface = Conda(self) |
245 e5App().registerObject("Conda", self.condaInterface) |
245 ericApp().registerObject("Conda", self.condaInterface) |
246 |
246 |
247 # Generate the pip interface |
247 # Generate the pip interface |
248 from PipInterface.Pip import Pip |
248 from PipInterface.Pip import Pip |
249 self.pipInterface = Pip(self) |
249 self.pipInterface = Pip(self) |
250 e5App().registerObject("Pip", self.pipInterface) |
250 ericApp().registerObject("Pip", self.pipInterface) |
251 |
251 |
252 # Generate the virtual environment manager |
252 # Generate the virtual environment manager |
253 from VirtualEnv.VirtualenvManager import VirtualenvManager |
253 from VirtualEnv.VirtualenvManager import VirtualenvManager |
254 self.virtualenvManager = VirtualenvManager(self) |
254 self.virtualenvManager = VirtualenvManager(self) |
255 # register it early because it is needed very soon |
255 # register it early because it is needed very soon |
256 e5App().registerObject("VirtualEnvManager", self.virtualenvManager) |
256 ericApp().registerObject("VirtualEnvManager", self.virtualenvManager) |
257 |
257 |
258 # Generate an empty project object and multi project object |
258 # Generate an empty project object and multi project object |
259 from Project.Project import Project |
259 from Project.Project import Project |
260 self.project = Project(self) |
260 self.project = Project(self) |
261 e5App().registerObject("Project", self.project) |
261 ericApp().registerObject("Project", self.project) |
262 |
262 |
263 from MultiProject.MultiProject import MultiProject |
263 from MultiProject.MultiProject import MultiProject |
264 self.multiProject = MultiProject(self.project, self) |
264 self.multiProject = MultiProject(self.project, self) |
265 |
265 |
266 # Generate the debug server object |
266 # Generate the debug server object |
585 QDesktopServices.setUrlHandler("http", self.handleUrl) |
585 QDesktopServices.setUrlHandler("http", self.handleUrl) |
586 QDesktopServices.setUrlHandler("https", self.handleUrl) |
586 QDesktopServices.setUrlHandler("https", self.handleUrl) |
587 |
587 |
588 # register all relevant objects |
588 # register all relevant objects |
589 splash.showMessage(self.tr("Registering Objects...")) |
589 splash.showMessage(self.tr("Registering Objects...")) |
590 e5App().registerObject("UserInterface", self) |
590 ericApp().registerObject("UserInterface", self) |
591 e5App().registerObject("DebugUI", self.debuggerUI) |
591 ericApp().registerObject("DebugUI", self.debuggerUI) |
592 e5App().registerObject("DebugServer", debugServer) |
592 ericApp().registerObject("DebugServer", debugServer) |
593 e5App().registerObject("BackgroundService", self.backgroundService) |
593 ericApp().registerObject("BackgroundService", self.backgroundService) |
594 e5App().registerObject("ViewManager", self.viewmanager) |
594 ericApp().registerObject("ViewManager", self.viewmanager) |
595 e5App().registerObject("ProjectBrowser", self.projectBrowser) |
595 ericApp().registerObject("ProjectBrowser", self.projectBrowser) |
596 e5App().registerObject("MultiProject", self.multiProject) |
596 ericApp().registerObject("MultiProject", self.multiProject) |
597 e5App().registerObject("TaskViewer", self.taskViewer) |
597 ericApp().registerObject("TaskViewer", self.taskViewer) |
598 if self.templateViewer is not None: |
598 if self.templateViewer is not None: |
599 e5App().registerObject("TemplateViewer", self.templateViewer) |
599 ericApp().registerObject("TemplateViewer", self.templateViewer) |
600 e5App().registerObject("Shell", self.shell) |
600 ericApp().registerObject("Shell", self.shell) |
601 e5App().registerObject("PluginManager", self.pluginManager) |
601 ericApp().registerObject("PluginManager", self.pluginManager) |
602 e5App().registerObject("ToolbarManager", self.toolbarManager) |
602 ericApp().registerObject("ToolbarManager", self.toolbarManager) |
603 if self.cooperation is not None: |
603 if self.cooperation is not None: |
604 e5App().registerObject("Cooperation", self.cooperation) |
604 ericApp().registerObject("Cooperation", self.cooperation) |
605 if self.irc is not None: |
605 if self.irc is not None: |
606 e5App().registerObject("IRC", self.irc) |
606 ericApp().registerObject("IRC", self.irc) |
607 if self.symbolsViewer is not None: |
607 if self.symbolsViewer is not None: |
608 e5App().registerObject("Symbols", self.symbolsViewer) |
608 ericApp().registerObject("Symbols", self.symbolsViewer) |
609 if self.numbersViewer is not None: |
609 if self.numbersViewer is not None: |
610 e5App().registerObject("Numbers", self.numbersViewer) |
610 ericApp().registerObject("Numbers", self.numbersViewer) |
611 if self.codeDocumentationViewer is not None: |
611 if self.codeDocumentationViewer is not None: |
612 e5App().registerObject("DocuViewer", self.codeDocumentationViewer) |
612 ericApp().registerObject("DocuViewer", self.codeDocumentationViewer) |
613 if self.microPythonWidget is not None: |
613 if self.microPythonWidget is not None: |
614 e5App().registerObject("MicroPython", self.microPythonWidget) |
614 ericApp().registerObject("MicroPython", self.microPythonWidget) |
615 |
615 |
616 # list of web addresses serving the versions file |
616 # list of web addresses serving the versions file |
617 self.__httpAlternatives = Preferences.getUI("VersionsUrls7") |
617 self.__httpAlternatives = Preferences.getUI("VersionsUrls7") |
618 self.__inVersionCheck = False |
618 self.__inVersionCheck = False |
619 self.__versionCheckProgress = None |
619 self.__versionCheckProgress = None |
821 """ |
821 """ |
822 Private method to create the Toolboxes layout. |
822 Private method to create the Toolboxes layout. |
823 |
823 |
824 @param debugServer reference to the debug server object |
824 @param debugServer reference to the debug server object |
825 """ |
825 """ |
826 from E5Gui.E5ToolBox import E5VerticalToolBox, E5HorizontalToolBox |
826 from E5Gui.EricToolBox import EricVerticalToolBox, EricHorizontalToolBox |
827 |
827 |
828 logging.debug("Creating Toolboxes Layout...") |
828 logging.debug("Creating Toolboxes Layout...") |
829 |
829 |
830 # Create the left toolbox |
830 # Create the left toolbox |
831 self.lToolboxDock = self.__createDockWindow("lToolboxDock") |
831 self.lToolboxDock = self.__createDockWindow("lToolboxDock") |
832 self.lToolbox = E5VerticalToolBox(self.lToolboxDock) |
832 self.lToolbox = EricVerticalToolBox(self.lToolboxDock) |
833 self.__setupDockWindow(self.lToolboxDock, |
833 self.__setupDockWindow(self.lToolboxDock, |
834 Qt.DockWidgetArea.LeftDockWidgetArea, |
834 Qt.DockWidgetArea.LeftDockWidgetArea, |
835 self.lToolbox, |
835 self.lToolbox, |
836 self.tr("Left Toolbox")) |
836 self.tr("Left Toolbox")) |
837 |
837 |
838 # Create the horizontal toolbox |
838 # Create the horizontal toolbox |
839 self.hToolboxDock = self.__createDockWindow("hToolboxDock") |
839 self.hToolboxDock = self.__createDockWindow("hToolboxDock") |
840 self.hToolbox = E5HorizontalToolBox(self.hToolboxDock) |
840 self.hToolbox = EricHorizontalToolBox(self.hToolboxDock) |
841 self.__setupDockWindow(self.hToolboxDock, |
841 self.__setupDockWindow(self.hToolboxDock, |
842 Qt.DockWidgetArea.BottomDockWidgetArea, |
842 Qt.DockWidgetArea.BottomDockWidgetArea, |
843 self.hToolbox, |
843 self.hToolbox, |
844 self.tr("Horizontal Toolbox")) |
844 self.tr("Horizontal Toolbox")) |
845 |
845 |
846 # Create the right toolbox |
846 # Create the right toolbox |
847 self.rToolboxDock = self.__createDockWindow("rToolboxDock") |
847 self.rToolboxDock = self.__createDockWindow("rToolboxDock") |
848 self.rToolbox = E5VerticalToolBox(self.rToolboxDock) |
848 self.rToolbox = EricVerticalToolBox(self.rToolboxDock) |
849 self.__setupDockWindow(self.rToolboxDock, |
849 self.__setupDockWindow(self.rToolboxDock, |
850 Qt.DockWidgetArea.RightDockWidgetArea, |
850 Qt.DockWidgetArea.RightDockWidgetArea, |
851 self.rToolbox, |
851 self.rToolbox, |
852 self.tr("Right Toolbox")) |
852 self.tr("Right Toolbox")) |
853 |
853 |
1028 """ |
1028 """ |
1029 Private method to create the Sidebars layout. |
1029 Private method to create the Sidebars layout. |
1030 |
1030 |
1031 @param debugServer reference to the debug server object |
1031 @param debugServer reference to the debug server object |
1032 """ |
1032 """ |
1033 from E5Gui.E5SideBar import E5SideBar, E5SideBarSide |
1033 from E5Gui.EricSideBar import EricSideBar, EricSideBarSide |
1034 |
1034 |
1035 logging.debug("Creating Sidebars Layout...") |
1035 logging.debug("Creating Sidebars Layout...") |
1036 |
1036 |
1037 delay = Preferences.getUI("SidebarDelay") |
1037 delay = Preferences.getUI("SidebarDelay") |
1038 # Create the left sidebar |
1038 # Create the left sidebar |
1039 self.leftSidebar = E5SideBar(E5SideBarSide.WEST, delay) |
1039 self.leftSidebar = EricSideBar(EricSideBarSide.WEST, delay) |
1040 |
1040 |
1041 # Create the bottom sidebar |
1041 # Create the bottom sidebar |
1042 self.bottomSidebar = E5SideBar(E5SideBarSide.SOUTH, delay) |
1042 self.bottomSidebar = EricSideBar(EricSideBarSide.SOUTH, delay) |
1043 |
1043 |
1044 # Create the right sidebar |
1044 # Create the right sidebar |
1045 self.rightSidebar = E5SideBar(E5SideBarSide.EAST, delay) |
1045 self.rightSidebar = EricSideBar(EricSideBarSide.EAST, delay) |
1046 |
1046 |
1047 #################################################### |
1047 #################################################### |
1048 ## Populate the left side bar |
1048 ## Populate the left side bar |
1049 #################################################### |
1049 #################################################### |
1050 |
1050 |
1664 """ and the preferences will be written to disc.</p>""" |
1664 """ and the preferences will be written to disc.</p>""" |
1665 )) |
1665 )) |
1666 self.restartAct.triggered.connect(self.__restart) |
1666 self.restartAct.triggered.connect(self.__restart) |
1667 self.actions.append(self.restartAct) |
1667 self.actions.append(self.restartAct) |
1668 |
1668 |
1669 self.saveSessionAct = E5Action( |
1669 self.saveSessionAct = EricAction( |
1670 self.tr('Save session'), |
1670 self.tr('Save session'), |
1671 self.tr('Save session...'), |
1671 self.tr('Save session...'), |
1672 0, 0, self, 'save_session_to_file') |
1672 0, 0, self, 'save_session_to_file') |
1673 self.saveSessionAct.setStatusTip(self.tr('Save session')) |
1673 self.saveSessionAct.setStatusTip(self.tr('Save session')) |
1674 self.saveSessionAct.setWhatsThis(self.tr( |
1674 self.saveSessionAct.setWhatsThis(self.tr( |
1677 """ opened to select the file name.</p>""" |
1677 """ opened to select the file name.</p>""" |
1678 )) |
1678 )) |
1679 self.saveSessionAct.triggered.connect(self.__saveSessionToFile) |
1679 self.saveSessionAct.triggered.connect(self.__saveSessionToFile) |
1680 self.actions.append(self.saveSessionAct) |
1680 self.actions.append(self.saveSessionAct) |
1681 |
1681 |
1682 self.loadSessionAct = E5Action( |
1682 self.loadSessionAct = EricAction( |
1683 self.tr('Load session'), |
1683 self.tr('Load session'), |
1684 self.tr('Load session...'), |
1684 self.tr('Load session...'), |
1685 0, 0, self, 'load_session_from_file') |
1685 0, 0, self, 'load_session_from_file') |
1686 self.loadSessionAct.setStatusTip(self.tr('Load session')) |
1686 self.loadSessionAct.setStatusTip(self.tr('Load session')) |
1687 self.loadSessionAct.setWhatsThis(self.tr( |
1687 self.loadSessionAct.setWhatsThis(self.tr( |
1690 """ opened to select the file name.</p>""" |
1690 """ opened to select the file name.</p>""" |
1691 )) |
1691 )) |
1692 self.loadSessionAct.triggered.connect(self.__loadSessionFromFile) |
1692 self.loadSessionAct.triggered.connect(self.__loadSessionFromFile) |
1693 self.actions.append(self.loadSessionAct) |
1693 self.actions.append(self.loadSessionAct) |
1694 |
1694 |
1695 self.newWindowAct = E5Action( |
1695 self.newWindowAct = EricAction( |
1696 self.tr('New Window'), |
1696 self.tr('New Window'), |
1697 UI.PixmapCache.getIcon("newWindow"), |
1697 UI.PixmapCache.getIcon("newWindow"), |
1698 self.tr('New &Window'), |
1698 self.tr('New &Window'), |
1699 QKeySequence(self.tr("Ctrl+Shift+N", "File|New Window")), |
1699 QKeySequence(self.tr("Ctrl+Shift+N", "File|New Window")), |
1700 0, self, 'new_window') |
1700 0, self, 'new_window') |
1709 self.newWindowAct.setEnabled( |
1709 self.newWindowAct.setEnabled( |
1710 not Preferences.getUI("SingleApplicationMode")) |
1710 not Preferences.getUI("SingleApplicationMode")) |
1711 |
1711 |
1712 self.viewProfileActGrp = createActionGroup(self, "viewprofiles", True) |
1712 self.viewProfileActGrp = createActionGroup(self, "viewprofiles", True) |
1713 |
1713 |
1714 self.setEditProfileAct = E5Action( |
1714 self.setEditProfileAct = EricAction( |
1715 self.tr('Edit Profile'), |
1715 self.tr('Edit Profile'), |
1716 UI.PixmapCache.getIcon("viewProfileEdit"), |
1716 UI.PixmapCache.getIcon("viewProfileEdit"), |
1717 self.tr('Edit Profile'), |
1717 self.tr('Edit Profile'), |
1718 0, 0, |
1718 0, 0, |
1719 self.viewProfileActGrp, 'edit_profile', True) |
1719 self.viewProfileActGrp, 'edit_profile', True) |
1885 self.templateViewerActivateAct.triggered.connect( |
1885 self.templateViewerActivateAct.triggered.connect( |
1886 self.__activateTemplateViewer) |
1886 self.__activateTemplateViewer) |
1887 self.actions.append(self.templateViewerActivateAct) |
1887 self.actions.append(self.templateViewerActivateAct) |
1888 self.addAction(self.templateViewerActivateAct) |
1888 self.addAction(self.templateViewerActivateAct) |
1889 |
1889 |
1890 self.ltAct = E5Action( |
1890 self.ltAct = EricAction( |
1891 self.tr('Left Toolbox'), |
1891 self.tr('Left Toolbox'), |
1892 self.tr('&Left Toolbox'), 0, 0, self, 'vertical_toolbox', True) |
1892 self.tr('&Left Toolbox'), 0, 0, self, 'vertical_toolbox', True) |
1893 self.ltAct.setStatusTip(self.tr('Toggle the Left Toolbox window')) |
1893 self.ltAct.setStatusTip(self.tr('Toggle the Left Toolbox window')) |
1894 self.ltAct.setWhatsThis(self.tr( |
1894 self.ltAct.setWhatsThis(self.tr( |
1895 """<b>Toggle the Left Toolbox window</b>""" |
1895 """<b>Toggle the Left Toolbox window</b>""" |
1897 """ If it is displayed then close it.</p>""" |
1897 """ If it is displayed then close it.</p>""" |
1898 )) |
1898 )) |
1899 self.ltAct.triggered.connect(self.__toggleLeftToolbox) |
1899 self.ltAct.triggered.connect(self.__toggleLeftToolbox) |
1900 self.actions.append(self.ltAct) |
1900 self.actions.append(self.ltAct) |
1901 |
1901 |
1902 self.rtAct = E5Action( |
1902 self.rtAct = EricAction( |
1903 self.tr('Right Toolbox'), |
1903 self.tr('Right Toolbox'), |
1904 self.tr('&Right Toolbox'), |
1904 self.tr('&Right Toolbox'), |
1905 0, 0, self, 'vertical_toolbox', True) |
1905 0, 0, self, 'vertical_toolbox', True) |
1906 self.rtAct.setStatusTip(self.tr('Toggle the Right Toolbox window')) |
1906 self.rtAct.setStatusTip(self.tr('Toggle the Right Toolbox window')) |
1907 self.rtAct.setWhatsThis(self.tr( |
1907 self.rtAct.setWhatsThis(self.tr( |
1910 """ If it is displayed then close it.</p>""" |
1910 """ If it is displayed then close it.</p>""" |
1911 )) |
1911 )) |
1912 self.rtAct.triggered.connect(self.__toggleRightToolbox) |
1912 self.rtAct.triggered.connect(self.__toggleRightToolbox) |
1913 self.actions.append(self.rtAct) |
1913 self.actions.append(self.rtAct) |
1914 |
1914 |
1915 self.htAct = E5Action( |
1915 self.htAct = EricAction( |
1916 self.tr('Horizontal Toolbox'), |
1916 self.tr('Horizontal Toolbox'), |
1917 self.tr('&Horizontal Toolbox'), 0, 0, self, |
1917 self.tr('&Horizontal Toolbox'), 0, 0, self, |
1918 'horizontal_toolbox', True) |
1918 'horizontal_toolbox', True) |
1919 self.htAct.setStatusTip(self.tr( |
1919 self.htAct.setStatusTip(self.tr( |
1920 'Toggle the Horizontal Toolbox window')) |
1920 'Toggle the Horizontal Toolbox window')) |
1924 """ it. If it is displayed then close it.</p>""" |
1924 """ it. If it is displayed then close it.</p>""" |
1925 )) |
1925 )) |
1926 self.htAct.triggered.connect(self.__toggleHorizontalToolbox) |
1926 self.htAct.triggered.connect(self.__toggleHorizontalToolbox) |
1927 self.actions.append(self.htAct) |
1927 self.actions.append(self.htAct) |
1928 |
1928 |
1929 self.lsbAct = E5Action( |
1929 self.lsbAct = EricAction( |
1930 self.tr('Left Sidebar'), |
1930 self.tr('Left Sidebar'), |
1931 self.tr('&Left Sidebar'), |
1931 self.tr('&Left Sidebar'), |
1932 0, 0, self, 'left_sidebar', True) |
1932 0, 0, self, 'left_sidebar', True) |
1933 self.lsbAct.setStatusTip(self.tr('Toggle the left sidebar window')) |
1933 self.lsbAct.setStatusTip(self.tr('Toggle the left sidebar window')) |
1934 self.lsbAct.setWhatsThis(self.tr( |
1934 self.lsbAct.setWhatsThis(self.tr( |
1937 """ If it is displayed then close it.</p>""" |
1937 """ If it is displayed then close it.</p>""" |
1938 )) |
1938 )) |
1939 self.lsbAct.triggered.connect(self.__toggleLeftSidebar) |
1939 self.lsbAct.triggered.connect(self.__toggleLeftSidebar) |
1940 self.actions.append(self.lsbAct) |
1940 self.actions.append(self.lsbAct) |
1941 |
1941 |
1942 self.rsbAct = E5Action( |
1942 self.rsbAct = EricAction( |
1943 self.tr('Right Sidebar'), |
1943 self.tr('Right Sidebar'), |
1944 self.tr('&Right Sidebar'), |
1944 self.tr('&Right Sidebar'), |
1945 0, 0, self, 'right_sidebar', True) |
1945 0, 0, self, 'right_sidebar', True) |
1946 self.rsbAct.setStatusTip(self.tr( |
1946 self.rsbAct.setStatusTip(self.tr( |
1947 'Toggle the right sidebar window')) |
1947 'Toggle the right sidebar window')) |
1951 """ If it is displayed then close it.</p>""" |
1951 """ If it is displayed then close it.</p>""" |
1952 )) |
1952 )) |
1953 self.rsbAct.triggered.connect(self.__toggleRightSidebar) |
1953 self.rsbAct.triggered.connect(self.__toggleRightSidebar) |
1954 self.actions.append(self.rsbAct) |
1954 self.actions.append(self.rsbAct) |
1955 |
1955 |
1956 self.bsbAct = E5Action( |
1956 self.bsbAct = EricAction( |
1957 self.tr('Bottom Sidebar'), |
1957 self.tr('Bottom Sidebar'), |
1958 self.tr('&Bottom Sidebar'), 0, 0, self, |
1958 self.tr('&Bottom Sidebar'), 0, 0, self, |
1959 'bottom_sidebar', True) |
1959 'bottom_sidebar', True) |
1960 self.bsbAct.setStatusTip(self.tr( |
1960 self.bsbAct.setStatusTip(self.tr( |
1961 'Toggle the bottom sidebar window')) |
1961 'Toggle the bottom sidebar window')) |
2041 self.__activateNumbersViewer) |
2041 self.__activateNumbersViewer) |
2042 self.actions.append(self.numbersViewerActivateAct) |
2042 self.actions.append(self.numbersViewerActivateAct) |
2043 self.addAction(self.numbersViewerActivateAct) |
2043 self.addAction(self.numbersViewerActivateAct) |
2044 |
2044 |
2045 if self.codeDocumentationViewer is not None: |
2045 if self.codeDocumentationViewer is not None: |
2046 self.codeDocumentationViewerActivateAct = E5Action( |
2046 self.codeDocumentationViewerActivateAct = EricAction( |
2047 self.tr('Code Documentation Viewer'), |
2047 self.tr('Code Documentation Viewer'), |
2048 self.tr('Code Documentation Viewer'), |
2048 self.tr('Code Documentation Viewer'), |
2049 QKeySequence(self.tr("Ctrl+Alt+Shift+D")), |
2049 QKeySequence(self.tr("Ctrl+Alt+Shift+D")), |
2050 0, self, |
2050 0, self, |
2051 'code_documentation_viewer_activate') |
2051 'code_documentation_viewer_activate') |
2115 self.microPythonWidgetActivateAct.triggered.connect( |
2115 self.microPythonWidgetActivateAct.triggered.connect( |
2116 self.__activateMicroPython) |
2116 self.__activateMicroPython) |
2117 self.actions.append(self.microPythonWidgetActivateAct) |
2117 self.actions.append(self.microPythonWidgetActivateAct) |
2118 self.addAction(self.microPythonWidgetActivateAct) |
2118 self.addAction(self.microPythonWidgetActivateAct) |
2119 |
2119 |
2120 self.whatsThisAct = E5Action( |
2120 self.whatsThisAct = EricAction( |
2121 self.tr('What\'s This?'), |
2121 self.tr('What\'s This?'), |
2122 UI.PixmapCache.getIcon("whatsThis"), |
2122 UI.PixmapCache.getIcon("whatsThis"), |
2123 self.tr('&What\'s This?'), |
2123 self.tr('&What\'s This?'), |
2124 QKeySequence(self.tr("Shift+F1")), |
2124 QKeySequence(self.tr("Shift+F1")), |
2125 0, self, 'whatsThis') |
2125 0, self, 'whatsThis') |
2133 """ context help button in the titlebar.</p>""" |
2133 """ context help button in the titlebar.</p>""" |
2134 )) |
2134 )) |
2135 self.whatsThisAct.triggered.connect(self.__whatsThis) |
2135 self.whatsThisAct.triggered.connect(self.__whatsThis) |
2136 self.actions.append(self.whatsThisAct) |
2136 self.actions.append(self.whatsThisAct) |
2137 |
2137 |
2138 self.helpviewerAct = E5Action( |
2138 self.helpviewerAct = EricAction( |
2139 self.tr('Helpviewer'), |
2139 self.tr('Helpviewer'), |
2140 UI.PixmapCache.getIcon("help"), |
2140 UI.PixmapCache.getIcon("help"), |
2141 self.tr('&Helpviewer...'), |
2141 self.tr('&Helpviewer...'), |
2142 QKeySequence(self.tr("F1")), |
2142 QKeySequence(self.tr("F1")), |
2143 0, self, 'helpviewer') |
2143 0, self, 'helpviewer') |
2159 self.__initQtDocActions() |
2159 self.__initQtDocActions() |
2160 self.__initPythonDocActions() |
2160 self.__initPythonDocActions() |
2161 self.__initEricDocAction() |
2161 self.__initEricDocAction() |
2162 self.__initPySideDocActions() |
2162 self.__initPySideDocActions() |
2163 |
2163 |
2164 self.versionAct = E5Action( |
2164 self.versionAct = EricAction( |
2165 self.tr('Show Versions'), |
2165 self.tr('Show Versions'), |
2166 self.tr('Show &Versions'), |
2166 self.tr('Show &Versions'), |
2167 0, 0, self, 'show_versions') |
2167 0, 0, self, 'show_versions') |
2168 self.versionAct.setStatusTip(self.tr( |
2168 self.versionAct.setStatusTip(self.tr( |
2169 'Display version information')) |
2169 'Display version information')) |
2172 """<p>Display version information.</p>""" |
2172 """<p>Display version information.</p>""" |
2173 )) |
2173 )) |
2174 self.versionAct.triggered.connect(self.__showVersions) |
2174 self.versionAct.triggered.connect(self.__showVersions) |
2175 self.actions.append(self.versionAct) |
2175 self.actions.append(self.versionAct) |
2176 |
2176 |
2177 self.checkUpdateAct = E5Action( |
2177 self.checkUpdateAct = EricAction( |
2178 self.tr('Check for Updates'), |
2178 self.tr('Check for Updates'), |
2179 self.tr('Check for &Updates...'), 0, 0, self, 'check_updates') |
2179 self.tr('Check for &Updates...'), 0, 0, self, 'check_updates') |
2180 self.checkUpdateAct.setStatusTip(self.tr('Check for Updates')) |
2180 self.checkUpdateAct.setStatusTip(self.tr('Check for Updates')) |
2181 self.checkUpdateAct.setWhatsThis(self.tr( |
2181 self.checkUpdateAct.setWhatsThis(self.tr( |
2182 """<b>Check for Updates...</b>""" |
2182 """<b>Check for Updates...</b>""" |
2183 """<p>Checks the internet for updates of eric.</p>""" |
2183 """<p>Checks the internet for updates of eric.</p>""" |
2184 )) |
2184 )) |
2185 self.checkUpdateAct.triggered.connect(self.performVersionCheck) |
2185 self.checkUpdateAct.triggered.connect(self.performVersionCheck) |
2186 self.actions.append(self.checkUpdateAct) |
2186 self.actions.append(self.checkUpdateAct) |
2187 |
2187 |
2188 self.showVersionsAct = E5Action( |
2188 self.showVersionsAct = EricAction( |
2189 self.tr('Show downloadable versions'), |
2189 self.tr('Show downloadable versions'), |
2190 self.tr('Show &downloadable versions...'), |
2190 self.tr('Show &downloadable versions...'), |
2191 0, 0, self, 'show_downloadable_versions') |
2191 0, 0, self, 'show_downloadable_versions') |
2192 self.showVersionsAct.setStatusTip( |
2192 self.showVersionsAct.setStatusTip( |
2193 self.tr('Show the versions available for download')) |
2193 self.tr('Show the versions available for download')) |
2198 )) |
2198 )) |
2199 self.showVersionsAct.triggered.connect( |
2199 self.showVersionsAct.triggered.connect( |
2200 self.showAvailableVersionsInfo) |
2200 self.showAvailableVersionsInfo) |
2201 self.actions.append(self.showVersionsAct) |
2201 self.actions.append(self.showVersionsAct) |
2202 |
2202 |
2203 self.showErrorLogAct = E5Action( |
2203 self.showErrorLogAct = EricAction( |
2204 self.tr('Show Error Log'), |
2204 self.tr('Show Error Log'), |
2205 self.tr('Show Error &Log...'), |
2205 self.tr('Show Error &Log...'), |
2206 0, 0, self, 'show_error_log') |
2206 0, 0, self, 'show_error_log') |
2207 self.showErrorLogAct.setStatusTip(self.tr('Show Error Log')) |
2207 self.showErrorLogAct.setStatusTip(self.tr('Show Error Log')) |
2208 self.showErrorLogAct.setWhatsThis(self.tr( |
2208 self.showErrorLogAct.setWhatsThis(self.tr( |
2210 """<p>Opens a dialog showing the most recent error log.</p>""" |
2210 """<p>Opens a dialog showing the most recent error log.</p>""" |
2211 )) |
2211 )) |
2212 self.showErrorLogAct.triggered.connect(self.__showErrorLog) |
2212 self.showErrorLogAct.triggered.connect(self.__showErrorLog) |
2213 self.actions.append(self.showErrorLogAct) |
2213 self.actions.append(self.showErrorLogAct) |
2214 |
2214 |
2215 self.showInstallInfoAct = E5Action( |
2215 self.showInstallInfoAct = EricAction( |
2216 self.tr('Show Install Info'), |
2216 self.tr('Show Install Info'), |
2217 self.tr('Show Install &Info...'), |
2217 self.tr('Show Install &Info...'), |
2218 0, 0, self, 'show_install_info') |
2218 0, 0, self, 'show_install_info') |
2219 self.showInstallInfoAct.setStatusTip(self.tr( |
2219 self.showInstallInfoAct.setStatusTip(self.tr( |
2220 'Show Installation Information')) |
2220 'Show Installation Information')) |
2224 """ installation process.</p>""" |
2224 """ installation process.</p>""" |
2225 )) |
2225 )) |
2226 self.showInstallInfoAct.triggered.connect(self.__showInstallInfo) |
2226 self.showInstallInfoAct.triggered.connect(self.__showInstallInfo) |
2227 self.actions.append(self.showInstallInfoAct) |
2227 self.actions.append(self.showInstallInfoAct) |
2228 |
2228 |
2229 self.reportBugAct = E5Action( |
2229 self.reportBugAct = EricAction( |
2230 self.tr('Report Bug'), |
2230 self.tr('Report Bug'), |
2231 self.tr('Report &Bug...'), |
2231 self.tr('Report &Bug...'), |
2232 0, 0, self, 'report_bug') |
2232 0, 0, self, 'report_bug') |
2233 self.reportBugAct.setStatusTip(self.tr('Report a bug')) |
2233 self.reportBugAct.setStatusTip(self.tr('Report a bug')) |
2234 self.reportBugAct.setWhatsThis(self.tr( |
2234 self.reportBugAct.setWhatsThis(self.tr( |
2236 """<p>Opens a dialog to report a bug.</p>""" |
2236 """<p>Opens a dialog to report a bug.</p>""" |
2237 )) |
2237 )) |
2238 self.reportBugAct.triggered.connect(self.__reportBug) |
2238 self.reportBugAct.triggered.connect(self.__reportBug) |
2239 self.actions.append(self.reportBugAct) |
2239 self.actions.append(self.reportBugAct) |
2240 |
2240 |
2241 self.requestFeatureAct = E5Action( |
2241 self.requestFeatureAct = EricAction( |
2242 self.tr('Request Feature'), |
2242 self.tr('Request Feature'), |
2243 self.tr('Request &Feature...'), |
2243 self.tr('Request &Feature...'), |
2244 0, 0, self, 'request_feature') |
2244 0, 0, self, 'request_feature') |
2245 self.requestFeatureAct.setStatusTip(self.tr( |
2245 self.requestFeatureAct.setStatusTip(self.tr( |
2246 'Send a feature request')) |
2246 'Send a feature request')) |
2251 self.requestFeatureAct.triggered.connect(self.__requestFeature) |
2251 self.requestFeatureAct.triggered.connect(self.__requestFeature) |
2252 self.actions.append(self.requestFeatureAct) |
2252 self.actions.append(self.requestFeatureAct) |
2253 |
2253 |
2254 self.utActGrp = createActionGroup(self) |
2254 self.utActGrp = createActionGroup(self) |
2255 |
2255 |
2256 self.utDialogAct = E5Action( |
2256 self.utDialogAct = EricAction( |
2257 self.tr('Unittest'), |
2257 self.tr('Unittest'), |
2258 UI.PixmapCache.getIcon("unittest"), |
2258 UI.PixmapCache.getIcon("unittest"), |
2259 self.tr('&Unittest...'), |
2259 self.tr('&Unittest...'), |
2260 0, 0, self.utActGrp, 'unittest') |
2260 0, 0, self.utActGrp, 'unittest') |
2261 self.utDialogAct.setStatusTip(self.tr('Start unittest dialog')) |
2261 self.utDialogAct.setStatusTip(self.tr('Start unittest dialog')) |
2265 """ ability to select and run a unittest suite.</p>""" |
2265 """ ability to select and run a unittest suite.</p>""" |
2266 )) |
2266 )) |
2267 self.utDialogAct.triggered.connect(self.__unittest) |
2267 self.utDialogAct.triggered.connect(self.__unittest) |
2268 self.actions.append(self.utDialogAct) |
2268 self.actions.append(self.utDialogAct) |
2269 |
2269 |
2270 self.utRestartAct = E5Action( |
2270 self.utRestartAct = EricAction( |
2271 self.tr('Unittest Restart'), |
2271 self.tr('Unittest Restart'), |
2272 UI.PixmapCache.getIcon("unittestRestart"), |
2272 UI.PixmapCache.getIcon("unittestRestart"), |
2273 self.tr('&Restart Unittest...'), |
2273 self.tr('&Restart Unittest...'), |
2274 0, 0, self.utActGrp, 'unittest_restart') |
2274 0, 0, self.utActGrp, 'unittest_restart') |
2275 self.utRestartAct.setStatusTip(self.tr('Restart last unittest')) |
2275 self.utRestartAct.setStatusTip(self.tr('Restart last unittest')) |
2279 )) |
2279 )) |
2280 self.utRestartAct.triggered.connect(self.__unittestRestart) |
2280 self.utRestartAct.triggered.connect(self.__unittestRestart) |
2281 self.utRestartAct.setEnabled(False) |
2281 self.utRestartAct.setEnabled(False) |
2282 self.actions.append(self.utRestartAct) |
2282 self.actions.append(self.utRestartAct) |
2283 |
2283 |
2284 self.utRerunFailedAct = E5Action( |
2284 self.utRerunFailedAct = EricAction( |
2285 self.tr('Unittest Rerun Failed'), |
2285 self.tr('Unittest Rerun Failed'), |
2286 UI.PixmapCache.getIcon("unittestRerunFailed"), |
2286 UI.PixmapCache.getIcon("unittestRerunFailed"), |
2287 self.tr('Rerun Failed Tests...'), |
2287 self.tr('Rerun Failed Tests...'), |
2288 0, 0, self.utActGrp, 'unittest_rerun_failed') |
2288 0, 0, self.utActGrp, 'unittest_rerun_failed') |
2289 self.utRerunFailedAct.setStatusTip(self.tr( |
2289 self.utRerunFailedAct.setStatusTip(self.tr( |
2295 )) |
2295 )) |
2296 self.utRerunFailedAct.triggered.connect(self.__unittestRerunFailed) |
2296 self.utRerunFailedAct.triggered.connect(self.__unittestRerunFailed) |
2297 self.utRerunFailedAct.setEnabled(False) |
2297 self.utRerunFailedAct.setEnabled(False) |
2298 self.actions.append(self.utRerunFailedAct) |
2298 self.actions.append(self.utRerunFailedAct) |
2299 |
2299 |
2300 self.utScriptAct = E5Action( |
2300 self.utScriptAct = EricAction( |
2301 self.tr('Unittest Script'), |
2301 self.tr('Unittest Script'), |
2302 UI.PixmapCache.getIcon("unittestScript"), |
2302 UI.PixmapCache.getIcon("unittestScript"), |
2303 self.tr('Unittest &Script...'), |
2303 self.tr('Unittest &Script...'), |
2304 0, 0, self.utActGrp, 'unittest_script') |
2304 0, 0, self.utActGrp, 'unittest_script') |
2305 self.utScriptAct.setStatusTip(self.tr( |
2305 self.utScriptAct.setStatusTip(self.tr( |
2310 )) |
2310 )) |
2311 self.utScriptAct.triggered.connect(self.__unittestScript) |
2311 self.utScriptAct.triggered.connect(self.__unittestScript) |
2312 self.utScriptAct.setEnabled(False) |
2312 self.utScriptAct.setEnabled(False) |
2313 self.actions.append(self.utScriptAct) |
2313 self.actions.append(self.utScriptAct) |
2314 |
2314 |
2315 self.utProjectAct = E5Action( |
2315 self.utProjectAct = EricAction( |
2316 self.tr('Unittest Project'), |
2316 self.tr('Unittest Project'), |
2317 UI.PixmapCache.getIcon("unittestProject"), |
2317 UI.PixmapCache.getIcon("unittestProject"), |
2318 self.tr('Unittest &Project...'), |
2318 self.tr('Unittest &Project...'), |
2319 0, 0, self.utActGrp, 'unittest_project') |
2319 0, 0, self.utActGrp, 'unittest_project') |
2320 self.utProjectAct.setStatusTip(self.tr( |
2320 self.utProjectAct.setStatusTip(self.tr( |
2337 else: |
2337 else: |
2338 designerExe = os.path.join( |
2338 designerExe = os.path.join( |
2339 Utilities.getQtBinariesPath(), |
2339 Utilities.getQtBinariesPath(), |
2340 Utilities.generateQtToolName("designer")) |
2340 Utilities.generateQtToolName("designer")) |
2341 if os.path.exists(designerExe): |
2341 if os.path.exists(designerExe): |
2342 self.designer4Act = E5Action( |
2342 self.designer4Act = EricAction( |
2343 self.tr('Qt-Designer'), |
2343 self.tr('Qt-Designer'), |
2344 UI.PixmapCache.getIcon("designer4"), |
2344 UI.PixmapCache.getIcon("designer4"), |
2345 self.tr('Qt-&Designer...'), |
2345 self.tr('Qt-&Designer...'), |
2346 0, 0, self, 'qt_designer4') |
2346 0, 0, self, 'qt_designer4') |
2347 self.designer4Act.setStatusTip(self.tr('Start Qt-Designer')) |
2347 self.designer4Act.setStatusTip(self.tr('Start Qt-Designer')) |
2363 else: |
2363 else: |
2364 linguistExe = os.path.join( |
2364 linguistExe = os.path.join( |
2365 Utilities.getQtBinariesPath(), |
2365 Utilities.getQtBinariesPath(), |
2366 Utilities.generateQtToolName("linguist")) |
2366 Utilities.generateQtToolName("linguist")) |
2367 if os.path.exists(linguistExe): |
2367 if os.path.exists(linguistExe): |
2368 self.linguist4Act = E5Action( |
2368 self.linguist4Act = EricAction( |
2369 self.tr('Qt-Linguist'), |
2369 self.tr('Qt-Linguist'), |
2370 UI.PixmapCache.getIcon("linguist4"), |
2370 UI.PixmapCache.getIcon("linguist4"), |
2371 self.tr('Qt-&Linguist...'), |
2371 self.tr('Qt-&Linguist...'), |
2372 0, 0, self, 'qt_linguist4') |
2372 0, 0, self, 'qt_linguist4') |
2373 self.linguist4Act.setStatusTip(self.tr('Start Qt-Linguist')) |
2373 self.linguist4Act.setStatusTip(self.tr('Start Qt-Linguist')) |
2378 self.linguist4Act.triggered.connect(self.__linguist) |
2378 self.linguist4Act.triggered.connect(self.__linguist) |
2379 self.actions.append(self.linguist4Act) |
2379 self.actions.append(self.linguist4Act) |
2380 else: |
2380 else: |
2381 self.linguist4Act = None |
2381 self.linguist4Act = None |
2382 |
2382 |
2383 self.uipreviewerAct = E5Action( |
2383 self.uipreviewerAct = EricAction( |
2384 self.tr('UI Previewer'), |
2384 self.tr('UI Previewer'), |
2385 UI.PixmapCache.getIcon("uiPreviewer"), |
2385 UI.PixmapCache.getIcon("uiPreviewer"), |
2386 self.tr('&UI Previewer...'), |
2386 self.tr('&UI Previewer...'), |
2387 0, 0, self, 'ui_previewer') |
2387 0, 0, self, 'ui_previewer') |
2388 self.uipreviewerAct.setStatusTip(self.tr('Start the UI Previewer')) |
2388 self.uipreviewerAct.setStatusTip(self.tr('Start the UI Previewer')) |
2391 """<p>Start the UI Previewer.</p>""" |
2391 """<p>Start the UI Previewer.</p>""" |
2392 )) |
2392 )) |
2393 self.uipreviewerAct.triggered.connect(self.__UIPreviewer) |
2393 self.uipreviewerAct.triggered.connect(self.__UIPreviewer) |
2394 self.actions.append(self.uipreviewerAct) |
2394 self.actions.append(self.uipreviewerAct) |
2395 |
2395 |
2396 self.trpreviewerAct = E5Action( |
2396 self.trpreviewerAct = EricAction( |
2397 self.tr('Translations Previewer'), |
2397 self.tr('Translations Previewer'), |
2398 UI.PixmapCache.getIcon("trPreviewer"), |
2398 UI.PixmapCache.getIcon("trPreviewer"), |
2399 self.tr('&Translations Previewer...'), |
2399 self.tr('&Translations Previewer...'), |
2400 0, 0, self, 'tr_previewer') |
2400 0, 0, self, 'tr_previewer') |
2401 self.trpreviewerAct.setStatusTip(self.tr( |
2401 self.trpreviewerAct.setStatusTip(self.tr( |
2405 """<p>Start the Translations Previewer.</p>""" |
2405 """<p>Start the Translations Previewer.</p>""" |
2406 )) |
2406 )) |
2407 self.trpreviewerAct.triggered.connect(self.__TRPreviewer) |
2407 self.trpreviewerAct.triggered.connect(self.__TRPreviewer) |
2408 self.actions.append(self.trpreviewerAct) |
2408 self.actions.append(self.trpreviewerAct) |
2409 |
2409 |
2410 self.diffAct = E5Action( |
2410 self.diffAct = EricAction( |
2411 self.tr('Compare Files'), |
2411 self.tr('Compare Files'), |
2412 UI.PixmapCache.getIcon("diffFiles"), |
2412 UI.PixmapCache.getIcon("diffFiles"), |
2413 self.tr('&Compare Files...'), |
2413 self.tr('&Compare Files...'), |
2414 0, 0, self, 'diff_files') |
2414 0, 0, self, 'diff_files') |
2415 self.diffAct.setStatusTip(self.tr('Compare two files')) |
2415 self.diffAct.setStatusTip(self.tr('Compare two files')) |
2418 """<p>Open a dialog to compare two files.</p>""" |
2418 """<p>Open a dialog to compare two files.</p>""" |
2419 )) |
2419 )) |
2420 self.diffAct.triggered.connect(self.__compareFiles) |
2420 self.diffAct.triggered.connect(self.__compareFiles) |
2421 self.actions.append(self.diffAct) |
2421 self.actions.append(self.diffAct) |
2422 |
2422 |
2423 self.compareAct = E5Action( |
2423 self.compareAct = EricAction( |
2424 self.tr('Compare Files side by side'), |
2424 self.tr('Compare Files side by side'), |
2425 UI.PixmapCache.getIcon("compareFiles"), |
2425 UI.PixmapCache.getIcon("compareFiles"), |
2426 self.tr('Compare &Files side by side...'), |
2426 self.tr('Compare &Files side by side...'), |
2427 0, 0, self, 'compare_files') |
2427 0, 0, self, 'compare_files') |
2428 self.compareAct.setStatusTip(self.tr('Compare two files')) |
2428 self.compareAct.setStatusTip(self.tr('Compare two files')) |
2432 """ side by side.</p>""" |
2432 """ side by side.</p>""" |
2433 )) |
2433 )) |
2434 self.compareAct.triggered.connect(self.__compareFilesSbs) |
2434 self.compareAct.triggered.connect(self.__compareFilesSbs) |
2435 self.actions.append(self.compareAct) |
2435 self.actions.append(self.compareAct) |
2436 |
2436 |
2437 self.sqlBrowserAct = E5Action( |
2437 self.sqlBrowserAct = EricAction( |
2438 self.tr('SQL Browser'), |
2438 self.tr('SQL Browser'), |
2439 UI.PixmapCache.getIcon("sqlBrowser"), |
2439 UI.PixmapCache.getIcon("sqlBrowser"), |
2440 self.tr('SQL &Browser...'), |
2440 self.tr('SQL &Browser...'), |
2441 0, 0, self, 'sql_browser') |
2441 0, 0, self, 'sql_browser') |
2442 self.sqlBrowserAct.setStatusTip(self.tr('Browse a SQL database')) |
2442 self.sqlBrowserAct.setStatusTip(self.tr('Browse a SQL database')) |
2445 """<p>Browse a SQL database.</p>""" |
2445 """<p>Browse a SQL database.</p>""" |
2446 )) |
2446 )) |
2447 self.sqlBrowserAct.triggered.connect(self.__sqlBrowser) |
2447 self.sqlBrowserAct.triggered.connect(self.__sqlBrowser) |
2448 self.actions.append(self.sqlBrowserAct) |
2448 self.actions.append(self.sqlBrowserAct) |
2449 |
2449 |
2450 self.miniEditorAct = E5Action( |
2450 self.miniEditorAct = EricAction( |
2451 self.tr('Mini Editor'), |
2451 self.tr('Mini Editor'), |
2452 UI.PixmapCache.getIcon("editor"), |
2452 UI.PixmapCache.getIcon("editor"), |
2453 self.tr('Mini &Editor...'), |
2453 self.tr('Mini &Editor...'), |
2454 0, 0, self, 'mini_editor') |
2454 0, 0, self, 'mini_editor') |
2455 self.miniEditorAct.setStatusTip(self.tr('Mini Editor')) |
2455 self.miniEditorAct.setStatusTip(self.tr('Mini Editor')) |
2458 """<p>Open a dialog with a simplified editor.</p>""" |
2458 """<p>Open a dialog with a simplified editor.</p>""" |
2459 )) |
2459 )) |
2460 self.miniEditorAct.triggered.connect(self.__openMiniEditor) |
2460 self.miniEditorAct.triggered.connect(self.__openMiniEditor) |
2461 self.actions.append(self.miniEditorAct) |
2461 self.actions.append(self.miniEditorAct) |
2462 |
2462 |
2463 self.hexEditorAct = E5Action( |
2463 self.hexEditorAct = EricAction( |
2464 self.tr('Hex Editor'), |
2464 self.tr('Hex Editor'), |
2465 UI.PixmapCache.getIcon("hexEditor"), |
2465 UI.PixmapCache.getIcon("hexEditor"), |
2466 self.tr('&Hex Editor...'), |
2466 self.tr('&Hex Editor...'), |
2467 0, 0, self, 'hex_editor') |
2467 0, 0, self, 'hex_editor') |
2468 self.hexEditorAct.setStatusTip(self.tr( |
2468 self.hexEditorAct.setStatusTip(self.tr( |
2473 """ binary files.</p>""" |
2473 """ binary files.</p>""" |
2474 )) |
2474 )) |
2475 self.hexEditorAct.triggered.connect(self.__openHexEditor) |
2475 self.hexEditorAct.triggered.connect(self.__openHexEditor) |
2476 self.actions.append(self.hexEditorAct) |
2476 self.actions.append(self.hexEditorAct) |
2477 |
2477 |
2478 self.webBrowserAct = E5Action( |
2478 self.webBrowserAct = EricAction( |
2479 self.tr('eric Web Browser'), |
2479 self.tr('eric Web Browser'), |
2480 UI.PixmapCache.getIcon("ericWeb"), |
2480 UI.PixmapCache.getIcon("ericWeb"), |
2481 self.tr('eric &Web Browser...'), |
2481 self.tr('eric &Web Browser...'), |
2482 0, 0, self, 'web_browser') |
2482 0, 0, self, 'web_browser') |
2483 self.webBrowserAct.setStatusTip(self.tr( |
2483 self.webBrowserAct.setStatusTip(self.tr( |
2487 """<p>Browse the Internet with the eric Web Browser.</p>""" |
2487 """<p>Browse the Internet with the eric Web Browser.</p>""" |
2488 )) |
2488 )) |
2489 self.webBrowserAct.triggered.connect(self.__startWebBrowser) |
2489 self.webBrowserAct.triggered.connect(self.__startWebBrowser) |
2490 self.actions.append(self.webBrowserAct) |
2490 self.actions.append(self.webBrowserAct) |
2491 |
2491 |
2492 self.iconEditorAct = E5Action( |
2492 self.iconEditorAct = EricAction( |
2493 self.tr('Icon Editor'), |
2493 self.tr('Icon Editor'), |
2494 UI.PixmapCache.getIcon("iconEditor"), |
2494 UI.PixmapCache.getIcon("iconEditor"), |
2495 self.tr('&Icon Editor...'), |
2495 self.tr('&Icon Editor...'), |
2496 0, 0, self, 'icon_editor') |
2496 0, 0, self, 'icon_editor') |
2497 self.iconEditorAct.setStatusTip(self.tr( |
2497 self.iconEditorAct.setStatusTip(self.tr( |
2501 """<p>Starts the eric Icon Editor for editing simple icons.</p>""" |
2501 """<p>Starts the eric Icon Editor for editing simple icons.</p>""" |
2502 )) |
2502 )) |
2503 self.iconEditorAct.triggered.connect(self.__editPixmap) |
2503 self.iconEditorAct.triggered.connect(self.__editPixmap) |
2504 self.actions.append(self.iconEditorAct) |
2504 self.actions.append(self.iconEditorAct) |
2505 |
2505 |
2506 self.snapshotAct = E5Action( |
2506 self.snapshotAct = EricAction( |
2507 self.tr('Snapshot'), |
2507 self.tr('Snapshot'), |
2508 UI.PixmapCache.getIcon("ericSnap"), |
2508 UI.PixmapCache.getIcon("ericSnap"), |
2509 self.tr('&Snapshot...'), |
2509 self.tr('&Snapshot...'), |
2510 0, 0, self, 'snapshot') |
2510 0, 0, self, 'snapshot') |
2511 self.snapshotAct.setStatusTip(self.tr( |
2511 self.snapshotAct.setStatusTip(self.tr( |
2532 )) |
2532 )) |
2533 self.prefAct.triggered.connect(self.showPreferences) |
2533 self.prefAct.triggered.connect(self.showPreferences) |
2534 self.prefAct.setMenuRole(QAction.MenuRole.PreferencesRole) |
2534 self.prefAct.setMenuRole(QAction.MenuRole.PreferencesRole) |
2535 self.actions.append(self.prefAct) |
2535 self.actions.append(self.prefAct) |
2536 |
2536 |
2537 self.prefExportAct = E5Action( |
2537 self.prefExportAct = EricAction( |
2538 self.tr('Export Preferences'), |
2538 self.tr('Export Preferences'), |
2539 UI.PixmapCache.getIcon("configureExport"), |
2539 UI.PixmapCache.getIcon("configureExport"), |
2540 self.tr('E&xport Preferences...'), |
2540 self.tr('E&xport Preferences...'), |
2541 0, 0, self, 'export_preferences') |
2541 0, 0, self, 'export_preferences') |
2542 self.prefExportAct.setStatusTip(self.tr( |
2542 self.prefExportAct.setStatusTip(self.tr( |
2546 """<p>Export the current configuration to a file.</p>""" |
2546 """<p>Export the current configuration to a file.</p>""" |
2547 )) |
2547 )) |
2548 self.prefExportAct.triggered.connect(self.__exportPreferences) |
2548 self.prefExportAct.triggered.connect(self.__exportPreferences) |
2549 self.actions.append(self.prefExportAct) |
2549 self.actions.append(self.prefExportAct) |
2550 |
2550 |
2551 self.prefImportAct = E5Action( |
2551 self.prefImportAct = EricAction( |
2552 self.tr('Import Preferences'), |
2552 self.tr('Import Preferences'), |
2553 UI.PixmapCache.getIcon("configureImport"), |
2553 UI.PixmapCache.getIcon("configureImport"), |
2554 self.tr('I&mport Preferences...'), |
2554 self.tr('I&mport Preferences...'), |
2555 0, 0, self, 'import_preferences') |
2555 0, 0, self, 'import_preferences') |
2556 self.prefImportAct.setStatusTip(self.tr( |
2556 self.prefImportAct.setStatusTip(self.tr( |
2560 """<p>Import a previously exported configuration.</p>""" |
2560 """<p>Import a previously exported configuration.</p>""" |
2561 )) |
2561 )) |
2562 self.prefImportAct.triggered.connect(self.__importPreferences) |
2562 self.prefImportAct.triggered.connect(self.__importPreferences) |
2563 self.actions.append(self.prefImportAct) |
2563 self.actions.append(self.prefImportAct) |
2564 |
2564 |
2565 self.reloadAPIsAct = E5Action( |
2565 self.reloadAPIsAct = EricAction( |
2566 self.tr('Reload APIs'), |
2566 self.tr('Reload APIs'), |
2567 self.tr('Reload &APIs'), |
2567 self.tr('Reload &APIs'), |
2568 0, 0, self, 'reload_apis') |
2568 0, 0, self, 'reload_apis') |
2569 self.reloadAPIsAct.setStatusTip(self.tr( |
2569 self.reloadAPIsAct.setStatusTip(self.tr( |
2570 'Reload the API information')) |
2570 'Reload the API information')) |
2573 """<p>Reload the API information.</p>""" |
2573 """<p>Reload the API information.</p>""" |
2574 )) |
2574 )) |
2575 self.reloadAPIsAct.triggered.connect(self.__reloadAPIs) |
2575 self.reloadAPIsAct.triggered.connect(self.__reloadAPIs) |
2576 self.actions.append(self.reloadAPIsAct) |
2576 self.actions.append(self.reloadAPIsAct) |
2577 |
2577 |
2578 self.showExternalToolsAct = E5Action( |
2578 self.showExternalToolsAct = EricAction( |
2579 self.tr('Show external tools'), |
2579 self.tr('Show external tools'), |
2580 UI.PixmapCache.getIcon("showPrograms"), |
2580 UI.PixmapCache.getIcon("showPrograms"), |
2581 self.tr('Show external &tools'), |
2581 self.tr('Show external &tools'), |
2582 0, 0, self, 'show_external_tools') |
2582 0, 0, self, 'show_external_tools') |
2583 self.showExternalToolsAct.setStatusTip(self.tr( |
2583 self.showExternalToolsAct.setStatusTip(self.tr( |
2589 )) |
2589 )) |
2590 self.showExternalToolsAct.triggered.connect( |
2590 self.showExternalToolsAct.triggered.connect( |
2591 self.__showExternalTools) |
2591 self.__showExternalTools) |
2592 self.actions.append(self.showExternalToolsAct) |
2592 self.actions.append(self.showExternalToolsAct) |
2593 |
2593 |
2594 self.configViewProfilesAct = E5Action( |
2594 self.configViewProfilesAct = EricAction( |
2595 self.tr('View Profiles'), |
2595 self.tr('View Profiles'), |
2596 UI.PixmapCache.getIcon("configureViewProfiles"), |
2596 UI.PixmapCache.getIcon("configureViewProfiles"), |
2597 self.tr('&View Profiles...'), |
2597 self.tr('&View Profiles...'), |
2598 0, 0, self, 'view_profiles') |
2598 0, 0, self, 'view_profiles') |
2599 self.configViewProfilesAct.setStatusTip(self.tr( |
2599 self.configViewProfilesAct.setStatusTip(self.tr( |
2606 )) |
2606 )) |
2607 self.configViewProfilesAct.triggered.connect( |
2607 self.configViewProfilesAct.triggered.connect( |
2608 self.__configViewProfiles) |
2608 self.__configViewProfiles) |
2609 self.actions.append(self.configViewProfilesAct) |
2609 self.actions.append(self.configViewProfilesAct) |
2610 |
2610 |
2611 self.configToolBarsAct = E5Action( |
2611 self.configToolBarsAct = EricAction( |
2612 self.tr('Toolbars'), |
2612 self.tr('Toolbars'), |
2613 UI.PixmapCache.getIcon("toolbarsConfigure"), |
2613 UI.PixmapCache.getIcon("toolbarsConfigure"), |
2614 self.tr('Tool&bars...'), |
2614 self.tr('Tool&bars...'), |
2615 0, 0, self, 'configure_toolbars') |
2615 0, 0, self, 'configure_toolbars') |
2616 self.configToolBarsAct.setStatusTip(self.tr('Configure toolbars')) |
2616 self.configToolBarsAct.setStatusTip(self.tr('Configure toolbars')) |
2621 """ define your own toolbars.</p>""" |
2621 """ define your own toolbars.</p>""" |
2622 )) |
2622 )) |
2623 self.configToolBarsAct.triggered.connect(self.__configToolBars) |
2623 self.configToolBarsAct.triggered.connect(self.__configToolBars) |
2624 self.actions.append(self.configToolBarsAct) |
2624 self.actions.append(self.configToolBarsAct) |
2625 |
2625 |
2626 self.shortcutsAct = E5Action( |
2626 self.shortcutsAct = EricAction( |
2627 self.tr('Keyboard Shortcuts'), |
2627 self.tr('Keyboard Shortcuts'), |
2628 UI.PixmapCache.getIcon("configureShortcuts"), |
2628 UI.PixmapCache.getIcon("configureShortcuts"), |
2629 self.tr('Keyboard &Shortcuts...'), |
2629 self.tr('Keyboard &Shortcuts...'), |
2630 0, 0, self, 'keyboard_shortcuts') |
2630 0, 0, self, 'keyboard_shortcuts') |
2631 self.shortcutsAct.setStatusTip(self.tr( |
2631 self.shortcutsAct.setStatusTip(self.tr( |
2636 """ with your prefered values.</p>""" |
2636 """ with your prefered values.</p>""" |
2637 )) |
2637 )) |
2638 self.shortcutsAct.triggered.connect(self.__configShortcuts) |
2638 self.shortcutsAct.triggered.connect(self.__configShortcuts) |
2639 self.actions.append(self.shortcutsAct) |
2639 self.actions.append(self.shortcutsAct) |
2640 |
2640 |
2641 self.exportShortcutsAct = E5Action( |
2641 self.exportShortcutsAct = EricAction( |
2642 self.tr('Export Keyboard Shortcuts'), |
2642 self.tr('Export Keyboard Shortcuts'), |
2643 UI.PixmapCache.getIcon("exportShortcuts"), |
2643 UI.PixmapCache.getIcon("exportShortcuts"), |
2644 self.tr('&Export Keyboard Shortcuts...'), |
2644 self.tr('&Export Keyboard Shortcuts...'), |
2645 0, 0, self, 'export_keyboard_shortcuts') |
2645 0, 0, self, 'export_keyboard_shortcuts') |
2646 self.exportShortcutsAct.setStatusTip(self.tr( |
2646 self.exportShortcutsAct.setStatusTip(self.tr( |
2650 """<p>Export the keyboard shortcuts of the application.</p>""" |
2650 """<p>Export the keyboard shortcuts of the application.</p>""" |
2651 )) |
2651 )) |
2652 self.exportShortcutsAct.triggered.connect(self.__exportShortcuts) |
2652 self.exportShortcutsAct.triggered.connect(self.__exportShortcuts) |
2653 self.actions.append(self.exportShortcutsAct) |
2653 self.actions.append(self.exportShortcutsAct) |
2654 |
2654 |
2655 self.importShortcutsAct = E5Action( |
2655 self.importShortcutsAct = EricAction( |
2656 self.tr('Import Keyboard Shortcuts'), |
2656 self.tr('Import Keyboard Shortcuts'), |
2657 UI.PixmapCache.getIcon("importShortcuts"), |
2657 UI.PixmapCache.getIcon("importShortcuts"), |
2658 self.tr('&Import Keyboard Shortcuts...'), |
2658 self.tr('&Import Keyboard Shortcuts...'), |
2659 0, 0, self, 'import_keyboard_shortcuts') |
2659 0, 0, self, 'import_keyboard_shortcuts') |
2660 self.importShortcutsAct.setStatusTip(self.tr( |
2660 self.importShortcutsAct.setStatusTip(self.tr( |
2665 )) |
2665 )) |
2666 self.importShortcutsAct.triggered.connect(self.__importShortcuts) |
2666 self.importShortcutsAct.triggered.connect(self.__importShortcuts) |
2667 self.actions.append(self.importShortcutsAct) |
2667 self.actions.append(self.importShortcutsAct) |
2668 |
2668 |
2669 if SSL_AVAILABLE: |
2669 if SSL_AVAILABLE: |
2670 self.certificatesAct = E5Action( |
2670 self.certificatesAct = EricAction( |
2671 self.tr('Manage SSL Certificates'), |
2671 self.tr('Manage SSL Certificates'), |
2672 UI.PixmapCache.getIcon("certificates"), |
2672 UI.PixmapCache.getIcon("certificates"), |
2673 self.tr('Manage SSL Certificates...'), |
2673 self.tr('Manage SSL Certificates...'), |
2674 0, 0, self, 'manage_ssl_certificates') |
2674 0, 0, self, 'manage_ssl_certificates') |
2675 self.certificatesAct.setStatusTip(self.tr( |
2675 self.certificatesAct.setStatusTip(self.tr( |
2681 )) |
2681 )) |
2682 self.certificatesAct.triggered.connect( |
2682 self.certificatesAct.triggered.connect( |
2683 self.__showCertificatesDialog) |
2683 self.__showCertificatesDialog) |
2684 self.actions.append(self.certificatesAct) |
2684 self.actions.append(self.certificatesAct) |
2685 |
2685 |
2686 self.editMessageFilterAct = E5Action( |
2686 self.editMessageFilterAct = EricAction( |
2687 self.tr('Edit Message Filters'), |
2687 self.tr('Edit Message Filters'), |
2688 UI.PixmapCache.getIcon("warning"), |
2688 UI.PixmapCache.getIcon("warning"), |
2689 self.tr('Edit Message Filters...'), |
2689 self.tr('Edit Message Filters...'), |
2690 0, 0, self, 'manage_message_filters') |
2690 0, 0, self, 'manage_message_filters') |
2691 self.editMessageFilterAct.setStatusTip(self.tr( |
2691 self.editMessageFilterAct.setStatusTip(self.tr( |
2695 """<p>Opens a dialog to edit the message filters used to""" |
2695 """<p>Opens a dialog to edit the message filters used to""" |
2696 """ suppress unwanted messages been shown in an error""" |
2696 """ suppress unwanted messages been shown in an error""" |
2697 """ window.</p>""" |
2697 """ window.</p>""" |
2698 )) |
2698 )) |
2699 self.editMessageFilterAct.triggered.connect( |
2699 self.editMessageFilterAct.triggered.connect( |
2700 E5ErrorMessage.editMessageFilters) |
2700 EricErrorMessage.editMessageFilters) |
2701 self.actions.append(self.editMessageFilterAct) |
2701 self.actions.append(self.editMessageFilterAct) |
2702 |
2702 |
2703 self.clearPrivateDataAct = E5Action( |
2703 self.clearPrivateDataAct = EricAction( |
2704 self.tr('Clear private data'), |
2704 self.tr('Clear private data'), |
2705 UI.PixmapCache.getIcon("clearPrivateData"), |
2705 UI.PixmapCache.getIcon("clearPrivateData"), |
2706 self.tr('Clear private data'), |
2706 self.tr('Clear private data'), |
2707 0, 0, |
2707 0, 0, |
2708 self, 'clear_private_data') |
2708 self, 'clear_private_data') |
2715 )) |
2715 )) |
2716 self.clearPrivateDataAct.triggered.connect( |
2716 self.clearPrivateDataAct.triggered.connect( |
2717 self.__clearPrivateData) |
2717 self.__clearPrivateData) |
2718 self.actions.append(self.clearPrivateDataAct) |
2718 self.actions.append(self.clearPrivateDataAct) |
2719 |
2719 |
2720 self.viewmanagerActivateAct = E5Action( |
2720 self.viewmanagerActivateAct = EricAction( |
2721 self.tr('Activate current editor'), |
2721 self.tr('Activate current editor'), |
2722 self.tr('Activate current editor'), |
2722 self.tr('Activate current editor'), |
2723 QKeySequence(self.tr("Alt+Shift+E")), |
2723 QKeySequence(self.tr("Alt+Shift+E")), |
2724 0, self, 'viewmanager_activate') |
2724 0, self, 'viewmanager_activate') |
2725 self.viewmanagerActivateAct.triggered.connect( |
2725 self.viewmanagerActivateAct.triggered.connect( |
2726 self.__activateViewmanager) |
2726 self.__activateViewmanager) |
2727 self.actions.append(self.viewmanagerActivateAct) |
2727 self.actions.append(self.viewmanagerActivateAct) |
2728 self.addAction(self.viewmanagerActivateAct) |
2728 self.addAction(self.viewmanagerActivateAct) |
2729 |
2729 |
2730 self.nextTabAct = E5Action( |
2730 self.nextTabAct = EricAction( |
2731 self.tr('Show next'), |
2731 self.tr('Show next'), |
2732 self.tr('Show next'), |
2732 self.tr('Show next'), |
2733 QKeySequence(self.tr('Ctrl+Alt+Tab')), 0, |
2733 QKeySequence(self.tr('Ctrl+Alt+Tab')), 0, |
2734 self, 'view_next_tab') |
2734 self, 'view_next_tab') |
2735 self.nextTabAct.triggered.connect(self.__showNext) |
2735 self.nextTabAct.triggered.connect(self.__showNext) |
2736 self.actions.append(self.nextTabAct) |
2736 self.actions.append(self.nextTabAct) |
2737 self.addAction(self.nextTabAct) |
2737 self.addAction(self.nextTabAct) |
2738 |
2738 |
2739 self.prevTabAct = E5Action( |
2739 self.prevTabAct = EricAction( |
2740 self.tr('Show previous'), |
2740 self.tr('Show previous'), |
2741 self.tr('Show previous'), |
2741 self.tr('Show previous'), |
2742 QKeySequence(self.tr('Shift+Ctrl+Alt+Tab')), 0, |
2742 QKeySequence(self.tr('Shift+Ctrl+Alt+Tab')), 0, |
2743 self, 'view_previous_tab') |
2743 self, 'view_previous_tab') |
2744 self.prevTabAct.triggered.connect(self.__showPrevious) |
2744 self.prevTabAct.triggered.connect(self.__showPrevious) |
2745 self.actions.append(self.prevTabAct) |
2745 self.actions.append(self.prevTabAct) |
2746 self.addAction(self.prevTabAct) |
2746 self.addAction(self.prevTabAct) |
2747 |
2747 |
2748 self.switchTabAct = E5Action( |
2748 self.switchTabAct = EricAction( |
2749 self.tr('Switch between tabs'), |
2749 self.tr('Switch between tabs'), |
2750 self.tr('Switch between tabs'), |
2750 self.tr('Switch between tabs'), |
2751 QKeySequence(self.tr('Ctrl+1')), 0, |
2751 QKeySequence(self.tr('Ctrl+1')), 0, |
2752 self, 'switch_tabs') |
2752 self, 'switch_tabs') |
2753 self.switchTabAct.triggered.connect(self.__switchTab) |
2753 self.switchTabAct.triggered.connect(self.__switchTab) |
2754 self.actions.append(self.switchTabAct) |
2754 self.actions.append(self.switchTabAct) |
2755 self.addAction(self.switchTabAct) |
2755 self.addAction(self.switchTabAct) |
2756 |
2756 |
2757 self.pluginInfoAct = E5Action( |
2757 self.pluginInfoAct = EricAction( |
2758 self.tr('Plugin Infos'), |
2758 self.tr('Plugin Infos'), |
2759 UI.PixmapCache.getIcon("plugin"), |
2759 UI.PixmapCache.getIcon("plugin"), |
2760 self.tr('&Plugin Infos...'), 0, 0, self, 'plugin_infos') |
2760 self.tr('&Plugin Infos...'), 0, 0, self, 'plugin_infos') |
2761 self.pluginInfoAct.setStatusTip(self.tr('Show Plugin Infos')) |
2761 self.pluginInfoAct.setStatusTip(self.tr('Show Plugin Infos')) |
2762 self.pluginInfoAct.setWhatsThis(self.tr( |
2762 self.pluginInfoAct.setWhatsThis(self.tr( |
2765 """ loaded plugins.</p>""" |
2765 """ loaded plugins.</p>""" |
2766 )) |
2766 )) |
2767 self.pluginInfoAct.triggered.connect(self.__showPluginInfo) |
2767 self.pluginInfoAct.triggered.connect(self.__showPluginInfo) |
2768 self.actions.append(self.pluginInfoAct) |
2768 self.actions.append(self.pluginInfoAct) |
2769 |
2769 |
2770 self.pluginInstallAct = E5Action( |
2770 self.pluginInstallAct = EricAction( |
2771 self.tr('Install Plugins'), |
2771 self.tr('Install Plugins'), |
2772 UI.PixmapCache.getIcon("pluginInstall"), |
2772 UI.PixmapCache.getIcon("pluginInstall"), |
2773 self.tr('&Install Plugins...'), |
2773 self.tr('&Install Plugins...'), |
2774 0, 0, self, 'plugin_install') |
2774 0, 0, self, 'plugin_install') |
2775 self.pluginInstallAct.setStatusTip(self.tr('Install Plugins')) |
2775 self.pluginInstallAct.setStatusTip(self.tr('Install Plugins')) |
2778 """<p>This opens a dialog to install or update plugins.</p>""" |
2778 """<p>This opens a dialog to install or update plugins.</p>""" |
2779 )) |
2779 )) |
2780 self.pluginInstallAct.triggered.connect(self.__installPlugins) |
2780 self.pluginInstallAct.triggered.connect(self.__installPlugins) |
2781 self.actions.append(self.pluginInstallAct) |
2781 self.actions.append(self.pluginInstallAct) |
2782 |
2782 |
2783 self.pluginDeinstallAct = E5Action( |
2783 self.pluginDeinstallAct = EricAction( |
2784 self.tr('Uninstall Plugin'), |
2784 self.tr('Uninstall Plugin'), |
2785 UI.PixmapCache.getIcon("pluginUninstall"), |
2785 UI.PixmapCache.getIcon("pluginUninstall"), |
2786 self.tr('&Uninstall Plugin...'), |
2786 self.tr('&Uninstall Plugin...'), |
2787 0, 0, self, 'plugin_deinstall') |
2787 0, 0, self, 'plugin_deinstall') |
2788 self.pluginDeinstallAct.setStatusTip(self.tr('Uninstall Plugin')) |
2788 self.pluginDeinstallAct.setStatusTip(self.tr('Uninstall Plugin')) |
2791 """<p>This opens a dialog to uninstall a plugin.</p>""" |
2791 """<p>This opens a dialog to uninstall a plugin.</p>""" |
2792 )) |
2792 )) |
2793 self.pluginDeinstallAct.triggered.connect(self.__deinstallPlugin) |
2793 self.pluginDeinstallAct.triggered.connect(self.__deinstallPlugin) |
2794 self.actions.append(self.pluginDeinstallAct) |
2794 self.actions.append(self.pluginDeinstallAct) |
2795 |
2795 |
2796 self.pluginRepoAct = E5Action( |
2796 self.pluginRepoAct = EricAction( |
2797 self.tr('Plugin Repository'), |
2797 self.tr('Plugin Repository'), |
2798 UI.PixmapCache.getIcon("pluginRepository"), |
2798 UI.PixmapCache.getIcon("pluginRepository"), |
2799 self.tr('Plugin &Repository...'), |
2799 self.tr('Plugin &Repository...'), |
2800 0, 0, self, 'plugin_repository') |
2800 0, 0, self, 'plugin_repository') |
2801 self.pluginRepoAct.setStatusTip(self.tr( |
2801 self.pluginRepoAct.setStatusTip(self.tr( |
2872 """ Assistant. </p>""" |
2872 """ Assistant. </p>""" |
2873 )) |
2873 )) |
2874 self.qt5DocAct.triggered.connect(lambda: self.__showQtDoc(5)) |
2874 self.qt5DocAct.triggered.connect(lambda: self.__showQtDoc(5)) |
2875 self.actions.append(self.qt5DocAct) |
2875 self.actions.append(self.qt5DocAct) |
2876 |
2876 |
2877 self.qt6DocAct = E5Action( |
2877 self.qt6DocAct = EricAction( |
2878 self.tr('Qt6 Documentation'), |
2878 self.tr('Qt6 Documentation'), |
2879 self.tr('Qt6 Documentation'), |
2879 self.tr('Qt6 Documentation'), |
2880 0, 0, self, 'qt6_documentation') |
2880 0, 0, self, 'qt6_documentation') |
2881 self.qt6DocAct.setStatusTip(self.tr('Open Qt6 Documentation')) |
2881 self.qt6DocAct.setStatusTip(self.tr('Open Qt6 Documentation')) |
2882 self.qt6DocAct.setWhatsThis(self.tr( |
2882 self.qt6DocAct.setWhatsThis(self.tr( |
2887 """ Assistant. </p>""" |
2887 """ Assistant. </p>""" |
2888 )) |
2888 )) |
2889 self.qt6DocAct.triggered.connect(lambda: self.__showQtDoc(6)) |
2889 self.qt6DocAct.triggered.connect(lambda: self.__showQtDoc(6)) |
2890 self.actions.append(self.qt6DocAct) |
2890 self.actions.append(self.qt6DocAct) |
2891 |
2891 |
2892 self.pyqt5DocAct = E5Action( |
2892 self.pyqt5DocAct = EricAction( |
2893 self.tr('PyQt5 Documentation'), |
2893 self.tr('PyQt5 Documentation'), |
2894 self.tr('PyQt5 Documentation'), |
2894 self.tr('PyQt5 Documentation'), |
2895 0, 0, self, 'pyqt5_documentation') |
2895 0, 0, self, 'pyqt5_documentation') |
2896 self.pyqt5DocAct.setStatusTip(self.tr( |
2896 self.pyqt5DocAct.setStatusTip(self.tr( |
2897 'Open PyQt5 Documentation')) |
2897 'Open PyQt5 Documentation')) |
2904 )) |
2904 )) |
2905 self.pyqt5DocAct.triggered.connect( |
2905 self.pyqt5DocAct.triggered.connect( |
2906 lambda: self.__showPyQtDoc(variant=5)) |
2906 lambda: self.__showPyQtDoc(variant=5)) |
2907 self.actions.append(self.pyqt5DocAct) |
2907 self.actions.append(self.pyqt5DocAct) |
2908 |
2908 |
2909 self.pyqt6DocAct = E5Action( |
2909 self.pyqt6DocAct = EricAction( |
2910 self.tr('PyQt6 Documentation'), |
2910 self.tr('PyQt6 Documentation'), |
2911 self.tr('PyQt6 Documentation'), |
2911 self.tr('PyQt6 Documentation'), |
2912 0, 0, self, 'pyqt6_documentation') |
2912 0, 0, self, 'pyqt6_documentation') |
2913 self.pyqt6DocAct.setStatusTip(self.tr( |
2913 self.pyqt6DocAct.setStatusTip(self.tr( |
2914 'Open PyQt6 Documentation')) |
2914 'Open PyQt6 Documentation')) |
2989 self.actions.append(self.pyside2DocAct) |
2989 self.actions.append(self.pyside2DocAct) |
2990 else: |
2990 else: |
2991 self.pyside2DocAct = None |
2991 self.pyside2DocAct = None |
2992 |
2992 |
2993 if Utilities.checkPyside(variant=6): |
2993 if Utilities.checkPyside(variant=6): |
2994 self.pyside6DocAct = E5Action( |
2994 self.pyside6DocAct = EricAction( |
2995 self.tr('PySide6 Documentation'), |
2995 self.tr('PySide6 Documentation'), |
2996 self.tr('PySide6 Documentation'), |
2996 self.tr('PySide6 Documentation'), |
2997 0, 0, self, 'pyside6_documentation') |
2997 0, 0, self, 'pyside6_documentation') |
2998 self.pyside6DocAct.setStatusTip(self.tr( |
2998 self.pyside6DocAct.setStatusTip(self.tr( |
2999 'Open PySide6 Documentation')) |
2999 'Open PySide6 Documentation')) |
3527 Private slot to set up the status bar. |
3527 Private slot to set up the status bar. |
3528 """ |
3528 """ |
3529 self.__statusBar = self.statusBar() |
3529 self.__statusBar = self.statusBar() |
3530 self.__statusBar.setSizeGripEnabled(True) |
3530 self.__statusBar.setSizeGripEnabled(True) |
3531 |
3531 |
3532 self.sbLanguage = E5ClickableLabel(self.__statusBar) |
3532 self.sbLanguage = EricClickableLabel(self.__statusBar) |
3533 self.__statusBar.addPermanentWidget(self.sbLanguage) |
3533 self.__statusBar.addPermanentWidget(self.sbLanguage) |
3534 self.sbLanguage.setWhatsThis(self.tr( |
3534 self.sbLanguage.setWhatsThis(self.tr( |
3535 """<p>This part of the status bar displays the""" |
3535 """<p>This part of the status bar displays the""" |
3536 """ current editors language.</p>""" |
3536 """ current editors language.</p>""" |
3537 )) |
3537 )) |
3538 |
3538 |
3539 self.sbEncoding = E5ClickableLabel(self.__statusBar) |
3539 self.sbEncoding = EricClickableLabel(self.__statusBar) |
3540 self.__statusBar.addPermanentWidget(self.sbEncoding) |
3540 self.__statusBar.addPermanentWidget(self.sbEncoding) |
3541 self.sbEncoding.setWhatsThis(self.tr( |
3541 self.sbEncoding.setWhatsThis(self.tr( |
3542 """<p>This part of the status bar displays the""" |
3542 """<p>This part of the status bar displays the""" |
3543 """ current editors encoding.</p>""" |
3543 """ current editors encoding.</p>""" |
3544 )) |
3544 )) |
3545 |
3545 |
3546 self.sbEol = E5ClickableLabel(self.__statusBar) |
3546 self.sbEol = EricClickableLabel(self.__statusBar) |
3547 self.__statusBar.addPermanentWidget(self.sbEol) |
3547 self.__statusBar.addPermanentWidget(self.sbEol) |
3548 self.sbEol.setWhatsThis(self.tr( |
3548 self.sbEol.setWhatsThis(self.tr( |
3549 """<p>This part of the status bar displays the""" |
3549 """<p>This part of the status bar displays the""" |
3550 """ current editors eol setting.</p>""" |
3550 """ current editors eol setting.</p>""" |
3551 )) |
3551 )) |
3929 """ |
3929 """ |
3930 from QScintilla.MiniEditor import MiniEditor |
3930 from QScintilla.MiniEditor import MiniEditor |
3931 editor = MiniEditor(parent=self) |
3931 editor = MiniEditor(parent=self) |
3932 editor.show() |
3932 editor.show() |
3933 |
3933 |
3934 def addE5Actions(self, actions, actionType): |
3934 def addEricActions(self, actions, actionType): |
3935 """ |
3935 """ |
3936 Public method to add actions to the list of actions. |
3936 Public method to add actions to the list of actions. |
3937 |
3937 |
3938 @param actions list of actions to be added (list of E5Action) |
3938 @param actions list of actions to be added (list of EricAction) |
3939 @param actionType string denoting the action set to add to. |
3939 @param actionType string denoting the action set to add to. |
3940 It must be one of "ui" or "wizards". |
3940 It must be one of "ui" or "wizards". |
3941 """ |
3941 """ |
3942 if actionType == 'ui': |
3942 if actionType == 'ui': |
3943 self.actions.extend(actions) |
3943 self.actions.extend(actions) |
3944 elif actionType == 'wizards': |
3944 elif actionType == 'wizards': |
3945 self.wizardsActions.extend(actions) |
3945 self.wizardsActions.extend(actions) |
3946 |
3946 |
3947 def removeE5Actions(self, actions, actionType='ui'): |
3947 def removeEricActions(self, actions, actionType='ui'): |
3948 """ |
3948 """ |
3949 Public method to remove actions from the list of actions. |
3949 Public method to remove actions from the list of actions. |
3950 |
3950 |
3951 @param actions list of actions (list of E5Action) |
3951 @param actions list of actions (list of EricAction) |
3952 @param actionType string denoting the action set to remove from. |
3952 @param actionType string denoting the action set to remove from. |
3953 It must be one of "ui" or "wizards". |
3953 It must be one of "ui" or "wizards". |
3954 """ |
3954 """ |
3955 for act in actions: |
3955 for act in actions: |
3956 with contextlib.suppress(ValueError): |
3956 with contextlib.suppress(ValueError): |
4109 def __quit(self): |
4109 def __quit(self): |
4110 """ |
4110 """ |
4111 Private method to quit the application. |
4111 Private method to quit the application. |
4112 """ |
4112 """ |
4113 if self.__shutdown(): |
4113 if self.__shutdown(): |
4114 e5App().closeAllWindows() |
4114 ericApp().closeAllWindows() |
4115 |
4115 |
4116 @pyqtSlot() |
4116 @pyqtSlot() |
4117 def __restart(self, ask=False): |
4117 def __restart(self, ask=False): |
4118 """ |
4118 """ |
4119 Private method to restart the application. |
4119 Private method to restart the application. |
4120 |
4120 |
4121 @param ask flag indicating to ask the user for permission |
4121 @param ask flag indicating to ask the user for permission |
4122 @type bool |
4122 @type bool |
4123 """ |
4123 """ |
4124 res = ( |
4124 res = ( |
4125 E5MessageBox.yesNo( |
4125 EricMessageBox.yesNo( |
4126 self, |
4126 self, |
4127 self.tr("Restart application"), |
4127 self.tr("Restart application"), |
4128 self.tr( |
4128 self.tr( |
4129 """The application needs to be restarted. Do it now?"""), |
4129 """The application needs to be restarted. Do it now?"""), |
4130 yesDefault=True) |
4130 yesDefault=True) |
4131 if ask else |
4131 if ask else |
4132 True |
4132 True |
4133 ) |
4133 ) |
4134 |
4134 |
4135 if res and self.__shutdown(): |
4135 if res and self.__shutdown(): |
4136 e5App().closeAllWindows() |
4136 ericApp().closeAllWindows() |
4137 program = sys.executable |
4137 program = sys.executable |
4138 eric7 = os.path.join(getConfig("ericDir"), "eric7.py") |
4138 eric7 = os.path.join(getConfig("ericDir"), "eric7.py") |
4139 args = [eric7] |
4139 args = [eric7] |
4140 args.append("--start-session") |
4140 args.append("--start-session") |
4141 args.extend(self.__restartArgs) |
4141 args.extend(self.__restartArgs) |
5483 for tool in toolGroup[1]: |
5483 for tool in toolGroup[1]: |
5484 if tool['menutext'] == toolMenuText: |
5484 if tool['menutext'] == toolMenuText: |
5485 self.__startToolProcess(tool) |
5485 self.__startToolProcess(tool) |
5486 return |
5486 return |
5487 |
5487 |
5488 E5MessageBox.information( |
5488 EricMessageBox.information( |
5489 self, |
5489 self, |
5490 self.tr("External Tools"), |
5490 self.tr("External Tools"), |
5491 self.tr( |
5491 self.tr( |
5492 """No tool entry found for external tool '{0}' """ |
5492 """No tool entry found for external tool '{0}' """ |
5493 """in tool group '{1}'.""") |
5493 """in tool group '{1}'.""") |
5494 .format(toolMenuText, toolGroupName)) |
5494 .format(toolMenuText, toolGroupName)) |
5495 return |
5495 return |
5496 |
5496 |
5497 E5MessageBox.information( |
5497 EricMessageBox.information( |
5498 self, |
5498 self, |
5499 self.tr("External Tools"), |
5499 self.tr("External Tools"), |
5500 self.tr("""No toolgroup entry '{0}' found.""") |
5500 self.tr("""No toolgroup entry '{0}' found.""") |
5501 .format(toolGroupName) |
5501 .format(toolGroupName) |
5502 ) |
5502 ) |
7052 self.httpAlternative = alternative |
7052 self.httpAlternative = alternative |
7053 url = QUrl(self.__httpAlternatives[alternative]) |
7053 url = QUrl(self.__httpAlternatives[alternative]) |
7054 self.__versionCheckCanceled = False |
7054 self.__versionCheckCanceled = False |
7055 if manual: |
7055 if manual: |
7056 if self.__versionCheckProgress is None: |
7056 if self.__versionCheckProgress is None: |
7057 self.__versionCheckProgress = E5ProgressDialog( |
7057 self.__versionCheckProgress = EricProgressDialog( |
7058 "", self.tr("&Cancel"), |
7058 "", self.tr("&Cancel"), |
7059 0, len(self.__httpAlternatives), |
7059 0, len(self.__httpAlternatives), |
7060 self.tr("%v/%m"), self) |
7060 self.tr("%v/%m"), self) |
7061 self.__versionCheckProgress.setWindowTitle( |
7061 self.__versionCheckProgress.setWindowTitle( |
7062 self.tr("Version Check")) |
7062 self.tr("Version Check")) |
7113 "Updates/FirstFailedCheckDate", QDate.currentDate()) |
7113 "Updates/FirstFailedCheckDate", QDate.currentDate()) |
7114 failedDuration = firstFailure.daysTo(QDate.currentDate()) |
7114 failedDuration = firstFailure.daysTo(QDate.currentDate()) |
7115 Preferences.Prefs.settings.setValue( |
7115 Preferences.Prefs.settings.setValue( |
7116 "Updates/FirstFailedCheckDate", firstFailure) |
7116 "Updates/FirstFailedCheckDate", firstFailure) |
7117 if self.manualUpdatesCheck: |
7117 if self.manualUpdatesCheck: |
7118 E5MessageBox.warning( |
7118 EricMessageBox.warning( |
7119 self, |
7119 self, |
7120 self.tr("Error getting versions information"), |
7120 self.tr("Error getting versions information"), |
7121 self.tr("""The versions information could not be""" |
7121 self.tr("""The versions information could not be""" |
7122 """ downloaded.""" |
7122 """ downloaded.""" |
7123 """ Please go online and try again.""")) |
7123 """ Please go online and try again.""")) |
7124 elif failedDuration > 7: |
7124 elif failedDuration > 7: |
7125 E5MessageBox.warning( |
7125 EricMessageBox.warning( |
7126 self, |
7126 self, |
7127 self.tr("Error getting versions information"), |
7127 self.tr("Error getting versions information"), |
7128 self.tr("""The versions information could not be""" |
7128 self.tr("""The versions information could not be""" |
7129 """ downloaded for the last 7 days.""" |
7129 """ downloaded for the last 7 days.""" |
7130 """ Please go online and try again.""")) |
7130 """ Please go online and try again.""")) |
7178 # check snapshot version like snapshot-20170810 |
7178 # check snapshot version like snapshot-20170810 |
7179 if "snapshot-" in versions[2]: |
7179 if "snapshot-" in versions[2]: |
7180 installedSnapshotDate = VersionOnly.rsplit("-", 1)[-1] |
7180 installedSnapshotDate = VersionOnly.rsplit("-", 1)[-1] |
7181 availableSnapshotDate = versions[2].rsplit("-", 1)[-1] |
7181 availableSnapshotDate = versions[2].rsplit("-", 1)[-1] |
7182 if availableSnapshotDate > installedSnapshotDate: |
7182 if availableSnapshotDate > installedSnapshotDate: |
7183 res = E5MessageBox.yesNo( |
7183 res = EricMessageBox.yesNo( |
7184 self, |
7184 self, |
7185 self.tr("Update available"), |
7185 self.tr("Update available"), |
7186 self.tr( |
7186 self.tr( |
7187 """The update to <b>{0}</b> of eric is""" |
7187 """The update to <b>{0}</b> of eric is""" |
7188 """ available at <b>{1}</b>. Would you like""" |
7188 """ available at <b>{1}</b>. Would you like""" |
7190 .format(versions[2], versions[3]), |
7190 .format(versions[2], versions[3]), |
7191 yesDefault=True) |
7191 yesDefault=True) |
7192 url = res and versions[3] or '' |
7192 url = res and versions[3] or '' |
7193 else: |
7193 else: |
7194 if self.manualUpdatesCheck: |
7194 if self.manualUpdatesCheck: |
7195 E5MessageBox.information( |
7195 EricMessageBox.information( |
7196 self, |
7196 self, |
7197 self.tr("Update Check"), |
7197 self.tr("Update Check"), |
7198 self.tr( |
7198 self.tr( |
7199 """You are using a snapshot release of""" |
7199 """You are using a snapshot release of""" |
7200 """ eric. A more up-to-date stable release""" |
7200 """ eric. A more up-to-date stable release""" |
7201 """ might be available.""")) |
7201 """ might be available.""")) |
7202 elif VersionOnly.startswith(("rev_", "@@")): |
7202 elif VersionOnly.startswith(("rev_", "@@")): |
7203 # check installation from source |
7203 # check installation from source |
7204 if self.manualUpdatesCheck: |
7204 if self.manualUpdatesCheck: |
7205 E5MessageBox.information( |
7205 EricMessageBox.information( |
7206 self, |
7206 self, |
7207 self.tr("Update Check"), |
7207 self.tr("Update Check"), |
7208 self.tr( |
7208 self.tr( |
7209 """You installed eric directly from the source""" |
7209 """You installed eric directly from the source""" |
7210 """ code. There is no possibility to check""" |
7210 """ code. There is no possibility to check""" |
7224 .format(versions[0], versions[1]), |
7224 .format(versions[0], versions[1]), |
7225 yesDefault=True) |
7225 yesDefault=True) |
7226 url = res and versions[1] or '' |
7226 url = res and versions[1] or '' |
7227 else: |
7227 else: |
7228 if self.manualUpdatesCheck: |
7228 if self.manualUpdatesCheck: |
7229 E5MessageBox.information( |
7229 EricMessageBox.information( |
7230 self, |
7230 self, |
7231 self.tr("eric is up to date"), |
7231 self.tr("eric is up to date"), |
7232 self.tr( |
7232 self.tr( |
7233 """You are using the latest version of""" |
7233 """You are using the latest version of""" |
7234 """ eric""")) |
7234 """ eric""")) |
7235 except (IndexError, TypeError): |
7235 except (IndexError, TypeError): |
7236 E5MessageBox.warning( |
7236 EricMessageBox.warning( |
7237 self, |
7237 self, |
7238 self.tr("Error during updates check"), |
7238 self.tr("Error during updates check"), |
7239 self.tr("""Could not perform updates check.""")) |
7239 self.tr("""Could not perform updates check.""")) |
7240 |
7240 |
7241 if url: |
7241 if url: |
7326 self.checkConfigurationStatus() |
7326 self.checkConfigurationStatus() |
7327 |
7327 |
7328 workspace = Preferences.getMultiProject("Workspace") |
7328 workspace = Preferences.getMultiProject("Workspace") |
7329 if workspace == "": |
7329 if workspace == "": |
7330 default = Utilities.getHomeDir() |
7330 default = Utilities.getHomeDir() |
7331 workspace = E5FileDialog.getExistingDirectory( |
7331 workspace = EricFileDialog.getExistingDirectory( |
7332 None, |
7332 None, |
7333 self.tr("Select Workspace Directory"), |
7333 self.tr("Select Workspace Directory"), |
7334 default, |
7334 default, |
7335 E5FileDialog.Option(0)) |
7335 EricFileDialog.Option(0)) |
7336 Preferences.setMultiProject("Workspace", workspace) |
7336 Preferences.setMultiProject("Workspace", workspace) |
7337 |
7337 |
7338 def versionIsNewer(self, required, snapshot=None): |
7338 def versionIsNewer(self, required, snapshot=None): |
7339 """ |
7339 """ |
7340 Public method to check, if the eric version is good compared to |
7340 Public method to check, if the eric version is good compared to |