diff options
author | kali <kali@leap.se> | 2012-12-07 02:16:25 +0900 |
---|---|---|
committer | kali <kali@leap.se> | 2012-12-12 04:27:51 +0900 |
commit | f40bfa7b674418f9903e826d20ad943efcc47807 (patch) | |
tree | 265d13a4381cbb47d5a937437c6ffc14534da64f /src/leap/gui/firstrun/wizard.py | |
parent | cb4c40c21cf19e8b61a7747067e4b9729209d4b0 (diff) |
register tests
Diffstat (limited to 'src/leap/gui/firstrun/wizard.py')
-rwxr-xr-x | src/leap/gui/firstrun/wizard.py | 32 |
1 files changed, 18 insertions, 14 deletions
diff --git a/src/leap/gui/firstrun/wizard.py b/src/leap/gui/firstrun/wizard.py index bd3fe903..89209401 100755 --- a/src/leap/gui/firstrun/wizard.py +++ b/src/leap/gui/firstrun/wizard.py @@ -49,12 +49,29 @@ TODO-ish: """ +def get_pages_dict(): + return OrderedDict(( + ('intro', firstrun.intro.IntroPage), + ('providerselection', + firstrun.providerselect.SelectProviderPage), + ('login', firstrun.login.LogInPage), + ('providerinfo', firstrun.providerinfo.ProviderInfoPage), + ('providersetupvalidation', + firstrun.providersetup.ProviderSetupValidationPage), + ('signup', firstrun.register.RegisterUserPage), + ('signupvalidation', + firstrun.regvalidation.RegisterUserValidationPage), + ('lastpage', firstrun.last.LastPage) + )) + + class FirstRunWizard(QtGui.QWizard): def __init__( self, conductor_instance, parent=None, + pages_dict=None, eip_username=None, providers=None, success_cb=None, is_provider_setup=False, @@ -115,20 +132,7 @@ class FirstRunWizard(QtGui.QWizard): self.is_previously_registered = bool(self.eip_username) self.from_login = False - pages_dict = OrderedDict(( - ('intro', firstrun.intro.IntroPage), - ('providerselection', - firstrun.providerselect.SelectProviderPage), - ('login', firstrun.login.LogInPage), - ('providerinfo', firstrun.providerinfo.ProviderInfoPage), - ('providersetupvalidation', - firstrun.providersetup.ProviderSetupValidationPage), - ('signup', firstrun.register.RegisterUserPage), - ('signupvalidation', - firstrun.regvalidation.RegisterUserValidationPage), - ('connecting', firstrun.connect.ConnectingPage), - ('lastpage', firstrun.last.LastPage) - )) + pages_dict = pages_dict or get_pages_dict() self.add_pages_from_dict(pages_dict) self.validation_errors = {} |