Skip to content

Commit 358674c

Browse files
author
borysiasty
committed
Plugin installer update - rest of the r12476
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@12487 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent beb6e90 commit 358674c

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

python/plugins/plugin_installer/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ def name():
1515
return "Plugin Installer"
1616

1717
def version():
18-
return "Version 1.0.6"
18+
return "Version 1.0.7"
1919

2020
def description():
2121
return "Downloads and installs QGIS python plugins"

python/plugins/plugin_installer/installer_gui.py

+8-2
Original file line numberDiff line numberDiff line change
@@ -599,11 +599,17 @@ def installPlugin(self):
599599
plugin = plugins.all()[key]
600600
if not plugin["error"]:
601601
if previousStatus in ["not installed", "new"]:
602-
if QGIS_14: infoString = (self.tr("Plugin installed successfully"), self.tr("Plugin installed successfully"))
602+
if QGIS_14:
603+
infoString = (self.tr("Plugin installed successfully"), self.tr("Plugin installed successfully"))
604+
settings = QSettings()
605+
settings.setValue("/PythonPlugins/"+plugin["localdir"], QVariant(True))
603606
else: infoString = (self.tr("Plugin installed successfully"), self.tr("Python plugin installed.\nNow you need to enable it in Plugin Manager."))
604607
else:
605608
infoString = (self.tr("Plugin reinstalled successfully"), self.tr("Python plugin reinstalled.\nYou need to restart Quantum GIS in order to reload it."))
606-
startPlugin(plugin["localdir"])
609+
try:
610+
startPlugin(plugin["localdir"])
611+
except:
612+
pass
607613
else:
608614
if plugin["error"] == "incompatible":
609615
message = self.tr("The plugin is designed for a newer version of Quantum GIS. The minimum required version is:")

python/utils.py

+2
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,8 @@ def startPlugin(packageName):
153153
def unloadPlugin(packageName):
154154
""" unload and delete plugin! """
155155
global plugins
156+
157+
if not plugins.has_key(packageName): return False
156158

157159
try:
158160
plugins[packageName].unload()

0 commit comments

Comments
 (0)