PluginProjectPyramid.py

changeset 25
2dd3d1cf573a
parent 22
c358b356b214
child 32
107e51521b1e
--- 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")

eric ide

mercurial