32
32
from ubuntu_sso.logger import setup_gui_logging
33
from ubuntu_sso.qt import PREFERED_UI_SIZE
33
from ubuntu_sso.qt import PREFERED_UI_SIZE, WINDOW_TITLE
34
34
from ubuntu_sso.qt.current_user_sign_in_page import CurrentUserSignInPage
35
35
from ubuntu_sso.qt.email_verification_page import EmailVerificationPage
36
36
from ubuntu_sso.qt.error_page import ErrorPage
142
142
def _go_back_to_page(self, page):
143
143
"""Move back until it reaches the 'page'."""
144
logger.debug('Moving back from page: %s, to page: %s',
145
self.currentPage(), page)
144
146
page_id = self._pages[page]
145
147
visited_pages = self.visitedPages()
146
148
for index in reversed(visited_pages):
151
153
def _move_to_reset_password_page(self):
152
154
"""Move to the reset password page wizard."""
155
logger.debug('Moving to ResetPasswordPage from: %s',
153
157
self._next_id = self.reset_password_page_id
155
159
self._next_id = -1
157
def _move_to_email_verification_page(self):
161
def _move_to_email_verification_page(self, email):
158
162
"""Move to the email verification page wizard."""
163
logger.debug('Moving to EmailVerificationPage from: %s',
159
165
self._next_id = self.email_verification_page_id
166
self.email_verification.email = unicode(email)
167
self.email_verification.password = self.currentPage().password
161
169
self._next_id = -1
163
171
def _move_to_setup_account_page(self):
164
172
"""Move to the setup account page wizard."""
173
logger.debug('Moving to SetupAccountPage from: %s',
165
175
self._next_id = self.setup_account_page_id
167
177
self._next_id = -1
169
179
def _move_to_login_page(self):
170
180
"""Move to the login page wizard."""
181
logger.debug('Moving to CurrentUserSignInPage from: %s',
171
183
self._next_id = self.current_user_page_id
173
185
self._next_id = -1
175
187
def _move_to_success_page(self):
176
188
"""Move to the success page wizard."""
189
logger.debug('Moving to SuccessPage from: %s',
177
191
self._next_id = self.success_page_id
179
193
self.setButtonLayout([
187
201
def _move_to_forgotten_page(self):
188
202
"""Move to the forgotten page wizard."""
203
logger.debug('Moving to ForgottenPasswordPage from: %s',
189
205
self._next_id = self.forgotten_password_page_id
191
207
self._next_id = -1
258
274
logger.debug('UbuntuSSOClientGUI: app_name %r, kwargs %r.',
259
275
app_name, kwargs)
260
276
self.app_name = app_name
277
self.setWindowTitle(WINDOW_TITLE)
261
278
# create the controller and the ui, then set the cb and call the show
262
279
# method so that we can work
263
280
self.wizard = UbuntuSSOWizard(app_name=app_name, **kwargs)