summaryrefslogtreecommitdiff
path: root/src/leap/gui
diff options
context:
space:
mode:
authorkali <kali@leap.se>2012-10-26 00:12:08 +0900
committerkali <kali@leap.se>2012-10-26 00:12:08 +0900
commit0590991d7777de473a7df21ed32e1fa7caa9cf4b (patch)
treebb9ec79ffb49920f6e2abeef1d105c8d47e9a75f /src/leap/gui
parenta0fc20884a02ccffe1f9a83440b5e2212853289a (diff)
user credentials saved on login/signup branches.
cert request is using magick decorator that retrieves the certificates using srp.
Diffstat (limited to 'src/leap/gui')
-rwxr-xr-xsrc/leap/gui/firstrunwizard.py21
1 files changed, 14 insertions, 7 deletions
diff --git a/src/leap/gui/firstrunwizard.py b/src/leap/gui/firstrunwizard.py
index 78f8afb5..4cad9c3f 100755
--- a/src/leap/gui/firstrunwizard.py
+++ b/src/leap/gui/firstrunwizard.py
@@ -28,10 +28,7 @@ except ImportError:
# We must be in 2.6
from leap.util.dicts import OrderedDict
-# XXX DEBUG
-logging.basicConfig()
logger = logging.getLogger(__name__)
-logger.setLevel(logging.DEBUG)
APP_LOGO = ':/images/leap-color-small.png'
@@ -194,22 +191,32 @@ class FirstRunWizard(QtGui.QWizard):
gather the info, update settings
and call the success callback if any has been passed.
"""
+ super(FirstRunWizard, self).accept()
+
+ # username and password are in different fields
+ # if they were stored in log_in or sign_up pages.
+ from_login = self.wizard().from_login
+ unamek_base = 'userName'
+ passwk_base = 'userPassword'
+ unamek = 'login_%s' % unamek_base if from_login else unamek_base
+ passwk = 'login_%s' % passwk_base if from_login else passwk_base
+
+ username = self.field(unamek)
+ password = self.field(passwk)
provider = self.field('provider_domain')
- username = self.field('userName')
- password = self.field('userPassword')
remember_pass = self.field('rememberPassword')
logger.debug('chosen provider: %s', provider)
logger.debug('username: %s', username)
logger.debug('remember password: %s', remember_pass)
- super(FirstRunWizard, self).accept()
- settings = QtCore.QSettings()
# we are assuming here that we only remember one username
# in the form username@provider.domain
# We probably could extend this to support some form of
# profiles.
+ settings = QtCore.QSettings()
+
settings.setValue("FirstRunWizardDone", True)
settings.setValue("provider_domain", provider)
full_username = "%s@%s" % (username, provider)