summaryrefslogtreecommitdiff
path: root/src/leap/bitmask/gui
diff options
context:
space:
mode:
authorIvan Alejandro <ivanalejandro0@gmail.com>2013-10-14 16:08:00 -0300
committerIvan Alejandro <ivanalejandro0@gmail.com>2013-10-14 16:14:03 -0300
commit0935a0f0b7ba3e53cba0914db8efbeb0960b77cb (patch)
tree8e4d44b69d1f7dc8093c7bd20e8bdda7c8ffbfc7 /src/leap/bitmask/gui
parent83d18a36423736b3e703c9f3d3dccd619d3fa335 (diff)
Always display first run wizard on first run.
* Display the wizard only the first time or if we don't have any provider configured. * Remove unused proper provider setting. * If we have a working provider (as a pinned one), the wizard won't show automatically after being displayed the first time. * If we cancel the first time wizard and we have a configured provider (like the pinned one) the app will not close.
Diffstat (limited to 'src/leap/bitmask/gui')
-rw-r--r--src/leap/bitmask/gui/mainwindow.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/leap/bitmask/gui/mainwindow.py b/src/leap/bitmask/gui/mainwindow.py
index 69545751..bb5c4e64 100644
--- a/src/leap/bitmask/gui/mainwindow.py
+++ b/src/leap/bitmask/gui/mainwindow.py
@@ -365,7 +365,12 @@ class MainWindow(QtGui.QMainWindow):
"""
if self._wizard_firstrun:
self._settings.set_properprovider(False)
- self.quit()
+ providers = self._settings.get_configured_providers()
+ has_provider_on_disk = len(providers) != 0
+ if not has_provider_on_disk:
+ # if we don't have any provider configured (included a pinned
+ # one) we can't use the application, so quit.
+ self.quit()
else:
self._finish_init()
@@ -393,6 +398,7 @@ class MainWindow(QtGui.QMainWindow):
if IS_MAC:
self._wizard.raise_()
self._wizard.finished.connect(self._wizard_finished)
+ self._settings.set_skip_first_run(True)
def _wizard_finished(self):
"""
@@ -783,8 +789,8 @@ class MainWindow(QtGui.QMainWindow):
"""
providers = self._settings.get_configured_providers()
has_provider_on_disk = len(providers) != 0
- is_proper_provider = self._settings.get_properprovider()
- return not (has_provider_on_disk and is_proper_provider)
+ skip_first_run = self._settings.get_skip_first_run()
+ return not (has_provider_on_disk and skip_first_run)
def _download_provider_config(self):
"""