Skip to content
Permalink
Browse files

Plugin installer update

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@14472 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
borysiasty
borysiasty committed Nov 1, 2010
1 parent c3a42e3 commit 35638a27278d8843a92102af65d02a2c4dbf19fe
@@ -260,8 +260,8 @@ def __init__(self, parent, fl):
self.connect(self.treePlugins, SIGNAL("itemSelectionChanged()"), self.pluginTreeClicked)
self.connect(self.treeRepositories, SIGNAL("itemSelectionChanged()"), self.repositoryTreeClicked)
# buttons
self.connect(self.buttonInstall, SIGNAL("clicked()"), self.installPlugin)
self.connect(self.buttonUninstall, SIGNAL("clicked()"), self.uninstallPlugin)
self.connect(self.buttonInstall, SIGNAL("clicked()"), self.installPluginClicked)
self.connect(self.buttonUninstall, SIGNAL("clicked()"), self.uninstallPluginClicked)
self.buttonInstall.setEnabled(False)
self.buttonUninstall.setEnabled(False)
self.buttonHelp.setEnabled(QGIS_14)
@@ -564,12 +564,25 @@ def pluginTreeClicked(self):


# ----------------------------------------- #
def installPlugin(self):
""" install currently selected plugin """
def installPluginClicked(self):
if not self.treePlugins.currentItem():
return
key = plugins.keyByUrl(self.treePlugins.currentItem().toolTip(5))
self.installPlugin(key)


# ----------------------------------------- #
def uninstallPluginClicked(self):
if not self.treePlugins.currentItem():
return
infoString = ('','')
key = plugins.keyByUrl(self.treePlugins.currentItem().toolTip(5))
self.uninstallPlugin(key)


# ----------------------------------------- #
def installPlugin(self, key):
""" install currently selected plugin """
infoString = ('','')
plugin = plugins.all()[key]
previousStatus = plugin["status"]
if not plugin:
@@ -666,11 +679,8 @@ def installPlugin(self):


# ----------------------------------------- #
def uninstallPlugin(self):
def uninstallPlugin(self,key):
""" uninstall currently selected plugin """
if not self.treePlugins.currentItem():
return
key = plugins.keyByUrl(self.treePlugins.currentItem().toolTip(5))
plugin = plugins.all()[key]
if not plugin:
return
@@ -78,9 +78,14 @@ def initGui(self):
else:
for key in repositories.allEnabled():
repositories.setRepositoryData(key,"state",3)

for i in plugins.obsoletePlugins:
QMessageBox.warning(self.mainWindow(), QCoreApplication.translate("QgsPluginInstaller","QGIS Plugin Conflict:")+" "+plugins.localCache[i]["name"], "<b>"+ plugins.localCache[i]["name"] + "</b><br/><br/>" + QCoreApplication.translate("QgsPluginInstaller","The Plugin Installer has detected an obsolete plugin which masks a newer version shipped with this QGIS version. This is likely due to files associated with a previous installation of QGIS. Please use the Plugin Installer to remove that older plugin in order to unmask the newer version shipped with this copy of QGIS."))
if i == "plugin_installer":
# uninstall the installer itself
QMessageBox.warning(self.mainWindow(), QCoreApplication.translate("QgsPluginInstaller","QGIS Plugin Installer update"), QCoreApplication.translate("QgsPluginInstaller","The Plugin Installer has been updated. Please restart QGIS prior to using it"))
removeDir( QFileInfo(QgsApplication.qgisUserDbFilePath()).path() + "/python/plugins/" + plugins.localCache[i]["localdir"] )
return
else:
QMessageBox.warning(self.mainWindow(), QCoreApplication.translate("QgsPluginInstaller","QGIS Plugin Conflict:")+" "+plugins.localCache[i]["name"], "<b>"+ plugins.localCache[i]["name"] + "</b><br/><br/>" + QCoreApplication.translate("QgsPluginInstaller","The Plugin Installer has detected an obsolete plugin which masks a newer version shipped with this QGIS version. This is likely due to files associated with a previous installation of QGIS. Please use the Plugin Installer to remove that older plugin in order to unmask the newer version shipped with this copy of QGIS."))


# ----------------------------------------- #

0 comments on commit 35638a2

Please sign in to comment.
You can’t perform that action at this time.