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

Proposed by Roberto Alsina
Status: Merged
Approved by: Roberto Alsina
Approved revision: 24
Merged at revision: 15
Proposed branch: lp:~ralsina/ubuntuone-windows-installer/fix_804600
Merge into: lp:ubuntuone-windows-installer
Diff against target: 281 lines (+183/-19)
5 files modified
data/qt/choose_sign_in.ui (+159/-0)
run-tests.bat (+7/-8)
ubuntuone_installer/gui/qt/gui.py (+9/-10)
ubuntuone_installer/gui/qt/setup_account.py (+2/-1)
ubuntuone_installer/gui/qt/tests/test_gui.py (+6/-0)
To merge this branch: bzr merge lp:~ralsina/ubuntuone-windows-installer/fix_804600
Reviewer Review Type Date Requested Status
Roberto Alsina (community) Approve
Natalia Bidart (community) Approve
Review via email: mp+66731@code.launchpad.net

Commit message

Bring the "choose sign in" page up to spec:

* Title
* Extra widget for a big image
* "Close window and setup later" button inside the page
* Added missing "Ubuntu One has installed!" label

Description of the change

Bring the "choose sign in" page up to spec:

* Title
* Extra widget for a big image
* "Close window and setup later" button inside the page
* Added missing "Ubuntu One has installed!" label

Wireframe:

https://bugs.launchpad.net/ubuntuone-windows-installer/+bug/804600/+attachment/2187322/+files/choose_signin_wireframe.png

Implemented:

https://bugs.launchpad.net/ubuntuone-windows-installer/+bug/804600/+attachment/2189757/+files/choose_sign_in_implemented.png

To test IRL (Windows)

In one terminal run the SSO client

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

In another terminal:

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

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

Merged trunk

21. By Roberto Alsina

Style fix

22. By Roberto Alsina

imports in alphabetical order

23. By Roberto Alsina

Removed useless back button

Revision history for this message
Natalia Bidart (nataliabidart) :
review: Approve
24. By Roberto Alsina

Move style checks to the top

