summaryrefslogtreecommitdiff
path: root/src/leap/baseapp/leap_app.py
diff options
context:
space:
mode:
authorkali <kali@leap.se>2012-10-26 05:16:44 +0900
committerkali <kali@leap.se>2012-10-26 05:16:44 +0900
commit0a8a34879a701a2d045f628403c6a0f8be21dc82 (patch)
tree49728df8753cad8c135bb261209034803073f7de /src/leap/baseapp/leap_app.py
parentb66f946c9e7bbdf4bfb7ceb7ffcf340257b2165e (diff)
stop eip connection when first run wizard started
Closes #716
Diffstat (limited to 'src/leap/baseapp/leap_app.py')
-rw-r--r--src/leap/baseapp/leap_app.py19
1 files changed, 12 insertions, 7 deletions
diff --git a/src/leap/baseapp/leap_app.py b/src/leap/baseapp/leap_app.py
index d1acb8ba..4b63dd2f 100644
--- a/src/leap/baseapp/leap_app.py
+++ b/src/leap/baseapp/leap_app.py
@@ -52,7 +52,7 @@ class MainWindowMixin(object):
self.firstRunWizardAct = QtGui.QAction(
"&First run wizard...", self,
- triggered=self.launch_first_run_wizard)
+ triggered=self.stop_connection_and_launch_first_run_wizard)
self.aboutAct = QtGui.QAction("&About", self, triggered=self.about)
#self.aboutQtAct = QtGui.QAction("About &Qt", self,
@@ -74,16 +74,21 @@ class MainWindowMixin(object):
self.menuBar().addMenu(self.settingsMenu)
self.menuBar().addMenu(self.helpMenu)
- def launch_first_run_wizard(self):
+ def stop_connection_and_launch_first_run_wizard(self):
settings = QtCore.QSettings()
settings.setValue('FirstRunWizardDone', False)
logger.debug('should run first run wizard again...')
- from leap.gui.firstrunwizard import FirstRunWizard
- wizard = FirstRunWizard(
- parent=self,
- success_cb=self.initReady.emit)
- wizard.show()
+ status = self.conductor.get_icon_name()
+ if status != "disconnected":
+ self.start_or_stopVPN()
+
+ self.launch_first_run_wizard()
+ #from leap.gui.firstrunwizard import FirstRunWizard
+ #wizard = FirstRunWizard(
+ #parent=self,
+ #success_cb=self.initReady.emit)
+ #wizard.show()
def set_app_icon(self):
icon = QtGui.QIcon(APP_LOGO)