67 def getVcsSystemIndicator(): |
68 def getVcsSystemIndicator(): |
68 """ |
69 """ |
69 Public function to get the indicators for this version control system. |
70 Public function to get the indicators for this version control system. |
70 |
71 |
71 @return dictionary with indicator as key and a tuple with the vcs name |
72 @return dictionary with indicator as key and a tuple with the vcs name |
72 (string) and vcs display string (string) |
73 and vcs display string |
|
74 @rtype dict |
73 """ |
75 """ |
74 ##global __header__ |
76 ##global __header__ |
75 data = {} |
77 data = {} |
76 exe = "git" |
78 exe = "git" |
77 if OSUtilities.isWindowsPlatform(): |
79 if OSUtilities.isWindowsPlatform(): |
102 |
105 |
103 def createConfigurationPage(configDlg): # noqa: U100 |
106 def createConfigurationPage(configDlg): # noqa: U100 |
104 """ |
107 """ |
105 Module function to create the configuration page. |
108 Module function to create the configuration page. |
106 |
109 |
107 @param configDlg reference to the configuration dialog (QDialog) |
110 @param configDlg reference to the configuration dialog |
|
111 @type QDialog |
108 @return reference to the configuration page |
112 @return reference to the configuration page |
|
113 @rtype GitPage |
109 """ |
114 """ |
110 from eric7.Plugins.VcsPlugins.vcsGit.ConfigurationPage.GitPage import GitPage |
115 from eric7.Plugins.VcsPlugins.vcsGit.ConfigurationPage.GitPage import GitPage |
111 |
116 |
112 global gitCfgPluginObject |
117 global gitCfgPluginObject |
113 |
118 |
119 |
124 |
120 def getConfigData(): |
125 def getConfigData(): |
121 """ |
126 """ |
122 Module function returning data as required by the configuration dialog. |
127 Module function returning data as required by the configuration dialog. |
123 |
128 |
124 @return dictionary with key "zzz_gitPage" containing the relevant |
129 @return dictionary with key "zzz_gitPage" containing the relevant data |
125 data |
130 @rtype dict |
126 """ |
131 """ |
127 return { |
132 return { |
128 "zzz_gitPage": [ |
133 "zzz_gitPage": [ |
129 QCoreApplication.translate("VcsGitPlugin", "Git"), |
134 QCoreApplication.translate("VcsGitPlugin", "Git"), |
130 os.path.join("VcsPlugins", "vcsGit", "icons", "preferences-git.svg"), |
135 os.path.join("VcsPlugins", "vcsGit", "icons", "preferences-git.svg"), |
204 def getProjectHelper(self): |
210 def getProjectHelper(self): |
205 """ |
211 """ |
206 Public method to get a reference to the project helper object. |
212 Public method to get a reference to the project helper object. |
207 |
213 |
208 @return reference to the project helper object |
214 @return reference to the project helper object |
|
215 @rtype GitProjectHelper |
209 """ |
216 """ |
210 return self.__projectHelperObject |
217 return self.__projectHelperObject |
211 |
218 |
212 def initToolbar(self, ui, toolbarManager): |
219 def initToolbar(self, ui, toolbarManager): |
213 """ |
220 """ |
214 Public slot to initialize the VCS toolbar. |
221 Public slot to initialize the VCS toolbar. |
215 |
222 |
216 @param ui reference to the main window (UserInterface) |
223 @param ui reference to the main window |
|
224 @type UserInterface |
217 @param toolbarManager reference to a toolbar manager object |
225 @param toolbarManager reference to a toolbar manager object |
218 (EricToolBarManager) |
226 @type EricToolBarManager |
219 """ |
227 """ |
220 if self.__projectHelperObject: |
228 if self.__projectHelperObject: |
221 self.__projectHelperObject.initToolbar(ui, toolbarManager) |
229 self.__projectHelperObject.initToolbar(ui, toolbarManager) |
222 |
230 |
223 def activate(self): |
231 def activate(self): |
224 """ |
232 """ |
225 Public method to activate this plugin. |
233 Public method to activate this plugin. |
226 |
234 |
227 @return tuple of reference to instantiated viewmanager and |
235 @return tuple of reference to instantiated version control and |
228 activation status (boolean) |
236 activation status |
|
237 @rtype tuple of (Git, bool) |
229 """ |
238 """ |
230 from eric7.Plugins.VcsPlugins.vcsGit.git import Git |
239 from eric7.Plugins.VcsPlugins.vcsGit.git import Git |
231 |
240 |
232 self.__object = Git(self, self.__ui) |
241 self.__object = Git(self, self.__ui) |
233 |
242 |
302 def setPreferences(cls, key, value): |
313 def setPreferences(cls, key, value): |
303 """ |
314 """ |
304 Class method to store the various settings. |
315 Class method to store the various settings. |
305 |
316 |
306 @param key the key of the setting to be set |
317 @param key the key of the setting to be set |
|
318 @type str |
307 @param value the value to be set |
319 @param value the value to be set |
|
320 @type Any |
308 """ |
321 """ |
309 Preferences.getSettings().setValue("Git/" + key, value) |
322 Preferences.getSettings().setValue("Git/" + key, value) |
310 |
323 |
311 def getConfigPath(self): |
324 def getConfigPath(self): |
312 """ |
325 """ |
313 Public method to get the filename of the config file. |
326 Public method to get the filename of the config file. |
314 |
327 |
315 @return filename of the config file (string) |
328 @return filename of the config file |
|
329 @rtype str |
316 """ |
330 """ |
317 return getConfigPath() |
331 return getConfigPath() |
318 |
332 |
319 def prepareUninstall(self): |
333 def prepareUninstall(self): |
320 """ |
334 """ |