Merge lp:~ralsina/ubuntuone-windows-installer/fix_803677 into lp:ubuntuone-windows-installer

Proposed by Roberto Alsina
Status: Merged
Approved by: Natalia Bidart
Approved revision: 16
Merged at revision: 12
Proposed branch: lp:~ralsina/ubuntuone-windows-installer/fix_803677
Merge into: lp:ubuntuone-windows-installer
Diff against target: 127 lines (+30/-8)
2 files modified
ubuntuone_installer/gui/qt/gui.py (+23/-7)
ubuntuone_installer/gui/qt/tests/test_gui.py (+7/-1)
To merge this branch: bzr merge lp:~ralsina/ubuntuone-windows-installer/fix_803677
Reviewer Review Type Date Requested Status
Natalia Bidart (community) Approve
Alejandro J. Cura (community) Approve
Review via email: mp+66466@code.launchpad.net

Commit message

* Add labels for the fields in the "Existing user sign in" page.
* Add the required strings for those labels.
* Add the subtitle to the page.

Description of the change

* Add labels for the fields in the "Existing user sign in" page.
* Add the required strings for those labels.
* Add the subtitle to the page.

Requires lp:~ralsina/ubuntu-sso-client/fix_803661 on ubuntu-sso-client

This is a UI change, you need to see it IRL:

On one terminal, start the ubuntu-sso-client:

PYTHONPATH=.
python bin\windows-ubuntu-sso-login

On a second terminal, start the wizard:

PYTHONPATH=..\ubuntuone-client;..\ubuntu-sso-client;..\ubuntuone-control-panel;.
python bin\ubuntuone-installer-qt

Follow the wizard, and you should see this:

https://launchpadlibrarian.net/74361741/implemented_bug_803677.png

Compare to the current wireframe:

https://launchpadlibrarian.net/74317058/existing_user.png

Consider that the texts are not final, because there is no signed off copy for the SSO pages, and review accordingly.

To post a comment you must log in.
Revision history for this message
Alejandro J. Cura (alecu) wrote :

works for me!
Please just remove the space between the app_name and the text "username"

review: Approve
Revision history for this message
Natalia Bidart (nataliabidart) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'ubuntuone_installer/gui/qt/gui.py'
2--- ubuntuone_installer/gui/qt/gui.py 2011-06-29 14:46:21 +0000
3+++ ubuntuone_installer/gui/qt/gui.py 2011-06-30 20:31:26 +0000
4@@ -76,7 +76,9 @@
5 from ubuntuone_installer.gui.qt.sync_now_or_later import SyncNowOrLaterPage
6
7 _ = gettext.gettext
8-SIGN_IN = _("Sign In")
9+SIGN_IN = _("Sign in to Ubuntu One")
10+SIGN_IN_SUBTITLE = _("Sign in with your existing Ubuntu One"
11+ " username and password.")
12
13 # Invalid name logger
14 # pylint: disable=C0103
15@@ -91,7 +93,6 @@
16 super(LicensePage, self).__init__(parent)
17 self.ui = license_ui.Ui_Form()
18 self.ui.setupUi(self)
19- self.setCommitPage(False)
20
21 # Invalid names of Qt-inherited methods
22 # pylint: disable=C0103
23@@ -118,6 +119,7 @@
24 QtGui.QWizard.CustomButton1,
25 QtGui.QWizard.Stretch,
26 QtGui.QWizard.CancelButton,
27+ QtGui.QWizard.BackButton,
28 QtGui.QWizard.NextButton,
29 QtGui.QWizard.FinishButton,
30 ])
31@@ -161,6 +163,7 @@
32 self.wizard().setButtonLayout([
33 QtGui.QWizard.CancelButton,
34 QtGui.QWizard.Stretch,
35+ QtGui.QWizard.BackButton,
36 QtGui.QWizard.NextButton,
37 ])
38
39@@ -187,6 +190,18 @@
40 """Provide the next id."""
41 return self.next
42
43+ def initializePage(self):
44+ """Setup UI details."""
45+ self.setButtonText(QtGui.QWizard.CancelButton,
46+ _("Cancel"))
47+ # Layout without custom button 1,
48+ # without finish button
49+ self.wizard().setButtonLayout([
50+ QtGui.QWizard.Stretch,
51+ QtGui.QWizard.BackButton,
52+ QtGui.QWizard.CancelButton,
53+ ])
54+
55
56 class SuccessPage(QtGui.QWizardPage):
57 """Shown after SSO login, before setup."""
58@@ -246,6 +261,7 @@
59
60
61 class MainWindow(QtGui.QWizard):
62+
63 """The Main Window of the Installer wizard."""
64
65 # Invalid constant names and Qt-inherited methods
66@@ -273,6 +289,7 @@
67 self.ping_url = PING_URL
68
69 super(MainWindow, self).__init__()
70+ self.setWizardStyle(self.ModernStyle)
71 self.close_callback = close_callback
72
73 self.creds = Credentials(
74@@ -283,15 +300,13 @@
75 )
76
77 self.setOption(self.NoBackButtonOnStartPage, True)
78- self.setOption(self.DisabledBackButtonOnLastPage, True)
79- # PyQt doesn't support the (int, page) version of addPage
80+
81+ # PyQt doesn't support the (int, page) version of addPage, so
82 # Add the pages in the right order
83-
84 # pylint: disable=C0103
85 self.LICENSE_PAGE = self.addPage(LicensePage())
86
87 #SSO Pages
88-
89 self.sign_in_controller = ChooseSignInController(title=SIGN_IN)
90 self.sign_in_page = SignInPage(ui=Ui_ChooseSignInPage(),
91 controller=self.sign_in_controller,
92@@ -306,7 +321,8 @@
93 self.email_verification = EmailVerificationPage(
94 Ui_EmailVerificationPage(),
95 EmailVerificationController())
96- self.current_user_controller = CurrentUserController(SIGN_IN)
97+ self.current_user_controller = CurrentUserController(
98+ title=SIGN_IN, subtitle=SIGN_IN_SUBTITLE)
99 self.current_user = CurrentUserSignInPage(Ui_CurrentUserSignInPage(),
100 self.current_user_controller,
101 parent=self)
102
103=== modified file 'ubuntuone_installer/gui/qt/tests/test_gui.py'
104--- ubuntuone_installer/gui/qt/tests/test_gui.py 2011-06-29 15:10:54 +0000
105+++ ubuntuone_installer/gui/qt/tests/test_gui.py 2011-06-30 20:31:26 +0000
106@@ -58,7 +58,7 @@
107 """A fake controller for the tests."""
108
109 def __init__(self, *args, **kwargs):
110- pass
111+ self.args = (args, kwargs)
112
113 # pylint: disable=C0103
114 def setupUi(self, view):
115@@ -159,6 +159,12 @@
116 'ping_url': PING_URL,
117 })
118
119+ def test_current_user_controller_parameters(self):
120+ """Compare controller parameters with expected values."""
121+ self.assertEqual(self.ui.current_user_controller.args,
122+ ((), {'title': gui.SIGN_IN,
123+ 'subtitle': gui.SIGN_IN_SUBTITLE}))
124+
125
126 class SSOGuiTestCase(BaseTestCase):
127 """Test the custom SSO GUI."""

Subscribers

People subscribed via source and target branches