Merge lp:~dobey/ubuntu/oneiric/ubuntu-sso-client/release-1-3-1 into lp:ubuntu/oneiric/ubuntu-sso-client
- Oneiric (11.10)
- release-1-3-1
- Merge into oneiric
Proposed by
dobey
Status: | Merged |
---|---|
Merged at revision: | 33 |
Proposed branch: | lp:~dobey/ubuntu/oneiric/ubuntu-sso-client/release-1-3-1 |
Merge into: | lp:ubuntu/oneiric/ubuntu-sso-client |
Diff against target: |
9779 lines (+7580/-1135) 45 files modified
PKG-INFO (+18/-1) README.windows (+56/-0) bin/windows-ubuntu-sso-login (+74/-0) data/gtk/ui.glade (+786/-0) data/qt/choose_sign_in.ui (+121/-0) data/qt/current_user_sign_in.ui (+154/-0) data/qt/email_verification.ui (+105/-0) data/qt/error_message.ui (+31/-0) data/qt/forgotten_password.ui (+191/-0) data/qt/reset_password.ui (+109/-0) data/qt/setup_account.ui (+290/-0) data/qt/success_message.ui (+31/-0) data/qt/terms_and_conditions.ui (+128/-0) data/ui.glade (+0/-786) debian/changelog (+11/-0) debian/watch (+1/-1) pylintrc (+1/-1) run-tests (+9/-3) run-tests.bat (+23/-15) setup.py (+314/-26) ubuntu_sso/gtk/gui.py (+2/-39) ubuntu_sso/gtk/tests/test_gui.py (+2/-0) ubuntu_sso/keyring/tests/test_windows.py (+13/-2) ubuntu_sso/keyring/windows.py (+2/-1) ubuntu_sso/main/__init__.py (+50/-9) ubuntu_sso/main/linux.py (+27/-49) ubuntu_sso/main/tests/test_common.py (+5/-6) ubuntu_sso/main/tests/test_linux.py (+42/-40) ubuntu_sso/main/tests/test_windows.py (+1208/-0) ubuntu_sso/main/windows.py (+926/-0) ubuntu_sso/networkstate/linux.py (+27/-8) ubuntu_sso/networkstate/tests/test_linux.py (+106/-90) ubuntu_sso/qt/__init__.py (+1/-0) ubuntu_sso/qt/controllers.py (+772/-0) ubuntu_sso/qt/gui.py (+429/-0) ubuntu_sso/qt/tests/__init__.py (+1/-0) ubuntu_sso/qt/tests/show_gui.py (+45/-0) ubuntu_sso/qt/tests/test_qt_views.py (+219/-0) ubuntu_sso/qt/tests/test_windows.py (+768/-0) ubuntu_sso/tests/test_account.py (+1/-1) ubuntu_sso/tests/test_credentials.py (+2/-1) ubuntu_sso/utils/tests/test_txsecrets.py (+114/-43) ubuntu_sso/utils/tests/test_ui.py (+125/-0) ubuntu_sso/utils/txsecrets.py (+57/-13) ubuntu_sso/utils/ui.py (+183/-0) |
To merge this branch: | bzr merge lp:~dobey/ubuntu/oneiric/ubuntu-sso-client/release-1-3-1 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Ubuntu branches | Pending | ||
Review via email: mp+65827@code.launchpad.net |
Commit message
Description of the change
To post a comment you must log in.
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'PKG-INFO' |
2 | --- PKG-INFO 2011-04-12 16:42:48 +0000 |
3 | +++ PKG-INFO 2011-06-24 19:23:07 +0000 |
4 | @@ -1,6 +1,6 @@ |
5 | Metadata-Version: 1.1 |
6 | Name: ubuntu-sso-client |
7 | -Version: 1.2.1 |
8 | +Version: 1.3.1 |
9 | Summary: Ubuntu Single Sign-On client |
10 | Home-page: https://launchpad.net/ubuntu-sso-client |
11 | Author: Natalia Bidart |
12 | @@ -8,4 +8,21 @@ |
13 | License: GPL v3 |
14 | Description: Desktop service to allow applications to sign into Ubuntu services via SSO |
15 | Platform: UNKNOWN |
16 | +Requires: Image |
17 | +Requires: PIL |
18 | +Requires: PyQt4.QtCore |
19 | +Requires: PyQt4.QtGui |
20 | +Requires: dbus |
21 | +Requires: gobject |
22 | +Requires: gtk |
23 | +Requires: keyring |
24 | +Requires: mocker |
25 | +Requires: oauth |
26 | +Requires: twisted.internet |
27 | +Requires: twisted.spread.pb |
28 | +Requires: twisted.trial |
29 | +Requires: ubuntuone.devtools.handlers |
30 | +Requires: ubuntuone.devtools.testcase |
31 | +Requires: webkit |
32 | +Requires: xdg |
33 | Provides: ubuntu_sso |
34 | |
35 | === added file 'README.windows' |
36 | --- README.windows 1970-01-01 00:00:00 +0000 |
37 | +++ README.windows 2011-06-24 19:23:07 +0000 |
38 | @@ -0,0 +1,56 @@ |
39 | += Ubuntu Single Sign-On Client = |
40 | + |
41 | +Ubuntu Single Sign-On Client has been ported to windows to allow Windows |
42 | +applications to take advantage of the service. This README contains instructions |
43 | +on how to build the project so that it can be distributed as a .exe file. |
44 | + |
45 | +In order to be able to build a .exe for the client py2exe is used. The |
46 | +following are a number of recommendations to follow to ensure that your |
47 | +environment is correctly setup in order to use py2exe successfully. |
48 | + |
49 | +== Egg support == |
50 | + |
51 | +As version 0.6.5 py2exe does not have egg support out of the box an therefore |
52 | +when building the .exe file you have to work around this limitation. At the |
53 | +moment the recommended way to work around this issue is to tell easy_install |
54 | +to always unzip the eggs so that py2xe can work with them. In order to |
55 | +unzip an egg when installing it with easy_install you can use the |
56 | +--always-unzip option. |
57 | + |
58 | +Example: |
59 | + |
60 | +easy_install --always-unzip oauth |
61 | + |
62 | +== PyQt issues == |
63 | + |
64 | +Do to the way that py2exe works, there are a number of issues that may happen |
65 | +depending on the setup of you system. |
66 | + |
67 | +=== PyQt and PySide === |
68 | + |
69 | +If you have PyQt and PySide py2exe will try to include both of them. The reason |
70 | +for this to happen is due to the way in which py2exe looks for dependencies. The |
71 | +module_finder form py2exe does not distinguish between normal imports and those |
72 | +that are wrapped around a try/except block. This means that the following code |
73 | +from the qtreactor will make py2exe believe that both are needed: |
74 | + |
75 | +This is a dangerous situation because PyQt and PySide do have different release |
76 | +cycles and normally do not depend on the same version of Qt. If in you system |
77 | +you have the two libraries using different version of Qt the build package |
78 | +might import dlls from different version which results in a runtime error. |
79 | + |
80 | +There are two ways to solve this issue: |
81 | + |
82 | +* Uninstall PySide |
83 | +* Ensure that both libs do depend on the same version of Qt. |
84 | + |
85 | +== PyQt and PyInstaller === |
86 | + |
87 | +PyInstaller has support for PyQt application out of the box. This means that |
88 | +PyInstaller has the Qt dlls in its installation. As with the issue with PySide |
89 | +it might happen that the dlls used by PyInstaller and the ones used by the PyQt |
90 | +version installed in you machine differ in their version. In cases where |
91 | +PyInstaller is present in you python path (for example in C:\Python27\Scripts) |
92 | +py2exe will copy the dlls found in the PyInstaller directory for an unknown |
93 | +reason. This will raise a runtime error complaining about the use of dlls from |
94 | +different versions. |
95 | \ No newline at end of file |
96 | |
97 | === added file 'bin/windows-ubuntu-sso-login' |
98 | --- bin/windows-ubuntu-sso-login 1970-01-01 00:00:00 +0000 |
99 | +++ bin/windows-ubuntu-sso-login 2011-06-24 19:23:07 +0000 |
100 | @@ -0,0 +1,74 @@ |
101 | +#!/usr/bin/env python |
102 | +# -*- coding: utf-8 -*- |
103 | +# Author: Manuel de la Pena <manuel@canonical.com> |
104 | +# |
105 | +# Copyright 2011 Canonical Ltd. |
106 | +# |
107 | +# This program is free software: you can redistribute it and/or modify it |
108 | +# under the terms of the GNU General Public License version 3, as published |
109 | +# by the Free Software Foundation. |
110 | +# |
111 | +# This program is distributed in the hope that it will be useful, but |
112 | +# WITHOUT ANY WARRANTY; without even the implied warranties of |
113 | +# MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR |
114 | +# PURPOSE. See the GNU General Public License for more details. |
115 | +# |
116 | +# You should have received a copy of the GNU General Public License along |
117 | +# with this program. If not, see <http://www.gnu.org/licenses/>. |
118 | +"""Start the sso service on a windows machine.""" |
119 | + |
120 | +# disable the name warning and complains about twisted |
121 | +# pylint: disable=C0103, E1101 |
122 | +import sys |
123 | + |
124 | +# pylint: disable=F0401 |
125 | +from win32api import GetUserNameEx |
126 | +from win32con import NameSamCompatible |
127 | +# pylint: enable=F0401 |
128 | + |
129 | +# import the qt reactor so that the qt ui can be used |
130 | +# pylint: disable=F0401 |
131 | +from txnamedpipes import threadedreactor |
132 | +threadedreactor.install() |
133 | +from txnamedpipes.qt import Interleaver |
134 | +# pylint: enable=F0401 |
135 | + |
136 | +from PyQt4.QtGui import QApplication |
137 | +from twisted.internet import reactor |
138 | +from twisted.spread.pb import PBServerFactory |
139 | +from twisted.internet.task import LoopingCall |
140 | + |
141 | +from ubuntu_sso.main.windows import ( |
142 | + CredentialsManagement, |
143 | + SSOCredentials, |
144 | + SSOLogin, |
145 | + UbuntuSSORoot, |
146 | + NAMED_PIPE_URL) |
147 | + |
148 | +# pylint: disable=W0702 |
149 | + |
150 | +def add_timeout(interval, callback, *args, **kwargs): |
151 | + """Add a timeout callback as a task.""" |
152 | + time_out_task = LoopingCall(callback, *args, **kwargs) |
153 | + time_out_task.start(interval/1000, now=False) |
154 | + |
155 | + |
156 | +def shutdown(): |
157 | + """Shutdown all the running processes and threads.""" |
158 | + reactor.stop() |
159 | + |
160 | + |
161 | +if __name__ == '__main__': |
162 | + # check if the service is running by calling the named pipe, if not |
163 | + # start it. |
164 | + login = SSOLogin('ignored') |
165 | + creds = SSOCredentials() |
166 | + creds_management = CredentialsManagement(add_timeout, shutdown) |
167 | + root = UbuntuSSORoot(login, creds, creds_management) |
168 | + named_pipe = NAMED_PIPE_URL % GetUserNameEx(NameSamCompatible) |
169 | + listener = reactor.listenPipe(named_pipe, PBServerFactory(root)) |
170 | + # instantiated an qapp so that we can show the ui |
171 | + ii = Interleaver() |
172 | + reactor.interleave(ii.toInterleave) |
173 | + app = QApplication(sys.argv) |
174 | + app.exec_() |
175 | |
176 | === added directory 'data/gtk' |
177 | === added file 'data/gtk/ui.glade' |
178 | --- data/gtk/ui.glade 1970-01-01 00:00:00 +0000 |
179 | +++ data/gtk/ui.glade 2011-06-24 19:23:07 +0000 |
180 | @@ -0,0 +1,786 @@ |
181 | +<?xml version="1.0" encoding="UTF-8"?> |
182 | +<interface> |
183 | + <requires lib="gtk+" version="2.16"/> |
184 | + <!-- interface-naming-policy project-wide --> |
185 | + <object class="GtkWindow" id="window"> |
186 | + <property name="border_width">10</property> |
187 | + <property name="window_position">center</property> |
188 | + <signal name="delete_event" handler="on_close_clicked"/> |
189 | + <child> |
190 | + <object class="GtkVBox" id="window_vbox"> |
191 | + <property name="visible">True</property> |
192 | + <property name="spacing">5</property> |
193 | + <child> |
194 | + <object class="GtkLabel" id="header_label"> |
195 | + <property name="visible">True</property> |
196 | + <property name="xalign">0</property> |
197 | + <property name="label" translatable="yes">Header Label </property> |
198 | + <property name="wrap">True</property> |
199 | + </object> |
200 | + <packing> |
201 | + <property name="expand">False</property> |
202 | + <property name="padding">5</property> |
203 | + <property name="position">0</property> |
204 | + </packing> |
205 | + </child> |
206 | + <child> |
207 | + <object class="GtkLabel" id="help_label"> |
208 | + <property name="visible">True</property> |
209 | + <property name="xalign">0</property> |
210 | + <property name="label" translatable="yes">help label</property> |
211 | + <property name="wrap">True</property> |
212 | + </object> |
213 | + <packing> |
214 | + <property name="expand">False</property> |
215 | + <property name="position">1</property> |
216 | + </packing> |
217 | + </child> |
218 | + <child> |
219 | + <object class="GtkLabel" id="warning_label"> |
220 | + <property name="visible">True</property> |
221 | + <property name="xalign">0</property> |
222 | + <property name="label" translatable="yes">warning label</property> |
223 | + <property name="wrap">True</property> |
224 | + </object> |
225 | + <packing> |
226 | + <property name="expand">False</property> |
227 | + <property name="position">2</property> |
228 | + </packing> |
229 | + </child> |
230 | + <child> |
231 | + <object class="GtkNotebook" id="content"> |
232 | + <property name="visible">True</property> |
233 | + <property name="can_focus">True</property> |
234 | + <property name="show_tabs">False</property> |
235 | + <property name="show_border">False</property> |
236 | + </object> |
237 | + <packing> |
238 | + <property name="position">3</property> |
239 | + </packing> |
240 | + </child> |
241 | + </object> |
242 | + </child> |
243 | + </object> |
244 | + <object class="GtkVBox" id="enter_details_vbox"> |
245 | + <property name="visible">True</property> |
246 | + <property name="spacing">5</property> |
247 | + <child> |
248 | + <object class="GtkHBox" id="emails_hbox"> |
249 | + <property name="visible">True</property> |
250 | + <property name="spacing">5</property> |
251 | + <property name="homogeneous">True</property> |
252 | + <child> |
253 | + <placeholder/> |
254 | + </child> |
255 | + <child> |
256 | + <placeholder/> |
257 | + </child> |
258 | + </object> |
259 | + <packing> |
260 | + <property name="expand">False</property> |
261 | + <property name="position">0</property> |
262 | + </packing> |
263 | + </child> |
264 | + <child> |
265 | + <object class="GtkHBox" id="passwords_hbox"> |
266 | + <property name="visible">True</property> |
267 | + <property name="spacing">5</property> |
268 | + <property name="homogeneous">True</property> |
269 | + <child> |
270 | + <placeholder/> |
271 | + </child> |
272 | + <child> |
273 | + <placeholder/> |
274 | + </child> |
275 | + </object> |
276 | + <packing> |
277 | + <property name="expand">False</property> |
278 | + <property name="position">1</property> |
279 | + </packing> |
280 | + </child> |
281 | + <child> |
282 | + <object class="GtkLabel" id="password_help_label"> |
283 | + <property name="visible">True</property> |
284 | + <property name="label">password help</property> |
285 | + <property name="wrap">True</property> |
286 | + </object> |
287 | + <packing> |
288 | + <property name="expand">False</property> |
289 | + <property name="position">2</property> |
290 | + </packing> |
291 | + </child> |
292 | + <child> |
293 | + <object class="GtkAlignment" id="alignment5"> |
294 | + <property name="visible">True</property> |
295 | + <property name="xscale">0</property> |
296 | + <property name="yscale">0</property> |
297 | + <child> |
298 | + <object class="GtkHBox" id="hbox1"> |
299 | + <property name="visible">True</property> |
300 | + <child> |
301 | + <object class="GtkVBox" id="captcha_vbox"> |
302 | + <property name="width_request">300</property> |
303 | + <property name="height_request">60</property> |
304 | + <property name="visible">True</property> |
305 | + <child> |
306 | + <object class="GtkEventBox" id="captcha_loading"> |
307 | + <property name="width_request">300</property> |
308 | + <property name="height_request">60</property> |
309 | + <property name="visible">True</property> |
310 | + <child> |
311 | + <placeholder/> |
312 | + </child> |
313 | + </object> |
314 | + <packing> |
315 | + <property name="expand">False</property> |
316 | + <property name="fill">False</property> |
317 | + <property name="position">0</property> |
318 | + </packing> |
319 | + </child> |
320 | + <child> |
321 | + <object class="GtkImage" id="captcha_image"> |
322 | + <property name="width_request">300</property> |
323 | + <property name="visible">True</property> |
324 | + <property name="stock">gtk-missing-image</property> |
325 | + </object> |
326 | + <packing> |
327 | + <property name="position">1</property> |
328 | + </packing> |
329 | + </child> |
330 | + </object> |
331 | + <packing> |
332 | + <property name="expand">False</property> |
333 | + <property name="fill">False</property> |
334 | + <property name="position">0</property> |
335 | + </packing> |
336 | + </child> |
337 | + <child> |
338 | + <object class="GtkVBox" id="vbox1"> |
339 | + <property name="visible">True</property> |
340 | + <child> |
341 | + <object class="GtkButton" id="captcha_reload_button"> |
342 | + <property name="visible">True</property> |
343 | + <property name="can_focus">True</property> |
344 | + <property name="receives_default">True</property> |
345 | + <property name="relief">none</property> |
346 | + <property name="focus_on_click">False</property> |
347 | + <signal name="clicked" handler="on_captcha_reload_button_clicked"/> |
348 | + <child> |
349 | + <object class="GtkImage" id="image1"> |
350 | + <property name="visible">True</property> |
351 | + <property name="icon_name">reload</property> |
352 | + </object> |
353 | + </child> |
354 | + </object> |
355 | + <packing> |
356 | + <property name="expand">False</property> |
357 | + <property name="position">0</property> |
358 | + </packing> |
359 | + </child> |
360 | + <child> |
361 | + <placeholder/> |
362 | + </child> |
363 | + <child> |
364 | + <placeholder/> |
365 | + </child> |
366 | + </object> |
367 | + <packing> |
368 | + <property name="expand">False</property> |
369 | + <property name="position">1</property> |
370 | + </packing> |
371 | + </child> |
372 | + </object> |
373 | + </child> |
374 | + </object> |
375 | + <packing> |
376 | + <property name="expand">False</property> |
377 | + <property name="position">3</property> |
378 | + </packing> |
379 | + </child> |
380 | + <child> |
381 | + <object class="GtkVBox" id="captcha_solution_vbox"> |
382 | + <property name="visible">True</property> |
383 | + <child> |
384 | + <placeholder/> |
385 | + </child> |
386 | + </object> |
387 | + <packing> |
388 | + <property name="expand">False</property> |
389 | + <property name="position">4</property> |
390 | + </packing> |
391 | + </child> |
392 | + <child> |
393 | + <object class="GtkCheckButton" id="yes_to_updates_checkbutton"> |
394 | + <property name="label" translatable="yes">yes to updates</property> |
395 | + <property name="visible">True</property> |
396 | + <property name="can_focus">True</property> |
397 | + <property name="receives_default">False</property> |
398 | + <property name="active">True</property> |
399 | + <property name="draw_indicator">True</property> |
400 | + </object> |
401 | + <packing> |
402 | + <property name="expand">False</property> |
403 | + <property name="position">5</property> |
404 | + </packing> |
405 | + </child> |
406 | + <child> |
407 | + <object class="GtkVBox" id="tc_vbox"> |
408 | + <property name="visible">True</property> |
409 | + <property name="spacing">5</property> |
410 | + <child> |
411 | + <object class="GtkCheckButton" id="yes_to_tc_checkbutton"> |
412 | + <property name="label" translatable="yes">yes to tc</property> |
413 | + <property name="visible">True</property> |
414 | + <property name="can_focus">True</property> |
415 | + <property name="receives_default">False</property> |
416 | + <property name="active">True</property> |
417 | + <property name="draw_indicator">True</property> |
418 | + </object> |
419 | + <packing> |
420 | + <property name="expand">False</property> |
421 | + <property name="position">0</property> |
422 | + </packing> |
423 | + </child> |
424 | + <child> |
425 | + <object class="GtkHButtonBox" id="hbuttonbox3"> |
426 | + <property name="visible">True</property> |
427 | + <property name="layout_style">start</property> |
428 | + <child> |
429 | + <object class="GtkButton" id="tc_button"> |
430 | + <property name="label">show tc</property> |
431 | + <property name="visible">True</property> |
432 | + <property name="can_focus">True</property> |
433 | + <property name="receives_default">True</property> |
434 | + <signal name="clicked" handler="on_tc_button_clicked"/> |
435 | + </object> |
436 | + <packing> |
437 | + <property name="expand">False</property> |
438 | + <property name="fill">False</property> |
439 | + <property name="position">1</property> |
440 | + </packing> |
441 | + </child> |
442 | + </object> |
443 | + <packing> |
444 | + <property name="expand">False</property> |
445 | + <property name="position">1</property> |
446 | + </packing> |
447 | + </child> |
448 | + <child> |
449 | + <object class="GtkLabel" id="tc_warning_label"> |
450 | + <property name="visible">True</property> |
451 | + <property name="xalign">0</property> |
452 | + <property name="label">tc warning</property> |
453 | + <property name="wrap">True</property> |
454 | + </object> |
455 | + <packing> |
456 | + <property name="position">2</property> |
457 | + </packing> |
458 | + </child> |
459 | + </object> |
460 | + <packing> |
461 | + <property name="expand">False</property> |
462 | + <property name="position">6</property> |
463 | + </packing> |
464 | + </child> |
465 | + <child> |
466 | + <object class="GtkHBox" id="hbox2"> |
467 | + <property name="visible">True</property> |
468 | + <property name="spacing">5</property> |
469 | + <child> |
470 | + <object class="GtkHButtonBox" id="hbuttonbox9"> |
471 | + <property name="visible">True</property> |
472 | + <property name="layout_style">start</property> |
473 | + <child> |
474 | + <object class="GtkLinkButton" id="login_button"> |
475 | + <property name="label">login button</property> |
476 | + <property name="visible">True</property> |
477 | + <property name="can_focus">True</property> |
478 | + <property name="receives_default">True</property> |
479 | + <property name="relief">none</property> |
480 | + <signal name="clicked" handler="on_sign_in_button_clicked"/> |
481 | + </object> |
482 | + <packing> |
483 | + <property name="expand">False</property> |
484 | + <property name="fill">False</property> |
485 | + <property name="position">0</property> |
486 | + </packing> |
487 | + </child> |
488 | + </object> |
489 | + <packing> |
490 | + <property name="expand">False</property> |
491 | + <property name="position">0</property> |
492 | + </packing> |
493 | + </child> |
494 | + <child> |
495 | + <object class="GtkHButtonBox" id="hbuttonbox1"> |
496 | + <property name="visible">True</property> |
497 | + <property name="spacing">5</property> |
498 | + <property name="layout_style">end</property> |
499 | + <child> |
500 | + <object class="GtkButton" id="join_cancel_button"> |
501 | + <property name="label">gtk-cancel</property> |
502 | + <property name="visible">True</property> |
503 | + <property name="can_focus">True</property> |
504 | + <property name="receives_default">True</property> |
505 | + <property name="use_stock">True</property> |
506 | + </object> |
507 | + <packing> |
508 | + <property name="expand">False</property> |
509 | + <property name="fill">False</property> |
510 | + <property name="position">0</property> |
511 | + </packing> |
512 | + </child> |
513 | + <child> |
514 | + <object class="GtkButton" id="join_ok_button"> |
515 | + <property name="label">gtk-go-forward</property> |
516 | + <property name="visible">True</property> |
517 | + <property name="can_focus">True</property> |
518 | + <property name="receives_default">True</property> |
519 | + <property name="use_stock">True</property> |
520 | + <signal name="clicked" handler="on_join_ok_button_clicked"/> |
521 | + </object> |
522 | + <packing> |
523 | + <property name="expand">False</property> |
524 | + <property name="fill">False</property> |
525 | + <property name="position">1</property> |
526 | + </packing> |
527 | + </child> |
528 | + </object> |
529 | + <packing> |
530 | + <property name="expand">False</property> |
531 | + <property name="pack_type">end</property> |
532 | + <property name="position">1</property> |
533 | + </packing> |
534 | + </child> |
535 | + </object> |
536 | + <packing> |
537 | + <property name="expand">False</property> |
538 | + <property name="pack_type">end</property> |
539 | + <property name="position">7</property> |
540 | + </packing> |
541 | + </child> |
542 | + </object> |
543 | + <object class="GtkVBox" id="processing_vbox"> |
544 | + <property name="visible">True</property> |
545 | + <property name="spacing">10</property> |
546 | + <child> |
547 | + <placeholder/> |
548 | + </child> |
549 | + </object> |
550 | + <object class="GtkVBox" id="verify_email_vbox"> |
551 | + <property name="visible">True</property> |
552 | + <property name="spacing">10</property> |
553 | + <child> |
554 | + <object class="GtkAlignment" id="alignment4"> |
555 | + <property name="visible">True</property> |
556 | + <property name="xscale">0</property> |
557 | + <property name="yscale">0</property> |
558 | + <child> |
559 | + <object class="GtkVBox" id="verify_email_details_vbox"> |
560 | + <property name="visible">True</property> |
561 | + <child> |
562 | + <placeholder/> |
563 | + </child> |
564 | + </object> |
565 | + </child> |
566 | + </object> |
567 | + <packing> |
568 | + <property name="position">0</property> |
569 | + </packing> |
570 | + </child> |
571 | + <child> |
572 | + <object class="GtkHButtonBox" id="hbuttonbox2"> |
573 | + <property name="visible">True</property> |
574 | + <property name="spacing">5</property> |
575 | + <property name="layout_style">end</property> |
576 | + <child> |
577 | + <object class="GtkButton" id="verify_token_button"> |
578 | + <property name="label">gtk-ok</property> |
579 | + <property name="visible">True</property> |
580 | + <property name="can_focus">True</property> |
581 | + <property name="receives_default">True</property> |
582 | + <property name="use_stock">True</property> |
583 | + <signal name="clicked" handler="on_verify_token_button_clicked"/> |
584 | + </object> |
585 | + <packing> |
586 | + <property name="expand">False</property> |
587 | + <property name="fill">False</property> |
588 | + <property name="position">0</property> |
589 | + </packing> |
590 | + </child> |
591 | + </object> |
592 | + <packing> |
593 | + <property name="expand">False</property> |
594 | + <property name="position">1</property> |
595 | + </packing> |
596 | + </child> |
597 | + </object> |
598 | + <object class="GtkVBox" id="tc_browser_vbox"> |
599 | + <property name="visible">True</property> |
600 | + <signal name="hide" handler="on_tc_browser_vbox_hide"/> |
601 | + <child> |
602 | + <object class="GtkScrolledWindow" id="tc_browser_window"> |
603 | + <property name="visible">True</property> |
604 | + <property name="can_focus">True</property> |
605 | + <property name="border_width">10</property> |
606 | + <property name="hscrollbar_policy">never</property> |
607 | + <property name="vscrollbar_policy">automatic</property> |
608 | + <property name="shadow_type">in</property> |
609 | + <child> |
610 | + <placeholder/> |
611 | + </child> |
612 | + </object> |
613 | + <packing> |
614 | + <property name="position">0</property> |
615 | + </packing> |
616 | + </child> |
617 | + <child> |
618 | + <object class="GtkHButtonBox" id="hbuttonbox4"> |
619 | + <property name="visible">True</property> |
620 | + <property name="layout_style">end</property> |
621 | + <child> |
622 | + <object class="GtkButton" id="tc_back_button"> |
623 | + <property name="label">gtk-go-back</property> |
624 | + <property name="visible">True</property> |
625 | + <property name="can_focus">True</property> |
626 | + <property name="receives_default">True</property> |
627 | + <property name="use_stock">True</property> |
628 | + <signal name="clicked" handler="on_tc_back_button_clicked"/> |
629 | + </object> |
630 | + <packing> |
631 | + <property name="expand">False</property> |
632 | + <property name="fill">False</property> |
633 | + <property name="position">0</property> |
634 | + </packing> |
635 | + </child> |
636 | + </object> |
637 | + <packing> |
638 | + <property name="expand">False</property> |
639 | + <property name="position">1</property> |
640 | + </packing> |
641 | + </child> |
642 | + </object> |
643 | + <object class="GtkVBox" id="login_vbox"> |
644 | + <property name="visible">True</property> |
645 | + <property name="spacing">10</property> |
646 | + <child> |
647 | + <object class="GtkAlignment" id="alignment3"> |
648 | + <property name="visible">True</property> |
649 | + <property name="xscale">0</property> |
650 | + <property name="yscale">0</property> |
651 | + <child> |
652 | + <object class="GtkVBox" id="login_details_vbox"> |
653 | + <property name="visible">True</property> |
654 | + <property name="spacing">5</property> |
655 | + <child> |
656 | + <placeholder/> |
657 | + </child> |
658 | + <child> |
659 | + <placeholder/> |
660 | + </child> |
661 | + </object> |
662 | + </child> |
663 | + </object> |
664 | + <packing> |
665 | + <property name="position">0</property> |
666 | + </packing> |
667 | + </child> |
668 | + <child> |
669 | + <object class="GtkHBox" id="hbox3"> |
670 | + <property name="visible">True</property> |
671 | + <property name="spacing">5</property> |
672 | + <child> |
673 | + <object class="GtkHButtonBox" id="hbuttonbox10"> |
674 | + <property name="visible">True</property> |
675 | + <property name="layout_style">start</property> |
676 | + <child> |
677 | + <object class="GtkLinkButton" id="forgotten_password_button"> |
678 | + <property name="label" translatable="yes">button</property> |
679 | + <property name="visible">True</property> |
680 | + <property name="can_focus">True</property> |
681 | + <property name="receives_default">True</property> |
682 | + <property name="has_tooltip">True</property> |
683 | + <property name="relief">none</property> |
684 | + <signal name="clicked" handler="on_forgotten_password_button_clicked"/> |
685 | + </object> |
686 | + <packing> |
687 | + <property name="expand">False</property> |
688 | + <property name="fill">False</property> |
689 | + <property name="padding">10</property> |
690 | + <property name="position">0</property> |
691 | + </packing> |
692 | + </child> |
693 | + </object> |
694 | + <packing> |
695 | + <property name="expand">False</property> |
696 | + <property name="position">0</property> |
697 | + </packing> |
698 | + </child> |
699 | + <child> |
700 | + <object class="GtkHButtonBox" id="hbuttonbox5"> |
701 | + <property name="visible">True</property> |
702 | + <property name="spacing">5</property> |
703 | + <property name="layout_style">end</property> |
704 | + <child> |
705 | + <object class="GtkButton" id="login_cancel_button"> |
706 | + <property name="label">gtk-cancel</property> |
707 | + <property name="visible">True</property> |
708 | + <property name="can_focus">True</property> |
709 | + <property name="receives_default">True</property> |
710 | + <property name="use_stock">True</property> |
711 | + </object> |
712 | + <packing> |
713 | + <property name="expand">False</property> |
714 | + <property name="fill">False</property> |
715 | + <property name="position">0</property> |
716 | + </packing> |
717 | + </child> |
718 | + <child> |
719 | + <object class="GtkButton" id="login_back_button"> |
720 | + <property name="label">gtk-go-back</property> |
721 | + <property name="visible">True</property> |
722 | + <property name="can_focus">True</property> |
723 | + <property name="receives_default">True</property> |
724 | + <property name="use_stock">True</property> |
725 | + <signal name="clicked" handler="on_login_back_button_clicked"/> |
726 | + </object> |
727 | + <packing> |
728 | + <property name="expand">False</property> |
729 | + <property name="fill">False</property> |
730 | + <property name="position">1</property> |
731 | + </packing> |
732 | + </child> |
733 | + <child> |
734 | + <object class="GtkButton" id="login_ok_button"> |
735 | + <property name="label">gtk-connect</property> |
736 | + <property name="visible">True</property> |
737 | + <property name="can_focus">True</property> |
738 | + <property name="receives_default">True</property> |
739 | + <property name="use_stock">True</property> |
740 | + <signal name="clicked" handler="on_login_connect_button_clicked"/> |
741 | + </object> |
742 | + <packing> |
743 | + <property name="expand">False</property> |
744 | + <property name="fill">False</property> |
745 | + <property name="position">2</property> |
746 | + </packing> |
747 | + </child> |
748 | + </object> |
749 | + <packing> |
750 | + <property name="expand">False</property> |
751 | + <property name="pack_type">end</property> |
752 | + <property name="position">1</property> |
753 | + </packing> |
754 | + </child> |
755 | + </object> |
756 | + <packing> |
757 | + <property name="expand">False</property> |
758 | + <property name="position">1</property> |
759 | + </packing> |
760 | + </child> |
761 | + </object> |
762 | + <object class="GtkVBox" id="request_password_token_vbox"> |
763 | + <property name="visible">True</property> |
764 | + <property name="spacing">10</property> |
765 | + <child> |
766 | + <object class="GtkAlignment" id="alignment2"> |
767 | + <property name="visible">True</property> |
768 | + <property name="xscale">0</property> |
769 | + <property name="yscale">0</property> |
770 | + <child> |
771 | + <object class="GtkVBox" id="request_password_token_details_vbox"> |
772 | + <property name="visible">True</property> |
773 | + <property name="spacing">5</property> |
774 | + <child> |
775 | + <placeholder/> |
776 | + </child> |
777 | + </object> |
778 | + </child> |
779 | + </object> |
780 | + <packing> |
781 | + <property name="position">0</property> |
782 | + </packing> |
783 | + </child> |
784 | + <child> |
785 | + <object class="GtkHButtonBox" id="hbuttonbox7"> |
786 | + <property name="visible">True</property> |
787 | + <property name="spacing">5</property> |
788 | + <property name="layout_style">end</property> |
789 | + <child> |
790 | + <object class="GtkButton" id="request_password_token_cancel_button"> |
791 | + <property name="label">gtk-cancel</property> |
792 | + <property name="visible">True</property> |
793 | + <property name="can_focus">True</property> |
794 | + <property name="receives_default">True</property> |
795 | + <property name="use_stock">True</property> |
796 | + </object> |
797 | + <packing> |
798 | + <property name="expand">False</property> |
799 | + <property name="fill">False</property> |
800 | + <property name="position">0</property> |
801 | + </packing> |
802 | + </child> |
803 | + <child> |
804 | + <object class="GtkButton" id="request_password_token_back_button"> |
805 | + <property name="label">gtk-go-back</property> |
806 | + <property name="visible">True</property> |
807 | + <property name="can_focus">True</property> |
808 | + <property name="receives_default">True</property> |
809 | + <property name="use_stock">True</property> |
810 | + <signal name="clicked" handler="on_request_password_token_back_button_clicked"/> |
811 | + </object> |
812 | + <packing> |
813 | + <property name="expand">False</property> |
814 | + <property name="fill">False</property> |
815 | + <property name="position">1</property> |
816 | + </packing> |
817 | + </child> |
818 | + <child> |
819 | + <object class="GtkButton" id="request_password_token_ok_button"> |
820 | + <property name="label">gtk-ok</property> |
821 | + <property name="visible">True</property> |
822 | + <property name="can_focus">True</property> |
823 | + <property name="receives_default">True</property> |
824 | + <property name="use_stock">True</property> |
825 | + <signal name="clicked" handler="on_request_password_token_ok_button_clicked"/> |
826 | + </object> |
827 | + <packing> |
828 | + <property name="expand">False</property> |
829 | + <property name="fill">False</property> |
830 | + <property name="position">2</property> |
831 | + </packing> |
832 | + </child> |
833 | + </object> |
834 | + <packing> |
835 | + <property name="expand">False</property> |
836 | + <property name="position">1</property> |
837 | + </packing> |
838 | + </child> |
839 | + </object> |
840 | + <object class="GtkVBox" id="set_new_password_vbox"> |
841 | + <property name="visible">True</property> |
842 | + <property name="spacing">10</property> |
843 | + <child> |
844 | + <object class="GtkVBox" id="vbox2"> |
845 | + <property name="visible">True</property> |
846 | + <child> |
847 | + <object class="GtkLabel" id="reset_password_help_label"> |
848 | + <property name="visible">True</property> |
849 | + <property name="label">label</property> |
850 | + <property name="wrap">True</property> |
851 | + </object> |
852 | + <packing> |
853 | + <property name="expand">False</property> |
854 | + <property name="position">0</property> |
855 | + </packing> |
856 | + </child> |
857 | + <child> |
858 | + <object class="GtkAlignment" id="alignment1"> |
859 | + <property name="visible">True</property> |
860 | + <property name="xscale">0</property> |
861 | + <property name="yscale">0</property> |
862 | + <child> |
863 | + <object class="GtkVBox" id="set_new_password_details_vbox"> |
864 | + <property name="visible">True</property> |
865 | + <property name="spacing">5</property> |
866 | + <child> |
867 | + <placeholder/> |
868 | + </child> |
869 | + <child> |
870 | + <placeholder/> |
871 | + </child> |
872 | + <child> |
873 | + <placeholder/> |
874 | + </child> |
875 | + </object> |
876 | + </child> |
877 | + </object> |
878 | + <packing> |
879 | + <property name="position">1</property> |
880 | + </packing> |
881 | + </child> |
882 | + </object> |
883 | + <packing> |
884 | + <property name="position">0</property> |
885 | + </packing> |
886 | + </child> |
887 | + <child> |
888 | + <object class="GtkHButtonBox" id="hbuttonbox6"> |
889 | + <property name="visible">True</property> |
890 | + <property name="spacing">5</property> |
891 | + <property name="layout_style">end</property> |
892 | + <child> |
893 | + <object class="GtkButton" id="set_new_password_cancel_button"> |
894 | + <property name="label">gtk-cancel</property> |
895 | + <property name="visible">True</property> |
896 | + <property name="can_focus">True</property> |
897 | + <property name="receives_default">True</property> |
898 | + <property name="use_stock">True</property> |
899 | + </object> |
900 | + <packing> |
901 | + <property name="expand">False</property> |
902 | + <property name="fill">False</property> |
903 | + <property name="position">0</property> |
904 | + </packing> |
905 | + </child> |
906 | + <child> |
907 | + <object class="GtkButton" id="set_new_password_ok_button"> |
908 | + <property name="label">gtk-ok</property> |
909 | + <property name="visible">True</property> |
910 | + <property name="can_focus">True</property> |
911 | + <property name="receives_default">True</property> |
912 | + <property name="use_stock">True</property> |
913 | + <signal name="clicked" handler="on_set_new_password_ok_button_clicked"/> |
914 | + </object> |
915 | + <packing> |
916 | + <property name="expand">False</property> |
917 | + <property name="fill">False</property> |
918 | + <property name="position">1</property> |
919 | + </packing> |
920 | + </child> |
921 | + </object> |
922 | + <packing> |
923 | + <property name="expand">False</property> |
924 | + <property name="position">1</property> |
925 | + </packing> |
926 | + </child> |
927 | + </object> |
928 | + <object class="GtkVBox" id="finish_vbox"> |
929 | + <property name="visible">True</property> |
930 | + <property name="spacing">10</property> |
931 | + <child> |
932 | + <object class="GtkLabel" id="finish_label"> |
933 | + <property name="visible">True</property> |
934 | + <property name="wrap">True</property> |
935 | + </object> |
936 | + <packing> |
937 | + <property name="position">0</property> |
938 | + </packing> |
939 | + </child> |
940 | + <child> |
941 | + <object class="GtkHButtonBox" id="hbuttonbox8"> |
942 | + <property name="visible">True</property> |
943 | + <property name="layout_style">end</property> |
944 | + <child> |
945 | + <object class="GtkButton" id="finish_close_button"> |
946 | + <property name="label">gtk-close</property> |
947 | + <property name="visible">True</property> |
948 | + <property name="can_focus">True</property> |
949 | + <property name="receives_default">True</property> |
950 | + <property name="use_stock">True</property> |
951 | + <signal name="clicked" handler="on_close_clicked"/> |
952 | + </object> |
953 | + <packing> |
954 | + <property name="expand">False</property> |
955 | + <property name="fill">False</property> |
956 | + <property name="position">0</property> |
957 | + </packing> |
958 | + </child> |
959 | + </object> |
960 | + <packing> |
961 | + <property name="expand">False</property> |
962 | + <property name="position">1</property> |
963 | + </packing> |
964 | + </child> |
965 | + </object> |
966 | +</interface> |
967 | |
968 | === added directory 'data/qt' |
969 | === added file 'data/qt/choose_sign_in.ui' |
970 | --- data/qt/choose_sign_in.ui 1970-01-01 00:00:00 +0000 |
971 | +++ data/qt/choose_sign_in.ui 2011-06-24 19:23:07 +0000 |
972 | @@ -0,0 +1,121 @@ |
973 | +<?xml version="1.0" encoding="UTF-8"?> |
974 | +<ui version="4.0"> |
975 | + <class>ChooseSignInPage</class> |
976 | + <widget class="QWizardPage" name="ChooseSingInPage"> |
977 | + <property name="geometry"> |
978 | + <rect> |
979 | + <x>0</x> |
980 | + <y>0</y> |
981 | + <width>400</width> |
982 | + <height>300</height> |
983 | + </rect> |
984 | + </property> |
985 | + <property name="windowTitle"> |
986 | + <string>WizardPage</string> |
987 | + </property> |
988 | + <layout class="QHBoxLayout" name="horizontalLayout"> |
989 | + <item> |
990 | + <layout class="QHBoxLayout" name="horizontalLayout_3"> |
991 | + <item> |
992 | + <spacer name="horizontalSpacer_2"> |
993 | + <property name="orientation"> |
994 | + <enum>Qt::Horizontal</enum> |
995 | + </property> |
996 | + <property name="sizeType"> |
997 | + <enum>QSizePolicy::Expanding</enum> |
998 | + </property> |
999 | + <property name="sizeHint" stdset="0"> |
1000 | + <size> |
1001 | + <width>40</width> |
1002 | + <height>20</height> |
1003 | + </size> |
1004 | + </property> |
1005 | + </spacer> |
1006 | + </item> |
1007 | + <item> |
1008 | + <layout class="QVBoxLayout" name="verticalLayout"> |
1009 | + <item> |
1010 | + <spacer name="verticalSpacer_3"> |
1011 | + <property name="orientation"> |
1012 | + <enum>Qt::Vertical</enum> |
1013 | + </property> |
1014 | + <property name="sizeHint" stdset="0"> |
1015 | + <size> |
1016 | + <width>20</width> |
1017 | + <height>40</height> |
1018 | + </size> |
1019 | + </property> |
1020 | + </spacer> |
1021 | + </item> |
1022 | + <item> |
1023 | + <layout class="QHBoxLayout" name="horizontalLayout_2"> |
1024 | + <item> |
1025 | + <widget class="QPushButton" name="existing_account_button"> |
1026 | + <property name="text"> |
1027 | + <string/> |
1028 | + </property> |
1029 | + </widget> |
1030 | + </item> |
1031 | + </layout> |
1032 | + </item> |
1033 | + <item> |
1034 | + <spacer name="verticalSpacer"> |
1035 | + <property name="orientation"> |
1036 | + <enum>Qt::Vertical</enum> |
1037 | + </property> |
1038 | + <property name="sizeType"> |
1039 | + <enum>QSizePolicy::Fixed</enum> |
1040 | + </property> |
1041 | + <property name="sizeHint" stdset="0"> |
1042 | + <size> |
1043 | + <width>20</width> |
1044 | + <height>10</height> |
1045 | + </size> |
1046 | + </property> |
1047 | + </spacer> |
1048 | + </item> |
1049 | + <item> |
1050 | + <widget class="QPushButton" name="setup_account_button"> |
1051 | + <property name="text"> |
1052 | + <string/> |
1053 | + </property> |
1054 | + </widget> |
1055 | + </item> |
1056 | + <item> |
1057 | + <spacer name="verticalSpacer_2"> |
1058 | + <property name="orientation"> |
1059 | + <enum>Qt::Vertical</enum> |
1060 | + </property> |
1061 | + <property name="sizeHint" stdset="0"> |
1062 | + <size> |
1063 | + <width>20</width> |
1064 | + <height>40</height> |
1065 | + </size> |
1066 | + </property> |
1067 | + </spacer> |
1068 | + </item> |
1069 | + </layout> |
1070 | + </item> |
1071 | + <item> |
1072 | + <spacer name="horizontalSpacer"> |
1073 | + <property name="orientation"> |
1074 | + <enum>Qt::Horizontal</enum> |
1075 | + </property> |
1076 | + <property name="sizeType"> |
1077 | + <enum>QSizePolicy::Expanding</enum> |
1078 | + </property> |
1079 | + <property name="sizeHint" stdset="0"> |
1080 | + <size> |
1081 | + <width>40</width> |
1082 | + <height>20</height> |
1083 | + </size> |
1084 | + </property> |
1085 | + </spacer> |
1086 | + </item> |
1087 | + </layout> |
1088 | + </item> |
1089 | + </layout> |
1090 | + </widget> |
1091 | + <resources/> |
1092 | + <connections/> |
1093 | +</ui> |
1094 | |
1095 | === added file 'data/qt/current_user_sign_in.ui' |
1096 | --- data/qt/current_user_sign_in.ui 1970-01-01 00:00:00 +0000 |
1097 | +++ data/qt/current_user_sign_in.ui 2011-06-24 19:23:07 +0000 |
1098 | @@ -0,0 +1,154 @@ |
1099 | +<?xml version="1.0" encoding="UTF-8"?> |
1100 | +<ui version="4.0"> |
1101 | + <class>CurrentUserSignInPage</class> |
1102 | + <widget class="QWizardPage" name="CurrentUserSignInPage"> |
1103 | + <property name="geometry"> |
1104 | + <rect> |
1105 | + <x>0</x> |
1106 | + <y>0</y> |
1107 | + <width>400</width> |
1108 | + <height>300</height> |
1109 | + </rect> |
1110 | + </property> |
1111 | + <property name="windowTitle"> |
1112 | + <string>WizardPage</string> |
1113 | + </property> |
1114 | + <layout class="QHBoxLayout" name="horizontalLayout"> |
1115 | + <item> |
1116 | + <layout class="QHBoxLayout" name="horizontalLayout_3"> |
1117 | + <item> |
1118 | + <spacer name="horizontalSpacer_2"> |
1119 | + <property name="orientation"> |
1120 | + <enum>Qt::Horizontal</enum> |
1121 | + </property> |
1122 | + <property name="sizeType"> |
1123 | + <enum>QSizePolicy::Fixed</enum> |
1124 | + </property> |
1125 | + <property name="sizeHint" stdset="0"> |
1126 | + <size> |
1127 | + <width>40</width> |
1128 | + <height>20</height> |
1129 | + </size> |
1130 | + </property> |
1131 | + </spacer> |
1132 | + </item> |
1133 | + <item> |
1134 | + <layout class="QVBoxLayout" name="verticalLayout"> |
1135 | + <item> |
1136 | + <spacer name="verticalSpacer_3"> |
1137 | + <property name="orientation"> |
1138 | + <enum>Qt::Vertical</enum> |
1139 | + </property> |
1140 | + <property name="sizeHint" stdset="0"> |
1141 | + <size> |
1142 | + <width>20</width> |
1143 | + <height>40</height> |
1144 | + </size> |
1145 | + </property> |
1146 | + </spacer> |
1147 | + </item> |
1148 | + <item> |
1149 | + <widget class="QFrame" name="_signInFrame"> |
1150 | + <property name="frameShape"> |
1151 | + <enum>QFrame::NoFrame</enum> |
1152 | + </property> |
1153 | + <layout class="QVBoxLayout" name="verticalLayout_3"> |
1154 | + <item> |
1155 | + <layout class="QVBoxLayout" name="verticalLayout_2"> |
1156 | + <item> |
1157 | + <widget class="QLineEdit" name="email_edit"> |
1158 | + <property name="placeholderText"> |
1159 | + <string/> |
1160 | + </property> |
1161 | + </widget> |
1162 | + </item> |
1163 | + <item> |
1164 | + <widget class="QLineEdit" name="password_edit"> |
1165 | + <property name="echoMode"> |
1166 | + <enum>QLineEdit::Password</enum> |
1167 | + </property> |
1168 | + <property name="placeholderText"> |
1169 | + <string/> |
1170 | + </property> |
1171 | + </widget> |
1172 | + </item> |
1173 | + <item> |
1174 | + <widget class="QLabel" name="forgot_password_label"> |
1175 | + <property name="sizePolicy"> |
1176 | + <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> |
1177 | + <horstretch>0</horstretch> |
1178 | + <verstretch>0</verstretch> |
1179 | + </sizepolicy> |
1180 | + </property> |
1181 | + <property name="text"> |
1182 | + <string/> |
1183 | + </property> |
1184 | + </widget> |
1185 | + </item> |
1186 | + <item> |
1187 | + <layout class="QHBoxLayout" name="horizontalLayout_4"> |
1188 | + <item> |
1189 | + <spacer name="horizontalSpacer_3"> |
1190 | + <property name="orientation"> |
1191 | + <enum>Qt::Horizontal</enum> |
1192 | + </property> |
1193 | + <property name="sizeHint" stdset="0"> |
1194 | + <size> |
1195 | + <width>40</width> |
1196 | + <height>20</height> |
1197 | + </size> |
1198 | + </property> |
1199 | + </spacer> |
1200 | + </item> |
1201 | + <item> |
1202 | + <widget class="QPushButton" name="sign_in_button"> |
1203 | + <property name="text"> |
1204 | + <string/> |
1205 | + </property> |
1206 | + </widget> |
1207 | + </item> |
1208 | + </layout> |
1209 | + </item> |
1210 | + </layout> |
1211 | + </item> |
1212 | + </layout> |
1213 | + </widget> |
1214 | + </item> |
1215 | + <item> |
1216 | + <spacer name="verticalSpacer_2"> |
1217 | + <property name="orientation"> |
1218 | + <enum>Qt::Vertical</enum> |
1219 | + </property> |
1220 | + <property name="sizeHint" stdset="0"> |
1221 | + <size> |
1222 | + <width>20</width> |
1223 | + <height>40</height> |
1224 | + </size> |
1225 | + </property> |
1226 | + </spacer> |
1227 | + </item> |
1228 | + </layout> |
1229 | + </item> |
1230 | + <item> |
1231 | + <spacer name="horizontalSpacer"> |
1232 | + <property name="orientation"> |
1233 | + <enum>Qt::Horizontal</enum> |
1234 | + </property> |
1235 | + <property name="sizeType"> |
1236 | + <enum>QSizePolicy::Fixed</enum> |
1237 | + </property> |
1238 | + <property name="sizeHint" stdset="0"> |
1239 | + <size> |
1240 | + <width>40</width> |
1241 | + <height>20</height> |
1242 | + </size> |
1243 | + </property> |
1244 | + </spacer> |
1245 | + </item> |
1246 | + </layout> |
1247 | + </item> |
1248 | + </layout> |
1249 | + </widget> |
1250 | + <resources/> |
1251 | + <connections/> |
1252 | +</ui> |
1253 | |
1254 | === added file 'data/qt/email_verification.ui' |
1255 | --- data/qt/email_verification.ui 1970-01-01 00:00:00 +0000 |
1256 | +++ data/qt/email_verification.ui 2011-06-24 19:23:07 +0000 |
1257 | @@ -0,0 +1,105 @@ |
1258 | +<?xml version="1.0" encoding="UTF-8"?> |
1259 | +<ui version="4.0"> |
1260 | + <class>EmailVerificationPage</class> |
1261 | + <widget class="QWizardPage" name="EmailVerificationPage"> |
1262 | + <property name="geometry"> |
1263 | + <rect> |
1264 | + <x>0</x> |
1265 | + <y>0</y> |
1266 | + <width>400</width> |
1267 | + <height>300</height> |
1268 | + </rect> |
1269 | + </property> |
1270 | + <property name="windowTitle"> |
1271 | + <string>WizardPage</string> |
1272 | + </property> |
1273 | + <layout class="QHBoxLayout" name="horizontalLayout"> |
1274 | + <item> |
1275 | + <layout class="QHBoxLayout" name="horizontalLayout_3"> |
1276 | + <item> |
1277 | + <spacer name="horizontalSpacer_2"> |
1278 | + <property name="orientation"> |
1279 | + <enum>Qt::Horizontal</enum> |
1280 | + </property> |
1281 | + <property name="sizeType"> |
1282 | + <enum>QSizePolicy::Fixed</enum> |
1283 | + </property> |
1284 | + <property name="sizeHint" stdset="0"> |
1285 | + <size> |
1286 | + <width>40</width> |
1287 | + <height>20</height> |
1288 | + </size> |
1289 | + </property> |
1290 | + </spacer> |
1291 | + </item> |
1292 | + <item> |
1293 | + <layout class="QVBoxLayout" name="verticalLayout"> |
1294 | + <item> |
1295 | + <widget class="QLineEdit" name="verification_code_edit"> |
1296 | + <property name="placeholderText"> |
1297 | + <string/> |
1298 | + </property> |
1299 | + </widget> |
1300 | + </item> |
1301 | + <item> |
1302 | + <layout class="QHBoxLayout" name="horizontalLayout_2"> |
1303 | + <item> |
1304 | + <spacer name="horizontalSpacer_3"> |
1305 | + <property name="orientation"> |
1306 | + <enum>Qt::Horizontal</enum> |
1307 | + </property> |
1308 | + <property name="sizeHint" stdset="0"> |
1309 | + <size> |
1310 | + <width>40</width> |
1311 | + <height>20</height> |
1312 | + </size> |
1313 | + </property> |
1314 | + </spacer> |
1315 | + </item> |
1316 | + <item> |
1317 | + <widget class="QPushButton" name="next_button"> |
1318 | + <property name="text"> |
1319 | + <string>Next</string> |
1320 | + </property> |
1321 | + </widget> |
1322 | + </item> |
1323 | + </layout> |
1324 | + </item> |
1325 | + <item> |
1326 | + <spacer name="verticalSpacer_2"> |
1327 | + <property name="orientation"> |
1328 | + <enum>Qt::Vertical</enum> |
1329 | + </property> |
1330 | + <property name="sizeHint" stdset="0"> |
1331 | + <size> |
1332 | + <width>20</width> |
1333 | + <height>40</height> |
1334 | + </size> |
1335 | + </property> |
1336 | + </spacer> |
1337 | + </item> |
1338 | + </layout> |
1339 | + </item> |
1340 | + <item> |
1341 | + <spacer name="horizontalSpacer"> |
1342 | + <property name="orientation"> |
1343 | + <enum>Qt::Horizontal</enum> |
1344 | + </property> |
1345 | + <property name="sizeType"> |
1346 | + <enum>QSizePolicy::Fixed</enum> |
1347 | + </property> |
1348 | + <property name="sizeHint" stdset="0"> |
1349 | + <size> |
1350 | + <width>40</width> |
1351 | + <height>20</height> |
1352 | + </size> |
1353 | + </property> |
1354 | + </spacer> |
1355 | + </item> |
1356 | + </layout> |
1357 | + </item> |
1358 | + </layout> |
1359 | + </widget> |
1360 | + <resources/> |
1361 | + <connections/> |
1362 | +</ui> |
1363 | |
1364 | === added file 'data/qt/error_message.ui' |
1365 | --- data/qt/error_message.ui 1970-01-01 00:00:00 +0000 |
1366 | +++ data/qt/error_message.ui 2011-06-24 19:23:07 +0000 |
1367 | @@ -0,0 +1,31 @@ |
1368 | +<?xml version="1.0" encoding="UTF-8"?> |
1369 | +<ui version="4.0"> |
1370 | + <class>ErrorPage</class> |
1371 | + <widget class="QWizardPage" name="ErrorPage"> |
1372 | + <property name="geometry"> |
1373 | + <rect> |
1374 | + <x>0</x> |
1375 | + <y>0</y> |
1376 | + <width>400</width> |
1377 | + <height>300</height> |
1378 | + </rect> |
1379 | + </property> |
1380 | + <property name="windowTitle"> |
1381 | + <string>WizardPage</string> |
1382 | + </property> |
1383 | + <layout class="QVBoxLayout" name="verticalLayout"> |
1384 | + <item> |
1385 | + <widget class="QLabel" name="error_message_label"> |
1386 | + <property name="text"> |
1387 | + <string>TextLabel</string> |
1388 | + </property> |
1389 | + <property name="alignment"> |
1390 | + <set>Qt::AlignCenter</set> |
1391 | + </property> |
1392 | + </widget> |
1393 | + </item> |
1394 | + </layout> |
1395 | + </widget> |
1396 | + <resources/> |
1397 | + <connections/> |
1398 | +</ui> |
1399 | |
1400 | === added file 'data/qt/forgotten_password.ui' |
1401 | --- data/qt/forgotten_password.ui 1970-01-01 00:00:00 +0000 |
1402 | +++ data/qt/forgotten_password.ui 2011-06-24 19:23:07 +0000 |
1403 | @@ -0,0 +1,191 @@ |
1404 | +<?xml version="1.0" encoding="UTF-8"?> |
1405 | +<ui version="4.0"> |
1406 | + <class>ForgottenPasswordPage</class> |
1407 | + <widget class="QWizardPage" name="ForgottenPasswordPage"> |
1408 | + <property name="geometry"> |
1409 | + <rect> |
1410 | + <x>0</x> |
1411 | + <y>0</y> |
1412 | + <width>446</width> |
1413 | + <height>209</height> |
1414 | + </rect> |
1415 | + </property> |
1416 | + <property name="windowTitle"> |
1417 | + <string>WizardPage</string> |
1418 | + </property> |
1419 | + <layout class="QVBoxLayout" name="verticalLayout_2"> |
1420 | + <item> |
1421 | + <widget class="QLabel" name="error_label"> |
1422 | + <property name="text"> |
1423 | + <string/> |
1424 | + </property> |
1425 | + <property name="wordWrap"> |
1426 | + <bool>true</bool> |
1427 | + </property> |
1428 | + </widget> |
1429 | + </item> |
1430 | + <item> |
1431 | + <widget class="QLabel" name="forgotted_password_intro_label"> |
1432 | + <property name="text"> |
1433 | + <string/> |
1434 | + </property> |
1435 | + <property name="wordWrap"> |
1436 | + <bool>true</bool> |
1437 | + </property> |
1438 | + </widget> |
1439 | + </item> |
1440 | + <item> |
1441 | + <widget class="QWidget" name="email_widget" native="true"> |
1442 | + <layout class="QHBoxLayout" name="horizontalLayout_2"> |
1443 | + <item> |
1444 | + <spacer name="horizontalSpacer_2"> |
1445 | + <property name="orientation"> |
1446 | + <enum>Qt::Horizontal</enum> |
1447 | + </property> |
1448 | + <property name="sizeType"> |
1449 | + <enum>QSizePolicy::Fixed</enum> |
1450 | + </property> |
1451 | + <property name="sizeHint" stdset="0"> |
1452 | + <size> |
1453 | + <width>40</width> |
1454 | + <height>20</height> |
1455 | + </size> |
1456 | + </property> |
1457 | + </spacer> |
1458 | + </item> |
1459 | + <item> |
1460 | + <layout class="QVBoxLayout" name="verticalLayout"> |
1461 | + <item> |
1462 | + <widget class="QLabel" name="email_address_label"> |
1463 | + <property name="sizePolicy"> |
1464 | + <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> |
1465 | + <horstretch>0</horstretch> |
1466 | + <verstretch>0</verstretch> |
1467 | + </sizepolicy> |
1468 | + </property> |
1469 | + <property name="text"> |
1470 | + <string/> |
1471 | + </property> |
1472 | + </widget> |
1473 | + </item> |
1474 | + <item> |
1475 | + <widget class="QLineEdit" name="email_line_edit"/> |
1476 | + </item> |
1477 | + </layout> |
1478 | + </item> |
1479 | + <item> |
1480 | + <spacer name="horizontalSpacer_3"> |
1481 | + <property name="orientation"> |
1482 | + <enum>Qt::Horizontal</enum> |
1483 | + </property> |
1484 | + <property name="sizeType"> |
1485 | + <enum>QSizePolicy::Fixed</enum> |
1486 | + </property> |
1487 | + <property name="sizeHint" stdset="0"> |
1488 | + <size> |
1489 | + <width>40</width> |
1490 | + <height>20</height> |
1491 | + </size> |
1492 | + </property> |
1493 | + </spacer> |
1494 | + </item> |
1495 | + </layout> |
1496 | + </widget> |
1497 | + </item> |
1498 | + <item> |
1499 | + <layout class="QHBoxLayout" name="horizontalLayout"> |
1500 | + <item> |
1501 | + <spacer name="horizontalSpacer"> |
1502 | + <property name="orientation"> |
1503 | + <enum>Qt::Horizontal</enum> |
1504 | + </property> |
1505 | + <property name="sizeHint" stdset="0"> |
1506 | + <size> |
1507 | + <width>40</width> |
1508 | + <height>20</height> |
1509 | + </size> |
1510 | + </property> |
1511 | + </spacer> |
1512 | + </item> |
1513 | + <item> |
1514 | + <widget class="QPushButton" name="send_button"> |
1515 | + <property name="text"> |
1516 | + <string/> |
1517 | + </property> |
1518 | + </widget> |
1519 | + </item> |
1520 | + <item> |
1521 | + <spacer name="horizontalSpacer_4"> |
1522 | + <property name="orientation"> |
1523 | + <enum>Qt::Horizontal</enum> |
1524 | + </property> |
1525 | + <property name="sizeType"> |
1526 | + <enum>QSizePolicy::Fixed</enum> |
1527 | + </property> |
1528 | + <property name="sizeHint" stdset="0"> |
1529 | + <size> |
1530 | + <width>40</width> |
1531 | + <height>20</height> |
1532 | + </size> |
1533 | + </property> |
1534 | + </spacer> |
1535 | + </item> |
1536 | + </layout> |
1537 | + </item> |
1538 | + <item> |
1539 | + <widget class="QWidget" name="try_again_widget" native="true"> |
1540 | + <layout class="QHBoxLayout" name="horizontalLayout_3"> |
1541 | + <item> |
1542 | + <spacer name="horizontalSpacer_5"> |
1543 | + <property name="orientation"> |
1544 | + <enum>Qt::Horizontal</enum> |
1545 | + </property> |
1546 | + <property name="sizeHint" stdset="0"> |
1547 | + <size> |
1548 | + <width>40</width> |
1549 | + <height>20</height> |
1550 | + </size> |
1551 | + </property> |
1552 | + </spacer> |
1553 | + </item> |
1554 | + <item> |
1555 | + <widget class="QPushButton" name="try_again_button"> |
1556 | + <property name="text"> |
1557 | + <string/> |
1558 | + </property> |
1559 | + </widget> |
1560 | + </item> |
1561 | + <item> |
1562 | + <spacer name="horizontalSpacer_6"> |
1563 | + <property name="orientation"> |
1564 | + <enum>Qt::Horizontal</enum> |
1565 | + </property> |
1566 | + <property name="sizeHint" stdset="0"> |
1567 | + <size> |
1568 | + <width>40</width> |
1569 | + <height>20</height> |
1570 | + </size> |
1571 | + </property> |
1572 | + </spacer> |
1573 | + </item> |
1574 | + </layout> |
1575 | + </widget> |
1576 | + </item> |
1577 | + <item> |
1578 | + <spacer name="verticalSpacer"> |
1579 | + <property name="orientation"> |
1580 | + <enum>Qt::Vertical</enum> |
1581 | + </property> |
1582 | + <property name="sizeHint" stdset="0"> |
1583 | + <size> |
1584 | + <width>20</width> |
1585 | + <height>40</height> |
1586 | + </size> |
1587 | + </property> |
1588 | + </spacer> |
1589 | + </item> |
1590 | + </layout> |
1591 | + </widget> |
1592 | + <resources/> |
1593 | + <connections/> |
1594 | +</ui> |
1595 | |
1596 | === added file 'data/qt/reset_password.ui' |
1597 | --- data/qt/reset_password.ui 1970-01-01 00:00:00 +0000 |
1598 | +++ data/qt/reset_password.ui 2011-06-24 19:23:07 +0000 |
1599 | @@ -0,0 +1,109 @@ |
1600 | +<?xml version="1.0" encoding="UTF-8"?> |
1601 | +<ui version="4.0"> |
1602 | + <class>ResetPasswordPage</class> |
1603 | + <widget class="QWizardPage" name="ResetPasswordPage"> |
1604 | + <property name="geometry"> |
1605 | + <rect> |
1606 | + <x>0</x> |
1607 | + <y>0</y> |
1608 | + <width>476</width> |
1609 | + <height>282</height> |
1610 | + </rect> |
1611 | + </property> |
1612 | + <property name="windowTitle"> |
1613 | + <string>WizardPage</string> |
1614 | + </property> |
1615 | + <layout class="QVBoxLayout" name="verticalLayout"> |
1616 | + <item> |
1617 | + <layout class="QHBoxLayout" name="horizontalLayout"> |
1618 | + <item> |
1619 | + <spacer name="horizontalSpacer_2"> |
1620 | + <property name="orientation"> |
1621 | + <enum>Qt::Horizontal</enum> |
1622 | + </property> |
1623 | + <property name="sizeHint" stdset="0"> |
1624 | + <size> |
1625 | + <width>40</width> |
1626 | + <height>20</height> |
1627 | + </size> |
1628 | + </property> |
1629 | + </spacer> |
1630 | + </item> |
1631 | + <item> |
1632 | + <layout class="QVBoxLayout" name="verticalLayout_2"> |
1633 | + <item> |
1634 | + <widget class="QLineEdit" name="reset_code_line_edit"/> |
1635 | + </item> |
1636 | + <item> |
1637 | + <widget class="QLineEdit" name="password_line_edit"> |
1638 | + <property name="echoMode"> |
1639 | + <enum>QLineEdit::Password</enum> |
1640 | + </property> |
1641 | + </widget> |
1642 | + </item> |
1643 | + <item> |
1644 | + <widget class="QLineEdit" name="confirm_password_line_edit"> |
1645 | + <property name="echoMode"> |
1646 | + <enum>QLineEdit::Password</enum> |
1647 | + </property> |
1648 | + </widget> |
1649 | + </item> |
1650 | + <item> |
1651 | + <layout class="QHBoxLayout" name="horizontalLayout_3"> |
1652 | + <item> |
1653 | + <spacer name="horizontalSpacer_4"> |
1654 | + <property name="orientation"> |
1655 | + <enum>Qt::Horizontal</enum> |
1656 | + </property> |
1657 | + <property name="sizeHint" stdset="0"> |
1658 | + <size> |
1659 | + <width>40</width> |
1660 | + <height>20</height> |
1661 | + </size> |
1662 | + </property> |
1663 | + </spacer> |
1664 | + </item> |
1665 | + <item> |
1666 | + <widget class="QPushButton" name="reset_password_button"> |
1667 | + <property name="text"> |
1668 | + <string/> |
1669 | + </property> |
1670 | + </widget> |
1671 | + </item> |
1672 | + </layout> |
1673 | + </item> |
1674 | + <item> |
1675 | + <spacer name="verticalSpacer"> |
1676 | + <property name="orientation"> |
1677 | + <enum>Qt::Vertical</enum> |
1678 | + </property> |
1679 | + <property name="sizeHint" stdset="0"> |
1680 | + <size> |
1681 | + <width>379</width> |
1682 | + <height>222</height> |
1683 | + </size> |
1684 | + </property> |
1685 | + </spacer> |
1686 | + </item> |
1687 | + </layout> |
1688 | + </item> |
1689 | + <item> |
1690 | + <spacer name="horizontalSpacer"> |
1691 | + <property name="orientation"> |
1692 | + <enum>Qt::Horizontal</enum> |
1693 | + </property> |
1694 | + <property name="sizeHint" stdset="0"> |
1695 | + <size> |
1696 | + <width>40</width> |
1697 | + <height>20</height> |
1698 | + </size> |
1699 | + </property> |
1700 | + </spacer> |
1701 | + </item> |
1702 | + </layout> |
1703 | + </item> |
1704 | + </layout> |
1705 | + </widget> |
1706 | + <resources/> |
1707 | + <connections/> |
1708 | +</ui> |
1709 | |
1710 | === added file 'data/qt/setup_account.ui' |
1711 | --- data/qt/setup_account.ui 1970-01-01 00:00:00 +0000 |
1712 | +++ data/qt/setup_account.ui 2011-06-24 19:23:07 +0000 |
1713 | @@ -0,0 +1,290 @@ |
1714 | +<?xml version="1.0" encoding="UTF-8"?> |
1715 | +<ui version="4.0"> |
1716 | + <class>SetUpAccountPage</class> |
1717 | + <widget class="QWizardPage" name="SetUpAccountPage"> |
1718 | + <property name="geometry"> |
1719 | + <rect> |
1720 | + <x>0</x> |
1721 | + <y>0</y> |
1722 | + <width>407</width> |
1723 | + <height>453</height> |
1724 | + </rect> |
1725 | + </property> |
1726 | + <property name="windowTitle"> |
1727 | + <string>WizardPage</string> |
1728 | + </property> |
1729 | + <layout class="QHBoxLayout" name="horizontalLayout"> |
1730 | + <item> |
1731 | + <layout class="QVBoxLayout" name="verticalLayout"> |
1732 | + <item> |
1733 | + <spacer name="verticalSpacer_3"> |
1734 | + <property name="orientation"> |
1735 | + <enum>Qt::Vertical</enum> |
1736 | + </property> |
1737 | + <property name="sizeHint" stdset="0"> |
1738 | + <size> |
1739 | + <width>20</width> |
1740 | + <height>40</height> |
1741 | + </size> |
1742 | + </property> |
1743 | + </spacer> |
1744 | + </item> |
1745 | + <item> |
1746 | + <widget class="QFrame" name="_signInFrame"> |
1747 | + <property name="frameShape"> |
1748 | + <enum>QFrame::NoFrame</enum> |
1749 | + </property> |
1750 | + <layout class="QVBoxLayout" name="verticalLayout_3"> |
1751 | + <item> |
1752 | + <layout class="QVBoxLayout" name="verticalLayout_2"> |
1753 | + <item> |
1754 | + <widget class="QLabel" name="password_info_label"> |
1755 | + <property name="sizePolicy"> |
1756 | + <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> |
1757 | + <horstretch>0</horstretch> |
1758 | + <verstretch>0</verstretch> |
1759 | + </sizepolicy> |
1760 | + </property> |
1761 | + <property name="text"> |
1762 | + <string/> |
1763 | + </property> |
1764 | + <property name="wordWrap"> |
1765 | + <bool>true</bool> |
1766 | + </property> |
1767 | + </widget> |
1768 | + </item> |
1769 | + <item> |
1770 | + <layout class="QVBoxLayout" name="verticalLayout_4"> |
1771 | + <item> |
1772 | + <widget class="QLabel" name="name_label"> |
1773 | + <property name="text"> |
1774 | + <string/> |
1775 | + </property> |
1776 | + </widget> |
1777 | + </item> |
1778 | + <item> |
1779 | + <widget class="QLineEdit" name="name_edit"> |
1780 | + <property name="placeholderText"> |
1781 | + <string/> |
1782 | + </property> |
1783 | + </widget> |
1784 | + </item> |
1785 | + <item> |
1786 | + <widget class="QLabel" name="email_label"> |
1787 | + <property name="text"> |
1788 | + <string/> |
1789 | + </property> |
1790 | + </widget> |
1791 | + </item> |
1792 | + <item> |
1793 | + <widget class="QLineEdit" name="email_edit"> |
1794 | + <property name="placeholderText"> |
1795 | + <string/> |
1796 | + </property> |
1797 | + </widget> |
1798 | + </item> |
1799 | + <item> |
1800 | + <widget class="QLabel" name="confirm_email_label"> |
1801 | + <property name="text"> |
1802 | + <string/> |
1803 | + </property> |
1804 | + </widget> |
1805 | + </item> |
1806 | + <item> |
1807 | + <widget class="QLineEdit" name="confirm_email_edit"> |
1808 | + <property name="placeholderText"> |
1809 | + <string/> |
1810 | + </property> |
1811 | + </widget> |
1812 | + </item> |
1813 | + <item> |
1814 | + <widget class="QLabel" name="password_label"> |
1815 | + <property name="text"> |
1816 | + <string/> |
1817 | + </property> |
1818 | + </widget> |
1819 | + </item> |
1820 | + <item> |
1821 | + <widget class="QLineEdit" name="password_edit"> |
1822 | + <property name="toolTip"> |
1823 | + <string>Your password must be at least 8 characters long and at least contain one number and one upper later.</string> |
1824 | + </property> |
1825 | + <property name="statusTip"> |
1826 | + <string/> |
1827 | + </property> |
1828 | + <property name="echoMode"> |
1829 | + <enum>QLineEdit::Password</enum> |
1830 | + </property> |
1831 | + <property name="placeholderText"> |
1832 | + <string/> |
1833 | + </property> |
1834 | + </widget> |
1835 | + </item> |
1836 | + <item> |
1837 | + <widget class="QLabel" name="confirm_password_label"> |
1838 | + <property name="text"> |
1839 | + <string/> |
1840 | + </property> |
1841 | + </widget> |
1842 | + </item> |
1843 | + <item> |
1844 | + <widget class="QLineEdit" name="confirm_password_edit"> |
1845 | + <property name="echoMode"> |
1846 | + <enum>QLineEdit::Password</enum> |
1847 | + </property> |
1848 | + <property name="placeholderText"> |
1849 | + <string/> |
1850 | + </property> |
1851 | + </widget> |
1852 | + </item> |
1853 | + </layout> |
1854 | + </item> |
1855 | + <item> |
1856 | + <layout class="QVBoxLayout" name="verticalLayout_9"> |
1857 | + <item> |
1858 | + <widget class="QFrame" name="frame_2"> |
1859 | + <property name="sizePolicy"> |
1860 | + <sizepolicy hsizetype="Minimum" vsizetype="Minimum"> |
1861 | + <horstretch>0</horstretch> |
1862 | + <verstretch>0</verstretch> |
1863 | + </sizepolicy> |
1864 | + </property> |
1865 | + <property name="frameShape"> |
1866 | + <enum>QFrame::StyledPanel</enum> |
1867 | + </property> |
1868 | + <property name="frameShadow"> |
1869 | + <enum>QFrame::Raised</enum> |
1870 | + </property> |
1871 | + <layout class="QHBoxLayout" name="horizontalLayout_16"> |
1872 | + <property name="leftMargin"> |
1873 | + <number>0</number> |
1874 | + </property> |
1875 | + <item> |
1876 | + <widget class="QLabel" name="captcha_view"> |
1877 | + <property name="minimumSize"> |
1878 | + <size> |
1879 | + <width>0</width> |
1880 | + <height>57</height> |
1881 | + </size> |
1882 | + </property> |
1883 | + <property name="frameShape"> |
1884 | + <enum>QFrame::Box</enum> |
1885 | + </property> |
1886 | + <property name="text"> |
1887 | + <string/> |
1888 | + </property> |
1889 | + </widget> |
1890 | + </item> |
1891 | + <item> |
1892 | + <widget class="QLabel" name="refresh_label"> |
1893 | + <property name="sizePolicy"> |
1894 | + <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> |
1895 | + <horstretch>0</horstretch> |
1896 | + <verstretch>0</verstretch> |
1897 | + </sizepolicy> |
1898 | + </property> |
1899 | + <property name="locale"> |
1900 | + <locale language="English" country="UnitedStates"/> |
1901 | + </property> |
1902 | + <property name="text"> |
1903 | + <string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> |
1904 | +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> |
1905 | +p, li { white-space: pre-wrap; } |
1906 | +</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;"> |
1907 | +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">If you can't read this then </span><a href="example.com"><span style=" text-decoration: underline; color:#0000ff;">refresh</span></a><span style=" font-size:8pt;"> this page</span></p></body></html></string> |
1908 | + </property> |
1909 | + <property name="wordWrap"> |
1910 | + <bool>true</bool> |
1911 | + </property> |
1912 | + </widget> |
1913 | + </item> |
1914 | + </layout> |
1915 | + </widget> |
1916 | + </item> |
1917 | + <item> |
1918 | + <widget class="QLineEdit" name="captcha_solution_edit"> |
1919 | + <property name="locale"> |
1920 | + <locale language="English" country="UnitedStates"/> |
1921 | + </property> |
1922 | + <property name="inputMask"> |
1923 | + <string/> |
1924 | + </property> |
1925 | + <property name="text"> |
1926 | + <string/> |
1927 | + </property> |
1928 | + <property name="placeholderText"> |
1929 | + <string/> |
1930 | + </property> |
1931 | + </widget> |
1932 | + </item> |
1933 | + </layout> |
1934 | + </item> |
1935 | + <item> |
1936 | + <widget class="QCheckBox" name="terms_checkbox"> |
1937 | + <property name="text"> |
1938 | + <string/> |
1939 | + </property> |
1940 | + </widget> |
1941 | + </item> |
1942 | + <item> |
1943 | + <layout class="QHBoxLayout" name="horizontalLayout_4"> |
1944 | + <property name="spacing"> |
1945 | + <number>0</number> |
1946 | + </property> |
1947 | + <item> |
1948 | + <widget class="QPushButton" name="terms_button"> |
1949 | + <property name="text"> |
1950 | + <string/> |
1951 | + </property> |
1952 | + </widget> |
1953 | + </item> |
1954 | + <item> |
1955 | + <spacer name="horizontalSpacer_3"> |
1956 | + <property name="orientation"> |
1957 | + <enum>Qt::Horizontal</enum> |
1958 | + </property> |
1959 | + <property name="sizeHint" stdset="0"> |
1960 | + <size> |
1961 | + <width>40</width> |
1962 | + <height>20</height> |
1963 | + </size> |
1964 | + </property> |
1965 | + </spacer> |
1966 | + </item> |
1967 | + <item> |
1968 | + <widget class="QPushButton" name="set_up_button"> |
1969 | + <property name="enabled"> |
1970 | + <bool>false</bool> |
1971 | + </property> |
1972 | + <property name="text"> |
1973 | + <string/> |
1974 | + </property> |
1975 | + </widget> |
1976 | + </item> |
1977 | + </layout> |
1978 | + </item> |
1979 | + </layout> |
1980 | + </item> |
1981 | + </layout> |
1982 | + </widget> |
1983 | + </item> |
1984 | + <item> |
1985 | + <spacer name="verticalSpacer_2"> |
1986 | + <property name="orientation"> |
1987 | + <enum>Qt::Vertical</enum> |
1988 | + </property> |
1989 | + <property name="sizeHint" stdset="0"> |
1990 | + <size> |
1991 | + <width>20</width> |
1992 | + <height>40</height> |
1993 | + </size> |
1994 | + </property> |
1995 | + </spacer> |
1996 | + </item> |
1997 | + </layout> |
1998 | + </item> |
1999 | + </layout> |
2000 | + </widget> |
2001 | + <resources/> |
2002 | + <connections/> |
2003 | +</ui> |
2004 | |
2005 | === added file 'data/qt/success_message.ui' |
2006 | --- data/qt/success_message.ui 1970-01-01 00:00:00 +0000 |
2007 | +++ data/qt/success_message.ui 2011-06-24 19:23:07 +0000 |
2008 | @@ -0,0 +1,31 @@ |
2009 | +<?xml version="1.0" encoding="UTF-8"?> |
2010 | +<ui version="4.0"> |
2011 | + <class>SuccessPage</class> |
2012 | + <widget class="QWizardPage" name="SuccessPage"> |
2013 | + <property name="geometry"> |
2014 | + <rect> |
2015 | + <x>0</x> |
2016 | + <y>0</y> |
2017 | + <width>400</width> |
2018 | + <height>300</height> |
2019 | + </rect> |
2020 | + </property> |
2021 | + <property name="windowTitle"> |
2022 | + <string>WizardPage</string> |
2023 | + </property> |
2024 | + <layout class="QVBoxLayout" name="verticalLayout"> |
2025 | + <item> |
2026 | + <widget class="QLabel" name="success_message_label"> |
2027 | + <property name="text"> |
2028 | + <string>TextLabel</string> |
2029 | + </property> |
2030 | + <property name="alignment"> |
2031 | + <set>Qt::AlignCenter</set> |
2032 | + </property> |
2033 | + </widget> |
2034 | + </item> |
2035 | + </layout> |
2036 | + </widget> |
2037 | + <resources/> |
2038 | + <connections/> |
2039 | +</ui> |
2040 | |
2041 | === added file 'data/qt/terms_and_conditions.ui' |
2042 | --- data/qt/terms_and_conditions.ui 1970-01-01 00:00:00 +0000 |
2043 | +++ data/qt/terms_and_conditions.ui 2011-06-24 19:23:07 +0000 |
2044 | @@ -0,0 +1,128 @@ |
2045 | +<?xml version="1.0" encoding="UTF-8"?> |
2046 | +<ui version="4.0"> |
2047 | + <class>TosPage</class> |
2048 | + <widget class="QWizardPage" name="TosPage"> |
2049 | + <property name="geometry"> |
2050 | + <rect> |
2051 | + <x>0</x> |
2052 | + <y>0</y> |
2053 | + <width>400</width> |
2054 | + <height>300</height> |
2055 | + </rect> |
2056 | + </property> |
2057 | + <property name="windowTitle"> |
2058 | + <string>WizardPage</string> |
2059 | + </property> |
2060 | + <layout class="QHBoxLayout" name="horizontalLayout"> |
2061 | + <item> |
2062 | + <layout class="QHBoxLayout" name="horizontalLayout_3"> |
2063 | + <item> |
2064 | + <spacer name="horizontalSpacer_2"> |
2065 | + <property name="orientation"> |
2066 | + <enum>Qt::Horizontal</enum> |
2067 | + </property> |
2068 | + <property name="sizeType"> |
2069 | + <enum>QSizePolicy::Fixed</enum> |
2070 | + </property> |
2071 | + <property name="sizeHint" stdset="0"> |
2072 | + <size> |
2073 | + <width>40</width> |
2074 | + <height>20</height> |
2075 | + </size> |
2076 | + </property> |
2077 | + </spacer> |
2078 | + </item> |
2079 | + <item> |
2080 | + <layout class="QVBoxLayout" name="verticalLayout"> |
2081 | + <item> |
2082 | + <spacer name="verticalSpacer_3"> |
2083 | + <property name="orientation"> |
2084 | + <enum>Qt::Vertical</enum> |
2085 | + </property> |
2086 | + <property name="sizeType"> |
2087 | + <enum>QSizePolicy::Fixed</enum> |
2088 | + </property> |
2089 | + <property name="sizeHint" stdset="0"> |
2090 | + <size> |
2091 | + <width>20</width> |
2092 | + <height>40</height> |
2093 | + </size> |
2094 | + </property> |
2095 | + </spacer> |
2096 | + </item> |
2097 | + <item> |
2098 | + <widget class="QScrollArea" name="scrollArea"> |
2099 | + <property name="widgetResizable"> |
2100 | + <bool>true</bool> |
2101 | + </property> |
2102 | + <widget class="QWidget" name="scrollAreaWidgetContents"> |
2103 | + <property name="geometry"> |
2104 | + <rect> |
2105 | + <x>0</x> |
2106 | + <y>0</y> |
2107 | + <width>284</width> |
2108 | + <height>184</height> |
2109 | + </rect> |
2110 | + </property> |
2111 | + <layout class="QHBoxLayout" name="horizontalLayout_2"> |
2112 | + <item> |
2113 | + <widget class="QWebView" name="terms_webkit"> |
2114 | + <property name="url"> |
2115 | + <url> |
2116 | + <string>about:blank</string> |
2117 | + </url> |
2118 | + </property> |
2119 | + </widget> |
2120 | + </item> |
2121 | + </layout> |
2122 | + </widget> |
2123 | + </widget> |
2124 | + </item> |
2125 | + <item> |
2126 | + <spacer name="verticalSpacer_2"> |
2127 | + <property name="orientation"> |
2128 | + <enum>Qt::Vertical</enum> |
2129 | + </property> |
2130 | + <property name="sizeType"> |
2131 | + <enum>QSizePolicy::Fixed</enum> |
2132 | + </property> |
2133 | + <property name="sizeHint" stdset="0"> |
2134 | + <size> |
2135 | + <width>20</width> |
2136 | + <height>40</height> |
2137 | + </size> |
2138 | + </property> |
2139 | + </spacer> |
2140 | + </item> |
2141 | + </layout> |
2142 | + </item> |
2143 | + <item> |
2144 | + <spacer name="horizontalSpacer"> |
2145 | + <property name="orientation"> |
2146 | + <enum>Qt::Horizontal</enum> |
2147 | + </property> |
2148 | + <property name="sizeType"> |
2149 | + <enum>QSizePolicy::Fixed</enum> |
2150 | + </property> |
2151 | + <property name="sizeHint" stdset="0"> |
2152 | + <size> |
2153 | + <width>40</width> |
2154 | + <height>20</height> |
2155 | + </size> |
2156 | + </property> |
2157 | + </spacer> |
2158 | + </item> |
2159 | + </layout> |
2160 | + </item> |
2161 | + </layout> |
2162 | + </widget> |
2163 | + <customwidgets> |
2164 | + <customwidget> |
2165 | + <class>QWebView</class> |
2166 | + <extends>QWidget</extends> |
2167 | + <header>QtWebKit/QWebView</header> |
2168 | + </customwidget> |
2169 | + </customwidgets> |
2170 | + <resources/> |
2171 | + <connections/> |
2172 | +</ui> |
2173 | |
2174 | === removed file 'data/ui.glade' |
2175 | --- data/ui.glade 2010-11-30 13:21:17 +0000 |
2176 | +++ data/ui.glade 1970-01-01 00:00:00 +0000 |
2177 | @@ -1,786 +0,0 @@ |
2178 | -<?xml version="1.0" encoding="UTF-8"?> |
2179 | -<interface> |
2180 | - <requires lib="gtk+" version="2.16"/> |
2181 | - <!-- interface-naming-policy project-wide --> |
2182 | - <object class="GtkWindow" id="window"> |
2183 | - <property name="border_width">10</property> |
2184 | - <property name="window_position">center</property> |
2185 | - <signal name="delete_event" handler="on_close_clicked"/> |
2186 | - <child> |
2187 | - <object class="GtkVBox" id="window_vbox"> |
2188 | - <property name="visible">True</property> |
2189 | - <property name="spacing">5</property> |
2190 | - <child> |
2191 | - <object class="GtkLabel" id="header_label"> |
2192 | - <property name="visible">True</property> |
2193 | - <property name="xalign">0</property> |
2194 | - <property name="label" translatable="yes">Header Label </property> |
2195 | - <property name="wrap">True</property> |
2196 | - </object> |
2197 | - <packing> |
2198 | - <property name="expand">False</property> |
2199 | - <property name="padding">5</property> |
2200 | - <property name="position">0</property> |
2201 | - </packing> |
2202 | - </child> |
2203 | - <child> |
2204 | - <object class="GtkLabel" id="help_label"> |
2205 | - <property name="visible">True</property> |
2206 | - <property name="xalign">0</property> |
2207 | - <property name="label" translatable="yes">help label</property> |
2208 | - <property name="wrap">True</property> |
2209 | - </object> |
2210 | - <packing> |
2211 | - <property name="expand">False</property> |
2212 | - <property name="position">1</property> |
2213 | - </packing> |
2214 | - </child> |
2215 | - <child> |
2216 | - <object class="GtkLabel" id="warning_label"> |
2217 | - <property name="visible">True</property> |
2218 | - <property name="xalign">0</property> |
2219 | - <property name="label" translatable="yes">warning label</property> |
2220 | - <property name="wrap">True</property> |
2221 | - </object> |
2222 | - <packing> |
2223 | - <property name="expand">False</property> |
2224 | - <property name="position">2</property> |
2225 | - </packing> |
2226 | - </child> |
2227 | - <child> |
2228 | - <object class="GtkNotebook" id="content"> |
2229 | - <property name="visible">True</property> |
2230 | - <property name="can_focus">True</property> |
2231 | - <property name="show_tabs">False</property> |
2232 | - <property name="show_border">False</property> |
2233 | - </object> |
2234 | - <packing> |
2235 | - <property name="position">3</property> |
2236 | - </packing> |
2237 | - </child> |
2238 | - </object> |
2239 | - </child> |
2240 | - </object> |
2241 | - <object class="GtkVBox" id="enter_details_vbox"> |
2242 | - <property name="visible">True</property> |
2243 | - <property name="spacing">5</property> |
2244 | - <child> |
2245 | - <object class="GtkHBox" id="emails_hbox"> |
2246 | - <property name="visible">True</property> |
2247 | - <property name="spacing">5</property> |
2248 | - <property name="homogeneous">True</property> |
2249 | - <child> |
2250 | - <placeholder/> |
2251 | - </child> |
2252 | - <child> |
2253 | - <placeholder/> |
2254 | - </child> |
2255 | - </object> |
2256 | - <packing> |
2257 | - <property name="expand">False</property> |
2258 | - <property name="position">0</property> |
2259 | - </packing> |
2260 | - </child> |
2261 | - <child> |
2262 | - <object class="GtkHBox" id="passwords_hbox"> |
2263 | - <property name="visible">True</property> |
2264 | - <property name="spacing">5</property> |
2265 | - <property name="homogeneous">True</property> |
2266 | - <child> |
2267 | - <placeholder/> |
2268 | - </child> |
2269 | - <child> |
2270 | - <placeholder/> |
2271 | - </child> |
2272 | - </object> |
2273 | - <packing> |
2274 | - <property name="expand">False</property> |
2275 | - <property name="position">1</property> |
2276 | - </packing> |
2277 | - </child> |
2278 | - <child> |
2279 | - <object class="GtkLabel" id="password_help_label"> |
2280 | - <property name="visible">True</property> |
2281 | - <property name="label">password help</property> |
2282 | - <property name="wrap">True</property> |
2283 | - </object> |
2284 | - <packing> |
2285 | - <property name="expand">False</property> |
2286 | - <property name="position">2</property> |
2287 | - </packing> |
2288 | - </child> |
2289 | - <child> |
2290 | - <object class="GtkAlignment" id="alignment5"> |
2291 | - <property name="visible">True</property> |
2292 | - <property name="xscale">0</property> |
2293 | - <property name="yscale">0</property> |
2294 | - <child> |
2295 | - <object class="GtkHBox" id="hbox1"> |
2296 | - <property name="visible">True</property> |
2297 | - <child> |
2298 | - <object class="GtkVBox" id="captcha_vbox"> |
2299 | - <property name="width_request">300</property> |
2300 | - <property name="height_request">60</property> |
2301 | - <property name="visible">True</property> |
2302 | - <child> |
2303 | - <object class="GtkEventBox" id="captcha_loading"> |
2304 | - <property name="width_request">300</property> |
2305 | - <property name="height_request">60</property> |
2306 | - <property name="visible">True</property> |
2307 | - <child> |
2308 | - <placeholder/> |
2309 | - </child> |
2310 | - </object> |
2311 | - <packing> |
2312 | - <property name="expand">False</property> |
2313 | - <property name="fill">False</property> |
2314 | - <property name="position">0</property> |
2315 | - </packing> |
2316 | - </child> |
2317 | - <child> |
2318 | - <object class="GtkImage" id="captcha_image"> |
2319 | - <property name="width_request">300</property> |
2320 | - <property name="visible">True</property> |
2321 | - <property name="stock">gtk-missing-image</property> |
2322 | - </object> |
2323 | - <packing> |
2324 | - <property name="position">1</property> |
2325 | - </packing> |
2326 | - </child> |
2327 | - </object> |
2328 | - <packing> |
2329 | - <property name="expand">False</property> |
2330 | - <property name="fill">False</property> |
2331 | - <property name="position">0</property> |
2332 | - </packing> |
2333 | - </child> |
2334 | - <child> |
2335 | - <object class="GtkVBox" id="vbox1"> |
2336 | - <property name="visible">True</property> |
2337 | - <child> |
2338 | - <object class="GtkButton" id="captcha_reload_button"> |
2339 | - <property name="visible">True</property> |
2340 | - <property name="can_focus">True</property> |
2341 | - <property name="receives_default">True</property> |
2342 | - <property name="relief">none</property> |
2343 | - <property name="focus_on_click">False</property> |
2344 | - <signal name="clicked" handler="on_captcha_reload_button_clicked"/> |
2345 | - <child> |
2346 | - <object class="GtkImage" id="image1"> |
2347 | - <property name="visible">True</property> |
2348 | - <property name="icon_name">reload</property> |
2349 | - </object> |
2350 | - </child> |
2351 | - </object> |
2352 | - <packing> |
2353 | - <property name="expand">False</property> |
2354 | - <property name="position">0</property> |
2355 | - </packing> |
2356 | - </child> |
2357 | - <child> |
2358 | - <placeholder/> |
2359 | - </child> |
2360 | - <child> |
2361 | - <placeholder/> |
2362 | - </child> |
2363 | - </object> |
2364 | - <packing> |
2365 | - <property name="expand">False</property> |
2366 | - <property name="position">1</property> |
2367 | - </packing> |
2368 | - </child> |
2369 | - </object> |
2370 | - </child> |
2371 | - </object> |
2372 | - <packing> |
2373 | - <property name="expand">False</property> |
2374 | - <property name="position">3</property> |
2375 | - </packing> |
2376 | - </child> |
2377 | - <child> |
2378 | - <object class="GtkVBox" id="captcha_solution_vbox"> |
2379 | - <property name="visible">True</property> |
2380 | - <child> |
2381 | - <placeholder/> |
2382 | - </child> |
2383 | - </object> |
2384 | - <packing> |
2385 | - <property name="expand">False</property> |
2386 | - <property name="position">4</property> |
2387 | - </packing> |
2388 | - </child> |
2389 | - <child> |
2390 | - <object class="GtkCheckButton" id="yes_to_updates_checkbutton"> |
2391 | - <property name="label" translatable="yes">yes to updates</property> |
2392 | - <property name="visible">True</property> |
2393 | - <property name="can_focus">True</property> |
2394 | - <property name="receives_default">False</property> |
2395 | - <property name="active">True</property> |
2396 | - <property name="draw_indicator">True</property> |
2397 | - </object> |
2398 | - <packing> |
2399 | - <property name="expand">False</property> |
2400 | - <property name="position">5</property> |
2401 | - </packing> |
2402 | - </child> |
2403 | - <child> |
2404 | - <object class="GtkVBox" id="tc_vbox"> |
2405 | - <property name="visible">True</property> |
2406 | - <property name="spacing">5</property> |
2407 | - <child> |
2408 | - <object class="GtkCheckButton" id="yes_to_tc_checkbutton"> |
2409 | - <property name="label" translatable="yes">yes to tc</property> |
2410 | - <property name="visible">True</property> |
2411 | - <property name="can_focus">True</property> |
2412 | - <property name="receives_default">False</property> |
2413 | - <property name="active">True</property> |
2414 | - <property name="draw_indicator">True</property> |
2415 | - </object> |
2416 | - <packing> |
2417 | - <property name="expand">False</property> |
2418 | - <property name="position">0</property> |
2419 | - </packing> |
2420 | - </child> |
2421 | - <child> |
2422 | - <object class="GtkHButtonBox" id="hbuttonbox3"> |
2423 | - <property name="visible">True</property> |
2424 | - <property name="layout_style">start</property> |
2425 | - <child> |
2426 | - <object class="GtkButton" id="tc_button"> |
2427 | - <property name="label">show tc</property> |
2428 | - <property name="visible">True</property> |
2429 | - <property name="can_focus">True</property> |
2430 | - <property name="receives_default">True</property> |
2431 | - <signal name="clicked" handler="on_tc_button_clicked"/> |
2432 | - </object> |
2433 | - <packing> |
2434 | - <property name="expand">False</property> |
2435 | - <property name="fill">False</property> |
2436 | - <property name="position">1</property> |
2437 | - </packing> |
2438 | - </child> |
2439 | - </object> |
2440 | - <packing> |
2441 | - <property name="expand">False</property> |
2442 | - <property name="position">1</property> |
2443 | - </packing> |
2444 | - </child> |
2445 | - <child> |
2446 | - <object class="GtkLabel" id="tc_warning_label"> |
2447 | - <property name="visible">True</property> |
2448 | - <property name="xalign">0</property> |
2449 | - <property name="label">tc warning</property> |
2450 | - <property name="wrap">True</property> |
2451 | - </object> |
2452 | - <packing> |
2453 | - <property name="position">2</property> |
2454 | - </packing> |
2455 | - </child> |
2456 | - </object> |
2457 | - <packing> |
2458 | - <property name="expand">False</property> |
2459 | - <property name="position">6</property> |
2460 | - </packing> |
2461 | - </child> |
2462 | - <child> |
2463 | - <object class="GtkHBox" id="hbox2"> |
2464 | - <property name="visible">True</property> |
2465 | - <property name="spacing">5</property> |
2466 | - <child> |
2467 | - <object class="GtkHButtonBox" id="hbuttonbox9"> |
2468 | - <property name="visible">True</property> |
2469 | - <property name="layout_style">start</property> |
2470 | - <child> |
2471 | - <object class="GtkLinkButton" id="login_button"> |
2472 | - <property name="label">login button</property> |
2473 | - <property name="visible">True</property> |
2474 | - <property name="can_focus">True</property> |
2475 | - <property name="receives_default">True</property> |
2476 | - <property name="relief">none</property> |
2477 | - <signal name="clicked" handler="on_sign_in_button_clicked"/> |
2478 | - </object> |
2479 | - <packing> |
2480 | - <property name="expand">False</property> |
2481 | - <property name="fill">False</property> |
2482 | - <property name="position">0</property> |
2483 | - </packing> |
2484 | - </child> |
2485 | - </object> |
2486 | - <packing> |
2487 | - <property name="expand">False</property> |
2488 | - <property name="position">0</property> |
2489 | - </packing> |
2490 | - </child> |
2491 | - <child> |
2492 | - <object class="GtkHButtonBox" id="hbuttonbox1"> |
2493 | - <property name="visible">True</property> |
2494 | - <property name="spacing">5</property> |
2495 | - <property name="layout_style">end</property> |
2496 | - <child> |
2497 | - <object class="GtkButton" id="join_cancel_button"> |
2498 | - <property name="label">gtk-cancel</property> |
2499 | - <property name="visible">True</property> |
2500 | - <property name="can_focus">True</property> |
2501 | - <property name="receives_default">True</property> |
2502 | - <property name="use_stock">True</property> |
2503 | - </object> |
2504 | - <packing> |
2505 | - <property name="expand">False</property> |
2506 | - <property name="fill">False</property> |
2507 | - <property name="position">0</property> |
2508 | - </packing> |
2509 | - </child> |
2510 | - <child> |
2511 | - <object class="GtkButton" id="join_ok_button"> |
2512 | - <property name="label">gtk-go-forward</property> |
2513 | - <property name="visible">True</property> |
2514 | - <property name="can_focus">True</property> |
2515 | - <property name="receives_default">True</property> |
2516 | - <property name="use_stock">True</property> |
2517 | - <signal name="clicked" handler="on_join_ok_button_clicked"/> |
2518 | - </object> |
2519 | - <packing> |
2520 | - <property name="expand">False</property> |
2521 | - <property name="fill">False</property> |
2522 | - <property name="position">1</property> |
2523 | - </packing> |
2524 | - </child> |
2525 | - </object> |
2526 | - <packing> |
2527 | - <property name="expand">False</property> |
2528 | - <property name="pack_type">end</property> |
2529 | - <property name="position">1</property> |
2530 | - </packing> |
2531 | - </child> |
2532 | - </object> |
2533 | - <packing> |
2534 | - <property name="expand">False</property> |
2535 | - <property name="pack_type">end</property> |
2536 | - <property name="position">7</property> |
2537 | - </packing> |
2538 | - </child> |
2539 | - </object> |
2540 | - <object class="GtkVBox" id="processing_vbox"> |
2541 | - <property name="visible">True</property> |
2542 | - <property name="spacing">10</property> |
2543 | - <child> |
2544 | - <placeholder/> |
2545 | - </child> |
2546 | - </object> |
2547 | - <object class="GtkVBox" id="verify_email_vbox"> |
2548 | - <property name="visible">True</property> |
2549 | - <property name="spacing">10</property> |
2550 | - <child> |
2551 | - <object class="GtkAlignment" id="alignment4"> |
2552 | - <property name="visible">True</property> |
2553 | - <property name="xscale">0</property> |
2554 | - <property name="yscale">0</property> |
2555 | - <child> |
2556 | - <object class="GtkVBox" id="verify_email_details_vbox"> |
2557 | - <property name="visible">True</property> |
2558 | - <child> |
2559 | - <placeholder/> |
2560 | - </child> |
2561 | - </object> |
2562 | - </child> |
2563 | - </object> |
2564 | - <packing> |
2565 | - <property name="position">0</property> |
2566 | - </packing> |
2567 | - </child> |
2568 | - <child> |
2569 | - <object class="GtkHButtonBox" id="hbuttonbox2"> |
2570 | - <property name="visible">True</property> |
2571 | - <property name="spacing">5</property> |
2572 | - <property name="layout_style">end</property> |
2573 | - <child> |
2574 | - <object class="GtkButton" id="verify_token_button"> |
2575 | - <property name="label">gtk-ok</property> |
2576 | - <property name="visible">True</property> |
2577 | - <property name="can_focus">True</property> |
2578 | - <property name="receives_default">True</property> |
2579 | - <property name="use_stock">True</property> |
2580 | - <signal name="clicked" handler="on_verify_token_button_clicked"/> |
2581 | - </object> |
2582 | - <packing> |
2583 | - <property name="expand">False</property> |
2584 | - <property name="fill">False</property> |
2585 | - <property name="position">0</property> |
2586 | - </packing> |
2587 | - </child> |
2588 | - </object> |
2589 | - <packing> |
2590 | - <property name="expand">False</property> |
2591 | - <property name="position">1</property> |
2592 | - </packing> |
2593 | - </child> |
2594 | - </object> |
2595 | - <object class="GtkVBox" id="tc_browser_vbox"> |
2596 | - <property name="visible">True</property> |
2597 | - <signal name="hide" handler="on_tc_browser_vbox_hide"/> |
2598 | - <child> |
2599 | - <object class="GtkScrolledWindow" id="tc_browser_window"> |
2600 | - <property name="visible">True</property> |
2601 | - <property name="can_focus">True</property> |
2602 | - <property name="border_width">10</property> |
2603 | - <property name="hscrollbar_policy">never</property> |
2604 | - <property name="vscrollbar_policy">automatic</property> |
2605 | - <property name="shadow_type">in</property> |
2606 | - <child> |
2607 | - <placeholder/> |
2608 | - </child> |
2609 | - </object> |
2610 | - <packing> |
2611 | - <property name="position">0</property> |
2612 | - </packing> |
2613 | - </child> |
2614 | - <child> |
2615 | - <object class="GtkHButtonBox" id="hbuttonbox4"> |
2616 | - <property name="visible">True</property> |
2617 | - <property name="layout_style">end</property> |
2618 | - <child> |
2619 | - <object class="GtkButton" id="tc_back_button"> |
2620 | - <property name="label">gtk-go-back</property> |
2621 | - <property name="visible">True</property> |
2622 | - <property name="can_focus">True</property> |
2623 | - <property name="receives_default">True</property> |
2624 | - <property name="use_stock">True</property> |
2625 | - <signal name="clicked" handler="on_tc_back_button_clicked"/> |
2626 | - </object> |
2627 | - <packing> |
2628 | - <property name="expand">False</property> |
2629 | - <property name="fill">False</property> |
2630 | - <property name="position">0</property> |
2631 | - </packing> |
2632 | - </child> |
2633 | - </object> |
2634 | - <packing> |
2635 | - <property name="expand">False</property> |
2636 | - <property name="position">1</property> |
2637 | - </packing> |
2638 | - </child> |
2639 | - </object> |
2640 | - <object class="GtkVBox" id="login_vbox"> |
2641 | - <property name="visible">True</property> |
2642 | - <property name="spacing">10</property> |
2643 | - <child> |
2644 | - <object class="GtkAlignment" id="alignment3"> |
2645 | - <property name="visible">True</property> |
2646 | - <property name="xscale">0</property> |
2647 | - <property name="yscale">0</property> |
2648 | - <child> |
2649 | - <object class="GtkVBox" id="login_details_vbox"> |
2650 | - <property name="visible">True</property> |
2651 | - <property name="spacing">5</property> |
2652 | - <child> |
2653 | - <placeholder/> |
2654 | - </child> |
2655 | - <child> |
2656 | - <placeholder/> |
2657 | - </child> |
2658 | - </object> |
2659 | - </child> |
2660 | - </object> |
2661 | - <packing> |
2662 | - <property name="position">0</property> |
2663 | - </packing> |
2664 | - </child> |
2665 | - <child> |
2666 | - <object class="GtkHBox" id="hbox3"> |
2667 | - <property name="visible">True</property> |
2668 | - <property name="spacing">5</property> |
2669 | - <child> |
2670 | - <object class="GtkHButtonBox" id="hbuttonbox10"> |
2671 | - <property name="visible">True</property> |
2672 | - <property name="layout_style">start</property> |
2673 | - <child> |
2674 | - <object class="GtkLinkButton" id="forgotten_password_button"> |
2675 | - <property name="label" translatable="yes">button</property> |
2676 | - <property name="visible">True</property> |
2677 | - <property name="can_focus">True</property> |
2678 | - <property name="receives_default">True</property> |
2679 | - <property name="has_tooltip">True</property> |
2680 | - <property name="relief">none</property> |
2681 | - <signal name="clicked" handler="on_forgotten_password_button_clicked"/> |
2682 | - </object> |
2683 | - <packing> |
2684 | - <property name="expand">False</property> |
2685 | - <property name="fill">False</property> |
2686 | - <property name="padding">10</property> |
2687 | - <property name="position">0</property> |
2688 | - </packing> |
2689 | - </child> |
2690 | - </object> |
2691 | - <packing> |
2692 | - <property name="expand">False</property> |
2693 | - <property name="position">0</property> |
2694 | - </packing> |
2695 | - </child> |
2696 | - <child> |
2697 | - <object class="GtkHButtonBox" id="hbuttonbox5"> |
2698 | - <property name="visible">True</property> |
2699 | - <property name="spacing">5</property> |
2700 | - <property name="layout_style">end</property> |
2701 | - <child> |
2702 | - <object class="GtkButton" id="login_cancel_button"> |
2703 | - <property name="label">gtk-cancel</property> |
2704 | - <property name="visible">True</property> |
2705 | - <property name="can_focus">True</property> |
2706 | - <property name="receives_default">True</property> |
2707 | - <property name="use_stock">True</property> |
2708 | - </object> |
2709 | - <packing> |
2710 | - <property name="expand">False</property> |
2711 | - <property name="fill">False</property> |
2712 | - <property name="position">0</property> |
2713 | - </packing> |
2714 | - </child> |
2715 | - <child> |
2716 | - <object class="GtkButton" id="login_back_button"> |
2717 | - <property name="label">gtk-go-back</property> |
2718 | - <property name="visible">True</property> |
2719 | - <property name="can_focus">True</property> |
2720 | - <property name="receives_default">True</property> |
2721 | - <property name="use_stock">True</property> |
2722 | - <signal name="clicked" handler="on_login_back_button_clicked"/> |
2723 | - </object> |
2724 | - <packing> |
2725 | - <property name="expand">False</property> |
2726 | - <property name="fill">False</property> |
2727 | - <property name="position">1</property> |
2728 | - </packing> |
2729 | - </child> |
2730 | - <child> |
2731 | - <object class="GtkButton" id="login_ok_button"> |
2732 | - <property name="label">gtk-connect</property> |
2733 | - <property name="visible">True</property> |
2734 | - <property name="can_focus">True</property> |
2735 | - <property name="receives_default">True</property> |
2736 | - <property name="use_stock">True</property> |
2737 | - <signal name="clicked" handler="on_login_connect_button_clicked"/> |
2738 | - </object> |
2739 | - <packing> |
2740 | - <property name="expand">False</property> |
2741 | - <property name="fill">False</property> |
2742 | - <property name="position">2</property> |
2743 | - </packing> |
2744 | - </child> |
2745 | - </object> |
2746 | - <packing> |
2747 | - <property name="expand">False</property> |
2748 | - <property name="pack_type">end</property> |
2749 | - <property name="position">1</property> |
2750 | - </packing> |
2751 | - </child> |
2752 | - </object> |
2753 | - <packing> |
2754 | - <property name="expand">False</property> |
2755 | - <property name="position">1</property> |
2756 | - </packing> |
2757 | - </child> |
2758 | - </object> |
2759 | - <object class="GtkVBox" id="request_password_token_vbox"> |
2760 | - <property name="visible">True</property> |
2761 | - <property name="spacing">10</property> |
2762 | - <child> |
2763 | - <object class="GtkAlignment" id="alignment2"> |
2764 | - <property name="visible">True</property> |
2765 | - <property name="xscale">0</property> |
2766 | - <property name="yscale">0</property> |
2767 | - <child> |
2768 | - <object class="GtkVBox" id="request_password_token_details_vbox"> |
2769 | - <property name="visible">True</property> |
2770 | - <property name="spacing">5</property> |
2771 | - <child> |
2772 | - <placeholder/> |
2773 | - </child> |
2774 | - </object> |
2775 | - </child> |
2776 | - </object> |
2777 | - <packing> |
2778 | - <property name="position">0</property> |
2779 | - </packing> |
2780 | - </child> |
2781 | - <child> |
2782 | - <object class="GtkHButtonBox" id="hbuttonbox7"> |
2783 | - <property name="visible">True</property> |
2784 | - <property name="spacing">5</property> |
2785 | - <property name="layout_style">end</property> |
2786 | - <child> |
2787 | - <object class="GtkButton" id="request_password_token_cancel_button"> |
2788 | - <property name="label">gtk-cancel</property> |
2789 | - <property name="visible">True</property> |
2790 | - <property name="can_focus">True</property> |
2791 | - <property name="receives_default">True</property> |
2792 | - <property name="use_stock">True</property> |
2793 | - </object> |
2794 | - <packing> |
2795 | - <property name="expand">False</property> |
2796 | - <property name="fill">False</property> |
2797 | - <property name="position">0</property> |
2798 | - </packing> |
2799 | - </child> |
2800 | - <child> |
2801 | - <object class="GtkButton" id="request_password_token_back_button"> |
2802 | - <property name="label">gtk-go-back</property> |
2803 | - <property name="visible">True</property> |
2804 | - <property name="can_focus">True</property> |
2805 | - <property name="receives_default">True</property> |
2806 | - <property name="use_stock">True</property> |
2807 | - <signal name="clicked" handler="on_request_password_token_back_button_clicked"/> |
2808 | - </object> |
2809 | - <packing> |
2810 | - <property name="expand">False</property> |
2811 | - <property name="fill">False</property> |
2812 | - <property name="position">1</property> |
2813 | - </packing> |
2814 | - </child> |
2815 | - <child> |
2816 | - <object class="GtkButton" id="request_password_token_ok_button"> |
2817 | - <property name="label">gtk-ok</property> |
2818 | - <property name="visible">True</property> |
2819 | - <property name="can_focus">True</property> |
2820 | - <property name="receives_default">True</property> |
2821 | - <property name="use_stock">True</property> |
2822 | - <signal name="clicked" handler="on_request_password_token_ok_button_clicked"/> |
2823 | - </object> |
2824 | - <packing> |
2825 | - <property name="expand">False</property> |
2826 | - <property name="fill">False</property> |
2827 | - <property name="position">2</property> |
2828 | - </packing> |
2829 | - </child> |
2830 | - </object> |
2831 | - <packing> |
2832 | - <property name="expand">False</property> |
2833 | - <property name="position">1</property> |
2834 | - </packing> |
2835 | - </child> |
2836 | - </object> |
2837 | - <object class="GtkVBox" id="set_new_password_vbox"> |
2838 | - <property name="visible">True</property> |
2839 | - <property name="spacing">10</property> |
2840 | - <child> |
2841 | - <object class="GtkVBox" id="vbox2"> |
2842 | - <property name="visible">True</property> |
2843 | - <child> |
2844 | - <object class="GtkLabel" id="reset_password_help_label"> |
2845 | - <property name="visible">True</property> |
2846 | - <property name="label">label</property> |
2847 | - <property name="wrap">True</property> |
2848 | - </object> |
2849 | - <packing> |
2850 | - <property name="expand">False</property> |
2851 | - <property name="position">0</property> |
2852 | - </packing> |
2853 | - </child> |
2854 | - <child> |
2855 | - <object class="GtkAlignment" id="alignment1"> |
2856 | - <property name="visible">True</property> |
2857 | - <property name="xscale">0</property> |
2858 | - <property name="yscale">0</property> |
2859 | - <child> |
2860 | - <object class="GtkVBox" id="set_new_password_details_vbox"> |
2861 | - <property name="visible">True</property> |
2862 | - <property name="spacing">5</property> |
2863 | - <child> |
2864 | - <placeholder/> |
2865 | - </child> |
2866 | - <child> |
2867 | - <placeholder/> |
2868 | - </child> |
2869 | - <child> |
2870 | - <placeholder/> |
2871 | - </child> |
2872 | - </object> |
2873 | - </child> |
2874 | - </object> |
2875 | - <packing> |
2876 | - <property name="position">1</property> |
2877 | - </packing> |
2878 | - </child> |
2879 | - </object> |
2880 | - <packing> |
2881 | - <property name="position">0</property> |
2882 | - </packing> |
2883 | - </child> |
2884 | - <child> |
2885 | - <object class="GtkHButtonBox" id="hbuttonbox6"> |
2886 | - <property name="visible">True</property> |
2887 | - <property name="spacing">5</property> |
2888 | - <property name="layout_style">end</property> |
2889 | - <child> |
2890 | - <object class="GtkButton" id="set_new_password_cancel_button"> |
2891 | - <property name="label">gtk-cancel</property> |
2892 | - <property name="visible">True</property> |
2893 | - <property name="can_focus">True</property> |
2894 | - <property name="receives_default">True</property> |
2895 | - <property name="use_stock">True</property> |
2896 | - </object> |
2897 | - <packing> |
2898 | - <property name="expand">False</property> |
2899 | - <property name="fill">False</property> |
2900 | - <property name="position">0</property> |
2901 | - </packing> |
2902 | - </child> |
2903 | - <child> |
2904 | - <object class="GtkButton" id="set_new_password_ok_button"> |
2905 | - <property name="label">gtk-ok</property> |
2906 | - <property name="visible">True</property> |
2907 | - <property name="can_focus">True</property> |
2908 | - <property name="receives_default">True</property> |
2909 | - <property name="use_stock">True</property> |
2910 | - <signal name="clicked" handler="on_set_new_password_ok_button_clicked"/> |
2911 | - </object> |
2912 | - <packing> |
2913 | - <property name="expand">False</property> |
2914 | - <property name="fill">False</property> |
2915 | - <property name="position">1</property> |
2916 | - </packing> |
2917 | - </child> |
2918 | - </object> |
2919 | - <packing> |
2920 | - <property name="expand">False</property> |
2921 | - <property name="position">1</property> |
2922 | - </packing> |
2923 | - </child> |
2924 | - </object> |
2925 | - <object class="GtkVBox" id="finish_vbox"> |
2926 | - <property name="visible">True</property> |
2927 | - <property name="spacing">10</property> |
2928 | - <child> |
2929 | - <object class="GtkLabel" id="finish_label"> |
2930 | - <property name="visible">True</property> |
2931 | - <property name="wrap">True</property> |
2932 | - </object> |
2933 | - <packing> |
2934 | - <property name="position">0</property> |
2935 | - </packing> |
2936 | - </child> |
2937 | - <child> |
2938 | - <object class="GtkHButtonBox" id="hbuttonbox8"> |
2939 | - <property name="visible">True</property> |
2940 | - <property name="layout_style">end</property> |
2941 | - <child> |
2942 | - <object class="GtkButton" id="finish_close_button"> |
2943 | - <property name="label">gtk-close</property> |
2944 | - <property name="visible">True</property> |
2945 | - <property name="can_focus">True</property> |
2946 | - <property name="receives_default">True</property> |
2947 | - <property name="use_stock">True</property> |
2948 | - <signal name="clicked" handler="on_close_clicked"/> |
2949 | - </object> |
2950 | - <packing> |
2951 | - <property name="expand">False</property> |
2952 | - <property name="fill">False</property> |
2953 | - <property name="position">0</property> |
2954 | - </packing> |
2955 | - </child> |
2956 | - </object> |
2957 | - <packing> |
2958 | - <property name="expand">False</property> |
2959 | - <property name="position">1</property> |
2960 | - </packing> |
2961 | - </child> |
2962 | - </object> |
2963 | -</interface> |
2964 | |
2965 | === modified file 'debian/changelog' |
2966 | --- debian/changelog 2011-06-21 15:23:34 +0000 |
2967 | +++ debian/changelog 2011-06-24 19:23:07 +0000 |
2968 | @@ -1,3 +1,14 @@ |
2969 | +ubuntu-sso-client (1.3.1-0ubuntu1) oneiric; urgency=low |
2970 | + |
2971 | + * New upstream release. |
2972 | + - Invalid signature for CreateItem call (LP: #745540) |
2973 | + - Never sees NetworkManager connection (LP: #791548) |
2974 | + - Support new property names in secrets API (LP: #800294) |
2975 | + - Deprecated DBus interfaces not marked as such (LP: #770269) |
2976 | + * Update the watch file to point at the correct place. |
2977 | + |
2978 | + -- Rodney Dawes <rodney.dawes@ubuntu.com> Fri, 24 Jun 2011 15:14:18 -0400 |
2979 | + |
2980 | ubuntu-sso-client (1.2.1-0ubuntu3) oneiric; urgency=low |
2981 | |
2982 | [ Michael Vogt ] |
2983 | |
2984 | === modified file 'debian/watch' |
2985 | --- debian/watch 2011-03-30 20:39:13 +0000 |
2986 | +++ debian/watch 2011-06-24 19:23:07 +0000 |
2987 | @@ -1,3 +1,3 @@ |
2988 | version=3 |
2989 | -http://launchpad.net/ubuntu-sso-client/+download?start=20 .*/ubuntu-sso-client-(1\.2\.[0-9]+)\.tar\.gz |
2990 | +http://launchpad.net/ubuntu-sso-client/+download .*/ubuntu-sso-client-([0-9.]+)\.tar\.gz |
2991 | |
2992 | |
2993 | === modified file 'pylintrc' |
2994 | --- pylintrc 2011-04-12 16:42:48 +0000 |
2995 | +++ pylintrc 2011-06-24 19:23:07 +0000 |
2996 | @@ -20,7 +20,7 @@ |
2997 | |
2998 | # Add <file or directory> to the black list. It should be a base name, not a |
2999 | # path. You may set this option multiple times. |
3000 | -#ignore=<somedir> |
3001 | +#ignore=qt |
3002 | |
3003 | # Pickle collected data for later comparisons. |
3004 | persistent=no |
3005 | |
3006 | === modified file 'run-tests' |
3007 | --- run-tests 2011-03-22 23:29:20 +0000 |
3008 | +++ run-tests 2011-06-24 19:23:07 +0000 |
3009 | @@ -1,4 +1,5 @@ |
3010 | -#!/bin/bash |
3011 | +#! /bin/bash |
3012 | +# |
3013 | # Author: Natalia Bidart <natalia.bidart@canonical.com> |
3014 | # |
3015 | # Copyright 2010 Canonical Ltd. |
3016 | @@ -15,8 +16,10 @@ |
3017 | # You should have received a copy of the GNU General Public License along |
3018 | # with this program. If not, see <http://www.gnu.org/licenses/>. |
3019 | |
3020 | +set -e |
3021 | + |
3022 | if [ $# -ne 0 ]; then |
3023 | - # an extra argument was given |
3024 | + # run specific module given by the caller |
3025 | MODULE="$@" |
3026 | else |
3027 | # run all tests, useful for tarmac and reviews |
3028 | @@ -32,6 +35,9 @@ |
3029 | fi |
3030 | } |
3031 | |
3032 | +unset GTK_MODULES |
3033 | + |
3034 | echo "Running test suite for ""$MODULE" |
3035 | -`which xvfb-run` u1trial "$MODULE" -i "test_windows.py" && style_check |
3036 | +`which xvfb-run` u1trial "$MODULE" -i "test_windows.py, test_qt_views.py" |
3037 | +style_check |
3038 | rm -rf _trial_temp |
3039 | |
3040 | === modified file 'run-tests.bat' |
3041 | --- run-tests.bat 2011-03-22 23:29:20 +0000 |
3042 | +++ run-tests.bat 2011-06-24 19:23:07 +0000 |
3043 | @@ -16,7 +16,7 @@ |
3044 | @ECHO off |
3045 | :: We could have Python 2.6 or 2.7 on Windows. In order to check availability, |
3046 | :: we should first check for 2.7, and run the tests, otherwise fall back to 2.6. |
3047 | -SET PYTHONPATH="" |
3048 | +SET PYTHONEXEPATH="" |
3049 | :: This is very annoying; FOR /F will work differently depending on the output |
3050 | :: of reg which is not consistent between OS versions (XP, 7). We must choose |
3051 | :: the tokens according to OS version. |
3052 | @@ -25,40 +25,48 @@ |
3053 | IF %ERRORLEVEL% == 0 SET PYTHONPATHTOKENS=4 |
3054 | ECHO Checking if python 2.7 is in the system |
3055 | :: Look for python 2.7 |
3056 | -FOR /F "tokens=%PYTHONPATHTOKENS%" %%A IN ('REG QUERY HKLM\Software\Python\PythonCore\2.7\InstallPath /ve') DO @SET PYTHONPATH=%%A |
3057 | -IF NOT %PYTHONPATH% == "" GOTO :PYTHONPRESENT |
3058 | +FOR /F "tokens=%PYTHONPATHTOKENS%" %%A IN ('REG QUERY HKLM\Software\Python\PythonCore\2.7\InstallPath /ve') DO @SET PYTHONEXEPATH=%%A |
3059 | +IF NOT %PYTHONEXEPATH% == "" GOTO :PYTHONPRESENT |
3060 | ECHO Checking if python 2.6 is in the system |
3061 | :: we do not have python 2.7 in the system, try to find 2.6 |
3062 | -FOR /F "tokens=%PYTHONPATHTOKENS%" %%A IN ('REG QUERY HKLM\Software\Python\PythonCore\2.6\InstallPath /ve') DO @SET PYTHONPATH=%%A |
3063 | -IF NOT %PYTHONPATH% == "" GOTO :PYTHONPRESENT |
3064 | +FOR /F "tokens=%PYTHONPATHTOKENS%" %%A IN ('REG QUERY HKLM\Software\Python\PythonCore\2.6\InstallPath /ve') DO @SET PYTHONEXEPATH=%%A |
3065 | +IF NOT %PYTHONEXEPATH% == "" GOTO :PYTHONPRESENT |
3066 | |
3067 | :: we do not have python (2.6 or 2.7) this could hapen in the case that the |
3068 | :: user installed the 32version in a 64 machine, let check if the software was installed in the wow key |
3069 | |
3070 | :: Look for python 2.7 in WoW64 |
3071 | ECHO Checking if python 2.7 32 is in the system |
3072 | -FOR /F "tokens=%PYTHONPATHTOKENS%" %%A IN ('REG QUERY HKLM\Software\Wow6432Node\Python\PythonCore\2.7\InstallPath /ve') DO @SET PYTHONPATH=%%A |
3073 | -IF NOT %PYTHONPATH% == "" GOTO :PYTHONPRESENT |
3074 | +FOR /F "tokens=%PYTHONPATHTOKENS%" %%A IN ('REG QUERY HKLM\Software\Wow6432Node\Python\PythonCore\2.7\InstallPath /ve') DO @SET PYTHONEXEPATH=%%A |
3075 | +IF NOT %PYTHONEXEPATH% == "" GOTO :PYTHONPRESENT |
3076 | ECHO Checking if python 2.6 32 is in the system |
3077 | :: we do not have python 2.7 in the system, try to find 2.6 |
3078 | -FOR /F "tokens=%PYTHONPATHTOKENS%" %%A IN ('REG QUERY HKLM\Software\Wow6432Node\Python\PythonCore\2.6\InstallPath /ve') DO @SET PYTHONPATH=%%A |
3079 | -IF NOT %PYTHONPATH% == "" GOTO :PYTHONPRESENT |
3080 | +FOR /F "tokens=%PYTHONPATHTOKENS%" %%A IN ('REG QUERY HKLM\Software\Wow6432Node\Python\PythonCore\2.6\InstallPath /ve') DO @SET PYTHONEXEPATH=%%A |
3081 | +IF NOT %PYTHONEXEPATH% == "" GOTO :PYTHONPRESENT |
3082 | |
3083 | ECHO Please ensure you have python installed |
3084 | GOTO :END |
3085 | |
3086 | |
3087 | :PYTHONPRESENT |
3088 | -ECHO Python found, executing the tests... |
3089 | +ECHO Python found, building auto-generated modules... |
3090 | +:: call setup.py build so that the qt uic is called |
3091 | +::START "Build code" /D%CD% /WAIT "%PYTHONEXEPATH%\python.exe" setup.py build |
3092 | +"%PYTHONEXEPATH%\python.exe" setup.py build |
3093 | +ECHO Running tests |
3094 | :: execute the tests with a number of ignored linux only modules |
3095 | -"%PYTHONPATH%\python.exe" "%PYTHONPATH%\Scripts\u1trial" -c ubuntu_sso -i "test_gui.py, test_linux.py, test_txsecrets.py" |
3096 | -"%PYTHONPATH%\python.exe" "%PYTHONPATH%\Scripts\u1lint" ubuntu_sso |
3097 | +"%PYTHONEXEPATH%\python.exe" "%PYTHONEXEPATH%\Scripts\u1trial" -c ubuntu_sso -i "test_gui.py, test_linux.py, test_txsecrets.py" --reactor=txnp |
3098 | +:: Clean the build from the setupt.py |
3099 | +ECHO Cleaning the generated code before running the style checks... |
3100 | +"%PYTHONEXEPATH%\python.exe" setup.py clean |
3101 | +ECHO Performing style checks... |
3102 | +"%PYTHONEXEPATH%\python.exe" "%PYTHONEXEPATH%\Scripts\u1lint" ubuntu_sso |
3103 | :: test for style if we can, if pep8 is not present, move to the end |
3104 | -IF EXIST "%PYTHONPATH%Scripts\pep8.exe" |
3105 | -"%PYTHONPATH%\Scripts\pep8.exe" --repeat ubuntu_sso |
3106 | +IF EXIST "%PYTHONEXEPATH%\Scripts\pep8.exe" |
3107 | +"%PYTHONEXEPATH%\Scripts\pep8.exe" --repeat ubuntu_sso |
3108 | ELSE |
3109 | ECHO Style checks were not done |
3110 | :: Delete the temp folders |
3111 | RMDIR /s /q _trial_temp |
3112 | RMDIR /s /q .coverage |
3113 | -:END |
3114 | \ No newline at end of file |
3115 | +:END |
3116 | |
3117 | === modified file 'setup.py' (properties changed: +x to -x) |
3118 | --- setup.py 2011-04-12 16:42:48 +0000 |
3119 | +++ setup.py 2011-06-24 19:23:07 +0000 |
3120 | @@ -2,6 +2,7 @@ |
3121 | # setup.py - Build system for Ubuntu SSO Client package |
3122 | # |
3123 | # Author: Natalia B. Bidart <natalia.bidart@canonical.com> |
3124 | +# Author: Manuel de la Pena <manuel@canonical.com> |
3125 | # |
3126 | # Copyright 2010 Canonical Ltd. |
3127 | # |
3128 | @@ -18,6 +19,7 @@ |
3129 | # with this program. If not, see <http://www.gnu.org/licenses/>. |
3130 | """setup.py""" |
3131 | |
3132 | +import cgi |
3133 | import os |
3134 | import sys |
3135 | |
3136 | @@ -31,20 +33,25 @@ |
3137 | assert DistUtilsExtra.auto.__version__ >= '2.18', \ |
3138 | 'needs DistUtilsExtra.auto >= 2.18' |
3139 | |
3140 | +from distutils import log |
3141 | +from distutils.command import clean |
3142 | from distutils.spawn import find_executable |
3143 | -from distutils.command import clean |
3144 | |
3145 | # Defining variables for various rules here, similar to a Makefile.am |
3146 | -CLEANFILES = ['data/com.ubuntu.sso.service', 'po/ubuntu-sso-client.pot', |
3147 | +LINUX_CLEANFILES = ['data/com.ubuntu.sso.service', 'po/ubuntu-sso-client.pot', |
3148 | 'MANIFEST'] |
3149 | |
3150 | |
3151 | +# pylint: disable=W0511 |
3152 | # This needs some serious cleanup |
3153 | -class SSOBuild(build_extra.build_extra): |
3154 | - """Class to build the extra files.""" |
3155 | +class SSOLinuxBuild(build_extra.build_extra): |
3156 | + """Build the extra files required on Linux..""" |
3157 | |
3158 | description = 'build extra files needed by ubuntu-sso-client' |
3159 | |
3160 | + def __init__(self, *args): |
3161 | + build_extra.build_extra.__init__(self, *args) |
3162 | + |
3163 | def run(self): |
3164 | """Do the build.""" |
3165 | sed = find_executable('sed') |
3166 | @@ -69,14 +76,14 @@ |
3167 | build_extra.build_extra.run(self) |
3168 | |
3169 | |
3170 | -class SSOClean(clean.clean): |
3171 | +class SSOLinuxClean(clean.clean): |
3172 | """Class to clean up after the build.""" |
3173 | |
3174 | description = 'Clean up built files.' |
3175 | |
3176 | def run(self): |
3177 | """Clean up the built files.""" |
3178 | - for built_file in CLEANFILES: |
3179 | + for built_file in LINUX_CLEANFILES: |
3180 | if os.path.exists(built_file): |
3181 | os.unlink(built_file) |
3182 | |
3183 | @@ -84,23 +91,304 @@ |
3184 | clean.clean.run(self) |
3185 | |
3186 | |
3187 | -DistUtilsExtra.auto.setup( |
3188 | - name='ubuntu-sso-client', |
3189 | - version='1.2.1', |
3190 | - license='GPL v3', |
3191 | - author='Natalia Bidart', |
3192 | - author_email='natalia.bidart@canonical.com', |
3193 | - description='Ubuntu Single Sign-On client', |
3194 | - long_description='Desktop service to allow applications to sign in' \ |
3195 | - 'to Ubuntu services via SSO', |
3196 | - url='https://launchpad.net/ubuntu-sso-client', |
3197 | - packages=['ubuntu_sso', 'ubuntu_sso.gtk', 'ubuntu_sso.utils', |
3198 | - 'ubuntu_sso.keyring', 'ubuntu_sso.networkstate', |
3199 | - 'ubuntu_sso.main'], |
3200 | - data_files=[ |
3201 | - ('share/dbus-1/services', ['data/com.ubuntu.sso.service']), |
3202 | - ('lib/ubuntu-sso-client', ['bin/ubuntu-sso-login']), |
3203 | - ('share/ubuntu-sso-client/data', ['data/ui.glade'])], |
3204 | - cmdclass={ |
3205 | - 'build' : SSOBuild, |
3206 | - 'clean' : SSOClean}) |
3207 | +class SSOWindowsBuild(build_extra.build_extra): |
3208 | + """Build PyQt (.ui) files and resources.""" |
3209 | + |
3210 | + description = "build PyQt GUIs (.ui) and resources (.qrc)" |
3211 | + |
3212 | + def __init__(self, *args): |
3213 | + build_extra.build_extra.__init__(self, *args) |
3214 | + |
3215 | + def compile_ui(self, ui_file, py_file=None): |
3216 | + """Compile the .ui files to python modules.""" |
3217 | + # Search for pyuic4 in python bin dir, then in the $Path. |
3218 | + if py_file is None: |
3219 | + # go from the ui_file in the data folder to the |
3220 | + # python file in the qt moodule |
3221 | + py_file = os.path.split(ui_file)[1] |
3222 | + py_file = os.path.splitext(py_file)[0] + '_ui.py' |
3223 | + py_file = os.path.join('ubuntu_sso', 'qt', py_file) |
3224 | + # we indeed want to catch Exception, is ugly but we need it |
3225 | + # pylint: disable=W0703 |
3226 | + try: |
3227 | + # import the uic compiler from pyqt and generate the .py files |
3228 | + # something similar could be done with pyside but that is left |
3229 | + # as an exercise for the reader. |
3230 | + from PyQt4 import uic |
3231 | + fp = open(py_file, 'w') |
3232 | + uic.compileUi(ui_file, fp) |
3233 | + fp.close() |
3234 | + log.info('Compiled %s into %s', ui_file, py_file) |
3235 | + except Exception, e: |
3236 | + self.warn('Unable to compile user interface %s: %s', py_file, e) |
3237 | + if not os.path.exists(py_file) or not file(py_file).read(): |
3238 | + raise SystemExit(1) |
3239 | + return |
3240 | + # pylint: enable=W0703 |
3241 | + |
3242 | + def compile_rc(self, qrc_file, py_file=None): |
3243 | + """Compile the resources that will be included with the project.""" |
3244 | + import PyQt4 |
3245 | + # Search for pyuic4 in python bin dir, then in the $Path. |
3246 | + if py_file is None: |
3247 | + py_file = os.path.split(qrc_file)[1] |
3248 | + py_file = os.path.splitext(py_file)[0] + '_rc.py' |
3249 | + py_file = os.path.join('ubuntu_sso', 'qt', py_file) |
3250 | + path = os.getenv('PATH') |
3251 | + os.putenv('PATH', path + ';' + os.path.join( |
3252 | + os.path.dirname(PyQt4.__file__),'bin')) |
3253 | + if os.system('pyrcc4 "%s" -o "%s"' % (qrc_file, py_file)) > 0: |
3254 | + self.warn('Unable to generate python module %s ' |
3255 | + + 'for resource file %s', py_file, qrc_file) |
3256 | + if not os.path.exists(py_file) or not file(py_file).read(): |
3257 | + raise SystemExit(1) |
3258 | + else: |
3259 | + log.info('compiled %s into %s' % (qrc_file, py_file)) |
3260 | + os.putenv('PATH', path) |
3261 | + |
3262 | + def _generate_qrc(self, qrc_file, srcfiles, prefix): |
3263 | + """Generate the qrc file for the given src files.""" |
3264 | + basedir = os.path.dirname(qrc_file) |
3265 | + f = open(qrc_file, 'w') |
3266 | + try: |
3267 | + f.write('<!DOCTYPE RCC><RCC version="1.0">\n') |
3268 | + f.write(' <qresource prefix="%s">\n' % cgi.escape(prefix)) |
3269 | + for e in srcfiles: |
3270 | + relpath = e[len(basedir) + 1:] |
3271 | + f.write(' <file>%s</file>\n' |
3272 | + % cgi.escape(relpath.replace(os.path.sep, '/'))) |
3273 | + f.write(' </qresource>\n') |
3274 | + f.write('</RCC>\n') |
3275 | + finally: |
3276 | + f.close() |
3277 | + |
3278 | + def build_rc(self, py_file, basedir, prefix='/'): |
3279 | + """Generate compiled resource including any files under basedir""" |
3280 | + # For details, see http://doc.qt.nokia.com/latest/resources.html |
3281 | + qrc_file = os.path.join(basedir, '%s.qrc' % os.path.basename(basedir)) |
3282 | + srcfiles = [os.path.join(root, e) |
3283 | + for root, _dirs, files in os.walk(basedir) for e in files] |
3284 | + # NOTE: Here we cannot detect deleted files. In such cases, we need |
3285 | + # to remove .qrc manually. |
3286 | + try: |
3287 | + self._generate_qrc(qrc_file, srcfiles, prefix) |
3288 | + self.compile_rc(qrc_file, py_file) |
3289 | + finally: |
3290 | + os.unlink(qrc_file) |
3291 | + |
3292 | + def run(self): |
3293 | + """Execute the command.""" |
3294 | + self._wrapuic() |
3295 | + basepath = os.path.join('data', 'qt') |
3296 | + # TODO: build the resource files so that we can include them |
3297 | + #self.build_rc(os.path.join(basepath, 'icons_rc.py'), |
3298 | + # os.path.join(os.path.dirname(__file__), 'icons'), |
3299 | + # '/icons') |
3300 | + for dirpath, _, filenames in os.walk(basepath): |
3301 | + for filename in filenames: |
3302 | + if filename.endswith('.ui'): |
3303 | + self.compile_ui(os.path.join(dirpath, filename)) |
3304 | + elif filename.endswith('.qrc'): |
3305 | + self.compile_rc(os.path.join(dirpath, filename)) |
3306 | + |
3307 | + # pylint: disable=E1002 |
3308 | + _wrappeduic = False |
3309 | + @classmethod |
3310 | + def _wrapuic(cls): |
3311 | + """Wrap uic to use gettext's _() in place of tr()""" |
3312 | + if cls._wrappeduic: |
3313 | + return |
3314 | + |
3315 | + from PyQt4.uic.Compiler import compiler, qtproxies, indenter |
3316 | + |
3317 | + # pylint: disable=C0103 |
3318 | + class _UICompiler(compiler.UICompiler): |
3319 | + """Speciallized compiler for qt .ui files.""" |
3320 | + def createToplevelWidget(self, classname, widgetname): |
3321 | + o = indenter.getIndenter() |
3322 | + o.level = 0 |
3323 | + o.write('from ubuntu_sso.utils.ui import _') |
3324 | + return super(_UICompiler, self).createToplevelWidget(classname, |
3325 | + widgetname) |
3326 | + compiler.UICompiler = _UICompiler |
3327 | + |
3328 | + class _i18n_string(qtproxies.i18n_string): |
3329 | + """Provide a trnalated text.""" |
3330 | + |
3331 | + def __str__(self): |
3332 | + return "_('%s')" % self.string.encode('string-escape') |
3333 | + |
3334 | + qtproxies.i18n_string = _i18n_string |
3335 | + |
3336 | + cls._wrappeduic = True |
3337 | + # pylint: enable=C0103 |
3338 | + # pylint: enable=E1002 |
3339 | + |
3340 | +class SSOWindowsClean(clean.clean): |
3341 | + """Clean the files from a Windows build.""" |
3342 | + |
3343 | + description = 'Clean up built files.' |
3344 | + |
3345 | + def run(self): |
3346 | + """Clean up the built files.""" |
3347 | + # remove the generated ui files |
3348 | + for dirpath, _, filenames in os.walk(os.path.join('ubuntu_sso', 'qt')): |
3349 | + for current_file in filenames: |
3350 | + if current_file.endswith('_ui.py') or\ |
3351 | + current_file.endswith('_rc.py'): |
3352 | + os.unlink(os.path.join(dirpath, current_file)) |
3353 | + |
3354 | +def set_py2exe_paths(): |
3355 | + """Set the path so that py2exe finds the required modules.""" |
3356 | + # Pylint does not understand same spaced imports which is what lazr uses |
3357 | + # pylint: disable=F0401 |
3358 | + import lazr |
3359 | + import win32com |
3360 | + # pylint: enable=F0401 |
3361 | + try: |
3362 | + # pylint: disable=F0401 |
3363 | + import py2exe.mf as modulefinder |
3364 | + # pylint: enable=F0401 |
3365 | + except ImportError: |
3366 | + import modulefinder |
3367 | + |
3368 | + # py2exe 0.6.4 introduced a replacement modulefinder. |
3369 | + # This means we have to add package paths there, |
3370 | + # not to the built-in one. If this new modulefinder gets |
3371 | + # integrated into Python, then we might be able to revert |
3372 | + # this some day. If this doesn't work, try import modulefinder |
3373 | + for package_path in win32com.__path__[1:]: |
3374 | + modulefinder.AddPackagePath("win32com", package_path) |
3375 | + for extra_mod in ["win32com.server" ,"win32com.client"]: |
3376 | + __import__(extra_mod) |
3377 | + module = sys.modules[extra_mod] |
3378 | + for module_path in module.__path__[1:]: |
3379 | + modulefinder.AddPackagePath(extra_mod, module_path) |
3380 | + |
3381 | + # lazr uses namespaces packages, which does add some problems to py2exe |
3382 | + # the following is a way to work arround the issue |
3383 | + for path in lazr.__path__: |
3384 | + modulefinder.AddPackagePath(__name__, path) |
3385 | + |
3386 | + |
3387 | +def get_py2exe_extension(): |
3388 | + """Return an extension class of py2exe.""" |
3389 | + import glob |
3390 | + # pylint: disable=F0401 |
3391 | + from py2exe.build_exe import py2exe as build_exe |
3392 | + # pylint: enable=F0401 |
3393 | + |
3394 | + # pylint: disable=E1101 |
3395 | + class MediaCollector(build_exe): |
3396 | + """Extension that copies lazr missing data.""" |
3397 | + |
3398 | + def __init__(self, *args, **kwargs): |
3399 | + """Create a new instance.""" |
3400 | + build_exe.__init__(self, *args, **kwargs) |
3401 | + |
3402 | + def _add_module_data(self, module_name): |
3403 | + """Add the data from a given path.""" |
3404 | + # Create the media subdir where the |
3405 | + # Python files are collected. |
3406 | + media = module_name.replace('.', os.path.sep) |
3407 | + full = os.path.join(self.collect_dir, media) |
3408 | + if not os.path.exists(full): |
3409 | + self.mkpath(full) |
3410 | + |
3411 | + # Copy the media files to the collection dir. |
3412 | + # Also add the copied file to the list of compiled |
3413 | + # files so it will be included in zipfile. |
3414 | + module = __import__(module_name, None, None, ['']) |
3415 | + for path in module.__path__: |
3416 | + for f in glob.glob(path + '/*'): # does not like os.path.sep |
3417 | + log.info('Copying file %s', f) |
3418 | + name = os.path.basename(f) |
3419 | + if not os.path.isdir(f): |
3420 | + self.copy_file(f, os.path.join(full, name)) |
3421 | + self.compiled_files.append(os.path.join(media, name)) |
3422 | + else: |
3423 | + self.copy_tree(f, os.path.join(full, name)) |
3424 | + |
3425 | + def copy_extensions(self, extensions): |
3426 | + """Copy the missing extensions.""" |
3427 | + build_exe.copy_extensions(self, extensions) |
3428 | + for module in ['lazr.uri', 'lazr.restfulclient', |
3429 | + 'lazr.authentication', 'wadllib']: |
3430 | + self._add_module_data(module) |
3431 | + # pylint: enable=E1101 |
3432 | + |
3433 | + return MediaCollector |
3434 | + |
3435 | +def setup_windows(): |
3436 | + """Provide the required info to setup the project on windows.""" |
3437 | + set_py2exe_paths() |
3438 | + _scripts = [] |
3439 | + _data_files = [] |
3440 | + _packages = ['ubuntu_sso', 'ubuntu_sso.qt', 'ubuntu_sso.utils', |
3441 | + 'ubuntu_sso.keyring', 'ubuntu_sso.networkstate', |
3442 | + 'ubuntu_sso.main'] |
3443 | + _extra = {} |
3444 | + _cmdclass = {'build' : SSOWindowsBuild, |
3445 | + 'clean' : SSOWindowsClean, |
3446 | + 'py2exe' : get_py2exe_extension()} |
3447 | + |
3448 | + # for PyQt, see http://www.py2exe.org/index.cgi/Py2exeAndPyQt |
3449 | + _includes = ['sip', 'email', 'ubuntu_sso.qt.gui', |
3450 | + 'ubuntu_sso.qt.controllers', 'PyQt4.QtNetwork', 'PIL'] |
3451 | + # exclude the modules that are not part of windows, this will not do much |
3452 | + # besides the fact that the warnings wont be returned. |
3453 | + _excludes = ['dbus', 'dbus.mainloop.glib', 'osx_keychain', 'gobject', |
3454 | + 'gnomekeyring'] |
3455 | + |
3456 | + _extra['options'] = { |
3457 | + 'py2exe' : { |
3458 | + 'bundle_files' : 1, |
3459 | + 'skip_archive' : 0, |
3460 | + 'includes' : _includes, |
3461 | + 'optimize' : 1, |
3462 | + 'dll_excludes': [ "mswsock.dll", "powrprof.dll" ] |
3463 | + } |
3464 | + } |
3465 | + # add the console script so that py2exe compiles it |
3466 | + _extra['console'] = ['bin/windows-ubuntu-sso-login',] |
3467 | + _extra['zipfile'] = None |
3468 | + return _scripts, _data_files, _packages, _extra, _cmdclass |
3469 | + |
3470 | +def setup_linux(): |
3471 | + """Provide the required info to setup the project on linux.""" |
3472 | + _scripts = [] |
3473 | + _data_files = [('share/dbus-1/services', ['data/com.ubuntu.sso.service']), |
3474 | + ('lib/ubuntu-sso-client', ['bin/ubuntu-sso-login']), |
3475 | + ('share/ubuntu-sso-client/data/gtk', ['data/gtk/ui.glade'])] |
3476 | + _packages = ['ubuntu_sso', 'ubuntu_sso.gtk', 'ubuntu_sso.utils', |
3477 | + 'ubuntu_sso.keyring', 'ubuntu_sso.networkstate', |
3478 | + 'ubuntu_sso.main'] |
3479 | + _extra = {} |
3480 | + _cmdclass = {'build' : SSOLinuxBuild, |
3481 | + 'clean' : SSOLinuxClean} |
3482 | + return _scripts, _data_files, _packages, _extra, _cmdclass |
3483 | + |
3484 | +if __name__ == "__main__": |
3485 | + |
3486 | + # pylint: disable=C0103 |
3487 | + scripts = data_files = packages = extra = cmdclass = None |
3488 | + if sys.platform == 'win32': |
3489 | + scripts, data_files, packages, extra, cmdclass = setup_windows() |
3490 | + else: |
3491 | + scripts, data_files, packages, extra, cmdclass = setup_linux() |
3492 | + |
3493 | + DistUtilsExtra.auto.setup( |
3494 | + name='ubuntu-sso-client', |
3495 | + version='1.3.1', |
3496 | + license='GPL v3', |
3497 | + author='Natalia Bidart', |
3498 | + author_email='natalia.bidart@canonical.com', |
3499 | + description='Ubuntu Single Sign-On client', |
3500 | + long_description='Desktop service to allow applications to sign in' \ |
3501 | + 'to Ubuntu services via SSO', |
3502 | + url='https://launchpad.net/ubuntu-sso-client', |
3503 | + scripts=scripts, |
3504 | + data_files=data_files, |
3505 | + packages=packages, |
3506 | + cmdclass=cmdclass, |
3507 | + **extra) |
3508 | |
3509 | === modified file 'ubuntu_sso/gtk/gui.py' |
3510 | --- ubuntu_sso/gtk/gui.py 2011-03-30 20:39:37 +0000 |
3511 | +++ ubuntu_sso/gtk/gui.py 2011-06-24 19:23:07 +0000 |
3512 | @@ -29,9 +29,7 @@ |
3513 | from functools import wraps |
3514 | |
3515 | import dbus |
3516 | -import gettext |
3517 | import gtk |
3518 | -import xdg |
3519 | |
3520 | from dbus.mainloop.glib import DBusGMainLoop |
3521 | from twisted.internet.defer import inlineCallbacks |
3522 | @@ -39,15 +37,12 @@ |
3523 | from ubuntu_sso import (DBUS_ACCOUNT_PATH, DBUS_BUS_NAME, DBUS_IFACE_USER_NAME, |
3524 | NO_OP) |
3525 | from ubuntu_sso.logger import setup_logging |
3526 | - |
3527 | +from ubuntu_sso.utils.ui import get_data_file, _ |
3528 | |
3529 | # Instance of 'UbuntuSSOClientGUI' has no 'yyy' member |
3530 | # pylint: disable=E1101 |
3531 | |
3532 | |
3533 | -_ = gettext.gettext |
3534 | -gettext.textdomain('ubuntu-sso-client') |
3535 | - |
3536 | DBusGMainLoop(set_as_default=True) |
3537 | logger = setup_logging('ubuntu_sso.gui') |
3538 | |
3539 | @@ -73,38 +68,6 @@ |
3540 | WARNING_TEXT_COLOR = gtk.gdk.Color("red") |
3541 | |
3542 | |
3543 | -def get_data_dir(): |
3544 | - """Build absolute path to the 'data' directory.""" |
3545 | - module = os.path.dirname(__file__) |
3546 | - result = os.path.abspath(os.path.join(module, os.pardir, |
3547 | - os.pardir, 'data')) |
3548 | - logger.debug('get_data_file: trying to load from %r (exists? %s)', |
3549 | - result, os.path.exists(result)) |
3550 | - if os.path.exists(result): |
3551 | - logger.info('get_data_file: returning data dir located at %r.', result) |
3552 | - return result |
3553 | - |
3554 | - # no local data dir, looking within system data dirs |
3555 | - data_dirs = xdg.BaseDirectory.xdg_data_dirs |
3556 | - for path in data_dirs: |
3557 | - result = os.path.join(path, 'ubuntu-sso-client', 'data') |
3558 | - result = os.path.abspath(result) |
3559 | - logger.debug('get_data_file: trying to load from %r (exists? %s)', |
3560 | - result, os.path.exists(result)) |
3561 | - if os.path.exists(result): |
3562 | - logger.info('get_data_file: data dir located at %r.', result) |
3563 | - return result |
3564 | - else: |
3565 | - msg = 'get_data_file: can not build a valid data path. Giving up.' \ |
3566 | - '__file__ is %r, data_dirs are %r' |
3567 | - logger.error(msg, __file__, data_dirs) |
3568 | - |
3569 | - |
3570 | -def get_data_file(filename): |
3571 | - """Build absolute path to 'filename' within the 'data' directory.""" |
3572 | - return os.path.join(get_data_dir(), filename) |
3573 | - |
3574 | - |
3575 | def log_call(f): |
3576 | """Decorator to log call funtions.""" |
3577 | |
3578 | @@ -265,7 +228,7 @@ |
3579 | self.user_email = None |
3580 | self.user_password = None |
3581 | |
3582 | - ui_filename = get_data_file('ui.glade') |
3583 | + ui_filename = get_data_file('gtk', 'ui.glade') |
3584 | builder = gtk.Builder() |
3585 | builder.add_from_file(ui_filename) |
3586 | builder.connect_signals(self) |
3587 | |
3588 | === modified file 'ubuntu_sso/gtk/tests/test_gui.py' |
3589 | --- ubuntu_sso/gtk/tests/test_gui.py 2011-03-30 20:39:37 +0000 |
3590 | +++ ubuntu_sso/gtk/tests/test_gui.py 2011-06-24 19:23:07 +0000 |
3591 | @@ -1028,6 +1028,8 @@ |
3592 | decision = webkit.WebPolicyDecision() |
3593 | decision.ignore = self._set_called |
3594 | |
3595 | + self.patch(gui.webbrowser, 'open', lambda *args, **kwargs: None) |
3596 | + |
3597 | kwargs = dict(browser=self.browser, frame=None, request=None, |
3598 | action=action, decision=decision) |
3599 | self.ui.on_tc_browser_navigation_requested(**kwargs) |
3600 | |
3601 | === modified file 'ubuntu_sso/keyring/tests/test_windows.py' |
3602 | --- ubuntu_sso/keyring/tests/test_windows.py 2011-03-22 23:29:20 +0000 |
3603 | +++ ubuntu_sso/keyring/tests/test_windows.py 2011-06-24 19:23:07 +0000 |
3604 | @@ -19,11 +19,12 @@ |
3605 | from json import dumps |
3606 | from mocker import MockerTestCase |
3607 | from twisted.internet.defer import inlineCallbacks |
3608 | +from twisted.trial.unittest import TestCase |
3609 | |
3610 | from ubuntu_sso.keyring.windows import Keyring, USERNAME |
3611 | |
3612 | |
3613 | -class TestWindowsKeyring(MockerTestCase): |
3614 | +class TestWindowsKeyring(MockerTestCase, TestCase): |
3615 | """Test the windows keyring implementation.""" |
3616 | |
3617 | def setUp(self): |
3618 | @@ -43,7 +44,7 @@ |
3619 | |
3620 | @inlineCallbacks |
3621 | def test_get_credentials(self): |
3622 | - """Test deleting the credentials.""" |
3623 | + """Test getting the credentials.""" |
3624 | app_name = 'name' |
3625 | password = dict(password='password') |
3626 | self.keyring_lib.get_password(app_name, USERNAME) |
3627 | @@ -53,6 +54,16 @@ |
3628 | self.assertEqual(password, result) |
3629 | |
3630 | @inlineCallbacks |
3631 | + def test_get_credentials_not_present(self): |
3632 | + """Test getting creds that are not present.""" |
3633 | + app_name = 'name' |
3634 | + self.keyring_lib.get_password(app_name, USERNAME) |
3635 | + self.mocker.result(None) |
3636 | + self.mocker.replay() |
3637 | + result = yield self.keyring.get_credentials(app_name) |
3638 | + self.assertEqual(None, result) |
3639 | + |
3640 | + @inlineCallbacks |
3641 | def test_delete_credentials(self): |
3642 | """Test deleting the credentials.""" |
3643 | app_name = 'name' |
3644 | |
3645 | === modified file 'ubuntu_sso/keyring/windows.py' |
3646 | --- ubuntu_sso/keyring/windows.py 2011-03-22 23:29:20 +0000 |
3647 | +++ ubuntu_sso/keyring/windows.py 2011-06-24 19:23:07 +0000 |
3648 | @@ -44,7 +44,8 @@ |
3649 | def _get_credentials_obj(self, app_name): |
3650 | """A dict with the credentials.""" |
3651 | creds = self.keyring.get_password(app_name, USERNAME) |
3652 | - return loads(creds) |
3653 | + if creds: |
3654 | + return loads(creds) |
3655 | |
3656 | def get_credentials(self, app_name): |
3657 | """A deferred with the secret of the SSO item in a dictionary.""" |
3658 | |
3659 | === modified file 'ubuntu_sso/main/__init__.py' |
3660 | --- ubuntu_sso/main/__init__.py 2011-03-22 23:29:20 +0000 |
3661 | +++ ubuntu_sso/main/__init__.py 2011-06-24 19:23:07 +0000 |
3662 | @@ -33,6 +33,7 @@ |
3663 | |
3664 | logger = setup_logging("ubuntu_sso.main") |
3665 | U1_PING_URL = "https://one.ubuntu.com/oauth/sso-finished-so-get-tokens/" |
3666 | +TIMEOUT_INTERVAL = 10000 # 10 seconds |
3667 | |
3668 | |
3669 | class SSOLoginProcessor(Account): |
3670 | @@ -181,7 +182,8 @@ |
3671 | def login_or_register_to_get_credentials(self, app_name, |
3672 | terms_and_conditions_url, |
3673 | help_text, window_id, |
3674 | - success_cb, error_cb, denial_cb): |
3675 | + success_cb, error_cb, denial_cb, |
3676 | + ui_module='ubuntu_sso.gtk.gui'): |
3677 | """Get credentials if found else prompt GUI to login or register. |
3678 | |
3679 | 'app_name' will be displayed in the GUI. |
3680 | @@ -197,11 +199,12 @@ |
3681 | tc_url=terms_and_conditions_url, |
3682 | help_text=help_text, window_id=window_id, |
3683 | success_cb=success_cb, error_cb=error_cb, |
3684 | - denial_cb=denial_cb) |
3685 | + denial_cb=denial_cb, ui_module=ui_module) |
3686 | obj.register() |
3687 | |
3688 | def login_to_get_credentials(self, app_name, help_text, window_id, |
3689 | - success_cb, error_cb, denial_cb): |
3690 | + success_cb, error_cb, denial_cb, |
3691 | + ui_module='ubuntu_sso.gtk.gui'): |
3692 | """Get credentials if found else prompt GUI just to login |
3693 | |
3694 | 'app_name' will be displayed in the GUI. |
3695 | @@ -215,7 +218,7 @@ |
3696 | obj = Credentials(app_name=app_name, ping_url=ping_url, tc_url=None, |
3697 | help_text=help_text, window_id=window_id, |
3698 | success_cb=success_cb, error_cb=error_cb, |
3699 | - denial_cb=denial_cb) |
3700 | + denial_cb=denial_cb, ui_module=ui_module) |
3701 | obj.login() |
3702 | |
3703 | def clear_token(self, app_name, callback=NO_OP, errback=NO_OP): |
3704 | @@ -254,7 +257,8 @@ |
3705 | |
3706 | """ |
3707 | |
3708 | - def __init__(self, found_cb, error_cb, denied_cb, *args, **kwargs): |
3709 | + def __init__(self, timeout_func, shutdown_func, found_cb, error_cb, |
3710 | + denied_cb, *args, **kwargs): |
3711 | """Create a new instance. |
3712 | |
3713 | - 'found_cb' is a callback that will be executed when the credentials |
3714 | @@ -268,10 +272,42 @@ |
3715 | |
3716 | """ |
3717 | super(CredentialsManagementRoot, self).__init__(*args, **kwargs) |
3718 | + self._ref_count = 0 |
3719 | + self.timeout_func = timeout_func |
3720 | + self.shutdown_func = shutdown_func |
3721 | self.found_cb = found_cb |
3722 | self.error_cb = error_cb |
3723 | self.denied_cb = denied_cb |
3724 | |
3725 | + def _get_ref_count(self): |
3726 | + """Get value of ref_count.""" |
3727 | + return self._ref_count |
3728 | + |
3729 | + def _set_ref_count(self, new_value): |
3730 | + """Set a new value to ref_count.""" |
3731 | + logger.debug('ref_count is %r, changing value to %r.', |
3732 | + self._ref_count, new_value) |
3733 | + if new_value < 0: |
3734 | + self._ref_count = 0 |
3735 | + msg = 'Attempting to decrease ref_count to a negative value (%r).' |
3736 | + logger.warning(msg, new_value) |
3737 | + else: |
3738 | + self._ref_count = new_value |
3739 | + |
3740 | + if self._ref_count == 0: |
3741 | + logger.debug('Setting up timer with %r (%r, %r).', |
3742 | + self.timeout_func, TIMEOUT_INTERVAL, self.shutdown) |
3743 | + self.timeout_func(TIMEOUT_INTERVAL, self.shutdown) |
3744 | + |
3745 | + ref_count = property(fget=_get_ref_count, fset=_set_ref_count) |
3746 | + |
3747 | + def shutdown(self): |
3748 | + """If no ongoing requests, call self.shutdown_func.""" |
3749 | + logger.debug('shutdown!, ref_count is %r.', self._ref_count) |
3750 | + if self._ref_count == 0: |
3751 | + logger.info('Shutting down, calling %r.', self.shutdown_func) |
3752 | + self.shutdown_func() |
3753 | + |
3754 | valid_keys = (HELP_TEXT_KEY, PING_URL_KEY, TC_URL_KEY, |
3755 | UI_CLASS_KEY, UI_MODULE_KEY, WINDOW_ID_KEY) |
3756 | |
3757 | @@ -299,7 +335,7 @@ |
3758 | an error. |
3759 | |
3760 | """ |
3761 | - |
3762 | + self.ref_count += 1 |
3763 | obj = Credentials(app_name) |
3764 | d = obj.find_credentials() |
3765 | # pylint: disable=E1101 |
3766 | @@ -321,7 +357,7 @@ |
3767 | an error. |
3768 | |
3769 | """ |
3770 | - |
3771 | + self.ref_count += 1 |
3772 | obj = Credentials(app_name) |
3773 | d = obj.clear_credentials() |
3774 | # pylint: disable=E1101 |
3775 | @@ -344,7 +380,7 @@ |
3776 | - 'error_cb' is a callback that will be executed if the operation had |
3777 | an error. |
3778 | """ |
3779 | - |
3780 | + self.ref_count += 1 |
3781 | obj = Credentials(app_name) |
3782 | d = obj.store_credentials(args) |
3783 | # pylint: disable=E1101 |
3784 | @@ -353,11 +389,13 @@ |
3785 | |
3786 | def register(self, app_name, args): |
3787 | """Get credentials if found else prompt GUI to register.""" |
3788 | + self.ref_count += 1 |
3789 | obj = Credentials(app_name, **self._parse_args(args)) |
3790 | obj.register() |
3791 | |
3792 | def login(self, app_name, args): |
3793 | """Get credentials if found else prompt GUI to login.""" |
3794 | + self.ref_count += 1 |
3795 | obj = Credentials(app_name, **self._parse_args(args)) |
3796 | obj.login() |
3797 | |
3798 | @@ -367,7 +405,10 @@ |
3799 | CredentialsManagement = None |
3800 | |
3801 | if sys.platform == 'win32': |
3802 | - pass |
3803 | + from ubuntu_sso.main import windows |
3804 | + SSOLogin = windows.SSOLogin |
3805 | + SSOCredentials = windows.SSOCredentials |
3806 | + CredentialsManagement = windows.CredentialsManagement |
3807 | else: |
3808 | from ubuntu_sso.main import linux |
3809 | SSOLogin = linux.SSOLogin |
3810 | |
3811 | === modified file 'ubuntu_sso/main/linux.py' |
3812 | --- ubuntu_sso/main/linux.py 2011-03-22 23:29:20 +0000 |
3813 | +++ ubuntu_sso/main/linux.py 2011-06-24 19:23:07 +0000 |
3814 | @@ -28,6 +28,7 @@ |
3815 | """ |
3816 | |
3817 | import threading |
3818 | +import warnings |
3819 | |
3820 | import dbus.service |
3821 | |
3822 | @@ -45,7 +46,6 @@ |
3823 | |
3824 | |
3825 | logger = setup_logging("ubuntu_sso.main") |
3826 | -TIMEOUT_INTERVAL = 10000 # 10 seconds |
3827 | |
3828 | |
3829 | def blocking(f, app_name, result_cb, error_cb): |
3830 | @@ -210,7 +210,11 @@ |
3831 | |
3832 | |
3833 | class SSOCredentials(dbus.service.Object): |
3834 | - """DBus object that gets credentials, and login/registers if needed.""" |
3835 | + """DBus object that gets credentials, and login/registers if needed. |
3836 | + |
3837 | + This class is Deprecated. DO NOT USE, use CredentialsManagement instead. |
3838 | + |
3839 | + """ |
3840 | |
3841 | # Operator not preceded by a space (fails with dbus decorators) |
3842 | # pylint: disable=C0322 |
3843 | @@ -218,6 +222,9 @@ |
3844 | def __init__(self, *args, **kwargs): |
3845 | dbus.service.Object.__init__(self, *args, **kwargs) |
3846 | self.root = SSOCredentialsRoot() |
3847 | + warnings.warn('%r DBus object is deprecated, please use %r instead.' % |
3848 | + (DBUS_IFACE_CRED_NAME, DBUS_CREDENTIALS_IFACE), |
3849 | + DeprecationWarning) |
3850 | |
3851 | def _process_error(self, app_name, error_dict): |
3852 | """Process the 'error_dict' and emit CredentialsError.""" |
3853 | @@ -266,11 +273,12 @@ |
3854 | |
3855 | """ |
3856 | self.root.login_or_register_to_get_credentials(app_name, |
3857 | - terms_and_conditions_url, |
3858 | - help_text, window_id, |
3859 | - self.CredentialsFound, |
3860 | - self._process_error, |
3861 | - self.AuthorizationDenied) |
3862 | + terms_and_conditions_url, |
3863 | + help_text, window_id, |
3864 | + self.CredentialsFound, |
3865 | + self._process_error, |
3866 | + self.AuthorizationDenied, |
3867 | + ui_module='ubuntu_sso.gtk.gui') |
3868 | |
3869 | @dbus.service.method(dbus_interface=DBUS_IFACE_CRED_NAME, |
3870 | in_signature="ssx", out_signature="") |
3871 | @@ -287,7 +295,8 @@ |
3872 | self.root.login_to_get_credentials(app_name, help_text, window_id, |
3873 | self.CredentialsFound, |
3874 | self._process_error, |
3875 | - self.AuthorizationDenied) |
3876 | + self.AuthorizationDenied, |
3877 | + ui_module='ubuntu_sso.gtk.gui') |
3878 | |
3879 | @dbus.service.method(dbus_interface=DBUS_IFACE_CRED_NAME, |
3880 | in_signature='s', out_signature='', |
3881 | @@ -328,10 +337,8 @@ |
3882 | |
3883 | def __init__(self, timeout_func, shutdown_func, *args, **kwargs): |
3884 | super(CredentialsManagement, self).__init__(*args, **kwargs) |
3885 | - self._ref_count = 0 |
3886 | - self.timeout_func = timeout_func |
3887 | - self.shutdown_func = shutdown_func |
3888 | - self.root = CredentialsManagementRoot(self.CredentialsFound, |
3889 | + self.root = CredentialsManagementRoot(timeout_func, shutdown_func, |
3890 | + self.CredentialsFound, |
3891 | self.CredentialsError, |
3892 | self.AuthorizationDenied) |
3893 | |
3894 | @@ -342,74 +349,50 @@ |
3895 | """Process the 'failure' and emit CredentialsError.""" |
3896 | self.CredentialsError(app_name, except_to_errdict(failure.value)) |
3897 | |
3898 | - def _get_ref_count(self): |
3899 | - """Get value of ref_count.""" |
3900 | - return self._ref_count |
3901 | - |
3902 | - def _set_ref_count(self, new_value): |
3903 | - """Set a new value to ref_count.""" |
3904 | - logger.debug('ref_count is %r, changing value to %r.', |
3905 | - self._ref_count, new_value) |
3906 | - if new_value < 0: |
3907 | - self._ref_count = 0 |
3908 | - msg = 'Attempting to decrease ref_count to a negative value (%r).' |
3909 | - logger.warning(msg, new_value) |
3910 | - else: |
3911 | - self._ref_count = new_value |
3912 | - |
3913 | - if self._ref_count == 0: |
3914 | - logger.debug('Setting up timer with %r (%r, %r).', |
3915 | - self.timeout_func, TIMEOUT_INTERVAL, self.shutdown) |
3916 | - self.timeout_func(TIMEOUT_INTERVAL, self.shutdown) |
3917 | - |
3918 | - ref_count = property(fget=_get_ref_count, fset=_set_ref_count) |
3919 | - |
3920 | def shutdown(self): |
3921 | """If no ongoing requests, call self.shutdown_func.""" |
3922 | - logger.debug('shutdown!, ref_count is %r.', self._ref_count) |
3923 | - if self._ref_count == 0: |
3924 | - logger.info('Shutting down, calling %r.', self.shutdown_func) |
3925 | - self.shutdown_func() |
3926 | + logger.debug('shutdown!, ref_count is %r.', self.root.ref_count) |
3927 | + self.root.shutdown() |
3928 | |
3929 | @dbus.service.signal(DBUS_CREDENTIALS_IFACE, signature='s') |
3930 | def AuthorizationDenied(self, app_name): |
3931 | """Signal thrown when the user denies the authorization.""" |
3932 | - self.ref_count -= 1 |
3933 | + self.root.ref_count -= 1 |
3934 | logger.info('%s: emitting AuthorizationDenied with app_name "%s".', |
3935 | self.__class__.__name__, app_name) |
3936 | |
3937 | @dbus.service.signal(DBUS_CREDENTIALS_IFACE, signature='sa{ss}') |
3938 | def CredentialsFound(self, app_name, credentials): |
3939 | """Signal thrown when the credentials are found.""" |
3940 | - self.ref_count -= 1 |
3941 | + self.root.ref_count -= 1 |
3942 | logger.info('%s: emitting CredentialsFound with app_name "%s".', |
3943 | self.__class__.__name__, app_name) |
3944 | |
3945 | @dbus.service.signal(DBUS_CREDENTIALS_IFACE, signature='s') |
3946 | def CredentialsNotFound(self, app_name): |
3947 | """Signal thrown when the credentials are not found.""" |
3948 | - self.ref_count -= 1 |
3949 | + self.root.ref_count -= 1 |
3950 | logger.info('%s: emitting CredentialsNotFound with app_name "%s".', |
3951 | self.__class__.__name__, app_name) |
3952 | |
3953 | @dbus.service.signal(DBUS_CREDENTIALS_IFACE, signature='s') |
3954 | def CredentialsCleared(self, app_name): |
3955 | """Signal thrown when the credentials were cleared.""" |
3956 | - self.ref_count -= 1 |
3957 | + self.root.ref_count -= 1 |
3958 | logger.info('%s: emitting CredentialsCleared with app_name "%s".', |
3959 | self.__class__.__name__, app_name) |
3960 | |
3961 | @dbus.service.signal(DBUS_CREDENTIALS_IFACE, signature='s') |
3962 | def CredentialsStored(self, app_name): |
3963 | """Signal thrown when the credentials were cleared.""" |
3964 | - self.ref_count -= 1 |
3965 | + self.root.ref_count -= 1 |
3966 | logger.info('%s: emitting CredentialsStored with app_name "%s".', |
3967 | self.__class__.__name__, app_name) |
3968 | |
3969 | @dbus.service.signal(DBUS_CREDENTIALS_IFACE, signature='sa{ss}') |
3970 | def CredentialsError(self, app_name, error_dict): |
3971 | """Signal thrown when there is a problem getting the credentials.""" |
3972 | - self.ref_count -= 1 |
3973 | + self.root.ref_count -= 1 |
3974 | logger.error('%s: emitting CredentialsError with app_name "%s" and ' |
3975 | 'error_dict %r.', self.__class__.__name__, app_name, |
3976 | error_dict) |
3977 | @@ -425,7 +408,6 @@ |
3978 | - 'args' is a dictionary, currently not used. |
3979 | |
3980 | """ |
3981 | - self.ref_count += 1 |
3982 | |
3983 | def success_cb(credentials): |
3984 | """Find credentials and notify using signals.""" |
3985 | @@ -448,7 +430,6 @@ |
3986 | - 'args' is a dictionary, currently not used. |
3987 | |
3988 | """ |
3989 | - self.ref_count += 1 |
3990 | self.root.clear_credentials(app_name, args, |
3991 | lambda _: self.CredentialsCleared(app_name), |
3992 | self._process_failure) |
3993 | @@ -466,7 +447,6 @@ |
3994 | 'consumer_secret'. |
3995 | |
3996 | """ |
3997 | - self.ref_count += 1 |
3998 | self.root.store_credentials(app_name, args, |
3999 | lambda _: self.CredentialsStored(app_name), |
4000 | self._process_failure) |
4001 | @@ -475,12 +455,10 @@ |
4002 | in_signature='sa{ss}', out_signature='') |
4003 | def register(self, app_name, args): |
4004 | """Get credentials if found else prompt GUI to register.""" |
4005 | - self.ref_count += 1 |
4006 | self.root.register(app_name, args) |
4007 | |
4008 | @dbus.service.method(dbus_interface=DBUS_CREDENTIALS_IFACE, |
4009 | in_signature='sa{ss}', out_signature='') |
4010 | def login(self, app_name, args): |
4011 | """Get credentials if found else prompt GUI to login.""" |
4012 | - self.ref_count += 1 |
4013 | self.root.login(app_name, args) |
4014 | |
4015 | === modified file 'ubuntu_sso/main/tests/test_common.py' |
4016 | --- ubuntu_sso/main/tests/test_common.py 2011-03-22 23:29:20 +0000 |
4017 | +++ ubuntu_sso/main/tests/test_common.py 2011-06-24 19:23:07 +0000 |
4018 | @@ -162,7 +162,7 @@ |
4019 | """Test that the call is relayed.""" |
4020 | app_name = 'app' |
4021 | result_cb = error_cb = lambda: None |
4022 | - self.root.find_credentials(app_name, result_cb, error_cb) |
4023 | + self.root.find_credentials(app_name, MATCH(callable), MATCH(callable)) |
4024 | self.mocker.mock() |
4025 | self.mocker.replay() |
4026 | self.cred.find_credentials(app_name, result_cb, error_cb) |
4027 | @@ -174,10 +174,9 @@ |
4028 | help_text = 'help' |
4029 | window_id = 'id' |
4030 | self.root.login_or_register_to_get_credentials(app_name, terms, |
4031 | - help_text, window_id, |
4032 | - MATCH(callable), |
4033 | - MATCH(callable), |
4034 | - MATCH(callable)) |
4035 | + help_text, window_id, MATCH(callable), |
4036 | + MATCH(callable), MATCH(callable), |
4037 | + ui_module=MATCH(lambda x: isinstance(x, str))) |
4038 | self.mocker.replay() |
4039 | self.cred.login_or_register_to_get_credentials(app_name, terms, |
4040 | help_text, window_id) |
4041 | @@ -186,7 +185,7 @@ |
4042 | """Test that the call is relayed.""" |
4043 | app_name = 'app' |
4044 | result_cb = error_cb = lambda: None |
4045 | - self.root.clear_token(app_name, result_cb, error_cb) |
4046 | + self.root.clear_token(app_name, MATCH(callable), MATCH(callable)) |
4047 | self.mocker.replay() |
4048 | self.cred.clear_token(app_name, result_cb, error_cb) |
4049 | |
4050 | |
4051 | === modified file 'ubuntu_sso/main/tests/test_linux.py' |
4052 | --- ubuntu_sso/main/tests/test_linux.py 2011-03-22 23:29:20 +0000 |
4053 | +++ ubuntu_sso/main/tests/test_linux.py 2011-06-24 19:23:07 +0000 |
4054 | @@ -23,7 +23,7 @@ |
4055 | import logging |
4056 | import os |
4057 | |
4058 | -from mocker import Mocker, MockerTestCase, ARGS, KWARGS |
4059 | +from mocker import Mocker, MockerTestCase, ARGS, KWARGS, MATCH |
4060 | from twisted.internet import defer |
4061 | from twisted.internet.defer import Deferred, inlineCallbacks |
4062 | from twisted.trial.unittest import TestCase |
4063 | @@ -36,8 +36,8 @@ |
4064 | from ubuntu_sso import DBUS_CREDENTIALS_IFACE |
4065 | from ubuntu_sso.keyring import U1_APP_NAME |
4066 | from ubuntu_sso.main import (U1_PING_URL, except_to_errdict, |
4067 | - CredentialsManagement, SSOCredentials, SSOLogin) |
4068 | -from ubuntu_sso.main.linux import TIMEOUT_INTERVAL, blocking |
4069 | + CredentialsManagement, SSOCredentials, SSOLogin, TIMEOUT_INTERVAL) |
4070 | +from ubuntu_sso.main.linux import blocking |
4071 | from ubuntu_sso.main import (HELP_TEXT_KEY, PING_URL_KEY, |
4072 | TC_URL_KEY, UI_CLASS_KEY, UI_MODULE_KEY, WINDOW_ID_KEY, |
4073 | SUCCESS_CB_KEY, ERROR_CB_KEY, DENIAL_CB_KEY) |
4074 | @@ -623,6 +623,7 @@ |
4075 | |
4076 | def test_login_or_register(self): |
4077 | """login_or_register is correct.""" |
4078 | + self.args[UI_MODULE_KEY] = MATCH(lambda x: isinstance(x, str)) |
4079 | mock_class = self.mocker.replace("ubuntu_sso.credentials.Credentials") |
4080 | mock_class(app_name=self.app_name, **self.args) |
4081 | creds_obj = self.mocker.mock() |
4082 | @@ -637,6 +638,7 @@ |
4083 | def test_login_only(self): |
4084 | """login_or_register is correct.""" |
4085 | self.args[TC_URL_KEY] = None |
4086 | + self.args[UI_MODULE_KEY] = MATCH(lambda x: isinstance(x, str)) |
4087 | mock_class = self.mocker.replace("ubuntu_sso.credentials.Credentials") |
4088 | mock_class(app_name=self.app_name, **self.args) |
4089 | creds_obj = self.mocker.mock() |
4090 | @@ -770,7 +772,7 @@ |
4091 | |
4092 | def test_ref_counting(self): |
4093 | """Ref counting is in place.""" |
4094 | - self.assertEqual(self.client.ref_count, 0) |
4095 | + self.assertEqual(self.client.root.ref_count, 0) |
4096 | |
4097 | def test_find_credentials(self): |
4098 | """Keep proper track of on going requests.""" |
4099 | @@ -778,7 +780,7 @@ |
4100 | |
4101 | def verify(*args): |
4102 | """Make the check.""" |
4103 | - self.assertEqual(self.client.ref_count, 1) |
4104 | + self.assertEqual(self.client.root.ref_count, 1) |
4105 | d.callback(True) |
4106 | |
4107 | self.patch(self.client, 'CredentialsFound', verify) |
4108 | @@ -792,7 +794,7 @@ |
4109 | |
4110 | def verify(*args): |
4111 | """Make the check.""" |
4112 | - self.assertEqual(self.client.ref_count, 1) |
4113 | + self.assertEqual(self.client.root.ref_count, 1) |
4114 | d.callback(True) |
4115 | |
4116 | self.patch(self.client, 'CredentialsCleared', verify) |
4117 | @@ -806,7 +808,7 @@ |
4118 | |
4119 | def verify(*args): |
4120 | """Make the check.""" |
4121 | - self.assertEqual(self.client.ref_count, 1) |
4122 | + self.assertEqual(self.client.root.ref_count, 1) |
4123 | d.callback(True) |
4124 | |
4125 | self.patch(self.client, 'CredentialsStored', verify) |
4126 | @@ -818,13 +820,13 @@ |
4127 | """Keep proper track of on going requests.""" |
4128 | self.client.register(APP_NAME, self.args) |
4129 | |
4130 | - self.assertEqual(self.client.ref_count, 1) |
4131 | + self.assertEqual(self.client.root.ref_count, 1) |
4132 | |
4133 | def test_login(self): |
4134 | """Keep proper track of on going requests.""" |
4135 | self.client.login(APP_NAME, self.args) |
4136 | |
4137 | - self.assertEqual(self.client.ref_count, 1) |
4138 | + self.assertEqual(self.client.root.ref_count, 1) |
4139 | |
4140 | def test_several_requests(self): |
4141 | """Requests can be nested.""" |
4142 | @@ -834,112 +836,112 @@ |
4143 | self.client.register(APP_NAME, self.args) |
4144 | self.client.register(APP_NAME, self.args) |
4145 | |
4146 | - self.assertEqual(self.client.ref_count, 5) |
4147 | + self.assertEqual(self.client.root.ref_count, 5) |
4148 | |
4149 | def test_credentials_found(self): |
4150 | """Ref counter is decreased when a signal is sent.""" |
4151 | - self.client.ref_count = 3 |
4152 | + self.client.root.ref_count = 3 |
4153 | self.client.CredentialsFound(APP_NAME, TOKEN) |
4154 | |
4155 | - self.assertEqual(self.client.ref_count, 2) |
4156 | + self.assertEqual(self.client.root.ref_count, 2) |
4157 | |
4158 | def test_credentials_not_found(self): |
4159 | """Ref counter is decreased when a signal is sent.""" |
4160 | - self.client.ref_count = 3 |
4161 | + self.client.root.ref_count = 3 |
4162 | self.client.CredentialsNotFound(APP_NAME) |
4163 | |
4164 | - self.assertEqual(self.client.ref_count, 2) |
4165 | + self.assertEqual(self.client.root.ref_count, 2) |
4166 | |
4167 | def test_credentials_cleared(self): |
4168 | """Ref counter is decreased when a signal is sent.""" |
4169 | - self.client.ref_count = 3 |
4170 | + self.client.root.ref_count = 3 |
4171 | self.client.CredentialsCleared(APP_NAME) |
4172 | |
4173 | - self.assertEqual(self.client.ref_count, 2) |
4174 | + self.assertEqual(self.client.root.ref_count, 2) |
4175 | |
4176 | def test_credentials_stored(self): |
4177 | """Ref counter is decreased when a signal is sent.""" |
4178 | - self.client.ref_count = 3 |
4179 | + self.client.root.ref_count = 3 |
4180 | self.client.CredentialsStored(APP_NAME) |
4181 | |
4182 | - self.assertEqual(self.client.ref_count, 2) |
4183 | + self.assertEqual(self.client.root.ref_count, 2) |
4184 | |
4185 | def test_credentials_error(self): |
4186 | """Ref counter is decreased when a signal is sent.""" |
4187 | - self.client.ref_count = 3 |
4188 | + self.client.root.ref_count = 3 |
4189 | self.client.CredentialsError(APP_NAME, {'error_type': 'test'}) |
4190 | |
4191 | - self.assertEqual(self.client.ref_count, 2) |
4192 | + self.assertEqual(self.client.root.ref_count, 2) |
4193 | |
4194 | def test_authorization_denied(self): |
4195 | """Ref counter is decreased when a signal is sent.""" |
4196 | - self.client.ref_count = 3 |
4197 | + self.client.root.ref_count = 3 |
4198 | self.client.AuthorizationDenied(APP_NAME) |
4199 | |
4200 | - self.assertEqual(self.client.ref_count, 2) |
4201 | + self.assertEqual(self.client.root.ref_count, 2) |
4202 | |
4203 | def test_credentials_found_when_ref_count_is_not_positive(self): |
4204 | """Ref counter is decreased when a signal is sent.""" |
4205 | - self.client._ref_count = -3 |
4206 | + self.client.root._ref_count = -3 |
4207 | self.client.CredentialsFound(APP_NAME, TOKEN) |
4208 | |
4209 | - self.assertEqual(self.client.ref_count, 0) |
4210 | + self.assertEqual(self.client.root.ref_count, 0) |
4211 | msg = 'Attempting to decrease ref_count to a negative value (-4).' |
4212 | self.assertTrue(self.memento.check_warning(msg)) |
4213 | |
4214 | def test_credentials_not_found_when_ref_count_is_not_positive(self): |
4215 | """Ref counter is decreased when a signal is sent.""" |
4216 | - self.client._ref_count = -3 |
4217 | + self.client.root._ref_count = -3 |
4218 | self.client.CredentialsNotFound(APP_NAME) |
4219 | |
4220 | - self.assertEqual(self.client.ref_count, 0) |
4221 | + self.assertEqual(self.client.root.ref_count, 0) |
4222 | msg = 'Attempting to decrease ref_count to a negative value (-4).' |
4223 | self.assertTrue(self.memento.check_warning(msg)) |
4224 | |
4225 | def test_credentials_cleared_when_ref_count_is_not_positive(self): |
4226 | """Ref counter is decreased when a signal is sent.""" |
4227 | - self.client._ref_count = -3 |
4228 | + self.client.root._ref_count = -3 |
4229 | self.client.CredentialsCleared(APP_NAME) |
4230 | |
4231 | - self.assertEqual(self.client.ref_count, 0) |
4232 | + self.assertEqual(self.client.root.ref_count, 0) |
4233 | msg = 'Attempting to decrease ref_count to a negative value (-4).' |
4234 | self.assertTrue(self.memento.check_warning(msg)) |
4235 | |
4236 | def test_credentials_stored_when_ref_count_is_not_positive(self): |
4237 | """Ref counter is decreased when a signal is sent.""" |
4238 | - self.client._ref_count = -3 |
4239 | + self.client.root._ref_count = -3 |
4240 | self.client.CredentialsStored(APP_NAME) |
4241 | |
4242 | - self.assertEqual(self.client.ref_count, 0) |
4243 | + self.assertEqual(self.client.root.ref_count, 0) |
4244 | msg = 'Attempting to decrease ref_count to a negative value (-4).' |
4245 | self.assertTrue(self.memento.check_warning(msg)) |
4246 | |
4247 | def test_credentials_error_when_ref_count_is_not_positive(self): |
4248 | """Ref counter is decreased when a signal is sent.""" |
4249 | - self.client._ref_count = -3 |
4250 | + self.client.root._ref_count = -3 |
4251 | self.client.CredentialsError(APP_NAME, {'error_type': 'test'}) |
4252 | |
4253 | - self.assertEqual(self.client.ref_count, 0) |
4254 | + self.assertEqual(self.client.root.ref_count, 0) |
4255 | msg = 'Attempting to decrease ref_count to a negative value (-4).' |
4256 | self.assertTrue(self.memento.check_warning(msg)) |
4257 | |
4258 | def test_autorization_denied_when_ref_count_is_not_positive(self): |
4259 | """Ref counter is decreased when a signal is sent.""" |
4260 | - self.client._ref_count = -3 |
4261 | + self.client.root._ref_count = -3 |
4262 | self.client.AuthorizationDenied(APP_NAME) |
4263 | |
4264 | - self.assertEqual(self.client.ref_count, 0) |
4265 | + self.assertEqual(self.client.root.ref_count, 0) |
4266 | msg = 'Attempting to decrease ref_count to a negative value (-4).' |
4267 | self.assertTrue(self.memento.check_warning(msg)) |
4268 | |
4269 | def test_on_zero_ref_count_shutdown(self): |
4270 | """When ref count reaches 0, queue shutdown op.""" |
4271 | - self.client.timeout_func = self._set_called |
4272 | + self.client.root.timeout_func = self._set_called |
4273 | self.client.login(APP_NAME, self.args) |
4274 | self.client.CredentialsFound(APP_NAME, TOKEN) |
4275 | |
4276 | self.assertEqual(self._called, |
4277 | - ((TIMEOUT_INTERVAL, self.client.shutdown), {})) |
4278 | + ((TIMEOUT_INTERVAL, self.client.root.shutdown), {})) |
4279 | |
4280 | def test_on_non_zero_ref_count_do_not_shutdown(self): |
4281 | """If ref count is not 0, do not queue shutdown op.""" |
4282 | @@ -954,7 +956,7 @@ |
4283 | def fake_timeout_func(interval, func): |
4284 | """Start a new request when the timer is started.""" |
4285 | self.client.register(APP_NAME, self.args) |
4286 | - assert self.client.ref_count > 0 |
4287 | + assert self.client.root.ref_count > 0 |
4288 | func() |
4289 | |
4290 | self.client.timeout_func = fake_timeout_func |
4291 | @@ -971,11 +973,11 @@ |
4292 | |
4293 | def fake_timeout_func(interval, func): |
4294 | """Start a new request when the timer is started.""" |
4295 | - assert self.client.ref_count == 0 |
4296 | + assert self.client.root.ref_count == 0 |
4297 | func() |
4298 | |
4299 | - self.client.timeout_func = fake_timeout_func |
4300 | - self.client.shutdown_func = self._set_called |
4301 | + self.client.root.timeout_func = fake_timeout_func |
4302 | + self.client.root.shutdown_func = self._set_called |
4303 | |
4304 | self.client.login(APP_NAME, self.args) |
4305 | self.client.CredentialsFound(APP_NAME, TOKEN) |
4306 | |
4307 | === modified file 'ubuntu_sso/main/tests/test_windows.py' |
4308 | --- ubuntu_sso/main/tests/test_windows.py 2011-03-22 23:29:20 +0000 |
4309 | +++ ubuntu_sso/main/tests/test_windows.py 2011-06-24 19:23:07 +0000 |
4310 | @@ -15,3 +15,1211 @@ |
4311 | # You should have received a copy of the GNU General Public License along |
4312 | # with this program. If not, see <http://www.gnu.org/licenses/>. |
4313 | """Windows tests.""" |
4314 | + |
4315 | +from mocker import MATCH, Mocker, MockerTestCase |
4316 | + |
4317 | +from twisted.internet import defer, reactor |
4318 | +from twisted.trial.unittest import TestCase |
4319 | +from twisted.spread.pb import PBClientFactory, PBServerFactory |
4320 | +from ubuntu_sso.main.windows import ( |
4321 | + blocking, |
4322 | + signal, |
4323 | + CredentialsManagement, |
4324 | + CredentialsManagementClient, |
4325 | + SSOCredentials, |
4326 | + SSOCredentialsClient, |
4327 | + SSOLogin, |
4328 | + SSOLoginClient, |
4329 | + UbuntuSSORoot) |
4330 | + |
4331 | +NAMED_PIPE_URL = "\\\\.\\pipe\\ubuntuone_sso\\tests" |
4332 | + |
4333 | +# because we are using twisted we have java like names C0103 and |
4334 | +# the issues that mocker brings with it like W0104 |
4335 | +# pylint: disable=C0103,W0104 |
4336 | + |
4337 | + |
4338 | +class SaveProtocolServerFactory(PBServerFactory): |
4339 | + """A PBServerFactory that saves the latest connected client.""" |
4340 | + |
4341 | + protocolInstance = None |
4342 | + |
4343 | + def clientConnectionMade(self, protocol): |
4344 | + """Keep track of the given protocol.""" |
4345 | + self.protocolInstance = protocol |
4346 | + |
4347 | + |
4348 | +class FakeDecoratedObject(object): |
4349 | + """An object that has decorators.""" |
4350 | + |
4351 | + def __init__(self): |
4352 | + """Create a new instance.""" |
4353 | + super(FakeDecoratedObject, self).__init__() |
4354 | + |
4355 | + @signal |
4356 | + def on_no_args(self): |
4357 | + """Get no args passwed.""" |
4358 | + |
4359 | + @signal |
4360 | + def on_just_args(self, *args): |
4361 | + """Just get args.""" |
4362 | + |
4363 | + @signal |
4364 | + def on_just_kwargs(self, **kwargs): |
4365 | + """Just get kwargs.""" |
4366 | + |
4367 | + @signal |
4368 | + def on_both_args(self, *args, **kwargs): |
4369 | + """Both args.""" |
4370 | + |
4371 | + |
4372 | +# pylint: disable=W0201 |
4373 | +class SignalTestCase(MockerTestCase): |
4374 | + """Test the signal decorator.""" |
4375 | + |
4376 | + def setUp(self): |
4377 | + """Set the tests.""" |
4378 | + super(SignalTestCase, self).setUp() |
4379 | + self.fake_object = FakeDecoratedObject() |
4380 | + self.cb = self.mocker.mock() |
4381 | + |
4382 | + def test_no_args(self): |
4383 | + """Test when the cb should have no args.""" |
4384 | + self.fake_object.on_no_args_cb = self.cb |
4385 | + self.cb() |
4386 | + self.mocker.replay() |
4387 | + self.fake_object.on_no_args() |
4388 | + |
4389 | + def test_just_args(self): |
4390 | + """Test when the cb just has *args""" |
4391 | + first = 'first' |
4392 | + second = 'second' |
4393 | + self.fake_object.on_just_args_cb = self.cb |
4394 | + self.cb(first, second) |
4395 | + self.mocker.replay() |
4396 | + self.fake_object.on_just_args(first, second) |
4397 | + |
4398 | + def test_just_kwargs(self): |
4399 | + """Test when the cb just has kwargs.""" |
4400 | + first = 'first' |
4401 | + second = 'second' |
4402 | + self.fake_object.on_just_kwargs_cb = self.cb |
4403 | + self.cb(first=first, second=second) |
4404 | + self.mocker.replay() |
4405 | + self.fake_object.on_just_kwargs(first=first, second=second) |
4406 | + |
4407 | + def test_just_kwargs_empty(self): |
4408 | + """Test when the cb just has kwargs.""" |
4409 | + self.fake_object.on_just_kwargs_cb = self.cb |
4410 | + self.cb() |
4411 | + self.mocker.replay() |
4412 | + self.fake_object.on_just_kwargs() |
4413 | + |
4414 | + def test_both_args(self): |
4415 | + """Test with args and kwargs.""" |
4416 | + first = 'first' |
4417 | + second = 'second' |
4418 | + self.fake_object.on_both_args_cb = self.cb |
4419 | + self.cb(first, second, first=first, second=second) |
4420 | + self.mocker.replay() |
4421 | + self.fake_object.on_both_args(first, second, first=first, |
4422 | + second=second) |
4423 | + |
4424 | + def test_both_args_no_kwargs(self): |
4425 | + """Test with args and kwargs.""" |
4426 | + first = 'first' |
4427 | + second = 'second' |
4428 | + self.fake_object.on_both_args_cb = self.cb |
4429 | + self.cb(first, second) |
4430 | + self.mocker.replay() |
4431 | + self.fake_object.on_both_args(first, second) |
4432 | + |
4433 | + def test_both_args_no_args(self): |
4434 | + """Test with args and kwargs.""" |
4435 | + first = 'first' |
4436 | + second = 'second' |
4437 | + self.fake_object.on_both_args_cb = self.cb |
4438 | + self.cb(first=first, second=second) |
4439 | + self.mocker.replay() |
4440 | + self.fake_object.on_both_args(first=first, second=second) |
4441 | +# pylint: enable=W0201 |
4442 | + |
4443 | + |
4444 | +class SSOLoginTestCase(TestCase): |
4445 | + """Test the login class.""" |
4446 | + |
4447 | + def setUp(self): |
4448 | + """Setup tests.""" |
4449 | + super(SSOLoginTestCase, self).setUp() |
4450 | + self.mocker = Mocker() |
4451 | + self.root = self.mocker.mock() |
4452 | + self.except_to_errdict = self.mocker.replace( |
4453 | + 'ubuntu_sso.main.except_to_errdict') |
4454 | + self.login = SSOLogin(None) |
4455 | + self.login.root = self.root |
4456 | + # start pb |
4457 | + self.sso_root = UbuntuSSORoot(self.login, None, None) |
4458 | + self.server_factory = SaveProtocolServerFactory(self.sso_root) |
4459 | + # pylint: disable=E1101 |
4460 | + self.listener = reactor.listenPipe(NAMED_PIPE_URL, self.server_factory) |
4461 | + self.client_factory = PBClientFactory() |
4462 | + self.connector = reactor.connectPipe(NAMED_PIPE_URL, |
4463 | + self.client_factory) |
4464 | + # pylint: enable=E1101 |
4465 | + |
4466 | + def tearDown(self): |
4467 | + """Clean reactor.""" |
4468 | + if self.server_factory.protocolInstance is not None: |
4469 | + self.server_factory.protocolInstance.transport.loseConnection() |
4470 | + return defer.gatherResults([self._tearDownServer(), |
4471 | + self._tearDownClient()]) |
4472 | + |
4473 | + def _tearDownServer(self): |
4474 | + """Teardown the server.""" |
4475 | + return defer.maybeDeferred(self.listener.stopListening) |
4476 | + |
4477 | + def _tearDownClient(self): |
4478 | + """Tear down the client.""" |
4479 | + self.connector.disconnect() |
4480 | + return defer.succeed(None) |
4481 | + |
4482 | + @defer.inlineCallbacks |
4483 | + def _get_client(self): |
4484 | + """Get the client.""" |
4485 | + # request the remote object and create a client |
4486 | + root = yield self.client_factory.getRootObject() |
4487 | + remote = yield root.callRemote('get_sso_login') |
4488 | + client = SSOLoginClient(remote) |
4489 | + yield client.register_to_signals() |
4490 | + # set the cb |
4491 | + for signal_name in ['on_captcha_generated_cb', |
4492 | + 'on_captcha_generation_error_cb', |
4493 | + 'on_user_registered_cb', |
4494 | + 'on_user_registration_error_cb', |
4495 | + 'on_logged_in_cb', |
4496 | + 'on_login_error_cb', |
4497 | + 'on_user_not_validated_cb', |
4498 | + 'on_email_validated_cb', |
4499 | + 'on_email_validation_error_cb', |
4500 | + 'on_password_reset_token_sent_cb', |
4501 | + 'on_password_reset_error_cb', |
4502 | + 'on_password_changed_cb', |
4503 | + 'on_password_change_error_cb']: |
4504 | + setattr(client, signal_name, self.mocker.mock()) |
4505 | + defer.returnValue(client) |
4506 | + |
4507 | + def test_emit_captcha_generated(self): |
4508 | + """Test that the cb was called.""" |
4509 | + app_name = 'app' |
4510 | + result = 'result' |
4511 | + |
4512 | + @defer.inlineCallbacks |
4513 | + def test_emit(client): |
4514 | + """Actual test.""" |
4515 | + client.on_captcha_generated_cb(app_name, result) |
4516 | + self.mocker.replay() |
4517 | + self.login.emit_captcha_generated(app_name, result) |
4518 | + yield client.unregister_to_signals() |
4519 | + self.mocker.verify() |
4520 | + |
4521 | + d = self._get_client() |
4522 | + # pylint: disable=E1101 |
4523 | + d.addCallback(test_emit) |
4524 | + # pylint: enable=E1101 |
4525 | + return d |
4526 | + |
4527 | + def test_emit_captcha_generation_error(self): |
4528 | + """Test that the cb was called.""" |
4529 | + app_name = 'app' |
4530 | + error_value = 'error' |
4531 | + raised_error = self.mocker.mock() |
4532 | + |
4533 | + @defer.inlineCallbacks |
4534 | + def test_emit(client): |
4535 | + """Actual test.""" |
4536 | + raised_error.value |
4537 | + self.mocker.result(error_value) |
4538 | + self.except_to_errdict(error_value) |
4539 | + self.mocker.result(error_value) |
4540 | + client.on_captcha_generation_error_cb(app_name, error_value) |
4541 | + self.mocker.replay() |
4542 | + self.login.emit_captcha_generation_error(app_name, raised_error) |
4543 | + yield client.unregister_to_signals() |
4544 | + self.mocker.verify() |
4545 | + |
4546 | + d = self._get_client() |
4547 | + # pylint: disable=E1101 |
4548 | + d.addCallback(test_emit) |
4549 | + # pylint: enable=E1101 |
4550 | + return d |
4551 | + |
4552 | + def test_generate_captcha(self): |
4553 | + """Test the call from the client.""" |
4554 | + app_name = 'app' |
4555 | + filename = 'file' |
4556 | + |
4557 | + @defer.inlineCallbacks |
4558 | + def test_execution(client): |
4559 | + """Actual test.""" |
4560 | + self.root.generate_captcha(app_name, filename, blocking, |
4561 | + self.login.emit_captcha_generated, |
4562 | + self.login.emit_captcha_generation_error) |
4563 | + self.mocker.replay() |
4564 | + yield client.generate_captcha(app_name, filename) |
4565 | + yield client.unregister_to_signals() |
4566 | + self.mocker.verify() |
4567 | + |
4568 | + d = self._get_client() |
4569 | + # pylint: disable=E1101 |
4570 | + d.addCallback(test_execution) |
4571 | + # pylint: enable=E1101 |
4572 | + return d |
4573 | + |
4574 | + def test_emit_user_registered(self): |
4575 | + """Test that the cb was called.""" |
4576 | + app_name = 'app' |
4577 | + result = 'result' |
4578 | + |
4579 | + @defer.inlineCallbacks |
4580 | + def test_emit(client): |
4581 | + """Actual test.""" |
4582 | + client.on_user_registered_cb(app_name, result) |
4583 | + self.mocker.replay() |
4584 | + self.login.emit_user_registered(app_name, result) |
4585 | + yield client.unregister_to_signals() |
4586 | + self.mocker.verify() |
4587 | + |
4588 | + d = self._get_client() |
4589 | + # pylint: disable=E1101 |
4590 | + d.addCallback(test_emit) |
4591 | + # pylint: enable=E1101 |
4592 | + return d |
4593 | + |
4594 | + def test_emit_user_registration_error(self): |
4595 | + """Test that the cb was called.""" |
4596 | + app_name = 'app' |
4597 | + error_value = 'error' |
4598 | + raised_error = self.mocker.mock() |
4599 | + |
4600 | + @defer.inlineCallbacks |
4601 | + def test_emit(client): |
4602 | + """Actual test.""" |
4603 | + raised_error.value |
4604 | + self.mocker.result(error_value) |
4605 | + self.except_to_errdict(error_value) |
4606 | + self.mocker.result(error_value) |
4607 | + client.on_user_registration_error_cb(app_name, error_value) |
4608 | + self.mocker.replay() |
4609 | + self.login.emit_user_registration_error(app_name, raised_error) |
4610 | + yield client.unregister_to_signals() |
4611 | + self.mocker.verify() |
4612 | + |
4613 | + d = self._get_client() |
4614 | + # pylint: disable=E1101 |
4615 | + d.addCallback(test_emit) |
4616 | + # pylint: enable=E1101 |
4617 | + return d |
4618 | + |
4619 | + def test_register_user(self): |
4620 | + """Test the call from the client.""" |
4621 | + app_name = 'app' |
4622 | + email = 'email' |
4623 | + password = 'password' |
4624 | + displayname = 'name' |
4625 | + captcha_id = 'captcha_id' |
4626 | + captcha_solution = 'captcha_solution' |
4627 | + |
4628 | + @defer.inlineCallbacks |
4629 | + def test_execution(client): |
4630 | + """Actual test.""" |
4631 | + self.root.register_user(app_name, email, password, displayname, |
4632 | + captcha_id, captcha_solution, blocking, |
4633 | + self.login.emit_user_registered, |
4634 | + self.login.emit_user_registration_error) |
4635 | + self.mocker.replay() |
4636 | + yield client.register_user(app_name, email, password, displayname, |
4637 | + captcha_id, captcha_solution) |
4638 | + yield client.unregister_to_signals() |
4639 | + self.mocker.verify() |
4640 | + |
4641 | + d = self._get_client() |
4642 | + # pylint: disable=E1101 |
4643 | + d.addCallback(test_execution) |
4644 | + # pylint: enable=E1101 |
4645 | + return d |
4646 | + |
4647 | + def test_emit_logged_in(self): |
4648 | + """Test that the cb was called.""" |
4649 | + app_name = 'app' |
4650 | + result = 'result' |
4651 | + |
4652 | + @defer.inlineCallbacks |
4653 | + def test_emit(client): |
4654 | + """Actual test.""" |
4655 | + client.on_logged_in_cb(app_name, result) |
4656 | + self.mocker.replay() |
4657 | + self.login.emit_logged_in(app_name, result) |
4658 | + yield client.unregister_to_signals() |
4659 | + self.mocker.verify() |
4660 | + |
4661 | + d = self._get_client() |
4662 | + # pylint: disable=E1101 |
4663 | + d.addCallback(test_emit) |
4664 | + # pylint: enable=E1101 |
4665 | + return d |
4666 | + |
4667 | + def test_emit_login_error(self): |
4668 | + """Test that the db was called.""" |
4669 | + app_name = 'app' |
4670 | + error_value = 'error' |
4671 | + raised_error = self.mocker.mock() |
4672 | + |
4673 | + @defer.inlineCallbacks |
4674 | + def test_emit(client): |
4675 | + """Actual test.""" |
4676 | + raised_error.value |
4677 | + self.mocker.result(error_value) |
4678 | + self.except_to_errdict(error_value) |
4679 | + self.mocker.result(error_value) |
4680 | + client.on_login_error_cb(app_name, error_value) |
4681 | + self.mocker.replay() |
4682 | + self.login.emit_login_error(app_name, raised_error) |
4683 | + yield client.unregister_to_signals() |
4684 | + self.mocker.verify() |
4685 | + |
4686 | + d = self._get_client() |
4687 | + # pylint: disable=E1101 |
4688 | + d.addCallback(test_emit) |
4689 | + # pylint: enable=E1101 |
4690 | + return d |
4691 | + |
4692 | + def test_emit_user_not_validated(self): |
4693 | + """Test that the cb was called.""" |
4694 | + app_name = 'app' |
4695 | + result = 'result' |
4696 | + |
4697 | + @defer.inlineCallbacks |
4698 | + def test_emit(client): |
4699 | + """Actual test.""" |
4700 | + client.on_user_not_validated_cb(app_name, result) |
4701 | + self.mocker.replay() |
4702 | + self.login.emit_user_not_validated(app_name, result) |
4703 | + yield client.unregister_to_signals() |
4704 | + self.mocker.verify() |
4705 | + |
4706 | + d = self._get_client() |
4707 | + # pylint: disable=E1101 |
4708 | + d.addCallback(test_emit) |
4709 | + # pylint: enable=E1101 |
4710 | + return d |
4711 | + |
4712 | + def test_login(self): |
4713 | + """Test the call from the client.""" |
4714 | + app_name = 'app' |
4715 | + email = 'email' |
4716 | + password = 'password' |
4717 | + |
4718 | + @defer.inlineCallbacks |
4719 | + def test_execution(client): |
4720 | + """Actual test.""" |
4721 | + self.root.login(app_name, email, password, blocking, |
4722 | + self.login.emit_logged_in, |
4723 | + self.login.emit_login_error, |
4724 | + self.login.emit_user_not_validated) |
4725 | + self.mocker.replay() |
4726 | + yield client.login(app_name, email, password) |
4727 | + yield client.unregister_to_signals() |
4728 | + self.mocker.verify() |
4729 | + |
4730 | + d = self._get_client() |
4731 | + # pylint: disable=E1101 |
4732 | + d.addCallback(test_execution) |
4733 | + # pylint: enable=E1101 |
4734 | + return d |
4735 | + |
4736 | + def test_emit_email_validated(self): |
4737 | + """Test the cb was called.""" |
4738 | + app_name = 'app' |
4739 | + result = 'result' |
4740 | + |
4741 | + @defer.inlineCallbacks |
4742 | + def test_emit(client): |
4743 | + """Actual test.""" |
4744 | + client.on_email_validated_cb(app_name, result) |
4745 | + self.mocker.replay() |
4746 | + self.login.emit_email_validated(app_name, result) |
4747 | + yield client.unregister_to_signals() |
4748 | + self.mocker.verify() |
4749 | + |
4750 | + d = self._get_client() |
4751 | + # pylint: disable=E1101 |
4752 | + d.addCallback(test_emit) |
4753 | + # pylint: enable=E1101 |
4754 | + return d |
4755 | + |
4756 | + def test_emit_email_validation_error(self): |
4757 | + """Test the cb was called.""" |
4758 | + app_name = 'app' |
4759 | + error_value = 'error' |
4760 | + raised_error = self.mocker.mock() |
4761 | + |
4762 | + @defer.inlineCallbacks |
4763 | + def test_emit(client): |
4764 | + """Actual test.""" |
4765 | + raised_error.value |
4766 | + self.mocker.result(error_value) |
4767 | + self.except_to_errdict(error_value) |
4768 | + self.mocker.result(error_value) |
4769 | + client.on_email_validation_error_cb(app_name, error_value) |
4770 | + self.mocker.replay() |
4771 | + self.login.emit_email_validation_error(app_name, raised_error) |
4772 | + yield client.unregister_to_signals() |
4773 | + self.mocker.verify() |
4774 | + |
4775 | + d = self._get_client() |
4776 | + # pylint: disable=E1101 |
4777 | + d.addCallback(test_emit) |
4778 | + # pylint: enable=E1101 |
4779 | + return d |
4780 | + |
4781 | + def test_validate_email(self): |
4782 | + """Test the client calll.""" |
4783 | + app_name = 'app' |
4784 | + email = 'email' |
4785 | + password = 'password' |
4786 | + email_token = 'token' |
4787 | + |
4788 | + @defer.inlineCallbacks |
4789 | + def test_execution(client): |
4790 | + """Actual test.""" |
4791 | + self.root.validate_email(app_name, email, password, email_token, |
4792 | + blocking, self.login.emit_email_validated, |
4793 | + self.login.emit_email_validation_error) |
4794 | + self.mocker.replay() |
4795 | + yield client.validate_email(app_name, email, password, email_token) |
4796 | + yield client.unregister_to_signals() |
4797 | + self.mocker.verify() |
4798 | + |
4799 | + d = self._get_client() |
4800 | + # pylint: disable=E1101 |
4801 | + d.addCallback(test_execution) |
4802 | + # pylint: enable=E1101 |
4803 | + return d |
4804 | + |
4805 | + def test_emit_password_reset_token_sent(self): |
4806 | + """Test the cb was called.""" |
4807 | + app_name = 'app' |
4808 | + result = 'result' |
4809 | + |
4810 | + @defer.inlineCallbacks |
4811 | + def test_emit(client): |
4812 | + """Actual test.""" |
4813 | + client.on_password_reset_token_sent_cb(app_name, result) |
4814 | + self.mocker.replay() |
4815 | + self.login.emit_password_reset_token_sent(app_name, result) |
4816 | + yield client.unregister_to_signals() |
4817 | + self.mocker.verify() |
4818 | + |
4819 | + d = self._get_client() |
4820 | + # pylint: disable=E1101 |
4821 | + d.addCallback(test_emit) |
4822 | + # pylint: enable=E1101 |
4823 | + return d |
4824 | + |
4825 | + def test_emit_password_reset_error(self): |
4826 | + """Test the cb was called.""" |
4827 | + app_name = 'app' |
4828 | + error_value = 'error' |
4829 | + raised_error = self.mocker.mock() |
4830 | + |
4831 | + @defer.inlineCallbacks |
4832 | + def test_emit(client): |
4833 | + """Actual test.""" |
4834 | + raised_error.value |
4835 | + self.mocker.result(error_value) |
4836 | + self.except_to_errdict(error_value) |
4837 | + self.mocker.result(error_value) |
4838 | + client.on_password_reset_error_cb(app_name, error_value) |
4839 | + self.mocker.replay() |
4840 | + self.login.emit_password_reset_error(app_name, raised_error) |
4841 | + yield client.unregister_to_signals() |
4842 | + self.mocker.verify() |
4843 | + |
4844 | + d = self._get_client() |
4845 | + # pylint: disable=E1101 |
4846 | + d.addCallback(test_emit) |
4847 | + # pylint: enable=E1101 |
4848 | + return d |
4849 | + |
4850 | + def test_request_password_reset_token(self): |
4851 | + """Test the client call.""" |
4852 | + app_name = 'app' |
4853 | + email = 'email' |
4854 | + |
4855 | + @defer.inlineCallbacks |
4856 | + def test_execution(client): |
4857 | + """Actual test.""" |
4858 | + self.root.request_password_reset_token(app_name, email, blocking, |
4859 | + self.login.emit_password_reset_token_sent, |
4860 | + self.login.emit_password_reset_error) |
4861 | + self.mocker.replay() |
4862 | + client.request_password_reset_token(app_name, email) |
4863 | + yield client.unregister_to_signals() |
4864 | + self.mocker.verify() |
4865 | + |
4866 | + d = self._get_client() |
4867 | + # pylint: disable=E1101 |
4868 | + d.addCallback(test_execution) |
4869 | + # pylint: enable=E1101 |
4870 | + return d |
4871 | + |
4872 | + def test_emit_password_changed(self): |
4873 | + """Test the cb was called.""" |
4874 | + app_name = 'app' |
4875 | + result = 'result' |
4876 | + |
4877 | + @defer.inlineCallbacks |
4878 | + def test_emit(client): |
4879 | + """Actual test.""" |
4880 | + client.on_password_changed_cb(app_name, result) |
4881 | + self.mocker.replay() |
4882 | + self.login.emit_password_changed(app_name, result) |
4883 | + yield client.unregister_to_signals() |
4884 | + self.mocker.verify() |
4885 | + |
4886 | + d = self._get_client() |
4887 | + # pylint: disable=E1101 |
4888 | + d.addCallback(test_emit) |
4889 | + # pylint: enable=E1101 |
4890 | + return d |
4891 | + |
4892 | + def test_emit_password_change_error(self): |
4893 | + """Test the cb was called.""" |
4894 | + app_name = 'app' |
4895 | + error_value = 'error' |
4896 | + raised_error = self.mocker.mock() |
4897 | + |
4898 | + @defer.inlineCallbacks |
4899 | + def test_emit(client): |
4900 | + """Actual test.""" |
4901 | + raised_error.value |
4902 | + self.mocker.result(error_value) |
4903 | + self.except_to_errdict(error_value) |
4904 | + self.mocker.result(error_value) |
4905 | + client.on_password_change_error(app_name, error_value) |
4906 | + self.mocker.replay() |
4907 | + self.login.emit_password_change_error(app_name, raised_error) |
4908 | + yield client.unregister_to_signals() |
4909 | + self.mocker.verify() |
4910 | + |
4911 | + d = self._get_client() |
4912 | + # pylint: disable=E1101 |
4913 | + d.addCallback(test_emit) |
4914 | + # pylint: enable=E1101 |
4915 | + return d |
4916 | + |
4917 | + def test_set_new_password(self): |
4918 | + """Test the client call.""" |
4919 | + app_name = 'app' |
4920 | + email = 'email' |
4921 | + token = 'token' |
4922 | + new_password = 'password' |
4923 | + |
4924 | + @defer.inlineCallbacks |
4925 | + def test_execution(client): |
4926 | + """Actual test.""" |
4927 | + self.root.set_new_password(app_name, email, token, new_password, |
4928 | + blocking, self.login.emit_password_changed, |
4929 | + self.login.emit_password_change_error) |
4930 | + self.mocker.replay() |
4931 | + yield client.set_new_password(app_name, email, token, new_password) |
4932 | + yield client.unregister_to_signals() |
4933 | + self.mocker.verify() |
4934 | + |
4935 | + d = self._get_client() |
4936 | + # pylint: disable=E1101 |
4937 | + d.addCallback(test_execution) |
4938 | + # pylint: enable=E1101 |
4939 | + return d |
4940 | + |
4941 | + |
4942 | +class SSOCredentialsTestCase(TestCase): |
4943 | + """Test the credentials class.""" |
4944 | + |
4945 | + def setUp(self): |
4946 | + """Set up tests.""" |
4947 | + super(SSOCredentialsTestCase, self).setUp() |
4948 | + self.mocker = Mocker() |
4949 | + self.root = self.mocker.mock() |
4950 | + self.except_to_errdict = self.mocker.replace( |
4951 | + 'ubuntu_sso.main.except_to_errdict') |
4952 | + self.creds = SSOCredentials(None) |
4953 | + self.creds.root = self.root |
4954 | + # start pb |
4955 | + self.sso_root = UbuntuSSORoot(None, self.creds, None) |
4956 | + self.server_factory = SaveProtocolServerFactory(self.sso_root) |
4957 | + # pylint: disable=E1101 |
4958 | + self.listener = reactor.listenPipe(NAMED_PIPE_URL, self.server_factory) |
4959 | + self.client_factory = PBClientFactory() |
4960 | + self.connector = reactor.connectPipe(NAMED_PIPE_URL, |
4961 | + self.client_factory) |
4962 | + # pylint: enable=E1101 |
4963 | + |
4964 | + def tearDown(self): |
4965 | + """Clean reactor.""" |
4966 | + if self.server_factory.protocolInstance is not None: |
4967 | + self.server_factory.protocolInstance.transport.loseConnection() |
4968 | + return defer.gatherResults([self._tearDownServer(), |
4969 | + self._tearDownClient()]) |
4970 | + |
4971 | + def _tearDownServer(self): |
4972 | + """Teardown the server.""" |
4973 | + return defer.maybeDeferred(self.listener.stopListening) |
4974 | + |
4975 | + def _tearDownClient(self): |
4976 | + """Tear down the client.""" |
4977 | + self.connector.disconnect() |
4978 | + return defer.succeed(None) |
4979 | + |
4980 | + @defer.inlineCallbacks |
4981 | + def _get_client(self): |
4982 | + """Get the client.""" |
4983 | + # request the remote object and create a client |
4984 | + root = yield self.client_factory.getRootObject() |
4985 | + remote = yield root.callRemote('get_sso_credentials') |
4986 | + client = SSOCredentialsClient(remote) |
4987 | + yield client.register_to_signals() |
4988 | + # set the cb |
4989 | + for signal_name in ['on_authorization_denied_cb', |
4990 | + 'on_credentials_found_cb', |
4991 | + 'on_credentials_error_cb']: |
4992 | + setattr(client, signal_name, self.mocker.mock()) |
4993 | + defer.returnValue(client) |
4994 | + |
4995 | + def test_emit_authorization_denied(self): |
4996 | + """Test that the cb is executed.""" |
4997 | + app_name = 'app' |
4998 | + |
4999 | + @defer.inlineCallbacks |
5000 | + def test_emit(client): |
The diff has been truncated for viewing.