summaryrefslogtreecommitdiff
path: root/src/leap/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/leap/gui')
-rwxr-xr-xsrc/leap/gui/firstrunwizard.py22
1 files changed, 20 insertions, 2 deletions
diff --git a/src/leap/gui/firstrunwizard.py b/src/leap/gui/firstrunwizard.py
index b93dc8e9..cc70daab 100755
--- a/src/leap/gui/firstrunwizard.py
+++ b/src/leap/gui/firstrunwizard.py
@@ -88,8 +88,11 @@ QLabel { color: red;
class FirstRunWizard(QtGui.QWizard):
def __init__(self, parent=None, providers=None, success_cb=None):
- super(FirstRunWizard, self).__init__(parent)
+ super(FirstRunWizard, self).__init__(
+ parent,
+ QtCore.Qt.WindowStaysOnTopHint)
+ # XXX hardcoded for tests
if not providers:
providers = ('springbok',)
self.providers = providers
@@ -116,6 +119,16 @@ class FirstRunWizard(QtGui.QWizard):
# TODO: set style for MAC / windows ...
#self.setWizardStyle()
+ def setWindowFlags(self, flags):
+ logger.debug('setting window flags')
+ QtGui.QWizard.setWindowFlags(self, flags)
+
+ def focusOutEvent(self, event):
+ self.setFocus(True)
+ self.activateWindow()
+ self.raise_()
+ self.show()
+
def accept(self):
print 'chosen provider: ', self.get_provider()
print 'username: ', self.field('userName')
@@ -219,8 +232,13 @@ class RegisterUserPage(QtGui.QWizardPage):
userNameLineEdit = QtGui.QLineEdit()
userNameLineEdit.cursorPositionChanged.connect(
self.reset_validation_status)
+ userNameLabel.setBuddy(userNameLineEdit)
+ # TODO
+ # add validator
+ # usernameRe = QRegexp(r"[]")
+ # userNameLineEdit.setValidator(
+ # QRegExpValidator(usernameRe, self))
self.userNameLineEdit = userNameLineEdit
- userNameLabel.setBuddy(self.userNameLineEdit)
userPasswordLabel = QtGui.QLabel("&Password:")
self.userPasswordLineEdit = QtGui.QLineEdit()