plugin installer update - fix #2247

git-svn-id: http://svn.osgeo.org/qgis/trunk@12621 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
borysiasty 2009-12-26 23:37:48 +00:00
parent 974ef95358
commit 4099c4aa8a
3 changed files with 13 additions and 5 deletions

View File

@ -15,7 +15,7 @@ def name():
return "Plugin Installer"
def version():
return "Version 1.0.7"
return "Version 1.0.8"
def description():
return "Downloads and installs QGIS python plugins"

View File

@ -311,10 +311,14 @@ class QgsPluginInstallerDialog(QDialog, Ui_QgsPluginInstallerDialogBase):
for key in repositories.all():
repositories.killConnection(key)
# display error messages for every unavailable reposioty, except the case if all repositories are unavailable!
# display error messages for every unavailable reposioty, unless Shift pressed nor all repositories are unavailable
keepQuiet = QgsApplication.keyboardModifiers() == Qt.KeyboardModifiers(Qt.ShiftModifier)
if repositories.allUnavailable() and repositories.allUnavailable() != repositories.allEnabled():
for key in repositories.allUnavailable():
QMessageBox.warning(self, self.tr("QGIS Python Plugin Installer"), self.tr("Error reading repository:") + " " + key + "\n" + repositories.all()[key]["error"])
if not keepQuiet:
QMessageBox.warning(self, self.tr("QGIS Python Plugin Installer"), self.tr("Error reading repository:") + " " + key + "\n" + repositories.all()[key]["error"])
if QgsApplication.keyboardModifiers() == Qt.KeyboardModifiers(Qt.ShiftModifier):
keepQuiet = True
# ----------------------------------------- #

View File

@ -157,10 +157,14 @@ class InstallerPlugin():
QApplication.restoreOverrideCursor()
# display an error message for every unavailable reposioty, except the case if all repositories are unavailable!
# display error messages for every unavailable reposioty, unless Shift pressed nor all repositories are unavailable
keepQuiet = QgsApplication.keyboardModifiers() == Qt.KeyboardModifiers(Qt.ShiftModifier)
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:") + QString(' %s\n%s' % (key,repositories.all()[key]["error"])))
if not keepQuiet:
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"])))
if QgsApplication.keyboardModifiers() == Qt.KeyboardModifiers(Qt.ShiftModifier):
keepQuiet = True
flags = Qt.WindowTitleHint | Qt.WindowSystemMenuHint | Qt.WindowMaximizeButtonHint
self.guiDlg = QgsPluginInstallerDialog(parent,flags)