Skip to content

Commit

Permalink
Plugin Installer small fixes
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@11270 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
borysiasty committed Aug 4, 2009
1 parent eb90ccc commit 1e36124
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion python/plugins/plugin_installer/__init__.py
Expand Up @@ -14,7 +14,7 @@ def name():
return "Plugin Installer"

def version():
return "Version 1.0.1"
return "Version 1.0.2"

def description():
return "Downloads and installs QGIS python plugins"
Expand Down
7 changes: 5 additions & 2 deletions python/plugins/plugin_installer/installer_data.py
Expand Up @@ -84,6 +84,7 @@ def setIface(qgisIface):
("Martin Dobias' Sandbox", "http://mapserver.sk/~wonder/qgis/plugins-sandbox.xml", ""),
("Aaron Racicot's Repository", "http://qgisplugins.z-pulley.com", ""),
("Barry Rowlingson's Repository", "http://www.maths.lancs.ac.uk/~rowlings/Qgis/Plugins/plugins.xml", ""),
("Volkan Kepoglu's Repository","http://ggit.metu.edu.tr/~volkan/plugins.xml", ""),
("GIS-Lab Repository", "http://gis-lab.info/programs/qgis/qgis-repo.xml", "")]


Expand Down Expand Up @@ -414,9 +415,11 @@ def xmlDownloaded(self,nr,state):
pluginNodes = reposXML.elementsByTagName("pyqgis_plugin")
if pluginNodes.size():
for i in range(pluginNodes.size()):
fileName = QFileInfo(pluginNodes.item(i).firstChildElement("download_url").text().trimmed()).fileName()
fileName = pluginNodes.item(i).firstChildElement("file_name").text().simplified()
if not fileName:
fileName = QFileInfo(pluginNodes.item(i).firstChildElement("download_url").text().trimmed().split("?")[0]).fileName()
name = fileName.section(".", 0, 0)
name = str(name)
name = unicode(name)
experimental = False
if pluginNodes.item(i).firstChildElement("experimental").text().simplified().toUpper() in ["TRUE","YES"]:
experimental = True
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/plugin_installer/installer_plugin.py
Expand Up @@ -159,7 +159,7 @@ def run(self, parent = None):
# display an error message for every unavailable reposioty, except the case if all repositories are unavailable!
if repositories.allUnavailable() and repositories.allUnavailable() != repositories.allEnabled():
for key in repositories.allUnavailable():
QMessageBox.warning(parent, QCoreApplication.translate("QgsPluginInstaller","QGIS Python Plugin Installer"), QCoreApplication.translate("QgsPluginInstaller","Error reading repository:") + u' %s\n%s' % (key,repositories.all()[key]["error"]))
QMessageBox.warning(parent, QCoreApplication.translate("QgsPluginInstaller","QGIS Python Plugin Installer"), QCoreApplication.translate("QgsPluginInstaller","Error reading repository:") + QString(' %s\n%s' % (key,repositories.all()[key]["error"])))

flags = Qt.WindowTitleHint | Qt.WindowSystemMenuHint | Qt.WindowMaximizeButtonHint
self.guiDlg = QgsPluginInstallerDialog(parent,flags)
Expand Down

0 comments on commit 1e36124

Please sign in to comment.