diff -r cf9fc78bb1c8 -r 2dd3d1cf573a PluginProjectPyramid.py --- a/PluginProjectPyramid.py Thu Sep 13 18:25:40 2012 +0200 +++ b/PluginProjectPyramid.py Tue Nov 06 17:13:58 2012 +0100 @@ -29,7 +29,7 @@ author = "Detlev Offenbach <detlev@die-offenbachs.de>" autoactivate = True deactivateable = True -version = "0.3.0" +version = "0.4.0" className = "ProjectPyramidPlugin" packageName = "ProjectPyramid" shortDescription = "Project support for Pyramid projects." @@ -92,14 +92,16 @@ """ Module function to prepare for an uninstallation. """ - pyramid = ProjectPyramidPlugin(None) - pyramid.prepareUninstall() + Preferences.removeProjectBrowserFlags(ProjectPyramidPlugin.PreferencesKey) + Preferences.Prefs.settings.remove(ProjectPyramidPlugin.PreferencesKey) class ProjectPyramidPlugin(QObject): """ Class implementing the Pyramid project plugin. """ + PreferencesKey = "Pyramid" + lexerAssociations = { "*.mako": "Pygments|HTML+Mako", "*.pt": "Pygments|HTML+Genshi", @@ -336,7 +338,7 @@ @param prefClass preferences class used as the storage area @return the requested setting """ - return Preferences.Prefs.settings.value("Pyramid/" + key, + return Preferences.Prefs.settings.value(self.PreferencesKey + "/" + key, self.__defaults[key]) def setPreferences(self, key, value): @@ -348,10 +350,3 @@ @param prefClass preferences class used as the storage area """ Preferences.Prefs.settings.setValue("Pyramid/" + key, value) - - def prepareUninstall(self): - """ - Public method to prepare for an uninstallation. - """ - Preferences.removeProjectBrowserFlags("Pyramid") - Preferences.Prefs.settings.remove("Pyramid")