Skip to content

Commit

Permalink
Plugin installer update - rest of the r12476
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk@12487 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
borysiasty committed Dec 16, 2009
1 parent cacb43d commit 5e25228
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion python/plugins/plugin_installer/__init__.py
Expand Up @@ -15,7 +15,7 @@ def name():
return "Plugin Installer"

def version():
return "Version 1.0.6"
return "Version 1.0.7"

def description():
return "Downloads and installs QGIS python plugins"
Expand Down
10 changes: 8 additions & 2 deletions python/plugins/plugin_installer/installer_gui.py
Expand Up @@ -599,11 +599,17 @@ def installPlugin(self):
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:")
Expand Down
2 changes: 2 additions & 0 deletions python/utils.py
Expand Up @@ -153,6 +153,8 @@ def startPlugin(packageName):
def unloadPlugin(packageName):
""" unload and delete plugin! """
global plugins

if not plugins.has_key(packageName): return False

try:
plugins[packageName].unload()
Expand Down

0 comments on commit 5e25228

Please sign in to comment.