Skip to content

Commit 8d53ac4

Browse files
author
borysiasty
committed
plugin installer update - fix #2247
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@12621 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 5279d7f commit 8d53ac4

File tree

3 files changed

+13
-5
lines changed

3 files changed

+13
-5
lines changed

python/plugins/plugin_installer/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ def name():
1515
return "Plugin Installer"
1616

1717
def version():
18-
return "Version 1.0.7"
18+
return "Version 1.0.8"
1919

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

python/plugins/plugin_installer/installer_gui.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -311,10 +311,14 @@ def getAllAvailablePlugins(self):
311311
for key in repositories.all():
312312
repositories.killConnection(key)
313313

314-
# display error messages for every unavailable reposioty, except the case if all repositories are unavailable!
314+
# display error messages for every unavailable reposioty, unless Shift pressed nor all repositories are unavailable
315+
keepQuiet = QgsApplication.keyboardModifiers() == Qt.KeyboardModifiers(Qt.ShiftModifier)
315316
if repositories.allUnavailable() and repositories.allUnavailable() != repositories.allEnabled():
316317
for key in repositories.allUnavailable():
317-
QMessageBox.warning(self, self.tr("QGIS Python Plugin Installer"), self.tr("Error reading repository:") + " " + key + "\n" + repositories.all()[key]["error"])
318+
if not keepQuiet:
319+
QMessageBox.warning(self, self.tr("QGIS Python Plugin Installer"), self.tr("Error reading repository:") + " " + key + "\n" + repositories.all()[key]["error"])
320+
if QgsApplication.keyboardModifiers() == Qt.KeyboardModifiers(Qt.ShiftModifier):
321+
keepQuiet = True
318322

319323

320324
# ----------------------------------------- #

python/plugins/plugin_installer/installer_plugin.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,10 +157,14 @@ def run(self, parent = None):
157157

158158
QApplication.restoreOverrideCursor()
159159

160-
# display an error message for every unavailable reposioty, except the case if all repositories are unavailable!
160+
# display error messages for every unavailable reposioty, unless Shift pressed nor all repositories are unavailable
161+
keepQuiet = QgsApplication.keyboardModifiers() == Qt.KeyboardModifiers(Qt.ShiftModifier)
161162
if repositories.allUnavailable() and repositories.allUnavailable() != repositories.allEnabled():
162163
for key in repositories.allUnavailable():
163-
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"])))
164+
if not keepQuiet:
165+
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"])))
166+
if QgsApplication.keyboardModifiers() == Qt.KeyboardModifiers(Qt.ShiftModifier):
167+
keepQuiet = True
164168

165169
flags = Qt.WindowTitleHint | Qt.WindowSystemMenuHint | Qt.WindowMaximizeButtonHint
166170
self.guiDlg = QgsPluginInstallerDialog(parent,flags)

0 commit comments

Comments
 (0)