10 import os |
10 import os |
11 import contextlib |
11 import contextlib |
12 |
12 |
13 from PyQt6.QtCore import QObject, QCoreApplication, QByteArray |
13 from PyQt6.QtCore import QObject, QCoreApplication, QByteArray |
14 |
14 |
15 from EricWidgets.EricApplication import ericApp |
15 from eric7.EricWidgets.EricApplication import ericApp |
16 |
16 |
17 import Preferences |
17 from eric7 import Preferences, Utilities |
18 from Preferences.Shortcuts import readShortcuts |
18 |
19 |
19 from eric7.Preferences.Shortcuts import readShortcuts |
20 from VcsPlugins.vcsGit.GitUtilities import getConfigPath |
20 |
21 |
21 from eric7.Plugins.VcsPlugins.vcsGit.GitUtilities import getConfigPath |
22 import Utilities |
22 |
23 import UI.Info |
23 from eric7.UI import Info |
24 |
24 |
25 # Start-Of-Header |
25 # Start-Of-Header |
26 name = "Git Plugin" |
26 name = "Git Plugin" |
27 author = "Detlev Offenbach <detlev@die-offenbachs.de>" |
27 author = "Detlev Offenbach <detlev@die-offenbachs.de>" |
28 autoactivate = False |
28 autoactivate = False |
29 deactivateable = True |
29 deactivateable = True |
30 version = UI.Info.VersionOnly |
30 version = Info.VersionOnly |
31 pluginType = "version_control" |
31 pluginType = "version_control" |
32 pluginTypename = "Git" |
32 pluginTypename = "Git" |
33 className = "VcsGitPlugin" |
33 className = "VcsGitPlugin" |
34 packageName = "__core__" |
34 packageName = "__core__" |
35 shortDescription = "Implements the Git version control interface." |
35 shortDescription = "Implements the Git version control interface." |
107 |
107 |
108 @param configDlg reference to the configuration dialog (QDialog) |
108 @param configDlg reference to the configuration dialog (QDialog) |
109 @return reference to the configuration page |
109 @return reference to the configuration page |
110 """ |
110 """ |
111 global gitCfgPluginObject |
111 global gitCfgPluginObject |
112 from VcsPlugins.vcsGit.ConfigurationPage.GitPage import GitPage |
112 from eric7.Plugins.VcsPlugins.vcsGit.ConfigurationPage.GitPage import GitPage |
113 |
113 |
114 if gitCfgPluginObject is None: |
114 if gitCfgPluginObject is None: |
115 gitCfgPluginObject = VcsGitPlugin(None) |
115 gitCfgPluginObject = VcsGitPlugin(None) |
116 page = GitPage(gitCfgPluginObject) |
116 page = GitPage(gitCfgPluginObject) |
117 return page |
117 return page |
186 @param ui reference to the user interface object (UI.UserInterface) |
186 @param ui reference to the user interface object (UI.UserInterface) |
187 """ |
187 """ |
188 super().__init__(ui) |
188 super().__init__(ui) |
189 self.__ui = ui |
189 self.__ui = ui |
190 |
190 |
191 from VcsPlugins.vcsGit.ProjectHelper import GitProjectHelper |
191 from eric7.Plugins.VcsPlugins.vcsGit.ProjectHelper import GitProjectHelper |
192 |
192 |
193 self.__projectHelperObject = GitProjectHelper(None, None) |
193 self.__projectHelperObject = GitProjectHelper(None, None) |
194 with contextlib.suppress(KeyError): |
194 with contextlib.suppress(KeyError): |
195 ericApp().registerPluginObject( |
195 ericApp().registerPluginObject( |
196 pluginTypename, self.__projectHelperObject, pluginType |
196 pluginTypename, self.__projectHelperObject, pluginType |
222 Public method to activate this plugin. |
222 Public method to activate this plugin. |
223 |
223 |
224 @return tuple of reference to instantiated viewmanager and |
224 @return tuple of reference to instantiated viewmanager and |
225 activation status (boolean) |
225 activation status (boolean) |
226 """ |
226 """ |
227 from VcsPlugins.vcsGit.git import Git |
227 from eric7.Plugins.VcsPlugins.vcsGit.git import Git |
228 |
228 |
229 self.__object = Git(self, self.__ui) |
229 self.__object = Git(self, self.__ui) |
230 |
230 |
231 tb = self.__ui.getToolbar("vcs")[1] |
231 tb = self.__ui.getToolbar("vcs")[1] |
232 tb.setVisible(False) |
232 tb.setVisible(False) |