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