summaryrefslogtreecommitdiff
path: root/src/leap/gui/progress.py
diff options
context:
space:
mode:
authorkali <kali@leap.se>2012-11-27 00:12:22 +0900
committerkali <kali@leap.se>2012-11-27 00:43:01 +0900
commitd5136a5f3b2aa8b16e8341f2eb99d05993028acf (patch)
tree7ef847e02cb9d60fb38761d0001f41968ea5a23f /src/leap/gui/progress.py
parent7a263b8ee74cc92ba39796cd9ad48395adfa7450 (diff)
inline validation at register page.
inline widget and focus and red marks and whistles.
Diffstat (limited to 'src/leap/gui/progress.py')
-rw-r--r--src/leap/gui/progress.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/leap/gui/progress.py b/src/leap/gui/progress.py
index 4f3a7d81..6f13a1ac 100644
--- a/src/leap/gui/progress.py
+++ b/src/leap/gui/progress.py
@@ -202,6 +202,20 @@ class WithStepsMixIn(object):
t.begin()
self.threads.append(t)
+ def fail(self, err=None):
+ """
+ return failed state
+ and send error notification as
+ a nice side effect
+ """
+ wizard = self.wizard()
+ senderr = lambda err: wizard.set_validation_error(
+ self.current_page, err)
+ self.set_undone()
+ if err:
+ senderr(err)
+ return False
+
@QtCore.pyqtSlot()
def launch_checks(self):
self.do_checks()