Skip to content

Commit

Permalink
plugin installer update - fix #2247
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@12621 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
borysiasty committed Dec 26, 2009
1 parent 5279d7f commit 8d53ac4
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
2 changes: 1 addition & 1 deletion python/plugins/plugin_installer/__init__.py
Expand Up @@ -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"
Expand Down
8 changes: 6 additions & 2 deletions python/plugins/plugin_installer/installer_gui.py
Expand Up @@ -311,10 +311,14 @@ def getAllAvailablePlugins(self):
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


# ----------------------------------------- #
Expand Down
8 changes: 6 additions & 2 deletions python/plugins/plugin_installer/installer_plugin.py
Expand Up @@ -157,10 +157,14 @@ def run(self, parent = None):

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)
Expand Down

0 comments on commit 8d53ac4

Please sign in to comment.