Merge lp:~diegosarmentero/ubuntuone-windows-installer/installer-ui-style into lp:ubuntuone-windows-installer
- installer-ui-style
- Merge into trunk
Status: | Merged |
---|---|
Approved by: | dobey |
Approved revision: | 31 |
Merged at revision: | 23 |
Proposed branch: | lp:~diegosarmentero/ubuntuone-windows-installer/installer-ui-style |
Merge into: | lp:ubuntuone-windows-installer |
Diff against target: |
1514 lines (+701/-478) 15 files modified
data/qt/choose_sign_in.ui (+25/-2) data/qt/images.qrc (+1/-0) data/qt/setup_account.ui (+246/-135) data/qt/sign_in.ui (+3/-0) data/qt/ubuntuone.qss (+76/-48) ubuntuone_installer/gui/qt/are_you_sure.py (+47/-47) ubuntuone_installer/gui/qt/embedded_sso.py (+61/-61) ubuntuone_installer/gui/qt/gui.py (+50/-13) ubuntuone_installer/gui/qt/main/tests/test_main.py (+1/-1) ubuntuone_installer/gui/qt/main/windows.py (+52/-52) ubuntuone_installer/gui/qt/setup_account.py (+23/-3) ubuntuone_installer/gui/qt/tests/test_are_you_sure.py (+47/-47) ubuntuone_installer/gui/qt/tests/test_gui.py (+1/-1) ubuntuone_installer/gui/qt/tos.py (+64/-66) ubuntuone_installer/logger.py (+4/-2) |
To merge this branch: | bzr merge lp:~diegosarmentero/ubuntuone-windows-installer/installer-ui-style |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Roberto Alsina (community) | Approve | ||
Review via email:
|
Commit message
Several improves in Windows Installer UI.
Rearrange buttons positions.
Fixing some imports issues involving credentials.
Description of the change
Several improves in Windows Installer UI.
Rearrange buttons positions.
Fixing some imports issues involving credentials.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Ubuntu One Auto Pilot (otto-pilot) wrote : | # |
There was a problem validating some authors of the branch. Authors must be either one of the listed Launchpad users, or a member of one of the listed teams on Launchpad.
Persons or Teams:
contributor
ubuntuone-
Unaccepted Authors:
Diego Sarmentero <email address hidden>
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Ubuntu One Auto Pilot (otto-pilot) wrote : | # |
There was a problem validating some authors of the branch. Authors must be either one of the listed Launchpad users, or a member of one of the listed teams on Launchpad.
Persons or Teams:
contributor
ubuntuone-
Unaccepted Authors:
Diego Sarmentero <email address hidden>
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Ubuntu One Auto Pilot (otto-pilot) wrote : | # |
There was a problem validating some authors of the branch. Authors must be either one of the listed Launchpad users, or a member of one of the listed teams on Launchpad.
Persons or Teams:
contributor
ubuntuone-
Unaccepted Authors:
Diego Sarmentero <email address hidden>
Diego Sarmentero <email address hidden>
Preview Diff
1 | === added file 'data/Ubuntu-B.ttf' |
2 | Binary files data/Ubuntu-B.ttf 1970-01-01 00:00:00 +0000 and data/Ubuntu-B.ttf 2011-07-28 18:40:32 +0000 differ |
3 | === modified file 'data/qt/choose_sign_in.ui' |
4 | --- data/qt/choose_sign_in.ui 2011-07-13 03:14:18 +0000 |
5 | +++ data/qt/choose_sign_in.ui 2011-07-28 18:40:32 +0000 |
6 | @@ -15,6 +15,22 @@ |
7 | </property> |
8 | <layout class="QVBoxLayout" name="verticalLayout_2"> |
9 | <item> |
10 | + <spacer name="verticalSpacer"> |
11 | + <property name="orientation"> |
12 | + <enum>Qt::Vertical</enum> |
13 | + </property> |
14 | + <property name="sizeType"> |
15 | + <enum>QSizePolicy::Preferred</enum> |
16 | + </property> |
17 | + <property name="sizeHint" stdset="0"> |
18 | + <size> |
19 | + <width>10</width> |
20 | + <height>30</height> |
21 | + </size> |
22 | + </property> |
23 | + </spacer> |
24 | + </item> |
25 | + <item> |
26 | <layout class="QHBoxLayout" name="horizontalLayout_2"> |
27 | <item> |
28 | <spacer name="horizontalSpacer_3"> |
29 | @@ -77,6 +93,13 @@ |
30 | </item> |
31 | <item> |
32 | <widget class="QLabel" name="message_label"> |
33 | + <property name="font"> |
34 | + <font> |
35 | + <pointsize>11</pointsize> |
36 | + <weight>50</weight> |
37 | + <bold>false</bold> |
38 | + </font> |
39 | + </property> |
40 | <property name="text"> |
41 | <string>Ubuntu One has installed!</string> |
42 | </property> |
43 | @@ -144,14 +167,14 @@ |
44 | </layout> |
45 | </item> |
46 | <item> |
47 | - <spacer name="verticalSpacer"> |
48 | + <spacer name="verticalSpacer_2"> |
49 | <property name="orientation"> |
50 | <enum>Qt::Vertical</enum> |
51 | </property> |
52 | <property name="sizeHint" stdset="0"> |
53 | <size> |
54 | <width>20</width> |
55 | - <height>76</height> |
56 | + <height>50</height> |
57 | </size> |
58 | </property> |
59 | </spacer> |
60 | |
61 | === modified file 'data/qt/images.qrc' |
62 | --- data/qt/images.qrc 2011-07-13 03:14:18 +0000 |
63 | +++ data/qt/images.qrc 2011-07-28 18:40:32 +0000 |
64 | @@ -4,6 +4,7 @@ |
65 | <file>../password_hint_ok.png</file> |
66 | <file>../password_hint_warning.png</file> |
67 | <file>../Ubuntu-R.ttf</file> |
68 | + <file>../Ubuntu-B.ttf</file> |
69 | <file>ubuntuone.qss</file> |
70 | <file>../progress_arrow_grey.png</file> |
71 | <file>../u1_logo.png</file> |
72 | |
73 | === modified file 'data/qt/setup_account.ui' |
74 | --- data/qt/setup_account.ui 2011-07-22 18:53:04 +0000 |
75 | +++ data/qt/setup_account.ui 2011-07-28 18:40:32 +0000 |
76 | @@ -6,16 +6,19 @@ |
77 | <rect> |
78 | <x>0</x> |
79 | <y>0</y> |
80 | - <width>631</width> |
81 | - <height>527</height> |
82 | + <width>569</width> |
83 | + <height>521</height> |
84 | </rect> |
85 | </property> |
86 | <property name="windowTitle"> |
87 | <string>WizardPage</string> |
88 | </property> |
89 | <layout class="QVBoxLayout" name="verticalLayout"> |
90 | + <property name="rightMargin"> |
91 | + <number>0</number> |
92 | + </property> |
93 | <item> |
94 | - <layout class="QGridLayout" name="gridLayout" columnminimumwidth="1,250"> |
95 | + <layout class="QGridLayout" name="gridLayout" columnminimumwidth="300,250"> |
96 | <item row="0" column="0"> |
97 | <widget class="QLabel" name="password_info_label"> |
98 | <property name="sizePolicy"> |
99 | @@ -33,23 +36,83 @@ |
100 | </widget> |
101 | </item> |
102 | <item row="1" column="0"> |
103 | - <widget class="QLabel" name="name_label"> |
104 | + <layout class="QVBoxLayout" name="verticalLayout"> |
105 | + <property name="spacing"> |
106 | + <number>3</number> |
107 | + </property> |
108 | + <item> |
109 | + <widget class="QLabel" name="name_label"> |
110 | + <property name="font"> |
111 | + <font> |
112 | + <weight>75</weight> |
113 | + <bold>true</bold> |
114 | + </font> |
115 | + </property> |
116 | + <property name="text"> |
117 | + <string>name_label</string> |
118 | + </property> |
119 | + </widget> |
120 | + </item> |
121 | + <item> |
122 | + <widget class="QLineEdit" name="name_edit"> |
123 | + <property name="font"> |
124 | + <font> |
125 | + <pointsize>11</pointsize> |
126 | + </font> |
127 | + </property> |
128 | + </widget> |
129 | + </item> |
130 | + </layout> |
131 | + </item> |
132 | + <item row="1" column="1"> |
133 | + <widget class="QLabel" name="name_assistance"> |
134 | <property name="text"> |
135 | - <string>If you can't read this then <a href="example.com"><span style=" text-decoration: underline; color:#dd4814;">refresh</span></a> this page</span></string> |
136 | + <string>name_assistance</string> |
137 | + </property> |
138 | + <property name="alignment"> |
139 | + <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set> |
140 | + </property> |
141 | + <property name="indent"> |
142 | + <number>20</number> |
143 | </property> |
144 | </widget> |
145 | </item> |
146 | <item row="2" column="0"> |
147 | - <widget class="QLineEdit" name="name_edit"> |
148 | - <property name="placeholderText"> |
149 | - <string/> |
150 | + <layout class="QVBoxLayout" name="verticalLayout"> |
151 | + <property name="spacing"> |
152 | + <number>3</number> |
153 | </property> |
154 | - </widget> |
155 | + <item> |
156 | + <widget class="QLabel" name="email_label"> |
157 | + <property name="font"> |
158 | + <font> |
159 | + <weight>75</weight> |
160 | + <bold>true</bold> |
161 | + </font> |
162 | + </property> |
163 | + <property name="text"> |
164 | + <string>email_label</string> |
165 | + </property> |
166 | + </widget> |
167 | + </item> |
168 | + <item> |
169 | + <widget class="QLineEdit" name="email_edit"> |
170 | + <property name="font"> |
171 | + <font> |
172 | + <pointsize>11</pointsize> |
173 | + </font> |
174 | + </property> |
175 | + <property name="placeholderText"> |
176 | + <string/> |
177 | + </property> |
178 | + </widget> |
179 | + </item> |
180 | + </layout> |
181 | </item> |
182 | <item row="2" column="1"> |
183 | - <widget class="QLabel" name="name_assistance"> |
184 | + <widget class="QLabel" name="email_assistance"> |
185 | <property name="text"> |
186 | - <string>If you can't read this then <a href="example.com"><span style=" text-decoration: underline; color:#dd4814;">refresh</span></a> this page</span></string> |
187 | + <string>email_assistance</string> |
188 | </property> |
189 | <property name="indent"> |
190 | <number>20</number> |
191 | @@ -57,145 +120,187 @@ |
192 | </widget> |
193 | </item> |
194 | <item row="3" column="0"> |
195 | - <widget class="QLabel" name="email_label"> |
196 | + <layout class="QVBoxLayout" name="verticalLayout"> |
197 | + <property name="spacing"> |
198 | + <number>3</number> |
199 | + </property> |
200 | + <item> |
201 | + <widget class="QLabel" name="confirm_email_label"> |
202 | + <property name="font"> |
203 | + <font> |
204 | + <weight>75</weight> |
205 | + <bold>true</bold> |
206 | + </font> |
207 | + </property> |
208 | + <property name="text"> |
209 | + <string>confirm_email_label</string> |
210 | + </property> |
211 | + </widget> |
212 | + </item> |
213 | + <item> |
214 | + <widget class="QLineEdit" name="confirm_email_edit"> |
215 | + <property name="font"> |
216 | + <font> |
217 | + <pointsize>11</pointsize> |
218 | + </font> |
219 | + </property> |
220 | + <property name="placeholderText"> |
221 | + <string/> |
222 | + </property> |
223 | + </widget> |
224 | + </item> |
225 | + </layout> |
226 | + </item> |
227 | + <item row="3" column="1"> |
228 | + <widget class="QLabel" name="confirm_email_assistance"> |
229 | <property name="text"> |
230 | - <string>If you can't read this then <a href="example.com"><span style=" text-decoration: underline; color:#dd4814;">refresh</span></a> this page</span></string> |
231 | + <string>confirm_email_assistance</string> |
232 | + </property> |
233 | + <property name="indent"> |
234 | + <number>20</number> |
235 | </property> |
236 | </widget> |
237 | </item> |
238 | <item row="4" column="0"> |
239 | - <widget class="QLineEdit" name="email_edit"> |
240 | - <property name="placeholderText"> |
241 | - <string/> |
242 | - </property> |
243 | - </widget> |
244 | - </item> |
245 | - <item row="4" column="1"> |
246 | - <widget class="QLabel" name="email_assistance"> |
247 | - <property name="text"> |
248 | - <string>If you can't read this then <a href="example.com"><span style=" text-decoration: underline; color:#dd4814;">refresh</span></a> this page</span></string> |
249 | - </property> |
250 | - <property name="indent"> |
251 | - <number>20</number> |
252 | - </property> |
253 | - </widget> |
254 | + <layout class="QVBoxLayout" name="verticalLayout"> |
255 | + <property name="spacing"> |
256 | + <number>3</number> |
257 | + </property> |
258 | + <item> |
259 | + <widget class="QLabel" name="password_label"> |
260 | + <property name="font"> |
261 | + <font> |
262 | + <weight>75</weight> |
263 | + <bold>true</bold> |
264 | + </font> |
265 | + </property> |
266 | + <property name="text"> |
267 | + <string>password_label</string> |
268 | + </property> |
269 | + </widget> |
270 | + </item> |
271 | + <item> |
272 | + <widget class="QLineEdit" name="password_edit"> |
273 | + <property name="font"> |
274 | + <font> |
275 | + <pointsize>11</pointsize> |
276 | + </font> |
277 | + </property> |
278 | + <property name="toolTip"> |
279 | + <string>Your password must be at least 8 characters long and at least contain one number and one upper later.</string> |
280 | + </property> |
281 | + <property name="statusTip"> |
282 | + <string/> |
283 | + </property> |
284 | + <property name="echoMode"> |
285 | + <enum>QLineEdit::Password</enum> |
286 | + </property> |
287 | + <property name="placeholderText"> |
288 | + <string/> |
289 | + </property> |
290 | + </widget> |
291 | + </item> |
292 | + </layout> |
293 | </item> |
294 | <item row="5" column="0"> |
295 | - <widget class="QLabel" name="confirm_email_label"> |
296 | + <layout class="QVBoxLayout" name="verticalLayout"> |
297 | + <property name="spacing"> |
298 | + <number>3</number> |
299 | + </property> |
300 | + <item> |
301 | + <widget class="QLabel" name="confirm_password_label"> |
302 | + <property name="font"> |
303 | + <font> |
304 | + <weight>75</weight> |
305 | + <bold>true</bold> |
306 | + </font> |
307 | + </property> |
308 | + <property name="text"> |
309 | + <string>confirm_password_label</string> |
310 | + </property> |
311 | + </widget> |
312 | + </item> |
313 | + <item> |
314 | + <widget class="QLineEdit" name="confirm_password_edit"> |
315 | + <property name="font"> |
316 | + <font> |
317 | + <pointsize>11</pointsize> |
318 | + </font> |
319 | + </property> |
320 | + <property name="echoMode"> |
321 | + <enum>QLineEdit::Password</enum> |
322 | + </property> |
323 | + <property name="placeholderText"> |
324 | + <string/> |
325 | + </property> |
326 | + </widget> |
327 | + </item> |
328 | + </layout> |
329 | + </item> |
330 | + <item row="4" column="1" rowspan="2"> |
331 | + <widget class="QLabel" name="password_assistance"> |
332 | <property name="text"> |
333 | - <string>If you can't read this then <a href="example.com"><span style=" text-decoration: underline; color:#dd4814;">refresh</span></a> this page</span></string> |
334 | + <string>password_assistance</string> |
335 | + </property> |
336 | + <property name="indent"> |
337 | + <number>20</number> |
338 | </property> |
339 | </widget> |
340 | </item> |
341 | <item row="6" column="0"> |
342 | - <widget class="QLineEdit" name="confirm_email_edit"> |
343 | - <property name="placeholderText"> |
344 | - <string/> |
345 | + <layout class="QVBoxLayout" name="verticalLayout"> |
346 | + <property name="spacing"> |
347 | + <number>3</number> |
348 | </property> |
349 | - </widget> |
350 | + <item> |
351 | + <widget class="QLabel" name="captcha_view"> |
352 | + <property name="sizePolicy"> |
353 | + <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> |
354 | + <horstretch>0</horstretch> |
355 | + <verstretch>0</verstretch> |
356 | + </sizepolicy> |
357 | + </property> |
358 | + <property name="minimumSize"> |
359 | + <size> |
360 | + <width>300</width> |
361 | + <height>57</height> |
362 | + </size> |
363 | + </property> |
364 | + <property name="styleSheet"> |
365 | + <string notr="true">background-color: white</string> |
366 | + </property> |
367 | + <property name="frameShape"> |
368 | + <enum>QFrame::Box</enum> |
369 | + </property> |
370 | + <property name="text"> |
371 | + <string>If you can't read this then <a href="example.com"><span style=" text-decoration: underline; color:#dd4814;">refresh</span></a> this page</span></string> |
372 | + </property> |
373 | + </widget> |
374 | + </item> |
375 | + <item> |
376 | + <widget class="QLineEdit" name="captcha_solution_edit"> |
377 | + <property name="font"> |
378 | + <font> |
379 | + <pointsize>11</pointsize> |
380 | + </font> |
381 | + </property> |
382 | + <property name="locale"> |
383 | + <locale language="English" country="UnitedStates"/> |
384 | + </property> |
385 | + <property name="inputMask"> |
386 | + <string/> |
387 | + </property> |
388 | + <property name="text"> |
389 | + <string/> |
390 | + </property> |
391 | + <property name="placeholderText"> |
392 | + <string/> |
393 | + </property> |
394 | + </widget> |
395 | + </item> |
396 | + </layout> |
397 | </item> |
398 | <item row="6" column="1"> |
399 | - <widget class="QLabel" name="confirm_email_assistance"> |
400 | - <property name="text"> |
401 | - <string>If you can't read this then <a href="example.com"><span style=" text-decoration: underline; color:#dd4814;">refresh</span></a> this page</span></string> |
402 | - </property> |
403 | - <property name="indent"> |
404 | - <number>20</number> |
405 | - </property> |
406 | - </widget> |
407 | - </item> |
408 | - <item row="7" column="0"> |
409 | - <widget class="QLabel" name="password_label"> |
410 | - <property name="text"> |
411 | - <string>If you can't read this then <a href="example.com"><span style=" text-decoration: underline; color:#dd4814;">refresh</span></a> this page</span></string> |
412 | - </property> |
413 | - </widget> |
414 | - </item> |
415 | - <item row="8" column="0"> |
416 | - <widget class="QLineEdit" name="password_edit"> |
417 | - <property name="toolTip"> |
418 | - <string>Your password must be at least 8 characters long and at least contain one number and one upper later.</string> |
419 | - </property> |
420 | - <property name="statusTip"> |
421 | - <string/> |
422 | - </property> |
423 | - <property name="echoMode"> |
424 | - <enum>QLineEdit::Password</enum> |
425 | - </property> |
426 | - <property name="placeholderText"> |
427 | - <string/> |
428 | - </property> |
429 | - </widget> |
430 | - </item> |
431 | - <item row="9" column="0"> |
432 | - <widget class="QLabel" name="confirm_password_label"> |
433 | - <property name="text"> |
434 | - <string>If you can't read this then <a href="example.com"><span style=" text-decoration: underline; color:#dd4814;">refresh</span></a> this page</span></string> |
435 | - </property> |
436 | - </widget> |
437 | - </item> |
438 | - <item row="8" column="1" rowspan="3"> |
439 | - <widget class="QLabel" name="password_assistance"> |
440 | - <property name="text"> |
441 | - <string>If you can't read this then <a href="example.com"><span style=" text-decoration: underline; color:#dd4814;">refresh</span></a> this page</span></string> |
442 | - </property> |
443 | - <property name="indent"> |
444 | - <number>20</number> |
445 | - </property> |
446 | - </widget> |
447 | - </item> |
448 | - <item row="10" column="0"> |
449 | - <widget class="QLineEdit" name="confirm_password_edit"> |
450 | - <property name="echoMode"> |
451 | - <enum>QLineEdit::Password</enum> |
452 | - </property> |
453 | - <property name="placeholderText"> |
454 | - <string/> |
455 | - </property> |
456 | - </widget> |
457 | - </item> |
458 | - <item row="11" column="0"> |
459 | - <widget class="QLabel" name="captcha_view"> |
460 | - <property name="sizePolicy"> |
461 | - <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> |
462 | - <horstretch>0</horstretch> |
463 | - <verstretch>0</verstretch> |
464 | - </sizepolicy> |
465 | - </property> |
466 | - <property name="minimumSize"> |
467 | - <size> |
468 | - <width>300</width> |
469 | - <height>57</height> |
470 | - </size> |
471 | - </property> |
472 | - <property name="styleSheet"> |
473 | - <string notr="true">background-color: white</string> |
474 | - </property> |
475 | - <property name="frameShape"> |
476 | - <enum>QFrame::Box</enum> |
477 | - </property> |
478 | - <property name="text"> |
479 | - <string>If you can't read this then <a href="example.com"><span style=" text-decoration: underline; color:#dd4814;">refresh</span></a> this page</span></string> |
480 | - </property> |
481 | - </widget> |
482 | - </item> |
483 | - <item row="12" column="0" colspan="2"> |
484 | - <widget class="QLineEdit" name="captcha_solution_edit"> |
485 | - <property name="locale"> |
486 | - <locale language="English" country="UnitedStates"/> |
487 | - </property> |
488 | - <property name="inputMask"> |
489 | - <string/> |
490 | - </property> |
491 | - <property name="text"> |
492 | - <string/> |
493 | - </property> |
494 | - <property name="placeholderText"> |
495 | - <string/> |
496 | - </property> |
497 | - </widget> |
498 | - </item> |
499 | - <item row="11" column="1"> |
500 | <widget class="QLabel" name="refresh_label"> |
501 | <property name="sizePolicy"> |
502 | <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> |
503 | @@ -256,9 +361,15 @@ |
504 | <property name="enabled"> |
505 | <bool>false</bool> |
506 | </property> |
507 | + <property name="styleSheet"> |
508 | + <string notr="true"/> |
509 | + </property> |
510 | <property name="text"> |
511 | <string>Set Up Account</string> |
512 | </property> |
513 | + <property name="DisabledState" stdset="0"> |
514 | + <bool>true</bool> |
515 | + </property> |
516 | </widget> |
517 | </item> |
518 | </layout> |
519 | |
520 | === modified file 'data/qt/sign_in.ui' |
521 | --- data/qt/sign_in.ui 2011-06-22 19:23:02 +0000 |
522 | +++ data/qt/sign_in.ui 2011-07-28 18:40:32 +0000 |
523 | @@ -46,6 +46,9 @@ |
524 | <property name="text"> |
525 | <string>Sign me in with my existing Ubuntu one account</string> |
526 | </property> |
527 | + <property name="default"> |
528 | + <bool>false</bool> |
529 | + </property> |
530 | </widget> |
531 | </item> |
532 | <item> |
533 | |
534 | === modified file 'data/qt/ubuntuone.qss' |
535 | --- data/qt/ubuntuone.qss 2011-07-15 22:59:41 +0000 |
536 | +++ data/qt/ubuntuone.qss 2011-07-28 18:40:32 +0000 |
537 | @@ -1,3 +1,8 @@ |
538 | +QWidget{ |
539 | + font-family: "Ubuntu"; |
540 | + color: #333333; |
541 | +} |
542 | + |
543 | QFrame#SideWidget { |
544 | background-color: white; |
545 | border-style: dotted; |
546 | @@ -19,7 +24,10 @@ |
547 | QLabel#password_assistance, |
548 | QLabel#refresh_label{ |
549 | border-image: url(":/balloon_shape.png"); |
550 | - padding-right: 2px; |
551 | +} |
552 | + |
553 | +QLineEdit{ |
554 | + border: 1px solid #aea79f; |
555 | } |
556 | |
557 | QLabel#install_label, |
558 | @@ -35,62 +43,82 @@ |
559 | border: none; |
560 | } |
561 | |
562 | -QPushButton[enabled="false"] { |
563 | - background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, |
564 | - stop: 0 #fecfc2,stop: 1.0 #df4d1a); |
565 | +QPushButton{ |
566 | border-radius: 5px; |
567 | border-style: solid; |
568 | padding: 6px; |
569 | padding-left: 20px; |
570 | padding-right: 20px; |
571 | - color: white; |
572 | - border-color: #939389; |
573 | border-width: 1px; |
574 | height: 14px; |
575 | - font-size: 12px; |
576 | -} |
577 | - |
578 | -QPushButton[enabled="true"] { |
579 | +} |
580 | + |
581 | +QPushButton[default="true"] { |
582 | + background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, |
583 | + stop: 0 #fe9e84,stop: 1.0 #dd4814); |
584 | + color: white; |
585 | + border-color: #999999; |
586 | +} |
587 | + |
588 | +QPushButton:hover[default="true"] { |
589 | + background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, |
590 | + stop: 0 #ffb19c,stop: 1.0 #dd4814); |
591 | + color: white; |
592 | + border-color: #999999; |
593 | +} |
594 | + |
595 | +QPushButton:pressed[default="true"] { |
596 | + background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, |
597 | + stop: 0 #b93f14,stop: 1.0 #dd4814); |
598 | + color: white; |
599 | + border-color: #999999; |
600 | +} |
601 | + |
602 | +QPushButton[default="false"] { |
603 | + background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, |
604 | + stop: 0 #ffffff,stop: 1.0 #e6e6e6); |
605 | + color: #333333; |
606 | + border-color: #999999; |
607 | +} |
608 | + |
609 | +QPushButton:hover[default="false"] { |
610 | + background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, |
611 | + stop: 0 #ffffff,stop: 1.0 #ededed); |
612 | + color: #333333; |
613 | + border-color: #999999; |
614 | +} |
615 | + |
616 | +QPushButton:pressed[default="false"] { |
617 | + background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, |
618 | + stop: 0 #d9d9d9,stop: 1.0 #fefefe); |
619 | + color: #333333; |
620 | + border-color: #999999; |
621 | +} |
622 | + |
623 | +QPushButton[DisabledState="true"] { |
624 | background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, |
625 | stop: 0 #eaeaea, stop: 1.0 #cacaca); |
626 | - border-radius: 5px; |
627 | - border-style: solid; |
628 | - padding: 6px; |
629 | - padding-left: 20px; |
630 | - padding-right: 20px; |
631 | color: #595959; |
632 | border-color: #939389; |
633 | - border-width: 1px; |
634 | - height: 14px; |
635 | - font-size: 12px; |
636 | -} |
637 | - |
638 | -QPushButton:hover { |
639 | - background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, |
640 | - stop: 0 #feae99,stop: 1.0 #df4e1c); |
641 | - border-radius: 5px; |
642 | - border-style: solid; |
643 | - padding: 6px; |
644 | - color: white; |
645 | - border-color: #939389; |
646 | - border-width: 1px; |
647 | - height: 12px; |
648 | -} |
649 | - |
650 | -QPushButton:pressed { |
651 | - background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, |
652 | - stop: 0 #ba3f14,stop: 1.0 #db4714); |
653 | - border-radius: 5px; |
654 | - border-style: solid; |
655 | - padding: 6px; |
656 | - color: white; |
657 | - border-color: #939389; |
658 | - border-width: 1px; |
659 | - height: 12px; |
660 | -} |
661 | - |
662 | -QWidget{ |
663 | - font-family: "Ubuntu"; |
664 | - color: #333333; |
665 | - font-size: 12px; |
666 | +} |
667 | + |
668 | +QPushButton[DisabledState="false"] { |
669 | + background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, |
670 | + stop: 0 #fe9e84,stop: 1.0 #dd4814); |
671 | + color: white; |
672 | + border-color: #999999; |
673 | +} |
674 | + |
675 | +QFrame#frm_box { |
676 | + background: #ffffff; |
677 | + border-radius: 5px; |
678 | + border-style: solid; |
679 | + border-color: #939389; |
680 | + border-width: 1px; |
681 | + color: white; |
682 | + min-height: 100px; |
683 | +} |
684 | + |
685 | +QFrame#frm_box > QLabel{ |
686 | + font-size: 24px; |
687 | } |
688 | |
689 | === modified file 'data/win_install_img_placeholder.png' |
690 | Binary files data/win_install_img_placeholder.png 2011-07-13 03:14:18 +0000 and data/win_install_img_placeholder.png 2011-07-28 18:40:32 +0000 differ |
691 | === modified file 'ubuntuone_installer/gui/qt/are_you_sure.py' |
692 | --- ubuntuone_installer/gui/qt/are_you_sure.py 2011-07-08 15:21:50 +0000 |
693 | +++ ubuntuone_installer/gui/qt/are_you_sure.py 2011-07-28 18:40:32 +0000 |
694 | @@ -1,47 +1,47 @@ |
695 | -# -*- coding: utf-8 -*- |
696 | - |
697 | -# Authors: Roberto Alsina <roberto.alsina@canonical.com> |
698 | -# |
699 | -# Copyright 2011 Canonical Ltd. |
700 | -# |
701 | -# This program is free software: you can redistribute it and/or modify it |
702 | -# under the terms of the GNU General Public License version 3, as published |
703 | -# by the Free Software Foundation. |
704 | -# |
705 | -# This program is distributed in the hope that it will be useful, but |
706 | -# WITHOUT ANY WARRANTY; without even the implied warranties of |
707 | -# MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR |
708 | -# PURPOSE. See the GNU General Public License for more details. |
709 | -# |
710 | -# You should have received a copy of the GNU General Public License along |
711 | -# with this program. If not, see <http://www.gnu.org/licenses/>. |
712 | - |
713 | -"""The "Are you sure" dialog.""" |
714 | - |
715 | -import gettext |
716 | - |
717 | -from PyQt4 import QtGui |
718 | - |
719 | -from ubuntuone.clientdefs import APP_NAME |
720 | - |
721 | -from ubuntuone_installer.gui.qt.ui import are_you_sure_ui |
722 | -from ubuntuone_installer.gui import ( |
723 | - ARE_YOU_SURE_1, |
724 | - ARE_YOU_SURE_2, |
725 | -) |
726 | - |
727 | -_ = gettext.gettext |
728 | - |
729 | - |
730 | -class AreYouSure(QtGui.QDialog): |
731 | - |
732 | - """A 'Are you sure?' dialog.""" |
733 | - |
734 | - def __init__(self, *args, **kwargs): |
735 | - super(AreYouSure, self).__init__(*args, **kwargs) |
736 | - self.ui = are_you_sure_ui.Ui_Dialog() |
737 | - self.ui.setupUi(self) |
738 | - self.setWindowTitle(APP_NAME) |
739 | - link = u'<a href="https://one.ubuntu.com">https://one.ubuntu.com</a>' |
740 | - msg = (u"%s<p>%s" % (ARE_YOU_SURE_1, ARE_YOU_SURE_2)) % {"url": link} |
741 | - self.ui.message_label.setText(msg) |
742 | +# -*- coding: utf-8 -*- |
743 | + |
744 | +# Authors: Roberto Alsina <roberto.alsina@canonical.com> |
745 | +# |
746 | +# Copyright 2011 Canonical Ltd. |
747 | +# |
748 | +# This program is free software: you can redistribute it and/or modify it |
749 | +# under the terms of the GNU General Public License version 3, as published |
750 | +# by the Free Software Foundation. |
751 | +# |
752 | +# This program is distributed in the hope that it will be useful, but |
753 | +# WITHOUT ANY WARRANTY; without even the implied warranties of |
754 | +# MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR |
755 | +# PURPOSE. See the GNU General Public License for more details. |
756 | +# |
757 | +# You should have received a copy of the GNU General Public License along |
758 | +# with this program. If not, see <http://www.gnu.org/licenses/>. |
759 | + |
760 | +"""The "Are you sure" dialog.""" |
761 | + |
762 | +import gettext |
763 | + |
764 | +from PyQt4 import QtGui |
765 | + |
766 | +from ubuntuone.platform.credentials import APP_NAME |
767 | + |
768 | +from ubuntuone_installer.gui.qt.ui import are_you_sure_ui |
769 | +from ubuntuone_installer.gui import ( |
770 | + ARE_YOU_SURE_1, |
771 | + ARE_YOU_SURE_2, |
772 | +) |
773 | + |
774 | +_ = gettext.gettext |
775 | + |
776 | + |
777 | +class AreYouSure(QtGui.QDialog): |
778 | + |
779 | + """A 'Are you sure?' dialog.""" |
780 | + |
781 | + def __init__(self, *args, **kwargs): |
782 | + super(AreYouSure, self).__init__(*args, **kwargs) |
783 | + self.ui = are_you_sure_ui.Ui_Dialog() |
784 | + self.ui.setupUi(self) |
785 | + self.setWindowTitle(APP_NAME) |
786 | + link = u'<a href="https://one.ubuntu.com">https://one.ubuntu.com</a>' |
787 | + msg = (u"%s<p>%s" % (ARE_YOU_SURE_1, ARE_YOU_SURE_2)) % {"url": link} |
788 | + self.ui.message_label.setText(msg) |
789 | |
790 | === modified file 'ubuntuone_installer/gui/qt/embedded_sso.py' |
791 | --- ubuntuone_installer/gui/qt/embedded_sso.py 2011-07-15 20:38:58 +0000 |
792 | +++ ubuntuone_installer/gui/qt/embedded_sso.py 2011-07-28 18:40:32 +0000 |
793 | @@ -1,61 +1,61 @@ |
794 | -# -*- coding: utf-8 -*- |
795 | - |
796 | -# Authors: Roberto Alsina <roberto.alsina@canonical.com> |
797 | -# |
798 | -# Copyright 2011 Canonical Ltd. |
799 | -# |
800 | -# This program is free software: you can redistribute it and/or modify it |
801 | -# under the terms of the GNU General Public License version 3, as published |
802 | -# by the Free Software Foundation. |
803 | -# |
804 | -# This program is distributed in the hope that it will be useful, but |
805 | -# WITHOUT ANY WARRANTY; without even the implied warranties of |
806 | -# MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR |
807 | -# PURPOSE. See the GNU General Public License for more details. |
808 | -# |
809 | -# You should have received a copy of the GNU General Public License along |
810 | -# with this program. If not, see <http://www.gnu.org/licenses/>. |
811 | - |
812 | -"""The user interface for the Ubuntu One Installer's SSO client.""" |
813 | - |
814 | -import ubuntu_sso.qt.gui as sso_gui |
815 | - |
816 | -from ubuntuone_installer.gui.qt.gui import MainWindow |
817 | - |
818 | - |
819 | -class UbuntuSSOClientGUI(object): |
820 | - """A custom Client GUI for SSO.""" |
821 | - def __init__(self, app_name, tc_url, help_text, |
822 | - window_id=0, login_only=False): |
823 | - """Create a new instance.""" |
824 | - |
825 | - # create the controller and the ui, then set the cb and call the show |
826 | - # method so that we can work |
827 | - self.controller = sso_gui.UbuntuSSOWizardController( |
828 | - app_name, |
829 | - user_cancellation_callback=self._user_cancellation_callback |
830 | - ) |
831 | - self.view = MainWindow() |
832 | - |
833 | - self.login_success_callback = lambda x, y: None |
834 | - self.registration_success_callback = lambda x, y: None |
835 | - self.user_cancellation_callback = lambda x: None |
836 | - |
837 | - self.view.loginSuccess.connect(self._login_success_callback) |
838 | - self.view.registrationSuccess.connect( |
839 | - self._registration_success_callback) |
840 | - self.view.userCancellation.connect(self._user_cancellation_callback) |
841 | - |
842 | - self.view.show() |
843 | - |
844 | - def _login_success_callback(self, app_name, email): |
845 | - """Call the real callback, set by the Credentials object""" |
846 | - self.login_success_callback(str(app_name), str(email)) |
847 | - |
848 | - def _registration_success_callback(self, app_name, email): |
849 | - """Call the real callback, set by the Credentials object""" |
850 | - self.registration_success_callback(str(app_name), str(email)) |
851 | - |
852 | - def _user_cancellation_callback(self, app_name): |
853 | - """Call the real callback, set by the Credentials object""" |
854 | - self.user_cancellation_callback(str(app_name)) |
855 | +# -*- coding: utf-8 -*- |
856 | + |
857 | +# Authors: Roberto Alsina <roberto.alsina@canonical.com> |
858 | +# |
859 | +# Copyright 2011 Canonical Ltd. |
860 | +# |
861 | +# This program is free software: you can redistribute it and/or modify it |
862 | +# under the terms of the GNU General Public License version 3, as published |
863 | +# by the Free Software Foundation. |
864 | +# |
865 | +# This program is distributed in the hope that it will be useful, but |
866 | +# WITHOUT ANY WARRANTY; without even the implied warranties of |
867 | +# MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR |
868 | +# PURPOSE. See the GNU General Public License for more details. |
869 | +# |
870 | +# You should have received a copy of the GNU General Public License along |
871 | +# with this program. If not, see <http://www.gnu.org/licenses/>. |
872 | + |
873 | +"""The user interface for the Ubuntu One Installer's SSO client.""" |
874 | + |
875 | +import ubuntu_sso.qt.gui as sso_gui |
876 | + |
877 | +from ubuntuone_installer.gui.qt.gui import MainWindow |
878 | + |
879 | + |
880 | +class UbuntuSSOClientGUI(object): |
881 | + """A custom Client GUI for SSO.""" |
882 | + |
883 | + def __init__(self, app_name, tc_url, help_text, |
884 | + window_id=0, login_only=False): |
885 | + """Create a new instance.""" |
886 | + |
887 | + # create the controller and the ui, then set the cb and call the show |
888 | + # method so that we can work |
889 | + self.controller = sso_gui.UbuntuSSOWizardController( |
890 | + app_name, |
891 | + user_cancellation_callback=self._user_cancellation_callback) |
892 | + self.view = MainWindow() |
893 | + |
894 | + self.login_success_callback = lambda x, y: None |
895 | + self.registration_success_callback = lambda x, y: None |
896 | + self.user_cancellation_callback = lambda x: None |
897 | + |
898 | + self.view.loginSuccess.connect(self._login_success_callback) |
899 | + self.view.registrationSuccess.connect( |
900 | + self._registration_success_callback) |
901 | + self.view.userCancellation.connect(self._user_cancellation_callback) |
902 | + |
903 | + self.view.show() |
904 | + |
905 | + def _login_success_callback(self, app_name, email): |
906 | + """Call the real callback, set by the Credentials object""" |
907 | + self.login_success_callback(str(app_name), str(email)) |
908 | + |
909 | + def _registration_success_callback(self, app_name, email): |
910 | + """Call the real callback, set by the Credentials object""" |
911 | + self.registration_success_callback(str(app_name), str(email)) |
912 | + |
913 | + def _user_cancellation_callback(self, app_name): |
914 | + """Call the real callback, set by the Credentials object""" |
915 | + self.user_cancellation_callback(str(app_name)) |
916 | |
917 | === modified file 'ubuntuone_installer/gui/qt/gui.py' |
918 | --- ubuntuone_installer/gui/qt/gui.py 2011-07-22 19:08:25 +0000 |
919 | +++ ubuntuone_installer/gui/qt/gui.py 2011-07-28 18:40:32 +0000 |
920 | @@ -54,9 +54,8 @@ |
921 | |
922 | from ubuntuone.controlpanel.gui.qt.loadingoverlay import LoadingOverlay |
923 | |
924 | -from ubuntuone.credentials import ( |
925 | +from ubuntuone.platform.credentials import ( |
926 | APP_NAME, |
927 | - DESCRIPTION, |
928 | TC_URL, |
929 | ) |
930 | |
931 | @@ -124,12 +123,11 @@ |
932 | |
933 | self.wizard().setButtonLayout([ |
934 | QtGui.QWizard.CancelButton, |
935 | + QtGui.QWizard.BackButton, |
936 | QtGui.QWizard.Stretch, |
937 | QtGui.QWizard.CustomButton1, |
938 | - QtGui.QWizard.BackButton, |
939 | QtGui.QWizard.NextButton, |
940 | - QtGui.QWizard.FinishButton, |
941 | - ]) |
942 | + QtGui.QWizard.FinishButton]) |
943 | |
944 | def print_document(self, button_id): |
945 | """Print the document displayed in textBrowser.""" |
946 | @@ -170,8 +168,14 @@ |
947 | # without cancel |
948 | self.wizard().setButtonLayout([ |
949 | QtGui.QWizard.Stretch, |
950 | - QtGui.QWizard.NextButton, |
951 | - ]) |
952 | + QtGui.QWizard.NextButton]) |
953 | + |
954 | + # Set existing_account_button as default when the page is shown. |
955 | + self.ui.existing_account_button.setDefault(True) |
956 | + self.ui.existing_account_button.style().unpolish( |
957 | + self.ui.existing_account_button) |
958 | + self.ui.existing_account_button.style().polish( |
959 | + self.ui.existing_account_button) |
960 | |
961 | def nextId(self): |
962 | """Provide the next id.""" |
963 | @@ -203,10 +207,15 @@ |
964 | # Layout without custom button 1, |
965 | # without finish button |
966 | self.wizard().setButtonLayout([ |
967 | - QtGui.QWizard.CancelButton, |
968 | - QtGui.QWizard.Stretch, |
969 | QtGui.QWizard.BackButton, |
970 | - ]) |
971 | + QtGui.QWizard.Stretch]) |
972 | + |
973 | + # Set sign_in_button as default when the page is shown. |
974 | + self.ui.sign_in_button.setDefault(True) |
975 | + self.ui.sign_in_button.style().unpolish( |
976 | + self.ui.sign_in_button) |
977 | + self.ui.sign_in_button.style().polish( |
978 | + self.ui.sign_in_button) |
979 | |
980 | |
981 | class SuccessPage(QtGui.QWizardPage): |
982 | @@ -257,14 +266,20 @@ |
983 | # Layout without custom button 1, |
984 | self.wizard().setButtonLayout([ |
985 | QtGui.QWizard.Stretch, |
986 | - QtGui.QWizard.FinishButton, |
987 | - ]) |
988 | + QtGui.QWizard.FinishButton]) |
989 | if self.field("sync_now").toBool() \ |
990 | or self.field("sync_custom").toBool(): |
991 | self.ui.progressContainer.setVisible(True) |
992 | else: |
993 | self.ui.progressContainer.setVisible(False) |
994 | |
995 | + # Set FinishButton as default when the page is shown. |
996 | + self.wizard().button(QtGui.QWizard.FinishButton).setDefault(True) |
997 | + self.wizard().button(QtGui.QWizard.FinishButton).style().unpolish( |
998 | + self.wizard().button(QtGui.QWizard.FinishButton)) |
999 | + self.wizard().button(QtGui.QWizard.FinishButton).style().polish( |
1000 | + self.wizard().button(QtGui.QWizard.FinishButton)) |
1001 | + |
1002 | |
1003 | class MainWindow(QtGui.QWizard): |
1004 | |
1005 | @@ -296,9 +311,10 @@ |
1006 | self.help_text = "" |
1007 | |
1008 | super(MainWindow, self).__init__() |
1009 | + |
1010 | self.setWindowTitle(APP_NAME) |
1011 | self.setMinimumHeight(630) |
1012 | - self.setMinimumWidth(800) |
1013 | + self.setMinimumWidth(820) |
1014 | self.setTitleFormat(QtCore.Qt.RichText) |
1015 | self.setWizardStyle(self.ModernStyle) |
1016 | self.close_callback = close_callback |
1017 | @@ -394,6 +410,18 @@ |
1018 | self.CONGRATULATIONS_PAGE = self.addPage(CongratulationsPage()) |
1019 | |
1020 | self.currentIdChanged.connect(self.on_currentIdChanged) |
1021 | + # Set Wizard buttons style |
1022 | + self.button(QtGui.QWizard.NextButton).setDefault(True) |
1023 | + |
1024 | + # Set Application Style Sheet |
1025 | + app = QtGui.QApplication.instance() |
1026 | + qss_file = QtCore.QFile(":/ubuntuone.qss") |
1027 | + qss_file.open(QtCore.QFile.ReadOnly) |
1028 | + stylesheet = QtCore.QLatin1String(qss_file.readAll()) |
1029 | + app.setStyleSheet(stylesheet) |
1030 | + # Apply font to the entire application |
1031 | + QtGui.QFontDatabase.addApplicationFont(':/Ubuntu-R.ttf') |
1032 | + QtGui.QFontDatabase.addApplicationFont(':/Ubuntu-B.ttf') |
1033 | |
1034 | # Invalid name "closeEvent" |
1035 | # pylint: disable=C0103 |
1036 | @@ -404,6 +432,7 @@ |
1037 | QtGui.QMessageBox.critical(*args, **kwargs) |
1038 | |
1039 | def next(self): |
1040 | + """Show the next page to display.""" |
1041 | self.overlay.hide() |
1042 | super(MainWindow, self).next() |
1043 | |
1044 | @@ -451,3 +480,11 @@ |
1045 | self.sideWidget().set_stage(3) |
1046 | else: |
1047 | self.sideWidget().set_stage(4) |
1048 | + |
1049 | + # Invalid name "resizeEvent" |
1050 | + # pylint: disable=C0103 |
1051 | + |
1052 | + def resizeEvent(self, event): |
1053 | + """Resize the overlay to fit all the widget.""" |
1054 | + QtGui.QWizard.resizeEvent(self, event) |
1055 | + self.overlay.resize(event.size()) |
1056 | |
1057 | === modified file 'ubuntuone_installer/gui/qt/main/tests/test_main.py' |
1058 | --- ubuntuone_installer/gui/qt/main/tests/test_main.py 2011-07-18 18:32:27 +0000 |
1059 | +++ ubuntuone_installer/gui/qt/main/tests/test_main.py 2011-07-28 18:40:32 +0000 |
1060 | @@ -24,7 +24,7 @@ |
1061 | |
1062 | # pylint: disable=W0212 |
1063 | |
1064 | -from ubuntuone.credentials import ( |
1065 | +from ubuntuone.platform.credentials import ( |
1066 | APP_NAME, |
1067 | DESCRIPTION, |
1068 | TC_URL, |
1069 | |
1070 | === modified file 'ubuntuone_installer/gui/qt/main/windows.py' |
1071 | --- ubuntuone_installer/gui/qt/main/windows.py 2011-07-22 16:32:35 +0000 |
1072 | +++ ubuntuone_installer/gui/qt/main/windows.py 2011-07-28 18:40:32 +0000 |
1073 | @@ -1,52 +1,52 @@ |
1074 | -# -*- coding: utf-8 -*- |
1075 | - |
1076 | -# Authors: Manuel de la Pena <manuel@canonical.com> |
1077 | -# |
1078 | -# Copyright 2011 Canonical Ltd. |
1079 | -# |
1080 | -# This program is free software: you can redistribute it and/or modify it |
1081 | -# under the terms of the GNU General Public License version 3, as published |
1082 | -# by the Free Software Foundation. |
1083 | -# |
1084 | -# This program is distributed in the hope that it will be useful, but |
1085 | -# WITHOUT ANY WARRANTY; without even the implied warranties of |
1086 | -# MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR |
1087 | -# PURPOSE. See the GNU General Public License for more details. |
1088 | -# |
1089 | -# You should have received a copy of the GNU General Public License along |
1090 | -# with this program. If not, see <http://www.gnu.org/licenses/>. |
1091 | -"""Reactor installation for windows.""" |
1092 | - |
1093 | -# pylint: disable=E1101, F0401, W0404 |
1094 | - |
1095 | -from twisted.internet.defer import inlineCallbacks |
1096 | -from ubuntu_sso.main.windows import UbuntuSSOClient |
1097 | - |
1098 | -from ubuntuone.credentials import ( |
1099 | - APP_NAME, |
1100 | - DESCRIPTION, |
1101 | - TC_URL, |
1102 | -) |
1103 | - |
1104 | - |
1105 | -@inlineCallbacks |
1106 | -def main(): |
1107 | - """Perform a client request to be logged in.""" |
1108 | - client = UbuntuSSOClient() |
1109 | - client = yield client.connect() |
1110 | - |
1111 | - @inlineCallbacks |
1112 | - def stop(*args): |
1113 | - """End the process.""" |
1114 | - from twisted.internet import reactor |
1115 | - yield client.sso_cred.unregister_to_signals() |
1116 | - reactor.stop() |
1117 | - |
1118 | - client.sso_cred.on_credentials_found_cb = stop |
1119 | - client.sso_cred.on_authorization_denied_cb = stop |
1120 | - client.sso_cred.on_credentials_error_cb = stop |
1121 | - yield client.sso_cred.register_to_signals() |
1122 | - yield client.sso_cred.login_or_register_to_get_credentials(APP_NAME, |
1123 | - TC_URL, |
1124 | - DESCRIPTION, 0, |
1125 | - ui_module="ubuntuone_installer.gui.qt.embedded_sso") |
1126 | +# -*- coding: utf-8 -*- |
1127 | + |
1128 | +# Authors: Manuel de la Pena <manuel@canonical.com> |
1129 | +# |
1130 | +# Copyright 2011 Canonical Ltd. |
1131 | +# |
1132 | +# This program is free software: you can redistribute it and/or modify it |
1133 | +# under the terms of the GNU General Public License version 3, as published |
1134 | +# by the Free Software Foundation. |
1135 | +# |
1136 | +# This program is distributed in the hope that it will be useful, but |
1137 | +# WITHOUT ANY WARRANTY; without even the implied warranties of |
1138 | +# MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR |
1139 | +# PURPOSE. See the GNU General Public License for more details. |
1140 | +# |
1141 | +# You should have received a copy of the GNU General Public License along |
1142 | +# with this program. If not, see <http://www.gnu.org/licenses/>. |
1143 | +"""Reactor installation for windows.""" |
1144 | + |
1145 | +# pylint: disable=E1101, F0401, W0404 |
1146 | + |
1147 | +from twisted.internet.defer import inlineCallbacks |
1148 | +from ubuntu_sso.main.windows import UbuntuSSOClient |
1149 | + |
1150 | +from ubuntuone.platform.credentials import ( |
1151 | + APP_NAME, |
1152 | + DESCRIPTION, |
1153 | + TC_URL, |
1154 | +) |
1155 | + |
1156 | + |
1157 | +@inlineCallbacks |
1158 | +def main(): |
1159 | + """Perform a client request to be logged in.""" |
1160 | + client = UbuntuSSOClient() |
1161 | + client = yield client.connect() |
1162 | + |
1163 | + @inlineCallbacks |
1164 | + def stop(*args): |
1165 | + """End the process.""" |
1166 | + from twisted.internet import reactor |
1167 | + yield client.sso_cred.unregister_to_signals() |
1168 | + reactor.stop() |
1169 | + |
1170 | + client.sso_cred.on_credentials_found_cb = stop |
1171 | + client.sso_cred.on_authorization_denied_cb = stop |
1172 | + client.sso_cred.on_credentials_error_cb = stop |
1173 | + yield client.sso_cred.register_to_signals() |
1174 | + yield client.sso_cred.login_or_register_to_get_credentials(APP_NAME, |
1175 | + TC_URL, |
1176 | + DESCRIPTION, 0, |
1177 | + ui_module="ubuntuone_installer.gui.qt.embedded_sso") |
1178 | |
1179 | === modified file 'ubuntuone_installer/gui/qt/setup_account.py' |
1180 | --- ubuntuone_installer/gui/qt/setup_account.py 2011-07-15 22:59:41 +0000 |
1181 | +++ ubuntuone_installer/gui/qt/setup_account.py 2011-07-28 18:40:32 +0000 |
1182 | @@ -22,6 +22,7 @@ |
1183 | import re |
1184 | |
1185 | from PyQt4 import QtGui |
1186 | +from PyQt4.QtCore import Qt |
1187 | |
1188 | from ubuntu_sso.qt import gui as sso_gui |
1189 | |
1190 | @@ -45,6 +46,9 @@ |
1191 | |
1192 | """Customized Setup Account page for SSO""" |
1193 | |
1194 | + # Invalid name "initializePage" |
1195 | + # pylint: disable=C0103 |
1196 | + |
1197 | def initializePage(self): |
1198 | """Setup UI details.""" |
1199 | # We need to override some texts from SSO |
1200 | @@ -67,10 +71,8 @@ |
1201 | |
1202 | # Button setup |
1203 | self.wizard().setButtonLayout([ |
1204 | - QtGui.QWizard.Stretch, |
1205 | QtGui.QWizard.BackButton, |
1206 | - QtGui.QWizard.CancelButton, |
1207 | - ]) |
1208 | + QtGui.QWizard.Stretch]) |
1209 | |
1210 | self.ui.name_edit.textEdited.connect(self.name_assistance) |
1211 | self.name_assistance() |
1212 | @@ -84,6 +86,8 @@ |
1213 | self.ui.confirm_password_edit.textEdited.connect( |
1214 | self.password_assistance) |
1215 | self.password_assistance() |
1216 | + self.ui.terms_checkbox.stateChanged.connect( |
1217 | + self.set_button_setup_account_property) |
1218 | |
1219 | def name_assistance(self): |
1220 | """Show help for the name field.""" |
1221 | @@ -142,6 +146,22 @@ |
1222 | |
1223 | self.ui.password_assistance.setText("<br>".join(label_text)) |
1224 | |
1225 | + def set_button_setup_account_property(self, state): |
1226 | + """Change the set_up_button disable property and reapply the style.""" |
1227 | + self.ui.set_up_button.setProperty("DisabledState", |
1228 | + state == Qt.Unchecked) |
1229 | + self.ui.set_up_button.style().unpolish(self.ui.set_up_button) |
1230 | + self.ui.set_up_button.style().polish(self.ui.set_up_button) |
1231 | + |
1232 | + def showEvent(self, event): |
1233 | + """Set set_up_button as default button when the page is shown.""" |
1234 | + # This method should stays here because if we move it to initializePage |
1235 | + # set_up_button won't take the proper style for hover and press |
1236 | + self.ui.set_up_button.setDefault(True) |
1237 | + self.ui.set_up_button.setProperty("DisabledState", True) |
1238 | + self.ui.set_up_button.style().unpolish(self.ui.set_up_button) |
1239 | + self.ui.set_up_button.style().polish(self.ui.set_up_button) |
1240 | + |
1241 | |
1242 | def is_min_required_password(password): |
1243 | """Return if the password meets the minimum requirements.""" |
1244 | |
1245 | === modified file 'ubuntuone_installer/gui/qt/tests/test_are_you_sure.py' |
1246 | --- ubuntuone_installer/gui/qt/tests/test_are_you_sure.py 2011-07-08 18:50:52 +0000 |
1247 | +++ ubuntuone_installer/gui/qt/tests/test_are_you_sure.py 2011-07-28 18:40:32 +0000 |
1248 | @@ -1,47 +1,47 @@ |
1249 | -# -*- coding: utf-8 -*- |
1250 | - |
1251 | -# Authors: Roberto Alsina <roberto.alsina@canonical.com> |
1252 | -# |
1253 | -# Copyright 2011 Canonical Ltd. |
1254 | -# |
1255 | -# This program is free software: you can redistribute it and/or modify it |
1256 | -# under the terms of the GNU General Public License version 3, as published |
1257 | -# by the Free Software Foundation. |
1258 | -# |
1259 | -# This program is distributed in the hope that it will be useful, but |
1260 | -# WITHOUT ANY WARRANTY; without even the implied warranties of |
1261 | -# MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR |
1262 | -# PURPOSE. See the GNU General Public License for more details. |
1263 | -# |
1264 | -# You should have received a copy of the GNU General Public License along |
1265 | -# with this program. If not, see <http://www.gnu.org/licenses/>. |
1266 | - |
1267 | -"""Tests for the Are you Sure dialog.""" |
1268 | - |
1269 | -from ubuntuone.clientdefs import APP_NAME |
1270 | - |
1271 | -from ubuntuone_installer.gui.qt.are_you_sure import AreYouSure |
1272 | -from ubuntuone_installer.gui.qt.tests import BaseTestCase |
1273 | -from ubuntuone_installer.gui import ( |
1274 | - ARE_YOU_SURE_1, |
1275 | - ARE_YOU_SURE_2, |
1276 | -) |
1277 | - |
1278 | - |
1279 | -class AreYouSureTestCase(BaseTestCase): |
1280 | - |
1281 | - """Test the are you sure dialog.""" |
1282 | - |
1283 | - class_ui = AreYouSure |
1284 | - |
1285 | - def test_title(self): |
1286 | - """Check the window title.""" |
1287 | - self.assertEqual(self.ui.windowTitle(), APP_NAME) |
1288 | - self.assertEqual(self.ui.windowTitle(), APP_NAME) |
1289 | - |
1290 | - def test_msg_label(self): |
1291 | - """Check the message label text.""" |
1292 | - link = '<a href="https://one.ubuntu.com">https://one.ubuntu.com</a>' |
1293 | - self.assertEqual( |
1294 | - (u"%s<p>%s" % (ARE_YOU_SURE_1, ARE_YOU_SURE_2)) % {"url": link}, |
1295 | - unicode(self.ui.ui.message_label.text())) |
1296 | +# -*- coding: utf-8 -*- |
1297 | + |
1298 | +# Authors: Roberto Alsina <roberto.alsina@canonical.com> |
1299 | +# |
1300 | +# Copyright 2011 Canonical Ltd. |
1301 | +# |
1302 | +# This program is free software: you can redistribute it and/or modify it |
1303 | +# under the terms of the GNU General Public License version 3, as published |
1304 | +# by the Free Software Foundation. |
1305 | +# |
1306 | +# This program is distributed in the hope that it will be useful, but |
1307 | +# WITHOUT ANY WARRANTY; without even the implied warranties of |
1308 | +# MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR |
1309 | +# PURPOSE. See the GNU General Public License for more details. |
1310 | +# |
1311 | +# You should have received a copy of the GNU General Public License along |
1312 | +# with this program. If not, see <http://www.gnu.org/licenses/>. |
1313 | + |
1314 | +"""Tests for the Are you Sure dialog.""" |
1315 | + |
1316 | +from ubuntuone.platform.credentials import APP_NAME |
1317 | + |
1318 | +from ubuntuone_installer.gui.qt.are_you_sure import AreYouSure |
1319 | +from ubuntuone_installer.gui.qt.tests import BaseTestCase |
1320 | +from ubuntuone_installer.gui import ( |
1321 | + ARE_YOU_SURE_1, |
1322 | + ARE_YOU_SURE_2, |
1323 | +) |
1324 | + |
1325 | + |
1326 | +class AreYouSureTestCase(BaseTestCase): |
1327 | + |
1328 | + """Test the are you sure dialog.""" |
1329 | + |
1330 | + class_ui = AreYouSure |
1331 | + |
1332 | + def test_title(self): |
1333 | + """Check the window title.""" |
1334 | + self.assertEqual(self.ui.windowTitle(), APP_NAME) |
1335 | + self.assertEqual(self.ui.windowTitle(), APP_NAME) |
1336 | + |
1337 | + def test_msg_label(self): |
1338 | + """Check the message label text.""" |
1339 | + link = '<a href="https://one.ubuntu.com">https://one.ubuntu.com</a>' |
1340 | + self.assertEqual( |
1341 | + (u"%s<p>%s" % (ARE_YOU_SURE_1, ARE_YOU_SURE_2)) % {"url": link}, |
1342 | + unicode(self.ui.ui.message_label.text())) |
1343 | |
1344 | === modified file 'ubuntuone_installer/gui/qt/tests/test_gui.py' |
1345 | --- ubuntuone_installer/gui/qt/tests/test_gui.py 2011-07-22 18:53:04 +0000 |
1346 | +++ ubuntuone_installer/gui/qt/tests/test_gui.py 2011-07-28 18:40:32 +0000 |
1347 | @@ -26,7 +26,7 @@ |
1348 | |
1349 | from PyQt4 import QtCore |
1350 | |
1351 | -from ubuntuone.credentials import ( |
1352 | +from ubuntuone.platform.credentials import ( |
1353 | APP_NAME, |
1354 | TC_URL, |
1355 | ) |
1356 | |
1357 | === modified file 'ubuntuone_installer/gui/qt/tos.py' |
1358 | --- ubuntuone_installer/gui/qt/tos.py 2011-07-07 20:32:17 +0000 |
1359 | +++ ubuntuone_installer/gui/qt/tos.py 2011-07-28 18:40:32 +0000 |
1360 | @@ -1,66 +1,64 @@ |
1361 | -# -*- coding: utf-8 -*- |
1362 | - |
1363 | -# Authors: Roberto Alsina <roberto.alsina@canonical.com> |
1364 | -# |
1365 | -# Copyright 2011 Canonical Ltd. |
1366 | -# |
1367 | -# This program is free software: you can redistribute it and/or modify it |
1368 | -# under the terms of the GNU General Public License version 3, as published |
1369 | -# by the Free Software Foundation. |
1370 | -# |
1371 | -# This program is distributed in the hope that it will be useful, but |
1372 | -# WITHOUT ANY WARRANTY; without even the implied warranties of |
1373 | -# MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR |
1374 | -# PURPOSE. See the GNU General Public License for more details. |
1375 | -# |
1376 | -# You should have received a copy of the GNU General Public License along |
1377 | -# with this program. If not, see <http://www.gnu.org/licenses/>. |
1378 | - |
1379 | -"""Widget to view the Terms Of Service.""" |
1380 | - |
1381 | -import gettext |
1382 | - |
1383 | -from PyQt4 import QtGui |
1384 | - |
1385 | -import ubuntu_sso.qt.gui as sso_gui |
1386 | - |
1387 | -_ = gettext.gettext |
1388 | - |
1389 | - |
1390 | -class TosPage(sso_gui.TosPage): |
1391 | - |
1392 | - """Page to display the Terms of Service.""" |
1393 | - |
1394 | - # initializePage is inherited |
1395 | - # pylint: disable=C0103 |
1396 | - def initializePage(self): |
1397 | - """Setup UI details.""" |
1398 | - # Set the right texts and connections for buttons |
1399 | - self.setButtonText(QtGui.QWizard.NextButton, _("Agree && Install")) |
1400 | - self.setButtonText(QtGui.QWizard.CancelButton, |
1401 | - _("Disagree && Cancel")) |
1402 | - self.setButtonText(QtGui.QWizard.CustomButton1, _("&Print")) |
1403 | - |
1404 | - # This is just to catch an exception thrown when nothing |
1405 | - # is connected to the signal. It's not an exceptional |
1406 | - # condition at all. |
1407 | - try: |
1408 | - self.wizard().customButtonClicked.disconnect() |
1409 | - except TypeError: |
1410 | - pass |
1411 | - |
1412 | - self.wizard().customButtonClicked.connect(self.print_document) |
1413 | - |
1414 | - self.wizard().setButtonLayout([ |
1415 | - QtGui.QWizard.CustomButton1, |
1416 | - QtGui.QWizard.Stretch, |
1417 | - QtGui.QWizard.CancelButton, |
1418 | - QtGui.QWizard.BackButton, |
1419 | - ]) |
1420 | - |
1421 | - def print_document(self, button_id): |
1422 | - """Print the document displayed in textBrowser.""" |
1423 | - if button_id == QtGui.QWizard.CustomButton1: |
1424 | - previewer = QtGui.QPrintPreviewDialog( |
1425 | - paintRequested=self.ui.terms_webkit.print_) |
1426 | - previewer.exec_() |
1427 | +# -*- coding: utf-8 -*- |
1428 | + |
1429 | +# Authors: Roberto Alsina <roberto.alsina@canonical.com> |
1430 | +# |
1431 | +# Copyright 2011 Canonical Ltd. |
1432 | +# |
1433 | +# This program is free software: you can redistribute it and/or modify it |
1434 | +# under the terms of the GNU General Public License version 3, as published |
1435 | +# by the Free Software Foundation. |
1436 | +# |
1437 | +# This program is distributed in the hope that it will be useful, but |
1438 | +# WITHOUT ANY WARRANTY; without even the implied warranties of |
1439 | +# MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR |
1440 | +# PURPOSE. See the GNU General Public License for more details. |
1441 | +# |
1442 | +# You should have received a copy of the GNU General Public License along |
1443 | +# with this program. If not, see <http://www.gnu.org/licenses/>. |
1444 | + |
1445 | +"""Widget to view the Terms Of Service.""" |
1446 | + |
1447 | +import gettext |
1448 | + |
1449 | +from PyQt4 import QtGui |
1450 | + |
1451 | +import ubuntu_sso.qt.gui as sso_gui |
1452 | + |
1453 | +_ = gettext.gettext |
1454 | + |
1455 | + |
1456 | +class TosPage(sso_gui.TosPage): |
1457 | + |
1458 | + """Page to display the Terms of Service.""" |
1459 | + |
1460 | + # initializePage is inherited |
1461 | + # pylint: disable=C0103 |
1462 | + def initializePage(self): |
1463 | + """Setup UI details.""" |
1464 | + # Set the right texts and connections for buttons |
1465 | + self.setButtonText(QtGui.QWizard.NextButton, _("Agree && Install")) |
1466 | + self.setButtonText(QtGui.QWizard.CancelButton, |
1467 | + _("Disagree && Cancel")) |
1468 | + self.setButtonText(QtGui.QWizard.CustomButton1, _("&Print")) |
1469 | + |
1470 | + # This is just to catch an exception thrown when nothing |
1471 | + # is connected to the signal. It's not an exceptional |
1472 | + # condition at all. |
1473 | + try: |
1474 | + self.wizard().customButtonClicked.disconnect() |
1475 | + except TypeError: |
1476 | + pass |
1477 | + |
1478 | + self.wizard().customButtonClicked.connect(self.print_document) |
1479 | + |
1480 | + self.wizard().setButtonLayout([ |
1481 | + QtGui.QWizard.CustomButton1, |
1482 | + QtGui.QWizard.BackButton, |
1483 | + QtGui.QWizard.Stretch]) |
1484 | + |
1485 | + def print_document(self, button_id): |
1486 | + """Print the document displayed in textBrowser.""" |
1487 | + if button_id == QtGui.QWizard.CustomButton1: |
1488 | + previewer = QtGui.QPrintPreviewDialog( |
1489 | + paintRequested=self.ui.terms_webkit.print_) |
1490 | + previewer.exec_() |
1491 | |
1492 | === modified file 'ubuntuone_installer/logger.py' |
1493 | --- ubuntuone_installer/logger.py 2011-06-21 19:27:43 +0000 |
1494 | +++ ubuntuone_installer/logger.py 2011-07-28 18:40:32 +0000 |
1495 | @@ -26,7 +26,8 @@ |
1496 | from logging.handlers import RotatingFileHandler |
1497 | |
1498 | # pylint: disable=F0401,E0611 |
1499 | -from ubuntuone.logger import LOGFOLDER, LOGBACKUP, basic_formatter |
1500 | +from ubuntuone.logger import LOGBACKUP, basic_formatter |
1501 | +from ubuntuone.platform.xdg_base_directory import ubuntuone_log_dir |
1502 | |
1503 | |
1504 | if os.environ.get('DEBUG'): |
1505 | @@ -35,7 +36,8 @@ |
1506 | # Only log this level and above |
1507 | LOG_LEVEL = logging.DEBUG # before final release, switch to INFO |
1508 | |
1509 | -MAIN_HANDLER = RotatingFileHandler(os.path.join(LOGFOLDER, 'installer.log'), |
1510 | +FILE_NAME = os.path.join(ubuntuone_log_dir, 'installer.log') |
1511 | +MAIN_HANDLER = RotatingFileHandler(FILE_NAME, |
1512 | maxBytes=1048576, |
1513 | backupCount=LOGBACKUP) |
1514 | MAIN_HANDLER.setFormatter(basic_formatter) |
+1