[QGIS Commit] r12487 - in trunk/qgis/python: . plugins/plugin_installer

svn_qgis at osgeo.org svn_qgis at osgeo.org
Tue Dec 15 19:37:02 EST 2009


Author: borysiasty
Date: 2009-12-15 19:37:01 -0500 (Tue, 15 Dec 2009)
New Revision: 12487

Modified:
   trunk/qgis/python/plugins/plugin_installer/__init__.py
   trunk/qgis/python/plugins/plugin_installer/installer_gui.py
   trunk/qgis/python/utils.py
Log:
Plugin installer update - rest of the r12476

Modified: trunk/qgis/python/plugins/plugin_installer/__init__.py
===================================================================
--- trunk/qgis/python/plugins/plugin_installer/__init__.py	2009-12-15 23:55:01 UTC (rev 12486)
+++ trunk/qgis/python/plugins/plugin_installer/__init__.py	2009-12-16 00:37:01 UTC (rev 12487)
@@ -15,7 +15,7 @@
   return "Plugin Installer"
 
 def version():
-  return "Version 1.0.6"
+  return "Version 1.0.7"
 
 def description():
   return "Downloads and installs QGIS python plugins"

Modified: trunk/qgis/python/plugins/plugin_installer/installer_gui.py
===================================================================
--- trunk/qgis/python/plugins/plugin_installer/installer_gui.py	2009-12-15 23:55:01 UTC (rev 12486)
+++ trunk/qgis/python/plugins/plugin_installer/installer_gui.py	2009-12-16 00:37:01 UTC (rev 12487)
@@ -599,11 +599,17 @@
       plugin = plugins.all()[key]
       if not plugin["error"]:
         if previousStatus in ["not installed", "new"]:
-          if QGIS_14: infoString = (self.tr("Plugin installed successfully"), self.tr("Plugin installed successfully"))
+          if QGIS_14: 
+            infoString = (self.tr("Plugin installed successfully"), self.tr("Plugin installed successfully"))
+            settings = QSettings()
+            settings.setValue("/PythonPlugins/"+plugin["localdir"], QVariant(True))
           else: infoString = (self.tr("Plugin installed successfully"), self.tr("Python plugin installed.\nNow you need to enable it in Plugin Manager."))
         else:
           infoString = (self.tr("Plugin reinstalled successfully"), self.tr("Python plugin reinstalled.\nYou need to restart Quantum GIS in order to reload it."))
-        startPlugin(plugin["localdir"])
+        try:
+          startPlugin(plugin["localdir"])
+        except:
+          pass
       else:
         if plugin["error"] == "incompatible":
           message = self.tr("The plugin is designed for a newer version of Quantum GIS. The minimum required version is:")

Modified: trunk/qgis/python/utils.py
===================================================================
--- trunk/qgis/python/utils.py	2009-12-15 23:55:01 UTC (rev 12486)
+++ trunk/qgis/python/utils.py	2009-12-16 00:37:01 UTC (rev 12487)
@@ -153,6 +153,8 @@
 def unloadPlugin(packageName):
   """ unload and delete plugin! """
   global plugins
+  
+  if not plugins.has_key(packageName): return False
 
   try:
     plugins[packageName].unload()



More information about the QGIS-commit mailing list