Skip to content

Commit 1e36124

Browse files
author
borysiasty
committed
Plugin Installer small fixes
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@11270 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent eb90ccc commit 1e36124

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

python/plugins/plugin_installer/__init__.py

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

1616
def version():
17-
return "Version 1.0.1"
17+
return "Version 1.0.2"
1818

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

python/plugins/plugin_installer/installer_data.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ def setIface(qgisIface):
8484
("Martin Dobias' Sandbox", "http://mapserver.sk/~wonder/qgis/plugins-sandbox.xml", ""),
8585
("Aaron Racicot's Repository", "http://qgisplugins.z-pulley.com", ""),
8686
("Barry Rowlingson's Repository", "http://www.maths.lancs.ac.uk/~rowlings/Qgis/Plugins/plugins.xml", ""),
87+
("Volkan Kepoglu's Repository","http://ggit.metu.edu.tr/~volkan/plugins.xml", ""),
8788
("GIS-Lab Repository", "http://gis-lab.info/programs/qgis/qgis-repo.xml", "")]
8889

8990

@@ -414,9 +415,11 @@ def xmlDownloaded(self,nr,state):
414415
pluginNodes = reposXML.elementsByTagName("pyqgis_plugin")
415416
if pluginNodes.size():
416417
for i in range(pluginNodes.size()):
417-
fileName = QFileInfo(pluginNodes.item(i).firstChildElement("download_url").text().trimmed()).fileName()
418+
fileName = pluginNodes.item(i).firstChildElement("file_name").text().simplified()
419+
if not fileName:
420+
fileName = QFileInfo(pluginNodes.item(i).firstChildElement("download_url").text().trimmed().split("?")[0]).fileName()
418421
name = fileName.section(".", 0, 0)
419-
name = str(name)
422+
name = unicode(name)
420423
experimental = False
421424
if pluginNodes.item(i).firstChildElement("experimental").text().simplified().toUpper() in ["TRUE","YES"]:
422425
experimental = True

python/plugins/plugin_installer/installer_plugin.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ def run(self, parent = None):
159159
# display an error message for every unavailable reposioty, except the case if all repositories are unavailable!
160160
if repositories.allUnavailable() and repositories.allUnavailable() != repositories.allEnabled():
161161
for key in repositories.allUnavailable():
162-
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"]))
162+
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"])))
163163

164164
flags = Qt.WindowTitleHint | Qt.WindowSystemMenuHint | Qt.WindowMaximizeButtonHint
165165
self.guiDlg = QgsPluginInstallerDialog(parent,flags)

0 commit comments

Comments
 (0)