Fixed a bug related to uninstalling the plug-in via the external plug-in uninstaller. release-2.3.2

Tue, 06 Nov 2012 17:43:14 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Tue, 06 Nov 2012 17:43:14 +0100
changeset 63
f8acb1de2200
parent 62
1b0491135c52
child 64
235a039124e5

Fixed a bug related to uninstalling the plug-in via the external plug-in uninstaller.

AssistantEric/Documentation/source/Plugin_Assistant_Eric.PluginAssistantEric.html file | annotate | diff | comparison | revisions
PluginAssistantEric.py file | annotate | diff | comparison | revisions
PluginAssistantEric.zip file | annotate | diff | comparison | revisions
--- a/AssistantEric/Documentation/source/Plugin_Assistant_Eric.PluginAssistantEric.html	Fri Sep 28 18:01:37 2012 +0200
+++ b/AssistantEric/Documentation/source/Plugin_Assistant_Eric.PluginAssistantEric.html	Tue Nov 06 17:43:14 2012 +0100
@@ -61,7 +61,7 @@
 QObject
 <h3>Class Attributes</h3>
 <table>
-<tr><td>None</td></tr>
+<tr><td>PreferencesKey</td></tr>
 </table>
 <h3>Class Methods</h3>
 <table>
@@ -94,9 +94,6 @@
 <td><a href="#AssistantEricPlugin.getPreferences">getPreferences</a></td>
 <td>Public method to retrieve the various refactoring settings.</td>
 </tr><tr>
-<td><a href="#AssistantEricPlugin.prepareUninstall">prepareUninstall</a></td>
-<td>Public method to prepare for an uninstallation.</td>
-</tr><tr>
 <td><a href="#AssistantEricPlugin.setPreferences">setPreferences</a></td>
 <td>Public method to store the various refactoring settings.</td>
 </tr>
@@ -178,12 +175,7 @@
 <dd>
 the requested refactoring setting
 </dd>
-</dl><a NAME="AssistantEricPlugin.prepareUninstall" ID="AssistantEricPlugin.prepareUninstall"></a>
-<h4>AssistantEricPlugin.prepareUninstall</h4>
-<b>prepareUninstall</b>(<i></i>)
-<p>
-        Public method to prepare for an uninstallation.
-</p><a NAME="AssistantEricPlugin.setPreferences" ID="AssistantEricPlugin.setPreferences"></a>
+</dl><a NAME="AssistantEricPlugin.setPreferences" ID="AssistantEricPlugin.setPreferences"></a>
 <h4>AssistantEricPlugin.setPreferences</h4>
 <b>setPreferences</b>(<i>key, value</i>)
 <p>
--- a/PluginAssistantEric.py	Fri Sep 28 18:01:37 2012 +0200
+++ b/PluginAssistantEric.py	Tue Nov 06 17:43:14 2012 +0100
@@ -88,14 +88,15 @@
     """
     Module function to prepare for an uninstallation.
     """
-    assistant = AssistantEricPlugin(None)
-    assistant.prepareUninstall()
+    Preferences.Prefs.settings.remove(AssistantEricPlugin.PreferencesKey)
     
 
 class AssistantEricPlugin(QObject):
     """
     Class implementing the Eric assistant plugin.
     """
+    PreferencesKey = "AssistantEric"
+    
     def __init__(self, ui):
         """
         Constructor
@@ -225,10 +226,10 @@
                    "CalltipsEnabled", "CallTipsContextShown",
                    "CallTipsFollowHierarchy"]:
             return Preferences.toBool(Preferences.Prefs.settings.value(
-                "AssistantEric/" + key, self.__defaults[key]))
+                self.PreferencesKey + "/" + key, self.__defaults[key]))
         else:
-            return int(Preferences.Prefs.settings.value("AssistantEric/" + key,
-                self.__defaults[key]))
+            return int(Preferences.Prefs.settings.value(
+                self.PreferencesKey + "/" + key, self.__defaults[key]))
     
     def setPreferences(self, key, value):
         """
@@ -238,13 +239,7 @@
         @param value the value to be set
         @param prefClass preferences class used as the storage area
         """
-        Preferences.Prefs.settings.setValue("AssistantEric/" + key, value)
+        Preferences.Prefs.settings.setValue(self.PreferencesKey + "/" + key, value)
         
         if key in ["AutoCompletionEnabled", "CalltipsEnabled"]:
             self.__object.setEnabled(key, value)
-    
-    def prepareUninstall(self):
-        """
-        Public method to prepare for an uninstallation.
-        """
-        Preferences.Prefs.settings.remove("AssistantEric")
Binary file PluginAssistantEric.zip has changed

eric ide

mercurial