summaryrefslogtreecommitdiff
path: root/src/leap/bitmask/gui/mainwindow.py
diff options
context:
space:
mode:
authorIvan Alejandro <ivanalejandro0@gmail.com>2014-01-07 19:06:49 -0300
committerIvan Alejandro <ivanalejandro0@gmail.com>2014-01-09 14:27:42 -0300
commitf4a0747e216fb651628490f7849d2e4c9c6d8092 (patch)
tree622384d3b6c0845321735d1a3d172ce0dd414780 /src/leap/bitmask/gui/mainwindow.py
parentfc0663054c4f76c1103291c334bb60c0dff1280b (diff)
Warn the user on incompatible api error.
- Add a proper signal for the incompatible api error. - Warn the user of an incompatible api.
Diffstat (limited to 'src/leap/bitmask/gui/mainwindow.py')
-rw-r--r--src/leap/bitmask/gui/mainwindow.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/leap/bitmask/gui/mainwindow.py b/src/leap/bitmask/gui/mainwindow.py
index 1bbce8d4..8c512ad2 100644
--- a/src/leap/bitmask/gui/mainwindow.py
+++ b/src/leap/bitmask/gui/mainwindow.py
@@ -374,6 +374,7 @@ class MainWindow(QtGui.QMainWindow):
sig.prov_problem_with_provider.connect(self._login_problem_provider)
sig.prov_unsupported_client.connect(self._needs_update)
+ sig.prov_unsupported_api.connect(self._incompatible_api)
def _backend_disconnect(self):
"""
@@ -859,6 +860,16 @@ class MainWindow(QtGui.QMainWindow):
"You can get the latest version from {0}").format(url)
QtGui.QMessageBox.warning(self, self.tr("Update Needed"), msg)
+ def _incompatible_api(self):
+ """
+ Display a warning dialog to inform the user that the provider has an
+ incompatible API.
+ """
+ msg = self.tr(
+ "This provider is not compatible with the client.<br><br>"
+ "Error: API version incompatible.")
+ QtGui.QMessageBox.warning(self, self.tr("Incompatible Provider"), msg)
+
def changeEvent(self, e):
"""
Reimplements the changeEvent method to minimize to tray