Merge lp:~ralsina/ubuntu-sso-client/fix_805461 into lp:ubuntu-sso-client

Proposed by Roberto Alsina
Status: Merged
Approved by: Roberto Alsina
Approved revision: 734
Merged at revision: 730
Proposed branch: lp:~ralsina/ubuntu-sso-client/fix_805461
Merge into: lp:ubuntu-sso-client
Diff against target: 33 lines (+15/-1)
1 file modified
ubuntu_sso/qt/controllers.py (+15/-1)
To merge this branch: bzr merge lp:~ralsina/ubuntu-sso-client/fix_805461
Reviewer Review Type Date Requested Status
Alejandro J. Cura (community) Approve
Review via email: mp+66820@code.launchpad.net

Commit message

Expand a couple of variables that were left as placeholders in a text.

Description of the change

Expand a couple of variables that were left as placeholders in a text.

To post a comment you must log in.
732. By Roberto Alsina

Call _set_titles *after* the email_address field is set

Revision history for this message
Alejandro J. Cura (alecu) wrote :

Tested on windows, works as expected.

review: Approve
733. By Roberto Alsina

Don't use a private method

734. By Roberto Alsina

Style fix

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'ubuntu_sso/qt/controllers.py'
2--- ubuntu_sso/qt/controllers.py 2011-06-29 22:19:49 +0000
3+++ ubuntu_sso/qt/controllers.py 2011-07-04 19:54:40 +0000
4@@ -405,6 +405,9 @@
5 self.backend.register_user(self.view.wizard().app_name, email,
6 password, name, captcha_id,
7 captcha_solution)
8+ # Update validation page's title, which contains the email
9+ wizard = self.view.wizard()
10+ wizard.page(wizard.email_verification_page_id).controller.set_titles()
11
12 def is_correct_email(self, email_address):
13 """Return if the email is correct."""
14@@ -480,7 +483,18 @@
15 """Set the different titles."""
16 logger.debug('EmailVerificationController._set_titles')
17 self.view.setTitle(VERIFY_EMAIL_TITLE)
18- self.view.setSubTitle(VERIFY_EMAIL_CONTENT)
19+ self.view.setSubTitle(VERIFY_EMAIL_CONTENT % {
20+ "app_name": self.view.wizard().app_name,
21+ "email": self.view.wizard().field("email_address").toString(),
22+ })
23+
24+ def set_titles(self):
25+ """This class needs to have a public set_titles.
26+
27+ Since the subtitle contains data that is only known after SetupAccount
28+ and _set_titles is only called on initialization.
29+ """
30+ self._set_titles()
31
32 #pylint: disable=C0103
33 @inlineCallbacks

Subscribers

People subscribed via source and target branches