summaryrefslogtreecommitdiff
path: root/src/leap/gui/firstrun/register.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/leap/gui/firstrun/register.py')
-rw-r--r--src/leap/gui/firstrun/register.py18
1 files changed, 15 insertions, 3 deletions
diff --git a/src/leap/gui/firstrun/register.py b/src/leap/gui/firstrun/register.py
index 0a7ba34b..6d15c156 100644
--- a/src/leap/gui/firstrun/register.py
+++ b/src/leap/gui/firstrun/register.py
@@ -87,13 +87,25 @@ class RegisterUserPage(QtGui.QWizardPage, UserFormMixIn):
def populateErrors(self):
# XXX could move this to ValidationMixin
+ # used in providerselect too
- #logger.debug('getting errors')
errors = self.wizard().get_validation_error(
self.current_page)
if errors:
- #logger.debug('errors! -> %s', errors)
- self.validationMsg.setText(errors)
+ bad_str = getattr(self, 'bad_string', None)
+ cur_str = self.userNameLineEdit.text()
+ showerr = self.validationMsg.setText
+ if bad_str is None:
+ # first time we fall here.
+ # save the current bad_string value
+ self.bad_string = cur_str
+ showerr(errors)
+ else:
+ # not the first time
+ if cur_str == bad_str:
+ showerr(errors)
+ else:
+ showerr('')
def paintEvent(self, event):
"""