~mvo/ubuntu-sso-client/strawman-lp711413

« back to all changes in this revision

Viewing changes to ubuntu_sso/qt/ubuntu_sso_wizard.py

  • Committer: Tarmac
  • Author(s): Diego Sarmentero, Alejandro J. Cura, Natalia B. Bidart, Manuel de la Pena, Roberto Alsina, Rodney Dawes, Jeremy Bicha
  • Date: 2012-03-21 13:39:14 UTC
  • mfrom: (829.1.2 stable-3-0-update-2.99.91)
  • Revision ID: tarmac-20120321133914-cwlk2mgns4ygbnkj
- Updating from trunk up to revno 930:

[ Alejandro J. Cura <alecu@canonical.com> ]
  - Do not allow ssl errors to be ignored (LP: #959390).
  - Handle wrong credentials properly in qtnetwork webclient
    (LP: #957317).
  - Use HTTPClientFactory to allow replacing the reactor used to connect
    (LP: #929207).

[ Diego Sarmentero <diego.sarmentero@canonical.com> ]
  - Decode the content of help_text (LP: #951371).
  - Removed the title from the reset page.
  - Adding missing file for translation (LP: #951376).
  - Adding a general error message when the argument received by
    build_general_error_message is not a dict (LP: #865176).
  - Adding some checks to setup_page (LP: #951461).
  - Adding a padding to the right margin of the reset layout, and align
    one of its layout to the left (LP: #945065).
  - Executing hide_error when the user click the refresh captcha link,
    not inside of the _refresh_captcha method, because this is executed
    automatically when a captcha error is generated, so we will always
    miss the error message (LP: #955010).
  - Removing the align property from the label that wasn't necessary
    and was breakint the work wrap. Also adjust the height of the widget
    depending if it has more than one line (LP: #940392).
  - Improve logging operations (LP: #934500).
  - Making LINK_STYLE to be unicode (LP: #950953).
  - Setting the window title equal to the app_name (LP: #949744).
  - The _move_to_email_verification_page wasn't receiving the params
    that the signal emits (LP: #945066).

[ Jeremy Bicha <jbicha@ubuntu.com> ]
  - Improve the grammar for the CLOSE_AND_SETUP_LATER button text
    (LP: #949978).

[ Manuel de la Pena <manuel.delapena@canonical.com> ]
  - Changed the way in which we deal with proxies to work around bugs
    found in the QNetworkAccessManager (LP: #957313).
  - Stopped listening to the proxyAuthenticationRequired to avoid the
    dialog showing more than once (LP: #957170)
  - Made changes in the way the webclient is selected to ensure that qt
    is used when possible (LP: #957169)
  - Connected the WebKit browser correctly so that the tc page gets
    loaded (LP: #933081).
  - Added code to check if the browser with the t&c was already loaded.
    If it is just show the t&c page, otherwise perform the request
    (LP: #956185).
  - Added a translatable string to give more context of the ssl cert
    info to the user (LP: #948119).
  - Provided the logic required for the Qt webclient implementation to
    detect ssl errors and spawn the ssl dialog to allow the user accept
    the ssl cert exceptions (LP: #948134).
  - Changed the qt webclient implementation to use a proxy factory so
    that the correct proxy is chosen according to the request
    (LP: #950088).
  - Added the required code to allow the webclient use authenticated
    proxies and request the creds when needed (LP: #933727).

[ Natalia B. Bidart <natalia.bidart@canonical.com> ]
  - The tooltip should not be shown for titles and subtitles when
    no cut off was needed (LP: #949741).
  - Making the WizardHeader a reusable class.
  - Added some minor logging to build_general_error_msg.
  - Improved code for the 'sign in' button validation.

[ Roberto Alsina <roberto.alsina@canonical.com> ]
  - Made the ubuntu-sso-proxy-creds script crossplatform (LP: #958884).
  - Added .exe to the constant for binary names if needed (LP: #958778).
  - Enable platform-specific styling (LP: #953318).
  - Return the executable's dirname as BIN_DIR for frozen binaries
    (LP: #956187).
  - Only import DBus on Linux (LP: #956304).
  - Fixed tests so they work under non-ascii locales (LP: #951716).

[ Rodney Dawes <rodney.dawes@canonical.com> ]
  - Don't hard-code font sizes
  - Remove usage of weight property as a numeric; just use bold
    property instead (LP: #953062).

Show diffs side-by-side

added added

removed removed

Lines of Context:
30
30
    USER_SUCCESS,
31
31
)
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
141
141
 
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):
150
152
 
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',
 
156
            self.currentPage())
153
157
        self._next_id = self.reset_password_page_id
154
158
        self.next()
155
159
        self._next_id = -1
156
160
 
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',
 
164
            self.currentPage())
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
160
168
        self.next()
161
169
        self._next_id = -1
162
170
 
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',
 
174
            self.currentPage())
165
175
        self._next_id = self.setup_account_page_id
166
176
        self.next()
167
177
        self._next_id = -1
168
178
 
169
179
    def _move_to_login_page(self):
170
180
        """Move to the login page wizard."""
 
181
        logger.debug('Moving to CurrentUserSignInPage from: %s',
 
182
            self.currentPage())
171
183
        self._next_id = self.current_user_page_id
172
184
        self.next()
173
185
        self._next_id = -1
174
186
 
175
187
    def _move_to_success_page(self):
176
188
        """Move to the success page wizard."""
 
189
        logger.debug('Moving to SuccessPage from: %s',
 
190
            self.currentPage())
177
191
        self._next_id = self.success_page_id
178
192
        self.next()
179
193
        self.setButtonLayout([
186
200
 
187
201
    def _move_to_forgotten_page(self):
188
202
        """Move to the forgotten page wizard."""
 
203
        logger.debug('Moving to ForgottenPasswordPage from: %s',
 
204
            self.currentPage())
189
205
        self._next_id = self.forgotten_password_page_id
190
206
        self.next()
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)