diff options
Diffstat (limited to 'src/leap/baseapp/mainwindow.py')
-rw-r--r-- | src/leap/baseapp/mainwindow.py | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/src/leap/baseapp/mainwindow.py b/src/leap/baseapp/mainwindow.py index 02adab65..b1e5bccf 100644 --- a/src/leap/baseapp/mainwindow.py +++ b/src/leap/baseapp/mainwindow.py @@ -57,10 +57,10 @@ class LeapWindow(QtGui.QMainWindow, settings = QtCore.QSettings() self.provider_domain = settings.value("provider_domain", None) - self.eip_username = settings.value("eip_username", None) + self.username = settings.value("username", None) logger.debug('provider: %s', self.provider_domain) - logger.debug('eip_username: %s', self.eip_username) + logger.debug('username: %s', self.username) provider = self.provider_domain EIPConductorAppMixin.__init__( @@ -100,11 +100,11 @@ class LeapWindow(QtGui.QMainWindow, self.startStopButton.clicked.connect( lambda: self.start_or_stopVPN()) self.start_eipconnection.connect( - lambda: self.start_or_stopVPN()) + self.do_start_eipconnection) self.shutdownSignal.connect( self.cleanupAndQuit) self.initNetworkChecker.connect( - lambda: self.init_network_checker(self.provider_domain)) + lambda: self.init_network_checker(self.conductor.provider)) # status change. # TODO unify @@ -147,9 +147,9 @@ class LeapWindow(QtGui.QMainWindow, # launch wizard if needed if need_wizard: + logger.debug('running first run wizard') self.launch_first_run_wizard() else: # no wizard needed - logger.debug('running first run wizard') self.initReady.emit() def launch_first_run_wizard(self): @@ -160,7 +160,7 @@ class LeapWindow(QtGui.QMainWindow, wizard = FirstRunWizard( self.conductor, parent=self, - eip_username=self.eip_username, + username=self.username, start_eipconnection_signal=self.start_eipconnection, eip_statuschange_signal=self.eipStatusChange, quitcallback=self.onWizardCancel) @@ -174,5 +174,16 @@ class LeapWindow(QtGui.QMainWindow, self.cleanupAndQuit() def runchecks_and_eipconnect(self): + """ + shows icon and run init checks + """ self.show_systray_icon() self.initchecks.begin() + + def do_start_eipconnection(self): + """ + shows icon and init eip connection + called from the end of wizard + """ + self.show_systray_icon() + self.start_or_stopVPN() |