Revision history for this message
Roberto Alsina (ralsina) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added file 'data/qt/choose_sign_in.ui'
2--- data/qt/choose_sign_in.ui 1970-01-01 00:00:00 +0000
3+++ data/qt/choose_sign_in.ui 2011-07-05 20:09:38 +0000
4@@ -0,0 +1,159 @@
5+<?xml version="1.0" encoding="UTF-8"?>
6+<ui version="4.0">
7+ <class>ChooseSignInPage</class>
8+ <widget class="QWizardPage" name="ChooseSignInPage">
9+ <property name="geometry">
10+ <rect>
11+ <x>0</x>
12+ <y>0</y>
13+ <width>541</width>
14+ <height>365</height>
15+ </rect>
16+ </property>
17+ <property name="windowTitle">
18+ <string>WizardPage</string>
19+ </property>
20+ <layout class="QVBoxLayout" name="verticalLayout_2">
21+ <item>
22+ <layout class="QHBoxLayout" name="horizontalLayout_2">
23+ <item>
24+ <spacer name="horizontalSpacer_3">
25+ <property name="orientation">
26+ <enum>Qt::Horizontal</enum>
27+ </property>
28+ <property name="sizeHint" stdset="0">
29+ <size>
30+ <width>40</width>
31+ <height>20</height>
32+ </size>
33+ </property>
34+ </spacer>
35+ </item>
36+ <item>
37+ <widget class="QLabel" name="image_label">
38+ <property name="sizePolicy">
39+ <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
40+ <horstretch>0</horstretch>
41+ <verstretch>0</verstretch>
42+ </sizepolicy>
43+ </property>
44+ <property name="minimumSize">
45+ <size>
46+ <width>400</width>
47+ <height>150</height>
48+ </size>
49+ </property>
50+ <property name="text">
51+ <string>image
52+
53+[This will be the same image as appears on Ubuntu One Home page on the web - in production]</string>
54+ </property>
55+ <property name="textFormat">
56+ <enum>Qt::PlainText</enum>
57+ </property>
58+ <property name="alignment">
59+ <set>Qt::AlignCenter</set>
60+ </property>
61+ <property name="wordWrap">
62+ <bool>true</bool>
63+ </property>
64+ </widget>
65+ </item>
66+ <item>
67+ <spacer name="horizontalSpacer_4">
68+ <property name="orientation">
69+ <enum>Qt::Horizontal</enum>
70+ </property>
71+ <property name="sizeHint" stdset="0">
72+ <size>
73+ <width>40</width>
74+ <height>20</height>
75+ </size>
76+ </property>
77+ </spacer>
78+ </item>
79+ </layout>
80+ </item>
81+ <item>
82+ <widget class="QLabel" name="message_label">
83+ <property name="text">
84+ <string>Ubuntu One has installed!</string>
85+ </property>
86+ <property name="alignment">
87+ <set>Qt::AlignCenter</set>
88+ </property>
89+ </widget>
90+ </item>
91+ <item>
92+ <layout class="QHBoxLayout" name="horizontalLayout">
93+ <item>
94+ <spacer name="horizontalSpacer_2">
95+ <property name="orientation">
96+ <enum>Qt::Horizontal</enum>
97+ </property>
98+ <property name="sizeHint" stdset="0">
99+ <size>
100+ <width>40</width>
101+ <height>20</height>
102+ </size>
103+ </property>
104+ </spacer>
105+ </item>
106+ <item>
107+ <layout class="QVBoxLayout" name="verticalLayout">
108+ <item>
109+ <widget class="QPushButton" name="existing_account_button">
110+ <property name="text">
111+ <string/>
112+ </property>
113+ </widget>
114+ </item>
115+ <item>
116+ <widget class="QPushButton" name="setup_account_button">
117+ <property name="text">
118+ <string/>
119+ </property>
120+ </widget>
121+ </item>
122+ <item>
123+ <widget class="QPushButton" name="cancel_button">
124+ <property name="text">
125+ <string/>
126+ </property>
127+ </widget>
128+ </item>
129+ </layout>
130+ </item>
131+ <item>
132+ <spacer name="horizontalSpacer">
133+ <property name="orientation">
134+ <enum>Qt::Horizontal</enum>
135+ </property>
136+ <property name="sizeHint" stdset="0">
137+ <size>
138+ <width>40</width>
139+ <height>20</height>
140+ </size>
141+ </property>
142+ </spacer>
143+ </item>
144+ </layout>
145+ </item>
146+ <item>
147+ <spacer name="verticalSpacer">
148+ <property name="orientation">
149+ <enum>Qt::Vertical</enum>
150+ </property>
151+ <property name="sizeHint" stdset="0">
152+ <size>
153+ <width>20</width>
154+ <height>76</height>
155+ </size>
156+ </property>
157+ </spacer>
158+ </item>
159+ </layout>
160+ </widget>
161+ <resources/>
162+ <connections/>
163+</ui>
164
165=== modified file 'run-tests.bat'
166--- run-tests.bat 2011-06-27 09:59:13 +0000
167+++ run-tests.bat 2011-07-05 20:09:38 +0000
168@@ -47,15 +47,7 @@
169 ECHO Please ensure you have python installed
170 GOTO :END
171
172-
173 :PYTHONPRESENT
174-ECHO Python found, building auto-generated modules...
175-:: call setup.py build so that the qt uic is called
176-::START "Build code" /D%CD% /WAIT "%PYTHONEXEPATH%\python.exe" setup.py build
177-"%PYTHONEXEPATH%\python.exe" setup.py build
178-ECHO Running tests
179-:: execute the tests with a number of ignored linux only modules
180-"%PYTHONEXEPATH%\python.exe" "%PYTHONEXEPATH%\Scripts\u1trial" ubuntuone_installer --gui --reactor=qt4
181 :: Clean the build from the setup.py
182 ECHO Cleaning the generated code before running the style checks...
183 "%PYTHONEXEPATH%\python.exe" setup.py clean
184@@ -68,3 +60,10 @@
185 RMDIR /s /q _trial_temp
186 RMDIR /s /q .coverage
187 :END
188+ECHO Python found, building auto-generated modules...
189+:: call setup.py build so that the qt uic is called
190+::START "Build code" /D%CD% /WAIT "%PYTHONEXEPATH%\python.exe" setup.py build
191+"%PYTHONEXEPATH%\python.exe" setup.py build
192+ECHO Running tests
193+:: execute the tests with a number of ignored linux only modules
194+"%PYTHONEXEPATH%\python.exe" "%PYTHONEXEPATH%\Scripts\u1trial" ubuntuone_installer --gui --reactor=qt4
195
196=== modified file 'ubuntuone_installer/gui/qt/gui.py'
197--- ubuntuone_installer/gui/qt/gui.py 2011-07-04 20:05:19 +0000
198+++ ubuntuone_installer/gui/qt/gui.py 2011-07-05 20:09:38 +0000
199@@ -33,8 +33,6 @@
200 ForgottenPasswordPage,
201 ResetPasswordPage,
202 )
203-from ubuntu_sso.qt.choose_sign_in_ui import \
204- Ui_ChooseSignInPage
205 from ubuntu_sso.qt.current_user_sign_in_ui import \
206 Ui_CurrentUserSignInPage
207 from ubuntu_sso.qt.email_verification_ui import \
208@@ -66,8 +64,9 @@
209
210 from ubuntuone_installer.logger import setup_logging
211 from ubuntuone_installer.gui.qt.ui import (
212+ choose_sign_in_ui,
213+ congratulations_ui,
214 license_ui,
215- congratulations_ui,
216 setup_account_ui
217 )
218 from ubuntuone_installer.gui.qt.local_folders import LocalFoldersPage
219@@ -156,14 +155,13 @@
220
221 def initializePage(self):
222 """Setup UI details."""
223- self.setButtonText(QtGui.QWizard.CancelButton,
224- _("Close window and setup later"))
225+ self.ui.cancel_button.setText(_("Close window and setup later"))
226+ self.ui.cancel_button.clicked.connect(self.wizard().reject)
227 # Layout without custom button 1,
228 # without finish button
229+ # without cancel
230 self.wizard().setButtonLayout([
231- QtGui.QWizard.CancelButton,
232 QtGui.QWizard.Stretch,
233- QtGui.QWizard.BackButton,
234 QtGui.QWizard.NextButton,
235 ])
236
237@@ -308,9 +306,10 @@
238
239 #SSO Pages
240 self.sign_in_controller = ChooseSignInController(title=SIGN_IN)
241- self.sign_in_page = SignInPage(ui=Ui_ChooseSignInPage(),
242- controller=self.sign_in_controller,
243- parent=self)
244+ self.sign_in_page = SignInPage(
245+ ui=choose_sign_in_ui.Ui_ChooseSignInPage(),
246+ controller=self.sign_in_controller,
247+ parent=self)
248 self.setup_controller = SetUpAccountController()
249 self.setup_account = SetupAccountPage(
250 setup_account_ui.Ui_SetUpAccountPage(),
251
252=== modified file 'ubuntuone_installer/gui/qt/setup_account.py'
253--- ubuntuone_installer/gui/qt/setup_account.py 2011-07-01 21:37:58 +0000
254+++ ubuntuone_installer/gui/qt/setup_account.py 2011-07-05 20:09:38 +0000
255@@ -78,7 +78,8 @@
256 self.confirm_email_assistance)
257 self.confirm_email_assistance()
258 self.ui.password_edit.textEdited.connect(self.password_assistance)
259- self.ui.confirm_password_edit.textEdited.connect(self.password_assistance)
260+ self.ui.confirm_password_edit.textEdited.connect(
261+ self.password_assistance)
262 self.password_assistance()
263
264 def name_assistance(self):
265
266=== modified file 'ubuntuone_installer/gui/qt/tests/test_gui.py'
267--- ubuntuone_installer/gui/qt/tests/test_gui.py 2011-07-01 21:08:26 +0000
268+++ ubuntuone_installer/gui/qt/tests/test_gui.py 2011-07-05 20:09:38 +0000
269@@ -170,6 +170,12 @@
270 ((), {'title': gui.SIGN_IN,
271 'subtitle': gui.SIGN_IN_SUBTITLE}))
272
273+ def test_choose_signin_cancel(self):
274+ """Test that the custom cancel button works."""
275+ self.ui.sign_in_page.ui.cancel_button.click()
276+ QtCore.QCoreApplication.instance().processEvents()
277+ self.assertEqual(self.ui.result(), self.ui.Rejected)
278+
279
280 class SSOGuiTestCase(BaseTestCase):
281 """Test the custom SSO GUI."""

Subscribers

People subscribed via source and target branches