summaryrefslogtreecommitdiff
path: root/src/leap/gui/firstrun
diff options
context:
space:
mode:
authorkali <kali@leap.se>2012-11-22 06:26:02 +0900
committerkali <kali@leap.se>2012-11-22 06:28:24 +0900
commit60ae69dd79fc4a17e54e9f898b04c7130d8b9f6e (patch)
tree2f7f65e30d637fcb78d8780cf52f523cbc32eaa4 /src/leap/gui/firstrun
parentf9a3e2cf6c4f7398411788974a2a6a9a53c9a1ab (diff)
fix widgets focus on providerselect page
it works with enter, enter, enter :) dedicated to DJ Focus...
Diffstat (limited to 'src/leap/gui/firstrun')
-rw-r--r--src/leap/gui/firstrun/login.py1
-rw-r--r--src/leap/gui/firstrun/providerselect.py13
2 files changed, 11 insertions, 3 deletions
diff --git a/src/leap/gui/firstrun/login.py b/src/leap/gui/firstrun/login.py
index 4271c774..004fa7d4 100644
--- a/src/leap/gui/firstrun/login.py
+++ b/src/leap/gui/firstrun/login.py
@@ -139,6 +139,7 @@ class LogInPage(QtGui.QWizardPage, UserFormMixIn):
def initializePage(self):
super(LogInPage, self).initializePage()
+ # XXX setPlaceholderText instead?!
self.userNameLineEdit.setText('username@provider.example.org')
self.userNameLineEdit.cursorPositionChanged.connect(
self.onUserNameEdit)
diff --git a/src/leap/gui/firstrun/providerselect.py b/src/leap/gui/firstrun/providerselect.py
index 0250ab8c..d029b1db 100644
--- a/src/leap/gui/firstrun/providerselect.py
+++ b/src/leap/gui/firstrun/providerselect.py
@@ -61,6 +61,9 @@ class SelectProviderPage(InlineValidationPage):
self.launchChecks.connect(
self.launch_checks)
+ self.providerNameEdit.editingFinished.connect(
+ lambda: self.providerCheckButton.setFocus(True))
+
def setupUI(self):
"""
initializes the UI
@@ -94,7 +97,7 @@ class SelectProviderPage(InlineValidationPage):
validationMsg = QtGui.QLabel("")
validationMsg.setStyleSheet(styles.ErrorLabelStyleSheet)
self.validationMsg = validationMsg
- providerCheckButton = QtGui.QPushButton(self.tr("chec&k"))
+ providerCheckButton = QtGui.QPushButton(self.tr("chec&k!"))
self.providerCheckButton = providerCheckButton
# cert info
@@ -238,7 +241,6 @@ class SelectProviderPage(InlineValidationPage):
else:
return True
-
logger.debug('checking name resolution')
yield(("check name", 20), namecheck)
@@ -349,9 +351,14 @@ class SelectProviderPage(InlineValidationPage):
called after _do_checks has finished.
"""
self.domain_checked = True
+ self.completeChanged.emit()
+ # let's set focus...
if self.is_done:
self.wizard().clean_validation_error(self.current_page)
- self.completeChanged.emit()
+ nextbutton = self.wizard().button(QtGui.QWizard.NextButton)
+ nextbutton.setFocus()
+ else:
+ self.providerNameEdit.setFocus()
# cert trust verification
# (disabled for now)