--- a/Plugins/PluginVcsSubversion.py Fri Mar 11 08:55:14 2011 +0100 +++ b/Plugins/PluginVcsSubversion.py Fri Mar 11 16:51:57 2011 +0100 @@ -38,6 +38,7 @@ error = "" + def exeDisplayData(): """ Public method to support the display of some executable info. @@ -50,19 +51,20 @@ exe += '.exe' data = { - "programEntry" : True, - "header" : QApplication.translate("VcsSubversionPlugin", - "Version Control - Subversion (svn)"), - "exe" : exe, - "versionCommand" : '--version', - "versionStartsWith" : 'svn', - "versionPosition" : 2, - "version" : "", - "versionCleanup" : None, + "programEntry": True, + "header": QApplication.translate("VcsSubversionPlugin", + "Version Control - Subversion (svn)"), + "exe": exe, + "versionCommand": '--version', + "versionStartsWith": 'svn', + "versionPosition": 2, + "version": "", + "versionCleanup": None, } return data + def getVcsSystemIndicator(): """ Public function to get the indicators for this version control system. @@ -80,6 +82,7 @@ data["_svn"] = (pluginTypename, displayString()) return data + def displayString(): """ Public function to get the display string. @@ -96,6 +99,7 @@ subversionCfgPluginObject = None + def createConfigurationPage(configDlg): """ Module function to create the configuration page. @@ -109,6 +113,7 @@ page = SubversionPage(subversionCfgPluginObject) return page + def getConfigData(): """ Module function returning data as required by the configuration dialog. @@ -116,13 +121,14 @@ @return dictionary with key "zzz_subversionPage" containing the relevant data """ return { - "zzz_subversionPage" : \ - [QApplication.translate("VcsSubversionPlugin", "Subversion"), - os.path.join("VcsPlugins", "vcsSubversion", "icons", + "zzz_subversionPage": \ + [QApplication.translate("VcsSubversionPlugin", "Subversion"), + os.path.join("VcsPlugins", "vcsSubversion", "icons", "preferences-subversion.png"), createConfigurationPage, "vcsPage", None], } + def prepareUninstall(): """ Module function to prepare for an uninstallation. @@ -130,6 +136,7 @@ if not e5App().getObject("PluginManager").isPluginLoaded("PluginVcsSubversion"): Preferences.Prefs.settings.remove("Subversion") + class VcsSubversionPlugin(QObject): """ Class implementing the Subversion version control plugin. @@ -144,19 +151,19 @@ self.__ui = ui self.__subversionDefaults = { - "StopLogOnCopy" : True, - "LogLimit" : 100, - "CommitMessages" : 20, + "StopLogOnCopy": True, + "LogLimit": 100, + "CommitMessages": 20, } from VcsPlugins.vcsSubversion.ProjectHelper import SvnProjectHelper self.__projectHelperObject = SvnProjectHelper(None, None) try: - e5App().registerPluginObject(pluginTypename, self.__projectHelperObject, + e5App().registerPluginObject(pluginTypename, self.__projectHelperObject, pluginType) except KeyError: pass # ignore duplicate registration - readShortcuts(pluginName = pluginTypename) + readShortcuts(pluginName=pluginTypename) def getProjectHelper(self): """ @@ -170,7 +177,7 @@ """ Public method to activate this plugin. - @return tuple of reference to instantiated viewmanager and + @return tuple of reference to instantiated viewmanager and activation status (boolean) """ from VcsPlugins.vcsSubversion.subversion import Subversion @@ -199,7 +206,7 @@ elif key in ["Commits"]: return Preferences.toList(Preferences.Prefs.settings.value( "Subversion/" + key)) - else: + else: return Preferences.Prefs.settings.value("Subversion/" + key) def setPreferences(self, key, value):