28 pluginType = "version_control" |
28 pluginType = "version_control" |
29 pluginTypename = "PySvn" |
29 pluginTypename = "PySvn" |
30 className = "VcsPySvnPlugin" |
30 className = "VcsPySvnPlugin" |
31 packageName = "__core__" |
31 packageName = "__core__" |
32 shortDescription = "Implements the PySvn version control interface." |
32 shortDescription = "Implements the PySvn version control interface." |
33 longDescription = """This plugin provides the PySvn version control interface.""" |
33 longDescription = \ |
|
34 """This plugin provides the PySvn version control interface.""" |
34 pyqtApi = 2 |
35 pyqtApi = 2 |
35 # End-Of-Header |
36 # End-Of-Header |
36 |
37 |
37 error = "" |
38 error = "" |
38 |
39 |
67 |
68 |
68 def getVcsSystemIndicator(): |
69 def getVcsSystemIndicator(): |
69 """ |
70 """ |
70 Public function to get the indicators for this version control system. |
71 Public function to get the indicators for this version control system. |
71 |
72 |
72 @return dictionary with indicator as key and a tuple with the vcs name (string) |
73 @return dictionary with indicator as key and a tuple with the vcs name |
73 and vcs display string (string) |
74 (string) and vcs display string (string) |
74 """ |
75 """ |
75 global pluginTypename |
76 global pluginTypename |
76 data = {} |
77 data = {} |
77 data[".svn"] = (pluginTypename, displayString()) |
78 data[".svn"] = (pluginTypename, displayString()) |
78 data["_svn"] = (pluginTypename, displayString()) |
79 data["_svn"] = (pluginTypename, displayString()) |
100 |
101 |
101 @param configDlg reference to the configuration dialog (QDialog) |
102 @param configDlg reference to the configuration dialog (QDialog) |
102 @return reference to the configuration page |
103 @return reference to the configuration page |
103 """ |
104 """ |
104 global subversionCfgPluginObject |
105 global subversionCfgPluginObject |
105 from VcsPlugins.vcsPySvn.ConfigurationPage.SubversionPage import SubversionPage |
106 from VcsPlugins.vcsPySvn.ConfigurationPage.SubversionPage import \ |
|
107 SubversionPage |
106 if subversionCfgPluginObject is None: |
108 if subversionCfgPluginObject is None: |
107 subversionCfgPluginObject = VcsPySvnPlugin(None) |
109 subversionCfgPluginObject = VcsPySvnPlugin(None) |
108 page = SubversionPage(subversionCfgPluginObject) |
110 page = SubversionPage(subversionCfgPluginObject) |
109 return page |
111 return page |
110 |
112 |
111 |
113 |
112 def getConfigData(): |
114 def getConfigData(): |
113 """ |
115 """ |
114 Module function returning data as required by the configuration dialog. |
116 Module function returning data as required by the configuration dialog. |
115 |
117 |
116 @return dictionary with key "zzz_subversionPage" containing the relevant data |
118 @return dictionary with key "zzz_subversionPage" containing the relevant |
|
119 data |
117 """ |
120 """ |
118 return { |
121 return { |
119 "zzz_subversionPage": \ |
122 "zzz_subversionPage": \ |
120 [QApplication.translate("VcsPySvnPlugin", "Subversion"), |
123 [QApplication.translate("VcsPySvnPlugin", "Subversion"), |
121 os.path.join("VcsPlugins", "vcsPySvn", "icons", |
124 os.path.join("VcsPlugins", "vcsPySvn", "icons", |
126 |
129 |
127 def prepareUninstall(): |
130 def prepareUninstall(): |
128 """ |
131 """ |
129 Module function to prepare for an uninstallation. |
132 Module function to prepare for an uninstallation. |
130 """ |
133 """ |
131 if not e5App().getObject("PluginManager").isPluginLoaded("PluginVcsSubversion"): |
134 if not e5App().getObject("PluginManager").isPluginLoaded( |
|
135 "PluginVcsSubversion"): |
132 Preferences.Prefs.settings.remove("Subversion") |
136 Preferences.Prefs.settings.remove("Subversion") |
133 |
137 |
134 |
138 |
135 class VcsPySvnPlugin(QObject): |
139 class VcsPySvnPlugin(QObject): |
136 """ |
140 """ |
152 } |
156 } |
153 |
157 |
154 from VcsPlugins.vcsPySvn.ProjectHelper import SvnProjectHelper |
158 from VcsPlugins.vcsPySvn.ProjectHelper import SvnProjectHelper |
155 self.__projectHelperObject = SvnProjectHelper(None, None) |
159 self.__projectHelperObject = SvnProjectHelper(None, None) |
156 try: |
160 try: |
157 e5App().registerPluginObject(pluginTypename, self.__projectHelperObject, |
161 e5App().registerPluginObject( |
158 pluginType) |
162 pluginTypename, self.__projectHelperObject, pluginType) |
159 except KeyError: |
163 except KeyError: |
160 pass # ignore duplicate registration |
164 pass # ignore duplicate registration |
161 readShortcuts(pluginName=pluginTypename) |
165 readShortcuts(pluginName=pluginTypename) |
162 |
166 |
163 def getProjectHelper(self): |
167 def getProjectHelper(self): |