Merge lp:~nataliabidart/ubuntuone-windows-installer/wipe-it into lp:ubuntuone-windows-installer
- wipe-it
- Merge into trunk
Proposed by
Natalia Bidart
Status: | Merged |
---|---|
Approved by: | dobey |
Approved revision: | 109 |
Merged at revision: | 109 |
Proposed branch: | lp:~nataliabidart/ubuntuone-windows-installer/wipe-it |
Merge into: | lp:ubuntuone-windows-installer |
Diff against target: |
9389 lines (+0/-9056) 58 files modified
.bzrignore (+0/-9) bin/ubuntuone-installer-qt (+0/-51) data/qt/are_you_sure.ui (+0/-156) data/qt/choose_sign_in.ui (+0/-171) data/qt/congratulations.ui (+0/-138) data/qt/folders.ui (+0/-61) data/qt/images.qrc (+0/-20) data/qt/license.ui (+0/-34) data/qt/local_folders.ui (+0/-172) data/qt/network_detection.ui (+0/-150) data/qt/preferences.ui (+0/-24) data/qt/setup_account.ui (+0/-670) data/qt/side_widget.ui (+0/-235) data/qt/sign_in.ui (+0/-75) data/qt/ubuntuone.qss (+0/-179) pylintrc (+0/-305) run-tests (+0/-44) run-tests.bat (+0/-125) setup.py (+0/-249) ubuntuone_installer/__init__.py (+0/-27) ubuntuone_installer/gui/__init__.py (+0/-35) ubuntuone_installer/gui/qt/__init__.py (+0/-36) ubuntuone_installer/gui/qt/are_you_sure.py (+0/-47) ubuntuone_installer/gui/qt/currentuser.py (+0/-55) ubuntuone_installer/gui/qt/enhanced_check_box.py (+0/-50) ubuntuone_installer/gui/qt/folders.py (+0/-71) ubuntuone_installer/gui/qt/forgotten.py (+0/-33) ubuntuone_installer/gui/qt/gui.py (+0/-604) ubuntuone_installer/gui/qt/local_folders.py (+0/-310) ubuntuone_installer/gui/qt/main/__init__.py (+0/-60) ubuntuone_installer/gui/qt/main/linux.py (+0/-30) ubuntuone_installer/gui/qt/main/windows.py (+0/-33) ubuntuone_installer/gui/qt/network_detection.py (+0/-76) ubuntuone_installer/gui/qt/preferences.py (+0/-98) ubuntuone_installer/gui/qt/setup_account.py (+0/-226) ubuntuone_installer/gui/qt/side_widget.py (+0/-69) ubuntuone_installer/gui/qt/sync_now_or_later.py (+0/-83) ubuntuone_installer/gui/qt/tests/__init__.py (+0/-277) ubuntuone_installer/gui/qt/tests/test_are_you_sure.py (+0/-47) ubuntuone_installer/gui/qt/tests/test_currentuser.py (+0/-93) ubuntuone_installer/gui/qt/tests/test_enhanced_check_box.py (+0/-49) ubuntuone_installer/gui/qt/tests/test_gui.py (+0/-1006) ubuntuone_installer/gui/qt/tests/test_local_folders.py (+0/-622) ubuntuone_installer/gui/qt/tests/test_network_detection.py (+0/-95) ubuntuone_installer/gui/qt/tests/test_setup_account.py (+0/-334) ubuntuone_installer/gui/qt/tests/test_side_widget.py (+0/-114) ubuntuone_installer/gui/qt/tests/test_sync_now_or_later.py (+0/-100) ubuntuone_installer/gui/qt/ui/__init__.py (+0/-19) ubuntuone_installer/gui/qt/utils/__init__.py (+0/-88) ubuntuone_installer/gui/qt/utils/linux.py (+0/-50) ubuntuone_installer/gui/qt/utils/tests/__init__.py (+0/-19) ubuntuone_installer/gui/qt/utils/tests/test_common.py (+0/-121) ubuntuone_installer/gui/qt/utils/tests/test_linux.py (+0/-74) ubuntuone_installer/gui/qt/utils/tests/test_windows.py (+0/-633) ubuntuone_installer/gui/qt/utils/windows.py (+0/-332) ubuntuone_installer/gui/tests/__init__.py (+0/-45) ubuntuone_installer/logger.py (+0/-83) ubuntuone_installer/tests/__init__.py (+0/-44) |
To merge this branch: | bzr merge lp:~nataliabidart/ubuntuone-windows-installer/wipe-it |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
dobey (community) | Approve | ||
Roberto Alsina (community) | Approve | ||
Review via email: mp+100204@code.launchpad.net |
Commit message
- Removing all the deprecated and unused code, since it was either replaced
or moved to another project.
Description of the change
To post a comment you must log in.
Revision history for this message
dobey (dobey) : | # |
review:
Approve
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === removed file '.bzrignore' | |||
2 | --- .bzrignore 2011-06-21 16:17:47 +0000 | |||
3 | +++ .bzrignore 1970-01-01 00:00:00 +0000 | |||
4 | @@ -1,9 +0,0 @@ | |||
5 | 1 | _trial_temp | ||
6 | 2 | *.service | ||
7 | 3 | MANIFEST | ||
8 | 4 | build/ | ||
9 | 5 | dist/ | ||
10 | 6 | po/ubuntuone-installer.pot | ||
11 | 7 | ubuntuone_installer/gui/qt/ui/*_ui.py | ||
12 | 8 | ubuntuone_installer/gui/qt/ui/*_rc.py | ||
13 | 9 | qtreactor/ | ||
14 | 10 | 0 | ||
15 | === removed directory 'bin' | |||
16 | === removed file 'bin/ubuntuone-installer-qt' | |||
17 | --- bin/ubuntuone-installer-qt 2011-09-14 14:12:02 +0000 | |||
18 | +++ bin/ubuntuone-installer-qt 1970-01-01 00:00:00 +0000 | |||
19 | @@ -1,51 +0,0 @@ | |||
20 | 1 | #!/usr/bin/python | ||
21 | 2 | # -*- coding: utf-8 -*- | ||
22 | 3 | |||
23 | 4 | # Authors: Natalia B Bidart <natalia.bidart@canonical.com> | ||
24 | 5 | # Eric Casteleijn <eric.casteleijn@canonical.com> | ||
25 | 6 | # Roberto Alsina <roberto.alsina@canonical.com> | ||
26 | 7 | # | ||
27 | 8 | # Copyright 2010 Canonical Ltd. | ||
28 | 9 | # | ||
29 | 10 | # This program is free software: you can redistribute it and/or modify it | ||
30 | 11 | # under the terms of the GNU General Public License version 3, as published | ||
31 | 12 | # by the Free Software Foundation. | ||
32 | 13 | # | ||
33 | 14 | # This program is distributed in the hope that it will be useful, but | ||
34 | 15 | # WITHOUT ANY WARRANTY; without even the implied warranties of | ||
35 | 16 | # MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR | ||
36 | 17 | # PURPOSE. See the GNU General Public License for more details. | ||
37 | 18 | # | ||
38 | 19 | # You should have received a copy of the GNU General Public License along | ||
39 | 20 | # with this program. If not, see <http://www.gnu.org/licenses/>. | ||
40 | 21 | """Execute the graphical interface for the Ubuntu One installer.""" | ||
41 | 22 | |||
42 | 23 | # Invalid name "ubuntuone-installer-qt", pylint: disable=C0103 | ||
43 | 24 | |||
44 | 25 | import gettext | ||
45 | 26 | import sys | ||
46 | 27 | |||
47 | 28 | from optparse import OptionParser | ||
48 | 29 | |||
49 | 30 | from ubuntuone_installer import TRANSLATION_DOMAIN | ||
50 | 31 | |||
51 | 32 | gettext.textdomain(TRANSLATION_DOMAIN) | ||
52 | 33 | # import the GUI after the translation domain has been set | ||
53 | 34 | from ubuntuone_installer.gui.qt import main | ||
54 | 35 | |||
55 | 36 | |||
56 | 37 | def parser_options(): | ||
57 | 38 | """Parse command line parameters.""" | ||
58 | 39 | usage = "Usage: %prog [option]" | ||
59 | 40 | result = OptionParser(usage=usage) | ||
60 | 41 | result.add_option("-i", "--installer", dest="installer", | ||
61 | 42 | action="store_true", | ||
62 | 43 | default=False, help="To be used by the installer: " | ||
63 | 44 | "Show license page, offer uninstall on cancel.") | ||
64 | 45 | return result | ||
65 | 46 | |||
66 | 47 | |||
67 | 48 | if __name__ == "__main__": | ||
68 | 49 | parser = parser_options() | ||
69 | 50 | (options, args) = parser.parse_args(sys.argv) | ||
70 | 51 | main.main(installing=options.installer) | ||
71 | 52 | 0 | ||
72 | === removed directory 'data' | |||
73 | === removed file 'data/Ubuntu-B.ttf' | |||
74 | 53 | Binary files data/Ubuntu-B.ttf 2011-07-27 14:53:56 +0000 and data/Ubuntu-B.ttf 1970-01-01 00:00:00 +0000 differ | 1 | Binary files data/Ubuntu-B.ttf 2011-07-27 14:53:56 +0000 and data/Ubuntu-B.ttf 1970-01-01 00:00:00 +0000 differ |
75 | === removed file 'data/Ubuntu-R.ttf' | |||
76 | 54 | Binary files data/Ubuntu-R.ttf 2011-07-12 03:24:48 +0000 and data/Ubuntu-R.ttf 1970-01-01 00:00:00 +0000 differ | 2 | Binary files data/Ubuntu-R.ttf 2011-07-12 03:24:48 +0000 and data/Ubuntu-R.ttf 1970-01-01 00:00:00 +0000 differ |
77 | === removed file 'data/balloon_shape.png' | |||
78 | 55 | Binary files data/balloon_shape.png 2011-07-13 03:14:18 +0000 and data/balloon_shape.png 1970-01-01 00:00:00 +0000 differ | 3 | Binary files data/balloon_shape.png 2011-07-13 03:14:18 +0000 and data/balloon_shape.png 1970-01-01 00:00:00 +0000 differ |
79 | === removed file 'data/folder.png' | |||
80 | 56 | Binary files data/folder.png 2011-08-08 21:48:11 +0000 and data/folder.png 1970-01-01 00:00:00 +0000 differ | 4 | Binary files data/folder.png 2011-08-08 21:48:11 +0000 and data/folder.png 1970-01-01 00:00:00 +0000 differ |
81 | === removed file 'data/password_hint_ok.png' | |||
82 | 57 | Binary files data/password_hint_ok.png 2011-07-13 03:14:18 +0000 and data/password_hint_ok.png 1970-01-01 00:00:00 +0000 differ | 5 | Binary files data/password_hint_ok.png 2011-07-13 03:14:18 +0000 and data/password_hint_ok.png 1970-01-01 00:00:00 +0000 differ |
83 | === removed file 'data/password_hint_warning.png' | |||
84 | 58 | Binary files data/password_hint_warning.png 2011-07-13 03:14:18 +0000 and data/password_hint_warning.png 1970-01-01 00:00:00 +0000 differ | 6 | Binary files data/password_hint_warning.png 2011-07-13 03:14:18 +0000 and data/password_hint_warning.png 1970-01-01 00:00:00 +0000 differ |
85 | === removed file 'data/progress_arrow_grey.png' | |||
86 | 59 | Binary files data/progress_arrow_grey.png 2011-07-12 03:24:48 +0000 and data/progress_arrow_grey.png 1970-01-01 00:00:00 +0000 differ | 7 | Binary files data/progress_arrow_grey.png 2011-07-12 03:24:48 +0000 and data/progress_arrow_grey.png 1970-01-01 00:00:00 +0000 differ |
87 | === removed file 'data/progress_arrow_orange.png' | |||
88 | 60 | Binary files data/progress_arrow_orange.png 2011-07-12 03:24:48 +0000 and data/progress_arrow_orange.png 1970-01-01 00:00:00 +0000 differ | 8 | Binary files data/progress_arrow_orange.png 2011-07-12 03:24:48 +0000 and data/progress_arrow_orange.png 1970-01-01 00:00:00 +0000 differ |
89 | === removed file 'data/progress_finish_grey.png' | |||
90 | 61 | Binary files data/progress_finish_grey.png 2011-07-12 03:24:48 +0000 and data/progress_finish_grey.png 1970-01-01 00:00:00 +0000 differ | 9 | Binary files data/progress_finish_grey.png 2011-07-12 03:24:48 +0000 and data/progress_finish_grey.png 1970-01-01 00:00:00 +0000 differ |
91 | === removed file 'data/progress_finish_orange.png' | |||
92 | 62 | Binary files data/progress_finish_orange.png 2011-07-12 03:24:48 +0000 and data/progress_finish_orange.png 1970-01-01 00:00:00 +0000 differ | 10 | Binary files data/progress_finish_orange.png 2011-07-12 03:24:48 +0000 and data/progress_finish_orange.png 1970-01-01 00:00:00 +0000 differ |
93 | === removed file 'data/progress_tick.png' | |||
94 | 63 | Binary files data/progress_tick.png 2011-07-12 03:24:48 +0000 and data/progress_tick.png 1970-01-01 00:00:00 +0000 differ | 11 | Binary files data/progress_tick.png 2011-07-12 03:24:48 +0000 and data/progress_tick.png 1970-01-01 00:00:00 +0000 differ |
95 | === removed directory 'data/qt' | |||
96 | === removed file 'data/qt/are_you_sure.ui' | |||
97 | --- data/qt/are_you_sure.ui 2011-09-05 17:53:44 +0000 | |||
98 | +++ data/qt/are_you_sure.ui 1970-01-01 00:00:00 +0000 | |||
99 | @@ -1,156 +0,0 @@ | |||
100 | 1 | <?xml version="1.0" encoding="UTF-8"?> | ||
101 | 2 | <ui version="4.0"> | ||
102 | 3 | <class>Dialog</class> | ||
103 | 4 | <widget class="QDialog" name="Dialog"> | ||
104 | 5 | <property name="geometry"> | ||
105 | 6 | <rect> | ||
106 | 7 | <x>0</x> | ||
107 | 8 | <y>0</y> | ||
108 | 9 | <width>386</width> | ||
109 | 10 | <height>196</height> | ||
110 | 11 | </rect> | ||
111 | 12 | </property> | ||
112 | 13 | <property name="windowTitle"> | ||
113 | 14 | <string>Dialog</string> | ||
114 | 15 | </property> | ||
115 | 16 | <layout class="QVBoxLayout" name="verticalLayout"> | ||
116 | 17 | <item> | ||
117 | 18 | <widget class="QLabel" name="label"> | ||
118 | 19 | <property name="text"> | ||
119 | 20 | <string>Are you sure you want to cancel setting up Ubuntu One?</string> | ||
120 | 21 | </property> | ||
121 | 22 | <property name="textFormat"> | ||
122 | 23 | <enum>Qt::PlainText</enum> | ||
123 | 24 | </property> | ||
124 | 25 | </widget> | ||
125 | 26 | </item> | ||
126 | 27 | <item> | ||
127 | 28 | <widget class="QLabel" name="message_label"> | ||
128 | 29 | <property name="text"> | ||
129 | 30 | <string>PLACEHOLDER TEXT</string> | ||
130 | 31 | </property> | ||
131 | 32 | <property name="textFormat"> | ||
132 | 33 | <enum>Qt::AutoText</enum> | ||
133 | 34 | </property> | ||
134 | 35 | <property name="wordWrap"> | ||
135 | 36 | <bool>true</bool> | ||
136 | 37 | </property> | ||
137 | 38 | <property name="openExternalLinks"> | ||
138 | 39 | <bool>true</bool> | ||
139 | 40 | </property> | ||
140 | 41 | </widget> | ||
141 | 42 | </item> | ||
142 | 43 | <item> | ||
143 | 44 | <spacer name="verticalSpacer"> | ||
144 | 45 | <property name="orientation"> | ||
145 | 46 | <enum>Qt::Vertical</enum> | ||
146 | 47 | </property> | ||
147 | 48 | <property name="sizeHint" stdset="0"> | ||
148 | 49 | <size> | ||
149 | 50 | <width>20</width> | ||
150 | 51 | <height>40</height> | ||
151 | 52 | </size> | ||
152 | 53 | </property> | ||
153 | 54 | </spacer> | ||
154 | 55 | </item> | ||
155 | 56 | <item> | ||
156 | 57 | <layout class="QHBoxLayout" name="horizontalLayout"> | ||
157 | 58 | <item> | ||
158 | 59 | <spacer name="horizontalSpacer"> | ||
159 | 60 | <property name="orientation"> | ||
160 | 61 | <enum>Qt::Horizontal</enum> | ||
161 | 62 | </property> | ||
162 | 63 | <property name="sizeHint" stdset="0"> | ||
163 | 64 | <size> | ||
164 | 65 | <width>40</width> | ||
165 | 66 | <height>20</height> | ||
166 | 67 | </size> | ||
167 | 68 | </property> | ||
168 | 69 | </spacer> | ||
169 | 70 | </item> | ||
170 | 71 | <item> | ||
171 | 72 | <widget class="QPushButton" name="pushButton"> | ||
172 | 73 | <property name="text"> | ||
173 | 74 | <string>Yes, I want to cancel</string> | ||
174 | 75 | </property> | ||
175 | 76 | <property name="autoDefault"> | ||
176 | 77 | <bool>false</bool> | ||
177 | 78 | </property> | ||
178 | 79 | </widget> | ||
179 | 80 | </item> | ||
180 | 81 | <item> | ||
181 | 82 | <spacer name="horizontalSpacer_2"> | ||
182 | 83 | <property name="orientation"> | ||
183 | 84 | <enum>Qt::Horizontal</enum> | ||
184 | 85 | </property> | ||
185 | 86 | <property name="sizeHint" stdset="0"> | ||
186 | 87 | <size> | ||
187 | 88 | <width>40</width> | ||
188 | 89 | <height>20</height> | ||
189 | 90 | </size> | ||
190 | 91 | </property> | ||
191 | 92 | </spacer> | ||
192 | 93 | </item> | ||
193 | 94 | <item> | ||
194 | 95 | <widget class="QPushButton" name="pushButton_2"> | ||
195 | 96 | <property name="text"> | ||
196 | 97 | <string>No, continue setting up</string> | ||
197 | 98 | </property> | ||
198 | 99 | <property name="default"> | ||
199 | 100 | <bool>true</bool> | ||
200 | 101 | </property> | ||
201 | 102 | </widget> | ||
202 | 103 | </item> | ||
203 | 104 | <item> | ||
204 | 105 | <spacer name="horizontalSpacer_3"> | ||
205 | 106 | <property name="orientation"> | ||
206 | 107 | <enum>Qt::Horizontal</enum> | ||
207 | 108 | </property> | ||
208 | 109 | <property name="sizeHint" stdset="0"> | ||
209 | 110 | <size> | ||
210 | 111 | <width>40</width> | ||
211 | 112 | <height>20</height> | ||
212 | 113 | </size> | ||
213 | 114 | </property> | ||
214 | 115 | </spacer> | ||
215 | 116 | </item> | ||
216 | 117 | </layout> | ||
217 | 118 | </item> | ||
218 | 119 | </layout> | ||
219 | 120 | </widget> | ||
220 | 121 | <resources/> | ||
221 | 122 | <connections> | ||
222 | 123 | <connection> | ||
223 | 124 | <sender>pushButton_2</sender> | ||
224 | 125 | <signal>clicked()</signal> | ||
225 | 126 | <receiver>Dialog</receiver> | ||
226 | 127 | <slot>reject()</slot> | ||
227 | 128 | <hints> | ||
228 | 129 | <hint type="sourcelabel"> | ||
229 | 130 | <x>272</x> | ||
230 | 131 | <y>174</y> | ||
231 | 132 | </hint> | ||
232 | 133 | <hint type="destinationlabel"> | ||
233 | 134 | <x>330</x> | ||
234 | 135 | <y>129</y> | ||
235 | 136 | </hint> | ||
236 | 137 | </hints> | ||
237 | 138 | </connection> | ||
238 | 139 | <connection> | ||
239 | 140 | <sender>pushButton</sender> | ||
240 | 141 | <signal>clicked()</signal> | ||
241 | 142 | <receiver>Dialog</receiver> | ||
242 | 143 | <slot>accept()</slot> | ||
243 | 144 | <hints> | ||
244 | 145 | <hint type="sourcelabel"> | ||
245 | 146 | <x>118</x> | ||
246 | 147 | <y>167</y> | ||
247 | 148 | </hint> | ||
248 | 149 | <hint type="destinationlabel"> | ||
249 | 150 | <x>163</x> | ||
250 | 151 | <y>122</y> | ||
251 | 152 | </hint> | ||
252 | 153 | </hints> | ||
253 | 154 | </connection> | ||
254 | 155 | </connections> | ||
255 | 156 | </ui> | ||
256 | 157 | 0 | ||
257 | === removed file 'data/qt/choose_sign_in.ui' | |||
258 | --- data/qt/choose_sign_in.ui 2011-09-02 12:58:29 +0000 | |||
259 | +++ data/qt/choose_sign_in.ui 1970-01-01 00:00:00 +0000 | |||
260 | @@ -1,171 +0,0 @@ | |||
261 | 1 | <?xml version="1.0" encoding="UTF-8"?> | ||
262 | 2 | <ui version="4.0"> | ||
263 | 3 | <class>ChooseSignInPage</class> | ||
264 | 4 | <widget class="QWizardPage" name="ChooseSignInPage"> | ||
265 | 5 | <property name="geometry"> | ||
266 | 6 | <rect> | ||
267 | 7 | <x>0</x> | ||
268 | 8 | <y>0</y> | ||
269 | 9 | <width>432</width> | ||
270 | 10 | <height>387</height> | ||
271 | 11 | </rect> | ||
272 | 12 | </property> | ||
273 | 13 | <property name="windowTitle"> | ||
274 | 14 | <string>WizardPage</string> | ||
275 | 15 | </property> | ||
276 | 16 | <layout class="QVBoxLayout" name="verticalLayout_2"> | ||
277 | 17 | <property name="leftMargin"> | ||
278 | 18 | <number>0</number> | ||
279 | 19 | </property> | ||
280 | 20 | <property name="topMargin"> | ||
281 | 21 | <number>0</number> | ||
282 | 22 | </property> | ||
283 | 23 | <property name="rightMargin"> | ||
284 | 24 | <number>0</number> | ||
285 | 25 | </property> | ||
286 | 26 | <item> | ||
287 | 27 | <layout class="QHBoxLayout" name="horizontalLayout_2"> | ||
288 | 28 | <item> | ||
289 | 29 | <widget class="QLabel" name="image_label"> | ||
290 | 30 | <property name="sizePolicy"> | ||
291 | 31 | <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> | ||
292 | 32 | <horstretch>0</horstretch> | ||
293 | 33 | <verstretch>0</verstretch> | ||
294 | 34 | </sizepolicy> | ||
295 | 35 | </property> | ||
296 | 36 | <property name="minimumSize"> | ||
297 | 37 | <size> | ||
298 | 38 | <width>400</width> | ||
299 | 39 | <height>150</height> | ||
300 | 40 | </size> | ||
301 | 41 | </property> | ||
302 | 42 | <property name="text"> | ||
303 | 43 | <string/> | ||
304 | 44 | </property> | ||
305 | 45 | <property name="textFormat"> | ||
306 | 46 | <enum>Qt::PlainText</enum> | ||
307 | 47 | </property> | ||
308 | 48 | <property name="pixmap"> | ||
309 | 49 | <pixmap resource="images.qrc">:/win_installer_graphic.png</pixmap> | ||
310 | 50 | </property> | ||
311 | 51 | <property name="alignment"> | ||
312 | 52 | <set>Qt::AlignCenter</set> | ||
313 | 53 | </property> | ||
314 | 54 | <property name="wordWrap"> | ||
315 | 55 | <bool>true</bool> | ||
316 | 56 | </property> | ||
317 | 57 | </widget> | ||
318 | 58 | </item> | ||
319 | 59 | </layout> | ||
320 | 60 | </item> | ||
321 | 61 | <item> | ||
322 | 62 | <widget class="QLabel" name="message_label"> | ||
323 | 63 | <property name="font"> | ||
324 | 64 | <font> | ||
325 | 65 | <pointsize>11</pointsize> | ||
326 | 66 | <weight>50</weight> | ||
327 | 67 | <bold>false</bold> | ||
328 | 68 | </font> | ||
329 | 69 | </property> | ||
330 | 70 | <property name="text"> | ||
331 | 71 | <string>Congratulations, Ubuntu One is installed!</string> | ||
332 | 72 | </property> | ||
333 | 73 | <property name="alignment"> | ||
334 | 74 | <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set> | ||
335 | 75 | </property> | ||
336 | 76 | </widget> | ||
337 | 77 | </item> | ||
338 | 78 | <item> | ||
339 | 79 | <spacer name="verticalSpacer_3"> | ||
340 | 80 | <property name="orientation"> | ||
341 | 81 | <enum>Qt::Vertical</enum> | ||
342 | 82 | </property> | ||
343 | 83 | <property name="sizeType"> | ||
344 | 84 | <enum>QSizePolicy::Fixed</enum> | ||
345 | 85 | </property> | ||
346 | 86 | <property name="sizeHint" stdset="0"> | ||
347 | 87 | <size> | ||
348 | 88 | <width>20</width> | ||
349 | 89 | <height>30</height> | ||
350 | 90 | </size> | ||
351 | 91 | </property> | ||
352 | 92 | </spacer> | ||
353 | 93 | </item> | ||
354 | 94 | <item> | ||
355 | 95 | <layout class="QHBoxLayout" name="horizontalLayout"> | ||
356 | 96 | <item> | ||
357 | 97 | <spacer name="horizontalSpacer_2"> | ||
358 | 98 | <property name="orientation"> | ||
359 | 99 | <enum>Qt::Horizontal</enum> | ||
360 | 100 | </property> | ||
361 | 101 | <property name="sizeHint" stdset="0"> | ||
362 | 102 | <size> | ||
363 | 103 | <width>20</width> | ||
364 | 104 | <height>20</height> | ||
365 | 105 | </size> | ||
366 | 106 | </property> | ||
367 | 107 | </spacer> | ||
368 | 108 | </item> | ||
369 | 109 | <item> | ||
370 | 110 | <layout class="QVBoxLayout" name="verticalLayout"> | ||
371 | 111 | <item> | ||
372 | 112 | <widget class="QPushButton" name="existing_account_button"> | ||
373 | 113 | <property name="text"> | ||
374 | 114 | <string/> | ||
375 | 115 | </property> | ||
376 | 116 | </widget> | ||
377 | 117 | </item> | ||
378 | 118 | <item> | ||
379 | 119 | <widget class="QPushButton" name="setup_account_button"> | ||
380 | 120 | <property name="text"> | ||
381 | 121 | <string/> | ||
382 | 122 | </property> | ||
383 | 123 | </widget> | ||
384 | 124 | </item> | ||
385 | 125 | <item> | ||
386 | 126 | <widget class="QPushButton" name="cancel_button"> | ||
387 | 127 | <property name="text"> | ||
388 | 128 | <string/> | ||
389 | 129 | </property> | ||
390 | 130 | </widget> | ||
391 | 131 | </item> | ||
392 | 132 | </layout> | ||
393 | 133 | </item> | ||
394 | 134 | <item> | ||
395 | 135 | <spacer name="horizontalSpacer"> | ||
396 | 136 | <property name="orientation"> | ||
397 | 137 | <enum>Qt::Horizontal</enum> | ||
398 | 138 | </property> | ||
399 | 139 | <property name="sizeType"> | ||
400 | 140 | <enum>QSizePolicy::Expanding</enum> | ||
401 | 141 | </property> | ||
402 | 142 | <property name="sizeHint" stdset="0"> | ||
403 | 143 | <size> | ||
404 | 144 | <width>20</width> | ||
405 | 145 | <height>20</height> | ||
406 | 146 | </size> | ||
407 | 147 | </property> | ||
408 | 148 | </spacer> | ||
409 | 149 | </item> | ||
410 | 150 | </layout> | ||
411 | 151 | </item> | ||
412 | 152 | <item> | ||
413 | 153 | <spacer name="verticalSpacer_2"> | ||
414 | 154 | <property name="orientation"> | ||
415 | 155 | <enum>Qt::Vertical</enum> | ||
416 | 156 | </property> | ||
417 | 157 | <property name="sizeHint" stdset="0"> | ||
418 | 158 | <size> | ||
419 | 159 | <width>20</width> | ||
420 | 160 | <height>50</height> | ||
421 | 161 | </size> | ||
422 | 162 | </property> | ||
423 | 163 | </spacer> | ||
424 | 164 | </item> | ||
425 | 165 | </layout> | ||
426 | 166 | </widget> | ||
427 | 167 | <resources> | ||
428 | 168 | <include location="images.qrc"/> | ||
429 | 169 | </resources> | ||
430 | 170 | <connections/> | ||
431 | 171 | </ui> | ||
432 | 172 | 0 | ||
433 | === removed file 'data/qt/congratulations.ui' | |||
434 | --- data/qt/congratulations.ui 2011-11-17 20:05:33 +0000 | |||
435 | +++ data/qt/congratulations.ui 1970-01-01 00:00:00 +0000 | |||
436 | @@ -1,138 +0,0 @@ | |||
437 | 1 | <?xml version="1.0" encoding="UTF-8"?> | ||
438 | 2 | <ui version="4.0"> | ||
439 | 3 | <class>Form</class> | ||
440 | 4 | <widget class="QWidget" name="Form"> | ||
441 | 5 | <property name="geometry"> | ||
442 | 6 | <rect> | ||
443 | 7 | <x>0</x> | ||
444 | 8 | <y>0</y> | ||
445 | 9 | <width>622</width> | ||
446 | 10 | <height>362</height> | ||
447 | 11 | </rect> | ||
448 | 12 | </property> | ||
449 | 13 | <property name="windowTitle"> | ||
450 | 14 | <string>Form</string> | ||
451 | 15 | </property> | ||
452 | 16 | <layout class="QVBoxLayout" name="verticalLayout_2"> | ||
453 | 17 | <property name="spacing"> | ||
454 | 18 | <number>24</number> | ||
455 | 19 | </property> | ||
456 | 20 | <property name="topMargin"> | ||
457 | 21 | <number>0</number> | ||
458 | 22 | </property> | ||
459 | 23 | <item> | ||
460 | 24 | <layout class="QHBoxLayout" name="horizontalLayout_2"> | ||
461 | 25 | <item> | ||
462 | 26 | <spacer name="horizontalSpacer"> | ||
463 | 27 | <property name="orientation"> | ||
464 | 28 | <enum>Qt::Horizontal</enum> | ||
465 | 29 | </property> | ||
466 | 30 | <property name="sizeHint" stdset="0"> | ||
467 | 31 | <size> | ||
468 | 32 | <width>40</width> | ||
469 | 33 | <height>20</height> | ||
470 | 34 | </size> | ||
471 | 35 | </property> | ||
472 | 36 | </spacer> | ||
473 | 37 | </item> | ||
474 | 38 | <item> | ||
475 | 39 | <widget class="QLabel" name="image_label"> | ||
476 | 40 | <property name="text"> | ||
477 | 41 | <string/> | ||
478 | 42 | </property> | ||
479 | 43 | <property name="pixmap"> | ||
480 | 44 | <pixmap resource="images.qrc">:/win_installer_graphic.png</pixmap> | ||
481 | 45 | </property> | ||
482 | 46 | </widget> | ||
483 | 47 | </item> | ||
484 | 48 | <item> | ||
485 | 49 | <spacer name="horizontalSpacer_2"> | ||
486 | 50 | <property name="orientation"> | ||
487 | 51 | <enum>Qt::Horizontal</enum> | ||
488 | 52 | </property> | ||
489 | 53 | <property name="sizeHint" stdset="0"> | ||
490 | 54 | <size> | ||
491 | 55 | <width>40</width> | ||
492 | 56 | <height>20</height> | ||
493 | 57 | </size> | ||
494 | 58 | </property> | ||
495 | 59 | </spacer> | ||
496 | 60 | </item> | ||
497 | 61 | </layout> | ||
498 | 62 | </item> | ||
499 | 63 | <item> | ||
500 | 64 | <widget class="QLabel" name="label_3"> | ||
501 | 65 | <property name="text"> | ||
502 | 66 | <string>Ubuntu One is installed, set up and is ready to go!</string> | ||
503 | 67 | </property> | ||
504 | 68 | </widget> | ||
505 | 69 | </item> | ||
506 | 70 | <item> | ||
507 | 71 | <widget class="QWidget" name="progressContainer" native="true"> | ||
508 | 72 | <property name="layoutDirection"> | ||
509 | 73 | <enum>Qt::RightToLeft</enum> | ||
510 | 74 | </property> | ||
511 | 75 | <layout class="QHBoxLayout" name="horizontalLayout"> | ||
512 | 76 | <property name="spacing"> | ||
513 | 77 | <number>0</number> | ||
514 | 78 | </property> | ||
515 | 79 | <property name="margin"> | ||
516 | 80 | <number>0</number> | ||
517 | 81 | </property> | ||
518 | 82 | <item> | ||
519 | 83 | <widget class="QLabel" name="label_4"> | ||
520 | 84 | <property name="text"> | ||
521 | 85 | <string/> | ||
522 | 86 | </property> | ||
523 | 87 | </widget> | ||
524 | 88 | </item> | ||
525 | 89 | <item> | ||
526 | 90 | <layout class="QVBoxLayout" name="verticalLayout"> | ||
527 | 91 | <item> | ||
528 | 92 | <widget class="QLabel" name="label_5"> | ||
529 | 93 | <property name="font"> | ||
530 | 94 | <font> | ||
531 | 95 | <weight>75</weight> | ||
532 | 96 | <bold>true</bold> | ||
533 | 97 | </font> | ||
534 | 98 | </property> | ||
535 | 99 | <property name="text"> | ||
536 | 100 | <string>Sync in progress...</string> | ||
537 | 101 | </property> | ||
538 | 102 | </widget> | ||
539 | 103 | </item> | ||
540 | 104 | <item> | ||
541 | 105 | <widget class="QLabel" name="label_6"> | ||
542 | 106 | <property name="text"> | ||
543 | 107 | <string>Your selected folders have started to sync in the background, launch the dashboard to get more information about the sync in progress.</string> | ||
544 | 108 | </property> | ||
545 | 109 | <property name="wordWrap"> | ||
546 | 110 | <bool>true</bool> | ||
547 | 111 | </property> | ||
548 | 112 | </widget> | ||
549 | 113 | </item> | ||
550 | 114 | </layout> | ||
551 | 115 | </item> | ||
552 | 116 | </layout> | ||
553 | 117 | </widget> | ||
554 | 118 | </item> | ||
555 | 119 | <item> | ||
556 | 120 | <spacer name="verticalSpacer"> | ||
557 | 121 | <property name="orientation"> | ||
558 | 122 | <enum>Qt::Vertical</enum> | ||
559 | 123 | </property> | ||
560 | 124 | <property name="sizeHint" stdset="0"> | ||
561 | 125 | <size> | ||
562 | 126 | <width>20</width> | ||
563 | 127 | <height>40</height> | ||
564 | 128 | </size> | ||
565 | 129 | </property> | ||
566 | 130 | </spacer> | ||
567 | 131 | </item> | ||
568 | 132 | </layout> | ||
569 | 133 | </widget> | ||
570 | 134 | <resources> | ||
571 | 135 | <include location="images.qrc"/> | ||
572 | 136 | </resources> | ||
573 | 137 | <connections/> | ||
574 | 138 | </ui> | ||
575 | 139 | 0 | ||
576 | === removed file 'data/qt/folders.ui' | |||
577 | --- data/qt/folders.ui 2011-09-08 02:33:23 +0000 | |||
578 | +++ data/qt/folders.ui 1970-01-01 00:00:00 +0000 | |||
579 | @@ -1,61 +0,0 @@ | |||
580 | 1 | <?xml version="1.0" encoding="UTF-8"?> | ||
581 | 2 | <ui version="4.0"> | ||
582 | 3 | <class>Form</class> | ||
583 | 4 | <widget class="QWidget" name="Form"> | ||
584 | 5 | <property name="geometry"> | ||
585 | 6 | <rect> | ||
586 | 7 | <x>0</x> | ||
587 | 8 | <y>0</y> | ||
588 | 9 | <width>480</width> | ||
589 | 10 | <height>374</height> | ||
590 | 11 | </rect> | ||
591 | 12 | </property> | ||
592 | 13 | <property name="windowTitle"> | ||
593 | 14 | <string>Form</string> | ||
594 | 15 | </property> | ||
595 | 16 | <layout class="QVBoxLayout" name="verticalLayout"> | ||
596 | 17 | <property name="topMargin"> | ||
597 | 18 | <number>0</number> | ||
598 | 19 | </property> | ||
599 | 20 | <item> | ||
600 | 21 | <layout class="QHBoxLayout" name="horizontalLayout"> | ||
601 | 22 | <item> | ||
602 | 23 | <spacer name="horizontalSpacer"> | ||
603 | 24 | <property name="orientation"> | ||
604 | 25 | <enum>Qt::Horizontal</enum> | ||
605 | 26 | </property> | ||
606 | 27 | <property name="sizeHint" stdset="0"> | ||
607 | 28 | <size> | ||
608 | 29 | <width>40</width> | ||
609 | 30 | <height>20</height> | ||
610 | 31 | </size> | ||
611 | 32 | </property> | ||
612 | 33 | </spacer> | ||
613 | 34 | </item> | ||
614 | 35 | <item> | ||
615 | 36 | <widget class="QPushButton" name="check_settings_button"> | ||
616 | 37 | <property name="text"> | ||
617 | 38 | <string>Check settings</string> | ||
618 | 39 | </property> | ||
619 | 40 | </widget> | ||
620 | 41 | </item> | ||
621 | 42 | <item> | ||
622 | 43 | <spacer name="horizontalSpacer_2"> | ||
623 | 44 | <property name="orientation"> | ||
624 | 45 | <enum>Qt::Horizontal</enum> | ||
625 | 46 | </property> | ||
626 | 47 | <property name="sizeHint" stdset="0"> | ||
627 | 48 | <size> | ||
628 | 49 | <width>40</width> | ||
629 | 50 | <height>20</height> | ||
630 | 51 | </size> | ||
631 | 52 | </property> | ||
632 | 53 | </spacer> | ||
633 | 54 | </item> | ||
634 | 55 | </layout> | ||
635 | 56 | </item> | ||
636 | 57 | </layout> | ||
637 | 58 | </widget> | ||
638 | 59 | <resources/> | ||
639 | 60 | <connections/> | ||
640 | 61 | </ui> | ||
641 | 62 | 0 | ||
642 | === removed file 'data/qt/images.qrc' | |||
643 | --- data/qt/images.qrc 2011-08-08 21:48:11 +0000 | |||
644 | +++ data/qt/images.qrc 1970-01-01 00:00:00 +0000 | |||
645 | @@ -1,20 +0,0 @@ | |||
646 | 1 | <RCC> | ||
647 | 2 | <qresource prefix="/"> | ||
648 | 3 | <file>../balloon_shape.png</file> | ||
649 | 4 | <file>../password_hint_ok.png</file> | ||
650 | 5 | <file>../password_hint_warning.png</file> | ||
651 | 6 | <file>../Ubuntu-R.ttf</file> | ||
652 | 7 | <file>../Ubuntu-B.ttf</file> | ||
653 | 8 | <file>ubuntuone.qss</file> | ||
654 | 9 | <file>../progress_arrow_grey.png</file> | ||
655 | 10 | <file>../u1_logo.png</file> | ||
656 | 11 | <file>../progress_arrow_orange.png</file> | ||
657 | 12 | <file>../progress_finish_grey.png</file> | ||
658 | 13 | <file>../progress_finish_orange.png</file> | ||
659 | 14 | <file>../progress_tick.png</file> | ||
660 | 15 | <file>../u1icon.png</file> | ||
661 | 16 | <file>../ubuntu_one_favicon.png</file> | ||
662 | 17 | <file>../win_installer_graphic.png</file> | ||
663 | 18 | <file>../folder.png</file> | ||
664 | 19 | </qresource> | ||
665 | 20 | </RCC> | ||
666 | 21 | 0 | ||
667 | === removed file 'data/qt/license.ui' | |||
668 | --- data/qt/license.ui 2011-09-07 11:30:30 +0000 | |||
669 | +++ data/qt/license.ui 1970-01-01 00:00:00 +0000 | |||
670 | @@ -1,34 +0,0 @@ | |||
671 | 1 | <?xml version="1.0" encoding="UTF-8"?> | ||
672 | 2 | <ui version="4.0"> | ||
673 | 3 | <class>Form</class> | ||
674 | 4 | <widget class="QWidget" name="Form"> | ||
675 | 5 | <property name="geometry"> | ||
676 | 6 | <rect> | ||
677 | 7 | <x>0</x> | ||
678 | 8 | <y>0</y> | ||
679 | 9 | <width>400</width> | ||
680 | 10 | <height>300</height> | ||
681 | 11 | </rect> | ||
682 | 12 | </property> | ||
683 | 13 | <property name="windowTitle"> | ||
684 | 14 | <string>Form</string> | ||
685 | 15 | </property> | ||
686 | 16 | <layout class="QVBoxLayout" name="verticalLayout"> | ||
687 | 17 | <property name="topMargin"> | ||
688 | 18 | <number>0</number> | ||
689 | 19 | </property> | ||
690 | 20 | <item> | ||
691 | 21 | <widget class="QTextBrowser" name="textBrowser"> | ||
692 | 22 | <property name="openExternalLinks"> | ||
693 | 23 | <bool>true</bool> | ||
694 | 24 | </property> | ||
695 | 25 | <property name="openLinks"> | ||
696 | 26 | <bool>true</bool> | ||
697 | 27 | </property> | ||
698 | 28 | </widget> | ||
699 | 29 | </item> | ||
700 | 30 | </layout> | ||
701 | 31 | </widget> | ||
702 | 32 | <resources/> | ||
703 | 33 | <connections/> | ||
704 | 34 | </ui> | ||
705 | 35 | 0 | ||
706 | === removed file 'data/qt/local_folders.ui' | |||
707 | --- data/qt/local_folders.ui 2011-09-08 02:33:23 +0000 | |||
708 | +++ data/qt/local_folders.ui 1970-01-01 00:00:00 +0000 | |||
709 | @@ -1,172 +0,0 @@ | |||
710 | 1 | <?xml version="1.0" encoding="UTF-8"?> | ||
711 | 2 | <ui version="4.0"> | ||
712 | 3 | <class>Form</class> | ||
713 | 4 | <widget class="QWidget" name="Form"> | ||
714 | 5 | <property name="geometry"> | ||
715 | 6 | <rect> | ||
716 | 7 | <x>0</x> | ||
717 | 8 | <y>0</y> | ||
718 | 9 | <width>519</width> | ||
719 | 10 | <height>536</height> | ||
720 | 11 | </rect> | ||
721 | 12 | </property> | ||
722 | 13 | <property name="windowTitle"> | ||
723 | 14 | <string>Form</string> | ||
724 | 15 | </property> | ||
725 | 16 | <layout class="QVBoxLayout" name="verticalLayout_2"> | ||
726 | 17 | <property name="topMargin"> | ||
727 | 18 | <number>0</number> | ||
728 | 19 | </property> | ||
729 | 20 | <item> | ||
730 | 21 | <widget class="QLabel" name="label"> | ||
731 | 22 | <property name="text"> | ||
732 | 23 | <string>Ok! Now it's time to choose which folder sync to the cloud from this computer. | ||
733 | 24 | We started by suggesting a few.</string> | ||
734 | 25 | </property> | ||
735 | 26 | <property name="textFormat"> | ||
736 | 27 | <enum>Qt::PlainText</enum> | ||
737 | 28 | </property> | ||
738 | 29 | <property name="wordWrap"> | ||
739 | 30 | <bool>true</bool> | ||
740 | 31 | </property> | ||
741 | 32 | </widget> | ||
742 | 33 | </item> | ||
743 | 34 | <item> | ||
744 | 35 | <widget class="QTreeWidget" name="folder_list"> | ||
745 | 36 | <property name="indentation"> | ||
746 | 37 | <number>0</number> | ||
747 | 38 | </property> | ||
748 | 39 | <property name="rootIsDecorated"> | ||
749 | 40 | <bool>false</bool> | ||
750 | 41 | </property> | ||
751 | 42 | <property name="uniformRowHeights"> | ||
752 | 43 | <bool>true</bool> | ||
753 | 44 | </property> | ||
754 | 45 | <property name="allColumnsShowFocus"> | ||
755 | 46 | <bool>true</bool> | ||
756 | 47 | </property> | ||
757 | 48 | <attribute name="headerStretchLastSection"> | ||
758 | 49 | <bool>false</bool> | ||
759 | 50 | </attribute> | ||
760 | 51 | <column> | ||
761 | 52 | <property name="text"> | ||
762 | 53 | <string>Sync these folders on my computer</string> | ||
763 | 54 | </property> | ||
764 | 55 | </column> | ||
765 | 56 | <column> | ||
766 | 57 | <property name="text"> | ||
767 | 58 | <string>Space (Total)</string> | ||
768 | 59 | </property> | ||
769 | 60 | </column> | ||
770 | 61 | </widget> | ||
771 | 62 | </item> | ||
772 | 63 | <item> | ||
773 | 64 | <layout class="QHBoxLayout" name="horizontalLayout_3"> | ||
774 | 65 | <item> | ||
775 | 66 | <spacer name="horizontalSpacer_4"> | ||
776 | 67 | <property name="orientation"> | ||
777 | 68 | <enum>Qt::Horizontal</enum> | ||
778 | 69 | </property> | ||
779 | 70 | <property name="sizeHint" stdset="0"> | ||
780 | 71 | <size> | ||
781 | 72 | <width>40</width> | ||
782 | 73 | <height>20</height> | ||
783 | 74 | </size> | ||
784 | 75 | </property> | ||
785 | 76 | </spacer> | ||
786 | 77 | </item> | ||
787 | 78 | <item> | ||
788 | 79 | <widget class="QPushButton" name="add_folder_button"> | ||
789 | 80 | <property name="text"> | ||
790 | 81 | <string>Add a folder from this computer</string> | ||
791 | 82 | </property> | ||
792 | 83 | <property name="DisabledState" stdset="0"> | ||
793 | 84 | <bool>false</bool> | ||
794 | 85 | </property> | ||
795 | 86 | </widget> | ||
796 | 87 | </item> | ||
797 | 88 | <item> | ||
798 | 89 | <spacer name="horizontalSpacer_5"> | ||
799 | 90 | <property name="orientation"> | ||
800 | 91 | <enum>Qt::Horizontal</enum> | ||
801 | 92 | </property> | ||
802 | 93 | <property name="sizeHint" stdset="0"> | ||
803 | 94 | <size> | ||
804 | 95 | <width>40</width> | ||
805 | 96 | <height>20</height> | ||
806 | 97 | </size> | ||
807 | 98 | </property> | ||
808 | 99 | </spacer> | ||
809 | 100 | </item> | ||
810 | 101 | </layout> | ||
811 | 102 | </item> | ||
812 | 103 | <item> | ||
813 | 104 | <widget class="QFrame" name="offer_frame"> | ||
814 | 105 | <property name="frameShape"> | ||
815 | 106 | <enum>QFrame::StyledPanel</enum> | ||
816 | 107 | </property> | ||
817 | 108 | <property name="frameShadow"> | ||
818 | 109 | <enum>QFrame::Raised</enum> | ||
819 | 110 | </property> | ||
820 | 111 | <layout class="QVBoxLayout" name="verticalLayout"> | ||
821 | 112 | <property name="leftMargin"> | ||
822 | 113 | <number>0</number> | ||
823 | 114 | </property> | ||
824 | 115 | <property name="rightMargin"> | ||
825 | 116 | <number>0</number> | ||
826 | 117 | </property> | ||
827 | 118 | <item> | ||
828 | 119 | <widget class="QLabel" name="offer_label"> | ||
829 | 120 | <property name="text"> | ||
830 | 121 | <string>The folders you have selected to sync take over your 5GB storage space by 6.5GB. You can remove some folders or add some extra storage now.</string> | ||
831 | 122 | </property> | ||
832 | 123 | <property name="wordWrap"> | ||
833 | 124 | <bool>true</bool> | ||
834 | 125 | </property> | ||
835 | 126 | </widget> | ||
836 | 127 | </item> | ||
837 | 128 | <item> | ||
838 | 129 | <layout class="QHBoxLayout" name="horizontalLayout"> | ||
839 | 130 | <item> | ||
840 | 131 | <spacer name="horizontalSpacer"> | ||
841 | 132 | <property name="orientation"> | ||
842 | 133 | <enum>Qt::Horizontal</enum> | ||
843 | 134 | </property> | ||
844 | 135 | <property name="sizeHint" stdset="0"> | ||
845 | 136 | <size> | ||
846 | 137 | <width>40</width> | ||
847 | 138 | <height>20</height> | ||
848 | 139 | </size> | ||
849 | 140 | </property> | ||
850 | 141 | </spacer> | ||
851 | 142 | </item> | ||
852 | 143 | <item> | ||
853 | 144 | <widget class="QPushButton" name="add_storage_button"> | ||
854 | 145 | <property name="text"> | ||
855 | 146 | <string>Add more storage</string> | ||
856 | 147 | </property> | ||
857 | 148 | </widget> | ||
858 | 149 | </item> | ||
859 | 150 | <item> | ||
860 | 151 | <spacer name="horizontalSpacer_2"> | ||
861 | 152 | <property name="orientation"> | ||
862 | 153 | <enum>Qt::Horizontal</enum> | ||
863 | 154 | </property> | ||
864 | 155 | <property name="sizeHint" stdset="0"> | ||
865 | 156 | <size> | ||
866 | 157 | <width>40</width> | ||
867 | 158 | <height>20</height> | ||
868 | 159 | </size> | ||
869 | 160 | </property> | ||
870 | 161 | </spacer> | ||
871 | 162 | </item> | ||
872 | 163 | </layout> | ||
873 | 164 | </item> | ||
874 | 165 | </layout> | ||
875 | 166 | </widget> | ||
876 | 167 | </item> | ||
877 | 168 | </layout> | ||
878 | 169 | </widget> | ||
879 | 170 | <resources/> | ||
880 | 171 | <connections/> | ||
881 | 172 | </ui> | ||
882 | 173 | 0 | ||
883 | === removed file 'data/qt/network_detection.ui' | |||
884 | --- data/qt/network_detection.ui 2011-09-26 20:28:46 +0000 | |||
885 | +++ data/qt/network_detection.ui 1970-01-01 00:00:00 +0000 | |||
886 | @@ -1,150 +0,0 @@ | |||
887 | 1 | <?xml version="1.0" encoding="UTF-8"?> | ||
888 | 2 | <ui version="4.0"> | ||
889 | 3 | <class>Form</class> | ||
890 | 4 | <widget class="QWizardPage" name="Form"> | ||
891 | 5 | <property name="geometry"> | ||
892 | 6 | <rect> | ||
893 | 7 | <x>0</x> | ||
894 | 8 | <y>0</y> | ||
895 | 9 | <width>541</width> | ||
896 | 10 | <height>365</height> | ||
897 | 11 | </rect> | ||
898 | 12 | </property> | ||
899 | 13 | <property name="windowTitle"> | ||
900 | 14 | <string>WizardPage</string> | ||
901 | 15 | </property> | ||
902 | 16 | <layout class="QVBoxLayout" name="verticalLayout"> | ||
903 | 17 | <item> | ||
904 | 18 | <layout class="QHBoxLayout" name="horizontalLayout_2"> | ||
905 | 19 | <item> | ||
906 | 20 | <spacer name="horizontalSpacer_3"> | ||
907 | 21 | <property name="orientation"> | ||
908 | 22 | <enum>Qt::Horizontal</enum> | ||
909 | 23 | </property> | ||
910 | 24 | <property name="sizeHint" stdset="0"> | ||
911 | 25 | <size> | ||
912 | 26 | <width>40</width> | ||
913 | 27 | <height>20</height> | ||
914 | 28 | </size> | ||
915 | 29 | </property> | ||
916 | 30 | </spacer> | ||
917 | 31 | </item> | ||
918 | 32 | <item> | ||
919 | 33 | <widget class="QLabel" name="image_label"> | ||
920 | 34 | <property name="sizePolicy"> | ||
921 | 35 | <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> | ||
922 | 36 | <horstretch>0</horstretch> | ||
923 | 37 | <verstretch>0</verstretch> | ||
924 | 38 | </sizepolicy> | ||
925 | 39 | </property> | ||
926 | 40 | <property name="minimumSize"> | ||
927 | 41 | <size> | ||
928 | 42 | <width>400</width> | ||
929 | 43 | <height>150</height> | ||
930 | 44 | </size> | ||
931 | 45 | </property> | ||
932 | 46 | <property name="text"> | ||
933 | 47 | <string/> | ||
934 | 48 | </property> | ||
935 | 49 | <property name="textFormat"> | ||
936 | 50 | <enum>Qt::PlainText</enum> | ||
937 | 51 | </property> | ||
938 | 52 | <property name="pixmap"> | ||
939 | 53 | <pixmap resource="images.qrc">:/win_installer_graphic.png</pixmap> | ||
940 | 54 | </property> | ||
941 | 55 | <property name="alignment"> | ||
942 | 56 | <set>Qt::AlignCenter</set> | ||
943 | 57 | </property> | ||
944 | 58 | <property name="wordWrap"> | ||
945 | 59 | <bool>true</bool> | ||
946 | 60 | </property> | ||
947 | 61 | </widget> | ||
948 | 62 | </item> | ||
949 | 63 | <item> | ||
950 | 64 | <spacer name="horizontalSpacer_4"> | ||
951 | 65 | <property name="orientation"> | ||
952 | 66 | <enum>Qt::Horizontal</enum> | ||
953 | 67 | </property> | ||
954 | 68 | <property name="sizeHint" stdset="0"> | ||
955 | 69 | <size> | ||
956 | 70 | <width>40</width> | ||
957 | 71 | <height>20</height> | ||
958 | 72 | </size> | ||
959 | 73 | </property> | ||
960 | 74 | </spacer> | ||
961 | 75 | </item> | ||
962 | 76 | </layout> | ||
963 | 77 | </item> | ||
964 | 78 | <item> | ||
965 | 79 | <widget class="QLabel" name="message_label"> | ||
966 | 80 | <property name="text"> | ||
967 | 81 | <string>Ubuntu One has installed!</string> | ||
968 | 82 | </property> | ||
969 | 83 | <property name="alignment"> | ||
970 | 84 | <set>Qt::AlignCenter</set> | ||
971 | 85 | </property> | ||
972 | 86 | </widget> | ||
973 | 87 | </item> | ||
974 | 88 | <item> | ||
975 | 89 | <layout class="QHBoxLayout" name="horizontalLayout"> | ||
976 | 90 | <item> | ||
977 | 91 | <spacer name="horizontalSpacer"> | ||
978 | 92 | <property name="orientation"> | ||
979 | 93 | <enum>Qt::Horizontal</enum> | ||
980 | 94 | </property> | ||
981 | 95 | <property name="sizeHint" stdset="0"> | ||
982 | 96 | <size> | ||
983 | 97 | <width>40</width> | ||
984 | 98 | <height>20</height> | ||
985 | 99 | </size> | ||
986 | 100 | </property> | ||
987 | 101 | </spacer> | ||
988 | 102 | </item> | ||
989 | 103 | <item> | ||
990 | 104 | <widget class="QLabel" name="label"> | ||
991 | 105 | <property name="text"> | ||
992 | 106 | <string>Are you online? We can't detect an internet connection - you will need to be connected to set up Ubuntu One</string> | ||
993 | 107 | </property> | ||
994 | 108 | <property name="textFormat"> | ||
995 | 109 | <enum>Qt::PlainText</enum> | ||
996 | 110 | </property> | ||
997 | 111 | <property name="wordWrap"> | ||
998 | 112 | <bool>true</bool> | ||
999 | 113 | </property> | ||
1000 | 114 | </widget> | ||
1001 | 115 | </item> | ||
1002 | 116 | <item> | ||
1003 | 117 | <spacer name="horizontalSpacer_2"> | ||
1004 | 118 | <property name="orientation"> | ||
1005 | 119 | <enum>Qt::Horizontal</enum> | ||
1006 | 120 | </property> | ||
1007 | 121 | <property name="sizeHint" stdset="0"> | ||
1008 | 122 | <size> | ||
1009 | 123 | <width>40</width> | ||
1010 | 124 | <height>20</height> | ||
1011 | 125 | </size> | ||
1012 | 126 | </property> | ||
1013 | 127 | </spacer> | ||
1014 | 128 | </item> | ||
1015 | 129 | </layout> | ||
1016 | 130 | </item> | ||
1017 | 131 | <item> | ||
1018 | 132 | <spacer name="verticalSpacer"> | ||
1019 | 133 | <property name="orientation"> | ||
1020 | 134 | <enum>Qt::Vertical</enum> | ||
1021 | 135 | </property> | ||
1022 | 136 | <property name="sizeHint" stdset="0"> | ||
1023 | 137 | <size> | ||
1024 | 138 | <width>20</width> | ||
1025 | 139 | <height>76</height> | ||
1026 | 140 | </size> | ||
1027 | 141 | </property> | ||
1028 | 142 | </spacer> | ||
1029 | 143 | </item> | ||
1030 | 144 | </layout> | ||
1031 | 145 | </widget> | ||
1032 | 146 | <resources> | ||
1033 | 147 | <include location="images.qrc"/> | ||
1034 | 148 | </resources> | ||
1035 | 149 | <connections/> | ||
1036 | 150 | </ui> | ||
1037 | 151 | 0 | ||
1038 | === removed file 'data/qt/preferences.ui' | |||
1039 | --- data/qt/preferences.ui 2011-09-02 12:58:29 +0000 | |||
1040 | +++ data/qt/preferences.ui 1970-01-01 00:00:00 +0000 | |||
1041 | @@ -1,24 +0,0 @@ | |||
1042 | 1 | <?xml version="1.0" encoding="UTF-8"?> | ||
1043 | 2 | <ui version="4.0"> | ||
1044 | 3 | <class>Form</class> | ||
1045 | 4 | <widget class="QWidget" name="Form"> | ||
1046 | 5 | <property name="geometry"> | ||
1047 | 6 | <rect> | ||
1048 | 7 | <x>0</x> | ||
1049 | 8 | <y>0</y> | ||
1050 | 9 | <width>480</width> | ||
1051 | 10 | <height>374</height> | ||
1052 | 11 | </rect> | ||
1053 | 12 | </property> | ||
1054 | 13 | <property name="windowTitle"> | ||
1055 | 14 | <string>Form</string> | ||
1056 | 15 | </property> | ||
1057 | 16 | <layout class="QVBoxLayout" name="verticalLayout"> | ||
1058 | 17 | <property name="topMargin"> | ||
1059 | 18 | <number>0</number> | ||
1060 | 19 | </property> | ||
1061 | 20 | </layout> | ||
1062 | 21 | </widget> | ||
1063 | 22 | <resources/> | ||
1064 | 23 | <connections/> | ||
1065 | 24 | </ui> | ||
1066 | 25 | 0 | ||
1067 | === removed file 'data/qt/setup_account.ui' | |||
1068 | --- data/qt/setup_account.ui 2011-09-02 12:58:29 +0000 | |||
1069 | +++ data/qt/setup_account.ui 1970-01-01 00:00:00 +0000 | |||
1070 | @@ -1,670 +0,0 @@ | |||
1071 | 1 | <?xml version="1.0" encoding="UTF-8"?> | ||
1072 | 2 | <ui version="4.0"> | ||
1073 | 3 | <class>SetUpAccountPage</class> | ||
1074 | 4 | <widget class="QWizardPage" name="SetUpAccountPage"> | ||
1075 | 5 | <property name="geometry"> | ||
1076 | 6 | <rect> | ||
1077 | 7 | <x>0</x> | ||
1078 | 8 | <y>0</y> | ||
1079 | 9 | <width>543</width> | ||
1080 | 10 | <height>523</height> | ||
1081 | 11 | </rect> | ||
1082 | 12 | </property> | ||
1083 | 13 | <property name="sizePolicy"> | ||
1084 | 14 | <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> | ||
1085 | 15 | <horstretch>0</horstretch> | ||
1086 | 16 | <verstretch>0</verstretch> | ||
1087 | 17 | </sizepolicy> | ||
1088 | 18 | </property> | ||
1089 | 19 | <property name="maximumSize"> | ||
1090 | 20 | <size> | ||
1091 | 21 | <width>16777215</width> | ||
1092 | 22 | <height>16777215</height> | ||
1093 | 23 | </size> | ||
1094 | 24 | </property> | ||
1095 | 25 | <property name="windowTitle"> | ||
1096 | 26 | <string>WizardPage</string> | ||
1097 | 27 | </property> | ||
1098 | 28 | <layout class="QVBoxLayout" name="verticalLayout"> | ||
1099 | 29 | <property name="spacing"> | ||
1100 | 30 | <number>0</number> | ||
1101 | 31 | </property> | ||
1102 | 32 | <property name="leftMargin"> | ||
1103 | 33 | <number>0</number> | ||
1104 | 34 | </property> | ||
1105 | 35 | <property name="topMargin"> | ||
1106 | 36 | <number>0</number> | ||
1107 | 37 | </property> | ||
1108 | 38 | <property name="rightMargin"> | ||
1109 | 39 | <number>3</number> | ||
1110 | 40 | </property> | ||
1111 | 41 | <property name="bottomMargin"> | ||
1112 | 42 | <number>0</number> | ||
1113 | 43 | </property> | ||
1114 | 44 | <item> | ||
1115 | 45 | <layout class="QGridLayout" name="gridLayout" columnminimumwidth="310,220"> | ||
1116 | 46 | <item row="0" column="0"> | ||
1117 | 47 | <widget class="QLabel" name="password_info_label"> | ||
1118 | 48 | <property name="sizePolicy"> | ||
1119 | 49 | <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> | ||
1120 | 50 | <horstretch>0</horstretch> | ||
1121 | 51 | <verstretch>0</verstretch> | ||
1122 | 52 | </sizepolicy> | ||
1123 | 53 | </property> | ||
1124 | 54 | <property name="text"> | ||
1125 | 55 | <string>If you can't read this then <a href="example.com"><span style=" text-decoration: underline; color:#dd4814;">refresh</span></a> this page</span></string> | ||
1126 | 56 | </property> | ||
1127 | 57 | <property name="wordWrap"> | ||
1128 | 58 | <bool>true</bool> | ||
1129 | 59 | </property> | ||
1130 | 60 | </widget> | ||
1131 | 61 | </item> | ||
1132 | 62 | <item row="1" column="0"> | ||
1133 | 63 | <layout class="QVBoxLayout" name="verticalLayout"> | ||
1134 | 64 | <property name="spacing"> | ||
1135 | 65 | <number>3</number> | ||
1136 | 66 | </property> | ||
1137 | 67 | <item> | ||
1138 | 68 | <widget class="QLabel" name="name_label"> | ||
1139 | 69 | <property name="font"> | ||
1140 | 70 | <font> | ||
1141 | 71 | <weight>75</weight> | ||
1142 | 72 | <bold>true</bold> | ||
1143 | 73 | </font> | ||
1144 | 74 | </property> | ||
1145 | 75 | <property name="text"> | ||
1146 | 76 | <string>name_label</string> | ||
1147 | 77 | </property> | ||
1148 | 78 | </widget> | ||
1149 | 79 | </item> | ||
1150 | 80 | <item> | ||
1151 | 81 | <widget class="QLineEdit" name="name_edit"> | ||
1152 | 82 | <property name="sizePolicy"> | ||
1153 | 83 | <sizepolicy hsizetype="Minimum" vsizetype="Fixed"> | ||
1154 | 84 | <horstretch>0</horstretch> | ||
1155 | 85 | <verstretch>0</verstretch> | ||
1156 | 86 | </sizepolicy> | ||
1157 | 87 | </property> | ||
1158 | 88 | <property name="minimumSize"> | ||
1159 | 89 | <size> | ||
1160 | 90 | <width>300</width> | ||
1161 | 91 | <height>0</height> | ||
1162 | 92 | </size> | ||
1163 | 93 | </property> | ||
1164 | 94 | <property name="maximumSize"> | ||
1165 | 95 | <size> | ||
1166 | 96 | <width>300</width> | ||
1167 | 97 | <height>16777215</height> | ||
1168 | 98 | </size> | ||
1169 | 99 | </property> | ||
1170 | 100 | <property name="font"> | ||
1171 | 101 | <font> | ||
1172 | 102 | <pointsize>11</pointsize> | ||
1173 | 103 | </font> | ||
1174 | 104 | </property> | ||
1175 | 105 | <property name="formError" stdset="0"> | ||
1176 | 106 | <bool>false</bool> | ||
1177 | 107 | </property> | ||
1178 | 108 | </widget> | ||
1179 | 109 | </item> | ||
1180 | 110 | </layout> | ||
1181 | 111 | </item> | ||
1182 | 112 | <item row="3" column="0"> | ||
1183 | 113 | <layout class="QVBoxLayout" name="verticalLayout"> | ||
1184 | 114 | <property name="spacing"> | ||
1185 | 115 | <number>3</number> | ||
1186 | 116 | </property> | ||
1187 | 117 | <item> | ||
1188 | 118 | <widget class="QLabel" name="email_label"> | ||
1189 | 119 | <property name="font"> | ||
1190 | 120 | <font> | ||
1191 | 121 | <weight>75</weight> | ||
1192 | 122 | <bold>true</bold> | ||
1193 | 123 | </font> | ||
1194 | 124 | </property> | ||
1195 | 125 | <property name="text"> | ||
1196 | 126 | <string>email_label</string> | ||
1197 | 127 | </property> | ||
1198 | 128 | </widget> | ||
1199 | 129 | </item> | ||
1200 | 130 | <item> | ||
1201 | 131 | <widget class="QLineEdit" name="email_edit"> | ||
1202 | 132 | <property name="sizePolicy"> | ||
1203 | 133 | <sizepolicy hsizetype="Minimum" vsizetype="Fixed"> | ||
1204 | 134 | <horstretch>0</horstretch> | ||
1205 | 135 | <verstretch>0</verstretch> | ||
1206 | 136 | </sizepolicy> | ||
1207 | 137 | </property> | ||
1208 | 138 | <property name="minimumSize"> | ||
1209 | 139 | <size> | ||
1210 | 140 | <width>300</width> | ||
1211 | 141 | <height>0</height> | ||
1212 | 142 | </size> | ||
1213 | 143 | </property> | ||
1214 | 144 | <property name="maximumSize"> | ||
1215 | 145 | <size> | ||
1216 | 146 | <width>300</width> | ||
1217 | 147 | <height>16777215</height> | ||
1218 | 148 | </size> | ||
1219 | 149 | </property> | ||
1220 | 150 | <property name="font"> | ||
1221 | 151 | <font> | ||
1222 | 152 | <pointsize>11</pointsize> | ||
1223 | 153 | </font> | ||
1224 | 154 | </property> | ||
1225 | 155 | <property name="placeholderText"> | ||
1226 | 156 | <string/> | ||
1227 | 157 | </property> | ||
1228 | 158 | <property name="formError" stdset="0"> | ||
1229 | 159 | <bool>false</bool> | ||
1230 | 160 | </property> | ||
1231 | 161 | </widget> | ||
1232 | 162 | </item> | ||
1233 | 163 | </layout> | ||
1234 | 164 | </item> | ||
1235 | 165 | <item row="4" column="0"> | ||
1236 | 166 | <layout class="QVBoxLayout" name="verticalLayout"> | ||
1237 | 167 | <property name="spacing"> | ||
1238 | 168 | <number>3</number> | ||
1239 | 169 | </property> | ||
1240 | 170 | <item> | ||
1241 | 171 | <widget class="QLabel" name="confirm_email_label"> | ||
1242 | 172 | <property name="font"> | ||
1243 | 173 | <font> | ||
1244 | 174 | <weight>75</weight> | ||
1245 | 175 | <bold>true</bold> | ||
1246 | 176 | </font> | ||
1247 | 177 | </property> | ||
1248 | 178 | <property name="text"> | ||
1249 | 179 | <string>confirm_email_label</string> | ||
1250 | 180 | </property> | ||
1251 | 181 | </widget> | ||
1252 | 182 | </item> | ||
1253 | 183 | <item> | ||
1254 | 184 | <widget class="QLineEdit" name="confirm_email_edit"> | ||
1255 | 185 | <property name="sizePolicy"> | ||
1256 | 186 | <sizepolicy hsizetype="Minimum" vsizetype="Fixed"> | ||
1257 | 187 | <horstretch>0</horstretch> | ||
1258 | 188 | <verstretch>0</verstretch> | ||
1259 | 189 | </sizepolicy> | ||
1260 | 190 | </property> | ||
1261 | 191 | <property name="minimumSize"> | ||
1262 | 192 | <size> | ||
1263 | 193 | <width>300</width> | ||
1264 | 194 | <height>0</height> | ||
1265 | 195 | </size> | ||
1266 | 196 | </property> | ||
1267 | 197 | <property name="maximumSize"> | ||
1268 | 198 | <size> | ||
1269 | 199 | <width>300</width> | ||
1270 | 200 | <height>16777215</height> | ||
1271 | 201 | </size> | ||
1272 | 202 | </property> | ||
1273 | 203 | <property name="font"> | ||
1274 | 204 | <font> | ||
1275 | 205 | <pointsize>11</pointsize> | ||
1276 | 206 | </font> | ||
1277 | 207 | </property> | ||
1278 | 208 | <property name="placeholderText"> | ||
1279 | 209 | <string/> | ||
1280 | 210 | </property> | ||
1281 | 211 | <property name="formError" stdset="0"> | ||
1282 | 212 | <bool>false</bool> | ||
1283 | 213 | </property> | ||
1284 | 214 | </widget> | ||
1285 | 215 | </item> | ||
1286 | 216 | </layout> | ||
1287 | 217 | </item> | ||
1288 | 218 | <item row="6" column="0"> | ||
1289 | 219 | <layout class="QVBoxLayout" name="verticalLayout"> | ||
1290 | 220 | <property name="spacing"> | ||
1291 | 221 | <number>3</number> | ||
1292 | 222 | </property> | ||
1293 | 223 | <item> | ||
1294 | 224 | <widget class="QLabel" name="password_label"> | ||
1295 | 225 | <property name="font"> | ||
1296 | 226 | <font> | ||
1297 | 227 | <weight>75</weight> | ||
1298 | 228 | <bold>true</bold> | ||
1299 | 229 | </font> | ||
1300 | 230 | </property> | ||
1301 | 231 | <property name="text"> | ||
1302 | 232 | <string>password_label</string> | ||
1303 | 233 | </property> | ||
1304 | 234 | </widget> | ||
1305 | 235 | </item> | ||
1306 | 236 | <item> | ||
1307 | 237 | <widget class="QLineEdit" name="password_edit"> | ||
1308 | 238 | <property name="sizePolicy"> | ||
1309 | 239 | <sizepolicy hsizetype="Minimum" vsizetype="Fixed"> | ||
1310 | 240 | <horstretch>0</horstretch> | ||
1311 | 241 | <verstretch>0</verstretch> | ||
1312 | 242 | </sizepolicy> | ||
1313 | 243 | </property> | ||
1314 | 244 | <property name="minimumSize"> | ||
1315 | 245 | <size> | ||
1316 | 246 | <width>300</width> | ||
1317 | 247 | <height>0</height> | ||
1318 | 248 | </size> | ||
1319 | 249 | </property> | ||
1320 | 250 | <property name="maximumSize"> | ||
1321 | 251 | <size> | ||
1322 | 252 | <width>300</width> | ||
1323 | 253 | <height>16777215</height> | ||
1324 | 254 | </size> | ||
1325 | 255 | </property> | ||
1326 | 256 | <property name="font"> | ||
1327 | 257 | <font> | ||
1328 | 258 | <pointsize>11</pointsize> | ||
1329 | 259 | </font> | ||
1330 | 260 | </property> | ||
1331 | 261 | <property name="toolTip"> | ||
1332 | 262 | <string>Your password must be at least 8 characters long and at least contain one number and one upper later.</string> | ||
1333 | 263 | </property> | ||
1334 | 264 | <property name="statusTip"> | ||
1335 | 265 | <string/> | ||
1336 | 266 | </property> | ||
1337 | 267 | <property name="echoMode"> | ||
1338 | 268 | <enum>QLineEdit::Password</enum> | ||
1339 | 269 | </property> | ||
1340 | 270 | <property name="placeholderText"> | ||
1341 | 271 | <string/> | ||
1342 | 272 | </property> | ||
1343 | 273 | <property name="formError" stdset="0"> | ||
1344 | 274 | <bool>false</bool> | ||
1345 | 275 | </property> | ||
1346 | 276 | </widget> | ||
1347 | 277 | </item> | ||
1348 | 278 | </layout> | ||
1349 | 279 | </item> | ||
1350 | 280 | <item row="7" column="0"> | ||
1351 | 281 | <layout class="QVBoxLayout" name="verticalLayout"> | ||
1352 | 282 | <property name="spacing"> | ||
1353 | 283 | <number>3</number> | ||
1354 | 284 | </property> | ||
1355 | 285 | <item> | ||
1356 | 286 | <widget class="QLabel" name="confirm_password_label"> | ||
1357 | 287 | <property name="font"> | ||
1358 | 288 | <font> | ||
1359 | 289 | <weight>75</weight> | ||
1360 | 290 | <bold>true</bold> | ||
1361 | 291 | </font> | ||
1362 | 292 | </property> | ||
1363 | 293 | <property name="text"> | ||
1364 | 294 | <string>confirm_password_label</string> | ||
1365 | 295 | </property> | ||
1366 | 296 | </widget> | ||
1367 | 297 | </item> | ||
1368 | 298 | <item> | ||
1369 | 299 | <widget class="QLineEdit" name="confirm_password_edit"> | ||
1370 | 300 | <property name="sizePolicy"> | ||
1371 | 301 | <sizepolicy hsizetype="Minimum" vsizetype="Fixed"> | ||
1372 | 302 | <horstretch>0</horstretch> | ||
1373 | 303 | <verstretch>0</verstretch> | ||
1374 | 304 | </sizepolicy> | ||
1375 | 305 | </property> | ||
1376 | 306 | <property name="minimumSize"> | ||
1377 | 307 | <size> | ||
1378 | 308 | <width>300</width> | ||
1379 | 309 | <height>0</height> | ||
1380 | 310 | </size> | ||
1381 | 311 | </property> | ||
1382 | 312 | <property name="maximumSize"> | ||
1383 | 313 | <size> | ||
1384 | 314 | <width>300</width> | ||
1385 | 315 | <height>16777215</height> | ||
1386 | 316 | </size> | ||
1387 | 317 | </property> | ||
1388 | 318 | <property name="font"> | ||
1389 | 319 | <font> | ||
1390 | 320 | <pointsize>11</pointsize> | ||
1391 | 321 | </font> | ||
1392 | 322 | </property> | ||
1393 | 323 | <property name="echoMode"> | ||
1394 | 324 | <enum>QLineEdit::Password</enum> | ||
1395 | 325 | </property> | ||
1396 | 326 | <property name="placeholderText"> | ||
1397 | 327 | <string/> | ||
1398 | 328 | </property> | ||
1399 | 329 | <property name="formError" stdset="0"> | ||
1400 | 330 | <bool>false</bool> | ||
1401 | 331 | </property> | ||
1402 | 332 | </widget> | ||
1403 | 333 | </item> | ||
1404 | 334 | </layout> | ||
1405 | 335 | </item> | ||
1406 | 336 | <item row="9" column="0"> | ||
1407 | 337 | <layout class="QVBoxLayout" name="verticalLayout"> | ||
1408 | 338 | <property name="spacing"> | ||
1409 | 339 | <number>3</number> | ||
1410 | 340 | </property> | ||
1411 | 341 | <item> | ||
1412 | 342 | <widget class="QLabel" name="captcha_view"> | ||
1413 | 343 | <property name="sizePolicy"> | ||
1414 | 344 | <sizepolicy hsizetype="Minimum" vsizetype="Fixed"> | ||
1415 | 345 | <horstretch>0</horstretch> | ||
1416 | 346 | <verstretch>0</verstretch> | ||
1417 | 347 | </sizepolicy> | ||
1418 | 348 | </property> | ||
1419 | 349 | <property name="minimumSize"> | ||
1420 | 350 | <size> | ||
1421 | 351 | <width>300</width> | ||
1422 | 352 | <height>57</height> | ||
1423 | 353 | </size> | ||
1424 | 354 | </property> | ||
1425 | 355 | <property name="maximumSize"> | ||
1426 | 356 | <size> | ||
1427 | 357 | <width>300</width> | ||
1428 | 358 | <height>16777215</height> | ||
1429 | 359 | </size> | ||
1430 | 360 | </property> | ||
1431 | 361 | <property name="styleSheet"> | ||
1432 | 362 | <string notr="true">background-color: white</string> | ||
1433 | 363 | </property> | ||
1434 | 364 | <property name="frameShape"> | ||
1435 | 365 | <enum>QFrame::Box</enum> | ||
1436 | 366 | </property> | ||
1437 | 367 | <property name="text"> | ||
1438 | 368 | <string>If you can't read this then <a href="example.com"><span style=" text-decoration: underline; color:#dd4814;">refresh</span></a> this page</span></string> | ||
1439 | 369 | </property> | ||
1440 | 370 | </widget> | ||
1441 | 371 | </item> | ||
1442 | 372 | <item> | ||
1443 | 373 | <widget class="QLineEdit" name="captcha_solution_edit"> | ||
1444 | 374 | <property name="sizePolicy"> | ||
1445 | 375 | <sizepolicy hsizetype="Minimum" vsizetype="Fixed"> | ||
1446 | 376 | <horstretch>0</horstretch> | ||
1447 | 377 | <verstretch>0</verstretch> | ||
1448 | 378 | </sizepolicy> | ||
1449 | 379 | </property> | ||
1450 | 380 | <property name="minimumSize"> | ||
1451 | 381 | <size> | ||
1452 | 382 | <width>300</width> | ||
1453 | 383 | <height>0</height> | ||
1454 | 384 | </size> | ||
1455 | 385 | </property> | ||
1456 | 386 | <property name="maximumSize"> | ||
1457 | 387 | <size> | ||
1458 | 388 | <width>300</width> | ||
1459 | 389 | <height>16777215</height> | ||
1460 | 390 | </size> | ||
1461 | 391 | </property> | ||
1462 | 392 | <property name="font"> | ||
1463 | 393 | <font> | ||
1464 | 394 | <pointsize>11</pointsize> | ||
1465 | 395 | </font> | ||
1466 | 396 | </property> | ||
1467 | 397 | <property name="locale"> | ||
1468 | 398 | <locale language="English" country="UnitedStates"/> | ||
1469 | 399 | </property> | ||
1470 | 400 | <property name="inputMask"> | ||
1471 | 401 | <string/> | ||
1472 | 402 | </property> | ||
1473 | 403 | <property name="text"> | ||
1474 | 404 | <string/> | ||
1475 | 405 | </property> | ||
1476 | 406 | <property name="placeholderText"> | ||
1477 | 407 | <string/> | ||
1478 | 408 | </property> | ||
1479 | 409 | <property name="formError" stdset="0"> | ||
1480 | 410 | <bool>false</bool> | ||
1481 | 411 | </property> | ||
1482 | 412 | </widget> | ||
1483 | 413 | </item> | ||
1484 | 414 | </layout> | ||
1485 | 415 | </item> | ||
1486 | 416 | <item row="9" column="1"> | ||
1487 | 417 | <widget class="QLabel" name="refresh_label"> | ||
1488 | 418 | <property name="sizePolicy"> | ||
1489 | 419 | <sizepolicy hsizetype="Maximum" vsizetype="Preferred"> | ||
1490 | 420 | <horstretch>0</horstretch> | ||
1491 | 421 | <verstretch>0</verstretch> | ||
1492 | 422 | </sizepolicy> | ||
1493 | 423 | </property> | ||
1494 | 424 | <property name="minimumSize"> | ||
1495 | 425 | <size> | ||
1496 | 426 | <width>220</width> | ||
1497 | 427 | <height>0</height> | ||
1498 | 428 | </size> | ||
1499 | 429 | </property> | ||
1500 | 430 | <property name="maximumSize"> | ||
1501 | 431 | <size> | ||
1502 | 432 | <width>220</width> | ||
1503 | 433 | <height>16777215</height> | ||
1504 | 434 | </size> | ||
1505 | 435 | </property> | ||
1506 | 436 | <property name="locale"> | ||
1507 | 437 | <locale language="English" country="UnitedStates"/> | ||
1508 | 438 | </property> | ||
1509 | 439 | <property name="text"> | ||
1510 | 440 | <string>If you can't read this then <a href="example.com"><span style=" text-decoration: underline; color:#dd4814;">refresh</span></a> this page</span></string> | ||
1511 | 441 | </property> | ||
1512 | 442 | <property name="wordWrap"> | ||
1513 | 443 | <bool>true</bool> | ||
1514 | 444 | </property> | ||
1515 | 445 | <property name="indent"> | ||
1516 | 446 | <number>0</number> | ||
1517 | 447 | </property> | ||
1518 | 448 | </widget> | ||
1519 | 449 | </item> | ||
1520 | 450 | <item row="1" column="1"> | ||
1521 | 451 | <layout class="QVBoxLayout" name="verticalLayout_7"> | ||
1522 | 452 | <property name="spacing"> | ||
1523 | 453 | <number>0</number> | ||
1524 | 454 | </property> | ||
1525 | 455 | <property name="leftMargin"> | ||
1526 | 456 | <number>0</number> | ||
1527 | 457 | </property> | ||
1528 | 458 | <item> | ||
1529 | 459 | <widget class="QLabel" name="name_assistance"> | ||
1530 | 460 | <property name="sizePolicy"> | ||
1531 | 461 | <sizepolicy hsizetype="Maximum" vsizetype="Preferred"> | ||
1532 | 462 | <horstretch>0</horstretch> | ||
1533 | 463 | <verstretch>0</verstretch> | ||
1534 | 464 | </sizepolicy> | ||
1535 | 465 | </property> | ||
1536 | 466 | <property name="minimumSize"> | ||
1537 | 467 | <size> | ||
1538 | 468 | <width>220</width> | ||
1539 | 469 | <height>0</height> | ||
1540 | 470 | </size> | ||
1541 | 471 | </property> | ||
1542 | 472 | <property name="maximumSize"> | ||
1543 | 473 | <size> | ||
1544 | 474 | <width>220</width> | ||
1545 | 475 | <height>16777215</height> | ||
1546 | 476 | </size> | ||
1547 | 477 | </property> | ||
1548 | 478 | <property name="text"> | ||
1549 | 479 | <string>name_assistance</string> | ||
1550 | 480 | </property> | ||
1551 | 481 | <property name="alignment"> | ||
1552 | 482 | <set>Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft</set> | ||
1553 | 483 | </property> | ||
1554 | 484 | <property name="wordWrap"> | ||
1555 | 485 | <bool>true</bool> | ||
1556 | 486 | </property> | ||
1557 | 487 | </widget> | ||
1558 | 488 | </item> | ||
1559 | 489 | </layout> | ||
1560 | 490 | </item> | ||
1561 | 491 | <item row="3" column="1"> | ||
1562 | 492 | <layout class="QVBoxLayout" name="verticalLayout_8"> | ||
1563 | 493 | <property name="spacing"> | ||
1564 | 494 | <number>0</number> | ||
1565 | 495 | </property> | ||
1566 | 496 | <property name="leftMargin"> | ||
1567 | 497 | <number>0</number> | ||
1568 | 498 | </property> | ||
1569 | 499 | <item> | ||
1570 | 500 | <widget class="QLabel" name="email_assistance"> | ||
1571 | 501 | <property name="sizePolicy"> | ||
1572 | 502 | <sizepolicy hsizetype="Maximum" vsizetype="Preferred"> | ||
1573 | 503 | <horstretch>0</horstretch> | ||
1574 | 504 | <verstretch>0</verstretch> | ||
1575 | 505 | </sizepolicy> | ||
1576 | 506 | </property> | ||
1577 | 507 | <property name="minimumSize"> | ||
1578 | 508 | <size> | ||
1579 | 509 | <width>220</width> | ||
1580 | 510 | <height>0</height> | ||
1581 | 511 | </size> | ||
1582 | 512 | </property> | ||
1583 | 513 | <property name="maximumSize"> | ||
1584 | 514 | <size> | ||
1585 | 515 | <width>220</width> | ||
1586 | 516 | <height>16777215</height> | ||
1587 | 517 | </size> | ||
1588 | 518 | </property> | ||
1589 | 519 | <property name="text"> | ||
1590 | 520 | <string>email_assistance</string> | ||
1591 | 521 | </property> | ||
1592 | 522 | <property name="alignment"> | ||
1593 | 523 | <set>Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft</set> | ||
1594 | 524 | </property> | ||
1595 | 525 | <property name="wordWrap"> | ||
1596 | 526 | <bool>true</bool> | ||
1597 | 527 | </property> | ||
1598 | 528 | </widget> | ||
1599 | 529 | </item> | ||
1600 | 530 | </layout> | ||
1601 | 531 | </item> | ||
1602 | 532 | <item row="4" column="1"> | ||
1603 | 533 | <layout class="QVBoxLayout" name="verticalLayout_9"> | ||
1604 | 534 | <property name="spacing"> | ||
1605 | 535 | <number>0</number> | ||
1606 | 536 | </property> | ||
1607 | 537 | <property name="leftMargin"> | ||
1608 | 538 | <number>0</number> | ||
1609 | 539 | </property> | ||
1610 | 540 | <item> | ||
1611 | 541 | <widget class="QLabel" name="confirm_email_assistance"> | ||
1612 | 542 | <property name="sizePolicy"> | ||
1613 | 543 | <sizepolicy hsizetype="Maximum" vsizetype="Preferred"> | ||
1614 | 544 | <horstretch>0</horstretch> | ||
1615 | 545 | <verstretch>0</verstretch> | ||
1616 | 546 | </sizepolicy> | ||
1617 | 547 | </property> | ||
1618 | 548 | <property name="minimumSize"> | ||
1619 | 549 | <size> | ||
1620 | 550 | <width>220</width> | ||
1621 | 551 | <height>0</height> | ||
1622 | 552 | </size> | ||
1623 | 553 | </property> | ||
1624 | 554 | <property name="maximumSize"> | ||
1625 | 555 | <size> | ||
1626 | 556 | <width>220</width> | ||
1627 | 557 | <height>16777215</height> | ||
1628 | 558 | </size> | ||
1629 | 559 | </property> | ||
1630 | 560 | <property name="text"> | ||
1631 | 561 | <string>confirm_email_assistance</string> | ||
1632 | 562 | </property> | ||
1633 | 563 | <property name="alignment"> | ||
1634 | 564 | <set>Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft</set> | ||
1635 | 565 | </property> | ||
1636 | 566 | <property name="wordWrap"> | ||
1637 | 567 | <bool>true</bool> | ||
1638 | 568 | </property> | ||
1639 | 569 | <property name="indent"> | ||
1640 | 570 | <number>0</number> | ||
1641 | 571 | </property> | ||
1642 | 572 | </widget> | ||
1643 | 573 | </item> | ||
1644 | 574 | </layout> | ||
1645 | 575 | </item> | ||
1646 | 576 | <item row="6" column="1" rowspan="2"> | ||
1647 | 577 | <widget class="QLabel" name="password_assistance"> | ||
1648 | 578 | <property name="sizePolicy"> | ||
1649 | 579 | <sizepolicy hsizetype="Maximum" vsizetype="Preferred"> | ||
1650 | 580 | <horstretch>0</horstretch> | ||
1651 | 581 | <verstretch>0</verstretch> | ||
1652 | 582 | </sizepolicy> | ||
1653 | 583 | </property> | ||
1654 | 584 | <property name="minimumSize"> | ||
1655 | 585 | <size> | ||
1656 | 586 | <width>220</width> | ||
1657 | 587 | <height>0</height> | ||
1658 | 588 | </size> | ||
1659 | 589 | </property> | ||
1660 | 590 | <property name="maximumSize"> | ||
1661 | 591 | <size> | ||
1662 | 592 | <width>220</width> | ||
1663 | 593 | <height>16777215</height> | ||
1664 | 594 | </size> | ||
1665 | 595 | </property> | ||
1666 | 596 | <property name="text"> | ||
1667 | 597 | <string>password_assistance</string> | ||
1668 | 598 | </property> | ||
1669 | 599 | <property name="wordWrap"> | ||
1670 | 600 | <bool>true</bool> | ||
1671 | 601 | </property> | ||
1672 | 602 | <property name="indent"> | ||
1673 | 603 | <number>17</number> | ||
1674 | 604 | </property> | ||
1675 | 605 | </widget> | ||
1676 | 606 | </item> | ||
1677 | 607 | <item row="2" column="1"> | ||
1678 | 608 | <spacer name="verticalSpacer"> | ||
1679 | 609 | <property name="orientation"> | ||
1680 | 610 | <enum>Qt::Vertical</enum> | ||
1681 | 611 | </property> | ||
1682 | 612 | <property name="sizeType"> | ||
1683 | 613 | <enum>QSizePolicy::Fixed</enum> | ||
1684 | 614 | </property> | ||
1685 | 615 | <property name="sizeHint" stdset="0"> | ||
1686 | 616 | <size> | ||
1687 | 617 | <width>20</width> | ||
1688 | 618 | <height>15</height> | ||
1689 | 619 | </size> | ||
1690 | 620 | </property> | ||
1691 | 621 | </spacer> | ||
1692 | 622 | </item> | ||
1693 | 623 | <item row="5" column="1"> | ||
1694 | 624 | <spacer name="verticalSpacer_2"> | ||
1695 | 625 | <property name="orientation"> | ||
1696 | 626 | <enum>Qt::Vertical</enum> | ||
1697 | 627 | </property> | ||
1698 | 628 | <property name="sizeType"> | ||
1699 | 629 | <enum>QSizePolicy::Fixed</enum> | ||
1700 | 630 | </property> | ||
1701 | 631 | <property name="sizeHint" stdset="0"> | ||
1702 | 632 | <size> | ||
1703 | 633 | <width>20</width> | ||
1704 | 634 | <height>15</height> | ||
1705 | 635 | </size> | ||
1706 | 636 | </property> | ||
1707 | 637 | </spacer> | ||
1708 | 638 | </item> | ||
1709 | 639 | <item row="8" column="1"> | ||
1710 | 640 | <spacer name="verticalSpacer_3"> | ||
1711 | 641 | <property name="orientation"> | ||
1712 | 642 | <enum>Qt::Vertical</enum> | ||
1713 | 643 | </property> | ||
1714 | 644 | <property name="sizeType"> | ||
1715 | 645 | <enum>QSizePolicy::Fixed</enum> | ||
1716 | 646 | </property> | ||
1717 | 647 | <property name="sizeHint" stdset="0"> | ||
1718 | 648 | <size> | ||
1719 | 649 | <width>20</width> | ||
1720 | 650 | <height>15</height> | ||
1721 | 651 | </size> | ||
1722 | 652 | </property> | ||
1723 | 653 | </spacer> | ||
1724 | 654 | </item> | ||
1725 | 655 | </layout> | ||
1726 | 656 | </item> | ||
1727 | 657 | <item> | ||
1728 | 658 | <layout class="QHBoxLayout" name="hlayout_check"> | ||
1729 | 659 | <property name="spacing"> | ||
1730 | 660 | <number>0</number> | ||
1731 | 661 | </property> | ||
1732 | 662 | </layout> | ||
1733 | 663 | </item> | ||
1734 | 664 | </layout> | ||
1735 | 665 | </widget> | ||
1736 | 666 | <resources> | ||
1737 | 667 | <include location="images.qrc"/> | ||
1738 | 668 | </resources> | ||
1739 | 669 | <connections/> | ||
1740 | 670 | </ui> | ||
1741 | 671 | 0 | ||
1742 | === removed file 'data/qt/side_widget.ui' | |||
1743 | --- data/qt/side_widget.ui 2011-09-02 12:58:29 +0000 | |||
1744 | +++ data/qt/side_widget.ui 1970-01-01 00:00:00 +0000 | |||
1745 | @@ -1,235 +0,0 @@ | |||
1746 | 1 | <?xml version="1.0" encoding="UTF-8"?> | ||
1747 | 2 | <ui version="4.0"> | ||
1748 | 3 | <class>SideWidget</class> | ||
1749 | 4 | <widget class="QFrame" name="SideWidget"> | ||
1750 | 5 | <property name="geometry"> | ||
1751 | 6 | <rect> | ||
1752 | 7 | <x>0</x> | ||
1753 | 8 | <y>0</y> | ||
1754 | 9 | <width>170</width> | ||
1755 | 10 | <height>466</height> | ||
1756 | 11 | </rect> | ||
1757 | 12 | </property> | ||
1758 | 13 | <property name="sizePolicy"> | ||
1759 | 14 | <sizepolicy hsizetype="Minimum" vsizetype="Preferred"> | ||
1760 | 15 | <horstretch>0</horstretch> | ||
1761 | 16 | <verstretch>0</verstretch> | ||
1762 | 17 | </sizepolicy> | ||
1763 | 18 | </property> | ||
1764 | 19 | <property name="minimumSize"> | ||
1765 | 20 | <size> | ||
1766 | 21 | <width>170</width> | ||
1767 | 22 | <height>466</height> | ||
1768 | 23 | </size> | ||
1769 | 24 | </property> | ||
1770 | 25 | <property name="windowTitle"> | ||
1771 | 26 | <string>Frame</string> | ||
1772 | 27 | </property> | ||
1773 | 28 | <property name="frameShape"> | ||
1774 | 29 | <enum>QFrame::StyledPanel</enum> | ||
1775 | 30 | </property> | ||
1776 | 31 | <property name="frameShadow"> | ||
1777 | 32 | <enum>QFrame::Raised</enum> | ||
1778 | 33 | </property> | ||
1779 | 34 | <layout class="QVBoxLayout" name="verticalLayout"> | ||
1780 | 35 | <property name="spacing"> | ||
1781 | 36 | <number>40</number> | ||
1782 | 37 | </property> | ||
1783 | 38 | <property name="margin"> | ||
1784 | 39 | <number>0</number> | ||
1785 | 40 | </property> | ||
1786 | 41 | <item> | ||
1787 | 42 | <widget class="QLabel" name="ubuntu_one_logo_label"> | ||
1788 | 43 | <property name="sizePolicy"> | ||
1789 | 44 | <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> | ||
1790 | 45 | <horstretch>0</horstretch> | ||
1791 | 46 | <verstretch>0</verstretch> | ||
1792 | 47 | </sizepolicy> | ||
1793 | 48 | </property> | ||
1794 | 49 | <property name="text"> | ||
1795 | 50 | <string/> | ||
1796 | 51 | </property> | ||
1797 | 52 | <property name="pixmap"> | ||
1798 | 53 | <pixmap resource="images.qrc">:/u1_logo.png</pixmap> | ||
1799 | 54 | </property> | ||
1800 | 55 | </widget> | ||
1801 | 56 | </item> | ||
1802 | 57 | <item> | ||
1803 | 58 | <widget class="QFrame" name="states_frame"> | ||
1804 | 59 | <property name="sizePolicy"> | ||
1805 | 60 | <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> | ||
1806 | 61 | <horstretch>0</horstretch> | ||
1807 | 62 | <verstretch>0</verstretch> | ||
1808 | 63 | </sizepolicy> | ||
1809 | 64 | </property> | ||
1810 | 65 | <property name="frameShape"> | ||
1811 | 66 | <enum>QFrame::StyledPanel</enum> | ||
1812 | 67 | </property> | ||
1813 | 68 | <property name="frameShadow"> | ||
1814 | 69 | <enum>QFrame::Raised</enum> | ||
1815 | 70 | </property> | ||
1816 | 71 | <layout class="QVBoxLayout" name="verticalLayout_2"> | ||
1817 | 72 | <property name="spacing"> | ||
1818 | 73 | <number>20</number> | ||
1819 | 74 | </property> | ||
1820 | 75 | <property name="margin"> | ||
1821 | 76 | <number>0</number> | ||
1822 | 77 | </property> | ||
1823 | 78 | <item> | ||
1824 | 79 | <layout class="QHBoxLayout" name="horizontalLayout"> | ||
1825 | 80 | <property name="spacing"> | ||
1826 | 81 | <number>7</number> | ||
1827 | 82 | </property> | ||
1828 | 83 | <item> | ||
1829 | 84 | <widget class="QLabel" name="install_icon_label"> | ||
1830 | 85 | <property name="sizePolicy"> | ||
1831 | 86 | <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> | ||
1832 | 87 | <horstretch>0</horstretch> | ||
1833 | 88 | <verstretch>0</verstretch> | ||
1834 | 89 | </sizepolicy> | ||
1835 | 90 | </property> | ||
1836 | 91 | <property name="text"> | ||
1837 | 92 | <string/> | ||
1838 | 93 | </property> | ||
1839 | 94 | <property name="pixmap"> | ||
1840 | 95 | <pixmap resource="images.qrc">:/progress_arrow_grey.png</pixmap> | ||
1841 | 96 | </property> | ||
1842 | 97 | </widget> | ||
1843 | 98 | </item> | ||
1844 | 99 | <item> | ||
1845 | 100 | <widget class="QLabel" name="install_label"> | ||
1846 | 101 | <property name="enabled"> | ||
1847 | 102 | <bool>true</bool> | ||
1848 | 103 | </property> | ||
1849 | 104 | <property name="text"> | ||
1850 | 105 | <string>Install</string> | ||
1851 | 106 | </property> | ||
1852 | 107 | </widget> | ||
1853 | 108 | </item> | ||
1854 | 109 | </layout> | ||
1855 | 110 | </item> | ||
1856 | 111 | <item> | ||
1857 | 112 | <layout class="QHBoxLayout" name="horizontalLayout_2"> | ||
1858 | 113 | <property name="spacing"> | ||
1859 | 114 | <number>7</number> | ||
1860 | 115 | </property> | ||
1861 | 116 | <property name="sizeConstraint"> | ||
1862 | 117 | <enum>QLayout::SetDefaultConstraint</enum> | ||
1863 | 118 | </property> | ||
1864 | 119 | <item> | ||
1865 | 120 | <widget class="QLabel" name="sign_icon_label"> | ||
1866 | 121 | <property name="sizePolicy"> | ||
1867 | 122 | <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> | ||
1868 | 123 | <horstretch>0</horstretch> | ||
1869 | 124 | <verstretch>0</verstretch> | ||
1870 | 125 | </sizepolicy> | ||
1871 | 126 | </property> | ||
1872 | 127 | <property name="text"> | ||
1873 | 128 | <string/> | ||
1874 | 129 | </property> | ||
1875 | 130 | <property name="pixmap"> | ||
1876 | 131 | <pixmap resource="images.qrc">:/progress_arrow_grey.png</pixmap> | ||
1877 | 132 | </property> | ||
1878 | 133 | </widget> | ||
1879 | 134 | </item> | ||
1880 | 135 | <item> | ||
1881 | 136 | <widget class="QLabel" name="sign_in_label"> | ||
1882 | 137 | <property name="enabled"> | ||
1883 | 138 | <bool>true</bool> | ||
1884 | 139 | </property> | ||
1885 | 140 | <property name="text"> | ||
1886 | 141 | <string>Sign In</string> | ||
1887 | 142 | </property> | ||
1888 | 143 | </widget> | ||
1889 | 144 | </item> | ||
1890 | 145 | </layout> | ||
1891 | 146 | </item> | ||
1892 | 147 | <item> | ||
1893 | 148 | <layout class="QHBoxLayout" name="horizontalLayout_4"> | ||
1894 | 149 | <property name="spacing"> | ||
1895 | 150 | <number>7</number> | ||
1896 | 151 | </property> | ||
1897 | 152 | <item> | ||
1898 | 153 | <widget class="QLabel" name="folders_icon_label"> | ||
1899 | 154 | <property name="sizePolicy"> | ||
1900 | 155 | <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> | ||
1901 | 156 | <horstretch>0</horstretch> | ||
1902 | 157 | <verstretch>0</verstretch> | ||
1903 | 158 | </sizepolicy> | ||
1904 | 159 | </property> | ||
1905 | 160 | <property name="text"> | ||
1906 | 161 | <string/> | ||
1907 | 162 | </property> | ||
1908 | 163 | <property name="pixmap"> | ||
1909 | 164 | <pixmap resource="images.qrc">:/progress_arrow_grey.png</pixmap> | ||
1910 | 165 | </property> | ||
1911 | 166 | </widget> | ||
1912 | 167 | </item> | ||
1913 | 168 | <item> | ||
1914 | 169 | <widget class="QLabel" name="select_folders_label"> | ||
1915 | 170 | <property name="enabled"> | ||
1916 | 171 | <bool>true</bool> | ||
1917 | 172 | </property> | ||
1918 | 173 | <property name="text"> | ||
1919 | 174 | <string>Select sync folders</string> | ||
1920 | 175 | </property> | ||
1921 | 176 | </widget> | ||
1922 | 177 | </item> | ||
1923 | 178 | </layout> | ||
1924 | 179 | </item> | ||
1925 | 180 | <item> | ||
1926 | 181 | <layout class="QHBoxLayout" name="horizontalLayout_5"> | ||
1927 | 182 | <property name="spacing"> | ||
1928 | 183 | <number>7</number> | ||
1929 | 184 | </property> | ||
1930 | 185 | <item> | ||
1931 | 186 | <widget class="QLabel" name="sync_icon_label"> | ||
1932 | 187 | <property name="sizePolicy"> | ||
1933 | 188 | <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> | ||
1934 | 189 | <horstretch>0</horstretch> | ||
1935 | 190 | <verstretch>0</verstretch> | ||
1936 | 191 | </sizepolicy> | ||
1937 | 192 | </property> | ||
1938 | 193 | <property name="text"> | ||
1939 | 194 | <string/> | ||
1940 | 195 | </property> | ||
1941 | 196 | <property name="pixmap"> | ||
1942 | 197 | <pixmap resource="images.qrc">:/progress_finish_grey.png</pixmap> | ||
1943 | 198 | </property> | ||
1944 | 199 | </widget> | ||
1945 | 200 | </item> | ||
1946 | 201 | <item> | ||
1947 | 202 | <widget class="QLabel" name="sync_label"> | ||
1948 | 203 | <property name="enabled"> | ||
1949 | 204 | <bool>true</bool> | ||
1950 | 205 | </property> | ||
1951 | 206 | <property name="text"> | ||
1952 | 207 | <string>Sync, stream, share!</string> | ||
1953 | 208 | </property> | ||
1954 | 209 | </widget> | ||
1955 | 210 | </item> | ||
1956 | 211 | </layout> | ||
1957 | 212 | </item> | ||
1958 | 213 | </layout> | ||
1959 | 214 | </widget> | ||
1960 | 215 | </item> | ||
1961 | 216 | <item> | ||
1962 | 217 | <spacer name="verticalSpacer"> | ||
1963 | 218 | <property name="orientation"> | ||
1964 | 219 | <enum>Qt::Vertical</enum> | ||
1965 | 220 | </property> | ||
1966 | 221 | <property name="sizeHint" stdset="0"> | ||
1967 | 222 | <size> | ||
1968 | 223 | <width>20</width> | ||
1969 | 224 | <height>40</height> | ||
1970 | 225 | </size> | ||
1971 | 226 | </property> | ||
1972 | 227 | </spacer> | ||
1973 | 228 | </item> | ||
1974 | 229 | </layout> | ||
1975 | 230 | </widget> | ||
1976 | 231 | <resources> | ||
1977 | 232 | <include location="images.qrc"/> | ||
1978 | 233 | </resources> | ||
1979 | 234 | <connections/> | ||
1980 | 235 | </ui> | ||
1981 | 236 | 0 | ||
1982 | === removed file 'data/qt/sign_in.ui' | |||
1983 | --- data/qt/sign_in.ui 2011-09-02 12:58:29 +0000 | |||
1984 | +++ data/qt/sign_in.ui 1970-01-01 00:00:00 +0000 | |||
1985 | @@ -1,75 +0,0 @@ | |||
1986 | 1 | <?xml version="1.0" encoding="UTF-8"?> | ||
1987 | 2 | <ui version="4.0"> | ||
1988 | 3 | <class>Form</class> | ||
1989 | 4 | <widget class="QWidget" name="Form"> | ||
1990 | 5 | <property name="geometry"> | ||
1991 | 6 | <rect> | ||
1992 | 7 | <x>0</x> | ||
1993 | 8 | <y>0</y> | ||
1994 | 9 | <width>400</width> | ||
1995 | 10 | <height>300</height> | ||
1996 | 11 | </rect> | ||
1997 | 12 | </property> | ||
1998 | 13 | <property name="windowTitle"> | ||
1999 | 14 | <string>Form</string> | ||
2000 | 15 | </property> | ||
2001 | 16 | <layout class="QVBoxLayout" name="verticalLayout"> | ||
2002 | 17 | <property name="topMargin"> | ||
2003 | 18 | <number>0</number> | ||
2004 | 19 | </property> | ||
2005 | 20 | <item> | ||
2006 | 21 | <widget class="QLabel" name="label"> | ||
2007 | 22 | <property name="font"> | ||
2008 | 23 | <font> | ||
2009 | 24 | <pointsize>14</pointsize> | ||
2010 | 25 | <weight>75</weight> | ||
2011 | 26 | <bold>true</bold> | ||
2012 | 27 | </font> | ||
2013 | 28 | </property> | ||
2014 | 29 | <property name="text"> | ||
2015 | 30 | <string>Sync, stream, share</string> | ||
2016 | 31 | </property> | ||
2017 | 32 | </widget> | ||
2018 | 33 | </item> | ||
2019 | 34 | <item> | ||
2020 | 35 | <spacer name="verticalSpacer"> | ||
2021 | 36 | <property name="orientation"> | ||
2022 | 37 | <enum>Qt::Vertical</enum> | ||
2023 | 38 | </property> | ||
2024 | 39 | <property name="sizeHint" stdset="0"> | ||
2025 | 40 | <size> | ||
2026 | 41 | <width>20</width> | ||
2027 | 42 | <height>163</height> | ||
2028 | 43 | </size> | ||
2029 | 44 | </property> | ||
2030 | 45 | </spacer> | ||
2031 | 46 | </item> | ||
2032 | 47 | <item> | ||
2033 | 48 | <widget class="QPushButton" name="sign_in"> | ||
2034 | 49 | <property name="text"> | ||
2035 | 50 | <string>Sign me in with my existing Ubuntu one account</string> | ||
2036 | 51 | </property> | ||
2037 | 52 | <property name="default"> | ||
2038 | 53 | <bool>false</bool> | ||
2039 | 54 | </property> | ||
2040 | 55 | </widget> | ||
2041 | 56 | </item> | ||
2042 | 57 | <item> | ||
2043 | 58 | <widget class="QPushButton" name="sign_up"> | ||
2044 | 59 | <property name="text"> | ||
2045 | 60 | <string>I don't have an account, sign me up</string> | ||
2046 | 61 | </property> | ||
2047 | 62 | </widget> | ||
2048 | 63 | </item> | ||
2049 | 64 | <item> | ||
2050 | 65 | <widget class="QPushButton" name="sign_off"> | ||
2051 | 66 | <property name="text"> | ||
2052 | 67 | <string>Close window and setup later</string> | ||
2053 | 68 | </property> | ||
2054 | 69 | </widget> | ||
2055 | 70 | </item> | ||
2056 | 71 | </layout> | ||
2057 | 72 | </widget> | ||
2058 | 73 | <resources/> | ||
2059 | 74 | <connections/> | ||
2060 | 75 | </ui> | ||
2061 | 76 | 0 | ||
2062 | === removed file 'data/qt/ubuntuone.qss' | |||
2063 | --- data/qt/ubuntuone.qss 2011-09-02 12:58:29 +0000 | |||
2064 | +++ data/qt/ubuntuone.qss 1970-01-01 00:00:00 +0000 | |||
2065 | @@ -1,179 +0,0 @@ | |||
2066 | 1 | QWidget { | ||
2067 | 2 | font-family: "Ubuntu"; | ||
2068 | 3 | color: #333333; | ||
2069 | 4 | } | ||
2070 | 5 | |||
2071 | 6 | QFrame#SideWidget { | ||
2072 | 7 | background-color: white; | ||
2073 | 8 | border-style: dotted; | ||
2074 | 9 | border-color: #939389; | ||
2075 | 10 | border-right-width: 1px; | ||
2076 | 11 | color: white; | ||
2077 | 12 | min-height: 100px; | ||
2078 | 13 | } | ||
2079 | 14 | |||
2080 | 15 | QWizard, | ||
2081 | 16 | QDialog { | ||
2082 | 17 | background-color: white; | ||
2083 | 18 | } | ||
2084 | 19 | |||
2085 | 20 | QLabel#password_assistance { | ||
2086 | 21 | border-image: url(":/balloon_shape.png"); | ||
2087 | 22 | } | ||
2088 | 23 | |||
2089 | 24 | QLineEdit { | ||
2090 | 25 | border: 1px solid #aea79f; | ||
2091 | 26 | } | ||
2092 | 27 | |||
2093 | 28 | QLabel#install_label, | ||
2094 | 29 | QLabel#sign_in_label, | ||
2095 | 30 | QLabel#choose_services_label, | ||
2096 | 31 | QLabel#select_folders_label, | ||
2097 | 32 | QLabel#sync_label { | ||
2098 | 33 | font-size: 14px; | ||
2099 | 34 | } | ||
2100 | 35 | |||
2101 | 36 | QTextEdit { | ||
2102 | 37 | background-color: #ffffff; | ||
2103 | 38 | border: none; | ||
2104 | 39 | } | ||
2105 | 40 | |||
2106 | 41 | QPushButton { | ||
2107 | 42 | border-radius: 5px; | ||
2108 | 43 | border-style: solid; | ||
2109 | 44 | padding: 6px; | ||
2110 | 45 | padding-left: 20px; | ||
2111 | 46 | padding-right: 20px; | ||
2112 | 47 | border-width: 1px; | ||
2113 | 48 | height: 14px; | ||
2114 | 49 | } | ||
2115 | 50 | |||
2116 | 51 | QPushButton[default="true"] { | ||
2117 | 52 | background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, | ||
2118 | 53 | stop: 0 #fe9e84,stop: 1.0 #dd4814); | ||
2119 | 54 | color: white; | ||
2120 | 55 | border-color: #999999; | ||
2121 | 56 | } | ||
2122 | 57 | |||
2123 | 58 | QPushButton:hover[default="true"] { | ||
2124 | 59 | background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, | ||
2125 | 60 | stop: 0 #ffb19c,stop: 1.0 #dd4814); | ||
2126 | 61 | color: white; | ||
2127 | 62 | border-color: #999999; | ||
2128 | 63 | } | ||
2129 | 64 | |||
2130 | 65 | QPushButton:pressed[default="true"] { | ||
2131 | 66 | background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, | ||
2132 | 67 | stop: 0 #b93f14,stop: 1.0 #dd4814); | ||
2133 | 68 | color: white; | ||
2134 | 69 | border-color: #999999; | ||
2135 | 70 | } | ||
2136 | 71 | |||
2137 | 72 | QPushButton[default="false"] { | ||
2138 | 73 | background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, | ||
2139 | 74 | stop: 0 #ffffff,stop: 1.0 #e6e6e6); | ||
2140 | 75 | color: #333333; | ||
2141 | 76 | border-color: #999999; | ||
2142 | 77 | } | ||
2143 | 78 | |||
2144 | 79 | QPushButton:hover[default="false"] { | ||
2145 | 80 | background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, | ||
2146 | 81 | stop: 0 #ffffff,stop: 1.0 #ededed); | ||
2147 | 82 | color: #333333; | ||
2148 | 83 | border-color: #999999; | ||
2149 | 84 | } | ||
2150 | 85 | |||
2151 | 86 | QPushButton:pressed[default="false"] { | ||
2152 | 87 | background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, | ||
2153 | 88 | stop: 0 #d9d9d9,stop: 1.0 #fefefe); | ||
2154 | 89 | color: #333333; | ||
2155 | 90 | border-color: #999999; | ||
2156 | 91 | } | ||
2157 | 92 | |||
2158 | 93 | QPushButton[DisabledState="true"] { | ||
2159 | 94 | background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, | ||
2160 | 95 | stop: 0 #eaeaea, stop: 1.0 #cacaca); | ||
2161 | 96 | color: #595959; | ||
2162 | 97 | border-color: #939389; | ||
2163 | 98 | } | ||
2164 | 99 | |||
2165 | 100 | QPushButton[DisabledState="false"] { | ||
2166 | 101 | background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, | ||
2167 | 102 | stop: 0 #fe9e84,stop: 1.0 #dd4814); | ||
2168 | 103 | color: white; | ||
2169 | 104 | border-color: #999999; | ||
2170 | 105 | } | ||
2171 | 106 | |||
2172 | 107 | QPushButton:hover[DisabledState="false"] { | ||
2173 | 108 | background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, | ||
2174 | 109 | stop: 0 #ffb19c,stop: 1.0 #dd4814); | ||
2175 | 110 | color: white; | ||
2176 | 111 | border-color: #999999; | ||
2177 | 112 | } | ||
2178 | 113 | |||
2179 | 114 | QPushButton:pressed[DisabledState="false"] { | ||
2180 | 115 | background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, | ||
2181 | 116 | stop: 0 #b93f14,stop: 1.0 #dd4814); | ||
2182 | 117 | color: white; | ||
2183 | 118 | border-color: #999999; | ||
2184 | 119 | } | ||
2185 | 120 | |||
2186 | 121 | QFrame#frm_box { | ||
2187 | 122 | background: #ffffff; | ||
2188 | 123 | border-radius: 5px; | ||
2189 | 124 | border-style: solid; | ||
2190 | 125 | border-color: #939389; | ||
2191 | 126 | border-width: 1px; | ||
2192 | 127 | color: white; | ||
2193 | 128 | min-height: 100px; | ||
2194 | 129 | } | ||
2195 | 130 | |||
2196 | 131 | QFrame#frm_box > QLabel { | ||
2197 | 132 | font-size: 24px; | ||
2198 | 133 | } | ||
2199 | 134 | |||
2200 | 135 | QLabel#image_label { | ||
2201 | 136 | border-style: dotted; | ||
2202 | 137 | border-color: #939389; | ||
2203 | 138 | border-bottom-width: 1px; | ||
2204 | 139 | border-top-width: 1px; | ||
2205 | 140 | } | ||
2206 | 141 | |||
2207 | 142 | QLabel#title_label { | ||
2208 | 143 | font-size: 20px; | ||
2209 | 144 | } | ||
2210 | 145 | |||
2211 | 146 | QGroupBox { | ||
2212 | 147 | padding-top: 30px; | ||
2213 | 148 | border: none; | ||
2214 | 149 | margin-top: 1ex; | ||
2215 | 150 | font: bold 15px; | ||
2216 | 151 | } | ||
2217 | 152 | |||
2218 | 153 | QGroupBox::title { | ||
2219 | 154 | color: #333333; | ||
2220 | 155 | } | ||
2221 | 156 | |||
2222 | 157 | QGroupBox#bandwidth_settings { | ||
2223 | 158 | border-style: dotted; | ||
2224 | 159 | border-color: #939389; | ||
2225 | 160 | border-bottom-width: 1px; | ||
2226 | 161 | } | ||
2227 | 162 | |||
2228 | 163 | QTreeView { | ||
2229 | 164 | background: #f7f6f5; | ||
2230 | 165 | alternate-background-color: #efedec; | ||
2231 | 166 | } | ||
2232 | 167 | |||
2233 | 168 | QLabel#form_errors { | ||
2234 | 169 | font: bold 14px; | ||
2235 | 170 | color: #df2d1f; | ||
2236 | 171 | } | ||
2237 | 172 | |||
2238 | 173 | QLineEdit[formError="true"] { | ||
2239 | 174 | background-color: #ffe5e5; | ||
2240 | 175 | } | ||
2241 | 176 | |||
2242 | 177 | QLineEdit[formError="false"] { | ||
2243 | 178 | background-color: white; | ||
2244 | 179 | } | ||
2245 | 180 | 0 | ||
2246 | === removed file 'data/u1_logo.png' | |||
2247 | 181 | Binary files data/u1_logo.png 2011-07-12 03:24:48 +0000 and data/u1_logo.png 1970-01-01 00:00:00 +0000 differ | 1 | Binary files data/u1_logo.png 2011-07-12 03:24:48 +0000 and data/u1_logo.png 1970-01-01 00:00:00 +0000 differ |
2248 | === removed file 'data/u1icon.png' | |||
2249 | 182 | Binary files data/u1icon.png 2011-07-12 03:24:48 +0000 and data/u1icon.png 1970-01-01 00:00:00 +0000 differ | 2 | Binary files data/u1icon.png 2011-07-12 03:24:48 +0000 and data/u1icon.png 1970-01-01 00:00:00 +0000 differ |
2250 | === removed file 'data/ubuntu_one_favicon.png' | |||
2251 | 183 | Binary files data/ubuntu_one_favicon.png 2011-08-05 17:18:34 +0000 and data/ubuntu_one_favicon.png 1970-01-01 00:00:00 +0000 differ | 3 | Binary files data/ubuntu_one_favicon.png 2011-08-05 17:18:34 +0000 and data/ubuntu_one_favicon.png 1970-01-01 00:00:00 +0000 differ |
2252 | === removed file 'data/win_installer_graphic.png' | |||
2253 | 184 | Binary files data/win_installer_graphic.png 2011-08-05 17:18:34 +0000 and data/win_installer_graphic.png 1970-01-01 00:00:00 +0000 differ | 4 | Binary files data/win_installer_graphic.png 2011-08-05 17:18:34 +0000 and data/win_installer_graphic.png 1970-01-01 00:00:00 +0000 differ |
2254 | === removed directory 'po' | |||
2255 | === removed file 'pylintrc' | |||
2256 | --- pylintrc 2011-06-22 21:40:10 +0000 | |||
2257 | +++ pylintrc 1970-01-01 00:00:00 +0000 | |||
2258 | @@ -1,305 +0,0 @@ | |||
2259 | 1 | # lint Python modules using external checkers. | ||
2260 | 2 | # | ||
2261 | 3 | # This is the main checker controlling the other ones and the reports | ||
2262 | 4 | # generation. It is itself both a raw checker and an astng checker in order | ||
2263 | 5 | # to: | ||
2264 | 6 | # * handle message activation / deactivation at the module level | ||
2265 | 7 | # * handle some basic but necessary stats'data (number of classes, methods...) | ||
2266 | 8 | # | ||
2267 | 9 | [MASTER] | ||
2268 | 10 | |||
2269 | 11 | # Specify a configuration file. | ||
2270 | 12 | #rcfile= | ||
2271 | 13 | |||
2272 | 14 | # Python code to execute, usually for sys.path manipulation such as | ||
2273 | 15 | # pygtk.require(). | ||
2274 | 16 | #init-hook= | ||
2275 | 17 | |||
2276 | 18 | # Profiled execution. | ||
2277 | 19 | profile=no | ||
2278 | 20 | |||
2279 | 21 | # Add <file or directory> to the black list. It should be a base name, not a | ||
2280 | 22 | # path. You may set this option multiple times. | ||
2281 | 23 | ignore=ui,qtreactor | ||
2282 | 24 | |||
2283 | 25 | # Pickle collected data for later comparisons. | ||
2284 | 26 | persistent=no | ||
2285 | 27 | |||
2286 | 28 | # List of plugins (as comma separated values of python modules names) to load, | ||
2287 | 29 | # usually to register additional checkers. | ||
2288 | 30 | load-plugins= | ||
2289 | 31 | |||
2290 | 32 | |||
2291 | 33 | [MESSAGES CONTROL] | ||
2292 | 34 | |||
2293 | 35 | # Enable only checker(s) with the given id(s). This option conflicts with the | ||
2294 | 36 | # disable-checker option | ||
2295 | 37 | #enable-checker= | ||
2296 | 38 | |||
2297 | 39 | # Enable all checker(s) except those with the given id(s). This option | ||
2298 | 40 | # conflicts with the enable-checker option | ||
2299 | 41 | #disable-checker= | ||
2300 | 42 | |||
2301 | 43 | # Enable all messages in the listed categories. | ||
2302 | 44 | #enable-cat= | ||
2303 | 45 | |||
2304 | 46 | # Disable all messages in the listed categories. | ||
2305 | 47 | #disable-cat= | ||
2306 | 48 | |||
2307 | 49 | # Disable the message(s) with the given id(s) or categories | ||
2308 | 50 | # W0142: Used * or ** magic | ||
2309 | 51 | # W0613: Unused argument 'yyy' | ||
2310 | 52 | disable=R,I,W0142,W0613,W0511 | ||
2311 | 53 | |||
2312 | 54 | |||
2313 | 55 | [REPORTS] | ||
2314 | 56 | |||
2315 | 57 | # Set the output format. Available formats are text, parseable, colorized, msvs | ||
2316 | 58 | # (visual studio) and html | ||
2317 | 59 | output-format=text | ||
2318 | 60 | |||
2319 | 61 | # Include message's id in output | ||
2320 | 62 | include-ids=yes | ||
2321 | 63 | |||
2322 | 64 | # Put messages in a separate file for each module / package specified on the | ||
2323 | 65 | # command line instead of printing them on stdout. Reports (if any) will be | ||
2324 | 66 | # written in a file name "pylint_global.[txt|html]". | ||
2325 | 67 | files-output=no | ||
2326 | 68 | |||
2327 | 69 | # Tells whether to display a full report or only the messages | ||
2328 | 70 | reports=no | ||
2329 | 71 | |||
2330 | 72 | # Python expression which should return a note less than 10 (10 is the highest | ||
2331 | 73 | # note). You have access to the variables errors warning, statement which | ||
2332 | 74 | # respectively contain the number of errors / warnings messages and the total | ||
2333 | 75 | # number of statements analyzed. This is used by the global evaluation report | ||
2334 | 76 | # (R0004). | ||
2335 | 77 | evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10) | ||
2336 | 78 | |||
2337 | 79 | # Add a comment according to your evaluation note. This is used by the global | ||
2338 | 80 | # evaluation report (R0004). | ||
2339 | 81 | comment=no | ||
2340 | 82 | |||
2341 | 83 | # Enable the report(s) with the given id(s). | ||
2342 | 84 | #enable-report= | ||
2343 | 85 | |||
2344 | 86 | # Disable the report(s) with the given id(s). | ||
2345 | 87 | #disable-report= | ||
2346 | 88 | |||
2347 | 89 | |||
2348 | 90 | # try to find bugs in the code using type inference | ||
2349 | 91 | # | ||
2350 | 92 | [TYPECHECK] | ||
2351 | 93 | |||
2352 | 94 | # Tells whether missing members accessed in mixin class should be ignored. A | ||
2353 | 95 | # mixin class is detected if its name ends with "mixin" (case insensitive). | ||
2354 | 96 | ignore-mixin-members=yes | ||
2355 | 97 | |||
2356 | 98 | # List of classes names for which member attributes should not be checked | ||
2357 | 99 | # (useful for classes with attributes dynamically set). | ||
2358 | 100 | ignored-classes= | ||
2359 | 101 | |||
2360 | 102 | # When zope mode is activated, add a predefined set of Zope acquired attributes | ||
2361 | 103 | # to generated-members. | ||
2362 | 104 | zope=no | ||
2363 | 105 | |||
2364 | 106 | # List of members which are set dynamically and missed by pylint inference | ||
2365 | 107 | # system, and so shouldn't trigger E0201 when accessed. | ||
2366 | 108 | generated-members=REQUEST,acl_users,aq_parent | ||
2367 | 109 | |||
2368 | 110 | |||
2369 | 111 | # checks for | ||
2370 | 112 | # * unused variables / imports | ||
2371 | 113 | # * undefined variables | ||
2372 | 114 | # * redefinition of variable from builtins or from an outer scope | ||
2373 | 115 | # * use of variable before assignment | ||
2374 | 116 | # | ||
2375 | 117 | [VARIABLES] | ||
2376 | 118 | |||
2377 | 119 | # Tells whether we should check for unused import in __init__ files. | ||
2378 | 120 | init-import=yes | ||
2379 | 121 | |||
2380 | 122 | # A regular expression matching names used for dummy variables (i.e. not used). | ||
2381 | 123 | dummy-variables-rgx=_|dummy | ||
2382 | 124 | |||
2383 | 125 | # List of additional names supposed to be defined in builtins. Remember that | ||
2384 | 126 | # you should avoid to define new builtins when possible. | ||
2385 | 127 | additional-builtins= | ||
2386 | 128 | |||
2387 | 129 | |||
2388 | 130 | # checks for : | ||
2389 | 131 | # * doc strings | ||
2390 | 132 | # * modules / classes / functions / methods / arguments / variables name | ||
2391 | 133 | # * number of arguments, local variables, branches, returns and statements in | ||
2392 | 134 | # functions, methods | ||
2393 | 135 | # * required module attributes | ||
2394 | 136 | # * dangerous default values as arguments | ||
2395 | 137 | # * redefinition of function / method / class | ||
2396 | 138 | # * uses of the global statement | ||
2397 | 139 | # | ||
2398 | 140 | [BASIC] | ||
2399 | 141 | |||
2400 | 142 | # Required attributes for module, separated by a comma | ||
2401 | 143 | required-attributes= | ||
2402 | 144 | |||
2403 | 145 | # Regular expression which should only match functions or classes name which do | ||
2404 | 146 | # not require a docstring | ||
2405 | 147 | no-docstring-rgx=(__.*__|setUp|tearDown) | ||
2406 | 148 | |||
2407 | 149 | # Regular expression which should only match correct module names | ||
2408 | 150 | module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$ | ||
2409 | 151 | |||
2410 | 152 | # Regular expression which should only match correct module level names | ||
2411 | 153 | const-rgx=(([A-Z_][A-Z0-9_]*)|(__.*__))$ | ||
2412 | 154 | |||
2413 | 155 | # Regular expression which should only match correct class names | ||
2414 | 156 | class-rgx=[A-Z_][a-zA-Z0-9]+$ | ||
2415 | 157 | |||
2416 | 158 | # Regular expression which should only match correct function names | ||
2417 | 159 | function-rgx=[a-z_][a-z0-9_]{2,79}$ | ||
2418 | 160 | |||
2419 | 161 | # Regular expression which should only match correct method names | ||
2420 | 162 | method-rgx=([a-z_][a-z0-9_]{2,79}$|setUp|tearDown) | ||
2421 | 163 | |||
2422 | 164 | # Regular expression which should only match correct instance attribute names | ||
2423 | 165 | attr-rgx=[a-z_][a-z0-9_]{1,30}$ | ||
2424 | 166 | |||
2425 | 167 | # Regular expression which should only match correct argument names | ||
2426 | 168 | argument-rgx=[a-z_][a-z0-9_]{1,30}$ | ||
2427 | 169 | |||
2428 | 170 | # Regular expression which should only match correct variable names | ||
2429 | 171 | variable-rgx=[a-z_][a-z0-9_]{1,30}$ | ||
2430 | 172 | |||
2431 | 173 | # Regular expression which should only match correct list comprehension / | ||
2432 | 174 | # generator expression variable names | ||
2433 | 175 | inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$ | ||
2434 | 176 | |||
2435 | 177 | # Good variable names which should always be accepted, separated by a comma | ||
2436 | 178 | good-names=d,e,f,g,i,j,k,ex,logger,Run,_ | ||
2437 | 179 | |||
2438 | 180 | # Bad variable names which should always be refused, separated by a comma | ||
2439 | 181 | bad-names=foo,bar,baz,toto,tutu,tata | ||
2440 | 182 | |||
2441 | 183 | # List of builtins function names that should not be used, separated by a comma | ||
2442 | 184 | bad-functions=apply,input,reduce | ||
2443 | 185 | |||
2444 | 186 | |||
2445 | 187 | # checks for sign of poor/misdesign: | ||
2446 | 188 | # * number of methods, attributes, local variables... | ||
2447 | 189 | # * size, complexity of functions, methods | ||
2448 | 190 | # | ||
2449 | 191 | [DESIGN] | ||
2450 | 192 | |||
2451 | 193 | # Maximum number of arguments for function / method | ||
2452 | 194 | max-args=5 | ||
2453 | 195 | |||
2454 | 196 | # Maximum number of locals for function / method body | ||
2455 | 197 | max-locals=15 | ||
2456 | 198 | |||
2457 | 199 | # Maximum number of return / yield for function / method body | ||
2458 | 200 | max-returns=6 | ||
2459 | 201 | |||
2460 | 202 | # Maximum number of branch for function / method body | ||
2461 | 203 | max-branchs=12 | ||
2462 | 204 | |||
2463 | 205 | # Maximum number of statements in function / method body | ||
2464 | 206 | max-statements=50 | ||
2465 | 207 | |||
2466 | 208 | # Maximum number of parents for a class (see R0901). | ||
2467 | 209 | max-parents=7 | ||
2468 | 210 | |||
2469 | 211 | # Maximum number of attributes for a class (see R0902). | ||
2470 | 212 | max-attributes=7 | ||
2471 | 213 | |||
2472 | 214 | # Minimum number of public methods for a class (see R0903). | ||
2473 | 215 | min-public-methods=2 | ||
2474 | 216 | |||
2475 | 217 | # Maximum number of public methods for a class (see R0904). | ||
2476 | 218 | max-public-methods=20 | ||
2477 | 219 | |||
2478 | 220 | |||
2479 | 221 | # checks for : | ||
2480 | 222 | # * methods without self as first argument | ||
2481 | 223 | # * overridden methods signature | ||
2482 | 224 | # * access only to existent members via self | ||
2483 | 225 | # * attributes not defined in the __init__ method | ||
2484 | 226 | # * supported interfaces implementation | ||
2485 | 227 | # * unreachable code | ||
2486 | 228 | # | ||
2487 | 229 | [CLASSES] | ||
2488 | 230 | |||
2489 | 231 | # List of interface methods to ignore, separated by a comma. This is used for | ||
2490 | 232 | # instance to not check methods defines in Zopes Interface base class. | ||
2491 | 233 | #ignore-iface-methods=isImplementedBy,deferred,extends,names,namesAndDescriptions,queryDescriptionFor,getBases,getDescriptionFor,getDoc,getName,getTaggedValue,getTaggedValueTags,isEqualOrExtendedBy,setTaggedValue,isImplementedByInstancesOf,adaptWith,is_implemented_by,providedBy | ||
2492 | 234 | |||
2493 | 235 | # List of method names used to declare (i.e. assign) instance attributes. | ||
2494 | 236 | defining-attr-methods=__init__,__new__,setUp | ||
2495 | 237 | |||
2496 | 238 | |||
2497 | 239 | # checks for | ||
2498 | 240 | # * external modules dependencies | ||
2499 | 241 | # * relative / wildcard imports | ||
2500 | 242 | # * cyclic imports | ||
2501 | 243 | # * uses of deprecated modules | ||
2502 | 244 | # | ||
2503 | 245 | [IMPORTS] | ||
2504 | 246 | |||
2505 | 247 | # Deprecated modules which should not be used, separated by a comma | ||
2506 | 248 | deprecated-modules=regsub,string,TERMIOS,Bastion,rexec | ||
2507 | 249 | |||
2508 | 250 | # Create a graph of every (i.e. internal and external) dependencies in the | ||
2509 | 251 | # given file (report RP0402 must not be disabled) | ||
2510 | 252 | import-graph= | ||
2511 | 253 | |||
2512 | 254 | # Create a graph of external dependencies in the given file (report RP0402 must | ||
2513 | 255 | # not be disabled) | ||
2514 | 256 | ext-import-graph= | ||
2515 | 257 | |||
2516 | 258 | # Create a graph of internal dependencies in the given file (report RP0402 must | ||
2517 | 259 | # not be disabled) | ||
2518 | 260 | int-import-graph= | ||
2519 | 261 | |||
2520 | 262 | |||
2521 | 263 | # checks for : | ||
2522 | 264 | # * unauthorized constructions | ||
2523 | 265 | # * strict indentation | ||
2524 | 266 | # * line length | ||
2525 | 267 | # * use of <> instead of != | ||
2526 | 268 | # | ||
2527 | 269 | [FORMAT] | ||
2528 | 270 | |||
2529 | 271 | # Maximum number of characters on a single line. | ||
2530 | 272 | max-line-length=79 | ||
2531 | 273 | |||
2532 | 274 | # Maximum number of lines in a module | ||
2533 | 275 | max-module-lines=2500 | ||
2534 | 276 | |||
2535 | 277 | # String used as indentation unit. This is usually " " (4 spaces) or "\t" (1 | ||
2536 | 278 | # tab). | ||
2537 | 279 | indent-string=' ' | ||
2538 | 280 | |||
2539 | 281 | |||
2540 | 282 | # checks for similarities and duplicated code. This computation may be | ||
2541 | 283 | # memory / CPU intensive, so you should disable it if you experiments some | ||
2542 | 284 | # problems. | ||
2543 | 285 | # | ||
2544 | 286 | [SIMILARITIES] | ||
2545 | 287 | |||
2546 | 288 | # Minimum lines number of a similarity. | ||
2547 | 289 | min-similarity-lines=4 | ||
2548 | 290 | |||
2549 | 291 | # Ignore comments when computing similarities. | ||
2550 | 292 | ignore-comments=yes | ||
2551 | 293 | |||
2552 | 294 | # Ignore docstrings when computing similarities. | ||
2553 | 295 | ignore-docstrings=yes | ||
2554 | 296 | |||
2555 | 297 | |||
2556 | 298 | # checks for: | ||
2557 | 299 | # * warning notes in the code like FIXME, XXX | ||
2558 | 300 | # * PEP 263: source code with non ascii character but no encoding declaration | ||
2559 | 301 | # | ||
2560 | 302 | [MISCELLANEOUS] | ||
2561 | 303 | |||
2562 | 304 | # List of note tags to take in consideration, separated by a comma. | ||
2563 | 305 | notes=FIXME,XXX,TODO,fixme,xxx,todo | ||
2564 | 306 | 0 | ||
2565 | === removed file 'run-tests' | |||
2566 | --- run-tests 2011-09-15 17:49:32 +0000 | |||
2567 | +++ run-tests 1970-01-01 00:00:00 +0000 | |||
2568 | @@ -1,44 +0,0 @@ | |||
2569 | 1 | #! /bin/bash | ||
2570 | 2 | # | ||
2571 | 3 | # Author: Natalia Bidart <natalia.bidart@canonical.com> | ||
2572 | 4 | # | ||
2573 | 5 | # Copyright 2010 Canonical Ltd. | ||
2574 | 6 | # | ||
2575 | 7 | # This program is free software: you can redistribute it and/or modify it | ||
2576 | 8 | # under the terms of the GNU General Public License version 3, as published | ||
2577 | 9 | # by the Free Software Foundation. | ||
2578 | 10 | # | ||
2579 | 11 | # This program is distributed in the hope that it will be useful, but | ||
2580 | 12 | # WITHOUT ANY WARRANTY; without even the implied warranties of | ||
2581 | 13 | # MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR | ||
2582 | 14 | # PURPOSE. See the GNU General Public License for more details. | ||
2583 | 15 | # | ||
2584 | 16 | # You should have received a copy of the GNU General Public License along | ||
2585 | 17 | # with this program. If not, see <http://www.gnu.org/licenses/>. | ||
2586 | 18 | |||
2587 | 19 | set -e | ||
2588 | 20 | |||
2589 | 21 | if [ $# -ne 0 ]; then | ||
2590 | 22 | # run specific module given by the caller | ||
2591 | 23 | MODULE="$@" | ||
2592 | 24 | else | ||
2593 | 25 | # run all tests, useful for tarmac and reviews | ||
2594 | 26 | MODULE="ubuntuone_installer" | ||
2595 | 27 | fi | ||
2596 | 28 | |||
2597 | 29 | style_check() { | ||
2598 | 30 | ./setup.py clean | ||
2599 | 31 | u1lint | ||
2600 | 32 | if [ -x `which pep8` ]; then | ||
2601 | 33 | pep8 --exclude '.svn,CVS,.bzr,.hg,.git,*_ui.py,*_rc.py' --repeat . | ||
2602 | 34 | else | ||
2603 | 35 | echo "Please install the 'pep8' package." | ||
2604 | 36 | fi | ||
2605 | 37 | } | ||
2606 | 38 | |||
2607 | 39 | ./setup.py build | ||
2608 | 40 | echo "Running test suite for ""$MODULE" | ||
2609 | 41 | `which xvfb-run` u1trial -i "test_windows.py" --reactor=qt4 --gui "$MODULE" | ||
2610 | 42 | style_check | ||
2611 | 43 | rm -rf _trial_temp | ||
2612 | 44 | rm -rf build | ||
2613 | 45 | 0 | ||
2614 | === removed file 'run-tests.bat' | |||
2615 | --- run-tests.bat 2012-01-31 16:33:13 +0000 | |||
2616 | +++ run-tests.bat 1970-01-01 00:00:00 +0000 | |||
2617 | @@ -1,125 +0,0 @@ | |||
2618 | 1 | :: Author: Manuel de la Pena <manuel@canonical.com> | ||
2619 | 2 | :: | ||
2620 | 3 | :: Copyright 2010 Canonical Ltd. | ||
2621 | 4 | :: | ||
2622 | 5 | :: This program is free software: you can redistribute it and/or modify it | ||
2623 | 6 | :: under the terms of the GNU General Public License version 3, as published | ||
2624 | 7 | :: by the Free Software Foundation. | ||
2625 | 8 | :: | ||
2626 | 9 | :: This program is distributed in the hope that it will be useful, but | ||
2627 | 10 | :: WITHOUT ANY WARRANTY; without even the implied warranties of | ||
2628 | 11 | :: MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR | ||
2629 | 12 | :: PURPOSE. See the GNU General Public License for more details. | ||
2630 | 13 | :: | ||
2631 | 14 | :: You should have received a copy of the GNU General Public License along | ||
2632 | 15 | :: with this program. If not, see <http://www.gnu.org/licenses/>. | ||
2633 | 16 | @ECHO off | ||
2634 | 17 | |||
2635 | 18 | :: We could have Python 2.6 or 2.7 on Windows. In order to check availability, | ||
2636 | 19 | :: we should first check for 2.7, and run the tests, otherwise fall back to 2.6. | ||
2637 | 20 | SET REGQUERY27="REG QUERY HKLM\Software\Python\PythonCore\2.7\InstallPath /ve" | ||
2638 | 21 | SET REGQUERY2732="REG QUERY HKLM\Software\Wow6432Node\Python\PythonCore\2.7\InstallPath /ve" | ||
2639 | 22 | SET REGQUERY26="REG QUERY HKLM\Software\Python\PythonCore\2.6\InstallPath /ve" | ||
2640 | 23 | SET REGQUERY2632="REG QUERY HKLM\Software\Wow6432Node\Python\PythonCore\2.6\InstallPath /ve" | ||
2641 | 24 | SET PYTHONEXEPATH="" | ||
2642 | 25 | |||
2643 | 26 | :: This is very annoying; FOR /F will work differently depending on the output | ||
2644 | 27 | :: of reg which is not consistent between OS versions (XP, 7). We must choose | ||
2645 | 28 | :: the tokens according to OS version. | ||
2646 | 29 | SET PYTHONPATHTOKENS=3 | ||
2647 | 30 | VER | FIND "XP" > nul | ||
2648 | 31 | IF %ERRORLEVEL% == 0 ( | ||
2649 | 32 | SET PYTHONPATHTOKENS=4) | ||
2650 | 33 | |||
2651 | 34 | ECHO Checking if python 2.7 is in the system | ||
2652 | 35 | |||
2653 | 36 | :: Look for python 2.7 | ||
2654 | 37 | FOR /F "tokens=%PYTHONPATHTOKENS%" %%A IN ('%REGQUERY27%') DO @SET PYTHONEXEPATH=%%A | ||
2655 | 38 | IF NOT %PYTHONEXEPATH% == "" ( | ||
2656 | 39 | GOTO :PYTHONPRESENT) | ||
2657 | 40 | |||
2658 | 41 | ECHO Checking if python 2.6 is in the system | ||
2659 | 42 | :: we do not have python 2.7 in the system, try to find 2.6 | ||
2660 | 43 | FOR /F "tokens=%PYTHONPATHTOKENS%" %%A IN ('%REGQUERY26%') DO @SET PYTHONEXEPATH=%%A | ||
2661 | 44 | |||
2662 | 45 | IF NOT %PYTHONEXEPATH% == "" ( | ||
2663 | 46 | GOTO :PYTHONPRESENT) | ||
2664 | 47 | |||
2665 | 48 | :: we do not have python (2.6 or 2.7) this could hapen in the case that the | ||
2666 | 49 | :: user installed the 32version in a 64 machine, let check if the software was installed in the wow key | ||
2667 | 50 | |||
2668 | 51 | :: Look for python 2.7 in WoW64 | ||
2669 | 52 | ECHO Checking if python 2.7 32 is in the system | ||
2670 | 53 | FOR /F "tokens=%PYTHONPATHTOKENS%" %%A IN ('%REGQUERY2732%') DO @SET PYTHONEXEPATH=%%A | ||
2671 | 54 | |||
2672 | 55 | IF NOT %PYTHONEXEPATH% == "" ( | ||
2673 | 56 | GOTO :PYTHONPRESENT) | ||
2674 | 57 | |||
2675 | 58 | ECHO Checking if python 2.6 32 is in the system | ||
2676 | 59 | :: we do not have python 2.7 in the system, try to find 2.6 | ||
2677 | 60 | FOR /F "tokens=%PYTHONPATHTOKENS%" %%A IN ('%REGQUERY2632%') DO @SET PYTHONEXEPATH=%%A | ||
2678 | 61 | IF NOT %PYTHONEXEPATH% == "" ( | ||
2679 | 62 | GOTO :PYTHONPRESENT) | ||
2680 | 63 | |||
2681 | 64 | ECHO Please ensure you have python installed | ||
2682 | 65 | GOTO :END | ||
2683 | 66 | |||
2684 | 67 | :PYTHONPRESENT | ||
2685 | 68 | |||
2686 | 69 | :: throw the first parameter away if is /skip-lint, | ||
2687 | 70 | :: the way we do this is to ensure that /skip-lint | ||
2688 | 71 | :: is the first parameter and copy all the rest in a loop | ||
2689 | 72 | :: the main reason for that is that %* is not affected | ||
2690 | 73 | :: by SHIFT, that is, it allways have all passed parameters | ||
2691 | 74 | |||
2692 | 75 | SET PARAMS=%* | ||
2693 | 76 | SET SKIPLINT=0 | ||
2694 | 77 | IF "%1" == "/skip-lint" ( | ||
2695 | 78 | SET SKIPLINT=1 | ||
2696 | 79 | GOTO :CLEANPARAMS | ||
2697 | 80 | )ELSE ( | ||
2698 | 81 | GOTO :CONTINUEBATCH) | ||
2699 | 82 | :CLEANPARAMS | ||
2700 | 83 | |||
2701 | 84 | SHIFT | ||
2702 | 85 | SET PARAMS=%1 | ||
2703 | 86 | :GETREST | ||
2704 | 87 | SHIFT | ||
2705 | 88 | if [%1]==[] ( | ||
2706 | 89 | GOTO CONTINUEBATCH) | ||
2707 | 90 | SET PARAMS=%PARAMS% %1 | ||
2708 | 91 | GOTO GETREST | ||
2709 | 92 | :CONTINUEBATCH | ||
2710 | 93 | |||
2711 | 94 | ECHO Python found, building auto-generated modules... | ||
2712 | 95 | :: call setup.py build so that the qt uic is called | ||
2713 | 96 | ::START "Build code" /D%CD% /WAIT "%PYTHONEXEPATH%\python.exe" setup.py build | ||
2714 | 97 | "%PYTHONEXEPATH%\python.exe" setup.py build | ||
2715 | 98 | |||
2716 | 99 | ECHO Running tests | ||
2717 | 100 | |||
2718 | 101 | :: execute the tests with a number of ignored linux only modules | ||
2719 | 102 | "%PYTHONEXEPATH%\python.exe" "%PYTHONEXEPATH%\Scripts\u1trial" -i "test_linux.py" --gui --reactor=qt4 -c %PARAMS% ubuntuone_installer | ||
2720 | 103 | |||
2721 | 104 | :: Clean the build from the setup.py | ||
2722 | 105 | ECHO Cleaning the generated code before running the style checks... | ||
2723 | 106 | |||
2724 | 107 | "%PYTHONEXEPATH%\python.exe" setup.py clean | ||
2725 | 108 | |||
2726 | 109 | IF %SKIPLINT% == 1 ( | ||
2727 | 110 | ECHO Skipping style checks | ||
2728 | 111 | GOTO :CLEAN) | ||
2729 | 112 | |||
2730 | 113 | ECHO Performing style checks... | ||
2731 | 114 | set USE_PYFLAKES=1 | ||
2732 | 115 | "%PYTHONEXEPATH%\python.exe" "%PYTHONEXEPATH%\Scripts\u1lint" ubuntuone_installer | ||
2733 | 116 | :: test for style if we can, if pep8 is not present, move to the end | ||
2734 | 117 | IF EXIST "%PYTHONEXEPATH%\Scripts\pep8.exe" ( | ||
2735 | 118 | "%PYTHONEXEPATH%\Scripts\pep8.exe" --repeat --exclude="*_ui.py,*_rc.py" . | ||
2736 | 119 | |||
2737 | 120 | :CLEAN | ||
2738 | 121 | :: Delete the temp folders | ||
2739 | 122 | RMDIR /s /q _trial_temp | ||
2740 | 123 | RMDIR /s /q .coverage | ||
2741 | 124 | :END | ||
2742 | 125 | |||
2743 | 126 | 0 | ||
2744 | === removed file 'setup.py' | |||
2745 | --- setup.py 2012-01-03 20:47:17 +0000 | |||
2746 | +++ setup.py 1970-01-01 00:00:00 +0000 | |||
2747 | @@ -1,249 +0,0 @@ | |||
2748 | 1 | #!/usr/bin/env python | ||
2749 | 2 | # setup.py - Build system for Ubuntu One Installer package | ||
2750 | 3 | # | ||
2751 | 4 | # Authors: Natalia B. Bidart <natalia.bidart@canonical.com> | ||
2752 | 5 | # Manuel de la Pena <manuel@canonical.com> | ||
2753 | 6 | # Alejandro J. Cura <alecu@canonical.com> | ||
2754 | 7 | # | ||
2755 | 8 | # Copyright 2010-2011 Canonical Ltd. | ||
2756 | 9 | # | ||
2757 | 10 | # This program is free software: you can redistribute it and/or modify it | ||
2758 | 11 | # under the terms of the GNU General Public License version 3, as published | ||
2759 | 12 | # by the Free Software Foundation. | ||
2760 | 13 | # | ||
2761 | 14 | # This program is distributed in the hope that it will be useful, but | ||
2762 | 15 | # WITHOUT ANY WARRANTY; without even the implied warranties of | ||
2763 | 16 | # MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR | ||
2764 | 17 | # PURPOSE. See the GNU General Public License for more details. | ||
2765 | 18 | # | ||
2766 | 19 | # You should have received a copy of the GNU General Public License along | ||
2767 | 20 | # with this program. If not, see <http://www.gnu.org/licenses/>. | ||
2768 | 21 | """Setup.py: build, distribute, clean.""" | ||
2769 | 22 | |||
2770 | 23 | # pylint: disable=W0404 | ||
2771 | 24 | |||
2772 | 25 | import os | ||
2773 | 26 | import sys | ||
2774 | 27 | |||
2775 | 28 | try: | ||
2776 | 29 | import DistUtilsExtra.auto | ||
2777 | 30 | from DistUtilsExtra.command import build_extra | ||
2778 | 31 | except ImportError: | ||
2779 | 32 | print >> sys.stderr, 'To build this program you need '\ | ||
2780 | 33 | 'https://launchpad.net/python-distutils-extra' | ||
2781 | 34 | sys.exit(1) | ||
2782 | 35 | assert DistUtilsExtra.auto.__version__ >= '2.18', \ | ||
2783 | 36 | 'needs DistUtilsExtra.auto >= 2.18' | ||
2784 | 37 | |||
2785 | 38 | from distutils import log | ||
2786 | 39 | |||
2787 | 40 | POT_FILE = 'po/ubuntuone-installer.pot' | ||
2788 | 41 | MESSAGE_ENTRY = 'ubuntuone-installer' | ||
2789 | 42 | CONSTANTS = 'ubuntuone_installer/constants.py' | ||
2790 | 43 | |||
2791 | 44 | CLEANFILES = [ | ||
2792 | 45 | MESSAGE_ENTRY, CONSTANTS, POT_FILE, | ||
2793 | 46 | 'MANIFEST'] | ||
2794 | 47 | QT_UI_DIR = os.path.join('ubuntuone_installer', 'gui', 'qt', 'ui') | ||
2795 | 48 | |||
2796 | 49 | |||
2797 | 50 | def replace_prefix(prefix): | ||
2798 | 51 | """Replace every '@prefix@' with prefix within 'filename' content.""" | ||
2799 | 52 | # replace .service file, DATA_DIR constant | ||
2800 | 53 | for filename in (MESSAGE_ENTRY, CONSTANTS): | ||
2801 | 54 | with open(filename + '.in') as in_file: | ||
2802 | 55 | content = in_file.read() | ||
2803 | 56 | with open(filename, 'w') as out_file: | ||
2804 | 57 | out_file.write(content.replace('@prefix@', prefix)) | ||
2805 | 58 | |||
2806 | 59 | |||
2807 | 60 | class InstallerInstall(DistUtilsExtra.auto.install_auto): | ||
2808 | 61 | """Class to install proper files.""" | ||
2809 | 62 | |||
2810 | 63 | def run(self): | ||
2811 | 64 | """Do the install. | ||
2812 | 65 | |||
2813 | 66 | Read from *.service.in and generate .service files by replacing | ||
2814 | 67 | @prefix@ by self.prefix. | ||
2815 | 68 | |||
2816 | 69 | """ | ||
2817 | 70 | replace_prefix(self.prefix) | ||
2818 | 71 | DistUtilsExtra.auto.install_auto.run(self) | ||
2819 | 72 | |||
2820 | 73 | |||
2821 | 74 | class InstallerBuild(build_extra.build_extra): | ||
2822 | 75 | """Build PyQt (.ui) files and resources.""" | ||
2823 | 76 | |||
2824 | 77 | description = "build PyQt GUIs (.ui) and resources (.qrc)" | ||
2825 | 78 | |||
2826 | 79 | def compile_ui(self, ui_file, py_file=None): | ||
2827 | 80 | """Compile the .ui files to python modules.""" | ||
2828 | 81 | # Search for pyuic4 in python bin dir, then in the $Path. | ||
2829 | 82 | if py_file is None: | ||
2830 | 83 | # go from the ui_file in the data folder to the | ||
2831 | 84 | # python file in the qt moodule | ||
2832 | 85 | py_file = os.path.split(ui_file)[1] | ||
2833 | 86 | py_file = os.path.splitext(py_file)[0] + '_ui.py' | ||
2834 | 87 | py_file = os.path.join(QT_UI_DIR, py_file) | ||
2835 | 88 | # we indeed want to catch Exception, is ugly but we need it | ||
2836 | 89 | # pylint: disable=W0703 | ||
2837 | 90 | try: | ||
2838 | 91 | # import the uic compiler from pyqt and generate the .py files | ||
2839 | 92 | # something similar could be done with pyside but that is left | ||
2840 | 93 | # as an exercise for the reader. | ||
2841 | 94 | from PyQt4 import uic | ||
2842 | 95 | fp = open(py_file, 'w') | ||
2843 | 96 | uic.compileUi(ui_file, fp) | ||
2844 | 97 | fp.close() | ||
2845 | 98 | log.info('Compiled %s into %s', ui_file, py_file) | ||
2846 | 99 | except Exception, e: | ||
2847 | 100 | self.warn('Unable to compile user interface %s: %s' % (py_file, e)) | ||
2848 | 101 | if not os.path.exists(py_file) or not file(py_file).read(): | ||
2849 | 102 | raise SystemExit(1) | ||
2850 | 103 | return | ||
2851 | 104 | # pylint: enable=W0703 | ||
2852 | 105 | |||
2853 | 106 | def compile_rc(self, qrc_file, py_file=None): | ||
2854 | 107 | """Compile the resources that will be included with the project.""" | ||
2855 | 108 | import PyQt4 | ||
2856 | 109 | # Search for pyuic4 in python bin dir, then in the $Path. | ||
2857 | 110 | if py_file is None: | ||
2858 | 111 | py_file = os.path.split(qrc_file)[1] | ||
2859 | 112 | py_file = os.path.splitext(py_file)[0] + '_rc.py' | ||
2860 | 113 | py_file = os.path.join(QT_UI_DIR, py_file) | ||
2861 | 114 | path = os.getenv('PATH') | ||
2862 | 115 | os.putenv('PATH', path + os.path.pathsep + os.path.join( | ||
2863 | 116 | os.path.dirname(PyQt4.__file__), 'bin')) | ||
2864 | 117 | if os.system('pyrcc4 -no-compress "%s" -o "%s"' % | ||
2865 | 118 | (qrc_file, py_file)) > 0: | ||
2866 | 119 | self.warn('Unable to generate python module {py_file}' | ||
2867 | 120 | ' for resource file {qrc_file}'.format( | ||
2868 | 121 | py_file=py_file, qrc_file=qrc_file)) | ||
2869 | 122 | if not os.path.exists(py_file) or not file(py_file).read(): | ||
2870 | 123 | raise SystemExit(1) | ||
2871 | 124 | else: | ||
2872 | 125 | log.info('compiled %s into %s' % (qrc_file, py_file)) | ||
2873 | 126 | os.putenv('PATH', path) | ||
2874 | 127 | |||
2875 | 128 | def _generate_qrc(self, qrc_file, srcfiles, prefix): | ||
2876 | 129 | """Generate the qrc file for the given src files.""" | ||
2877 | 130 | basedir = os.path.dirname(qrc_file) | ||
2878 | 131 | f = open(qrc_file, 'w') | ||
2879 | 132 | try: | ||
2880 | 133 | f.write('<!DOCTYPE RCC><RCC version="1.0">\n') | ||
2881 | 134 | import cgi | ||
2882 | 135 | f.write(' <qresource prefix="%s">\n' % cgi.escape(prefix)) | ||
2883 | 136 | for e in srcfiles: | ||
2884 | 137 | relpath = e[len(basedir) + 1:] | ||
2885 | 138 | f.write(' <file>%s</file>\n' | ||
2886 | 139 | % cgi.escape(relpath.replace(os.path.sep, '/'))) | ||
2887 | 140 | f.write(' </qresource>\n') | ||
2888 | 141 | f.write('</RCC>\n') | ||
2889 | 142 | finally: | ||
2890 | 143 | f.close() | ||
2891 | 144 | |||
2892 | 145 | def build_rc(self, py_file, basedir, prefix='/'): | ||
2893 | 146 | """Generate compiled resource including any files under basedir""" | ||
2894 | 147 | # For details, see http://doc.qt.nokia.com/latest/resources.html | ||
2895 | 148 | qrc_file = os.path.join(basedir, '%s.qrc' % os.path.basename(basedir)) | ||
2896 | 149 | srcfiles = [os.path.join(root, e) | ||
2897 | 150 | for root, _dirs, files in os.walk(basedir) for e in files] | ||
2898 | 151 | # NOTE: Here we cannot detect deleted files. In such cases, we need | ||
2899 | 152 | # to remove .qrc manually. | ||
2900 | 153 | try: | ||
2901 | 154 | self._generate_qrc(qrc_file, srcfiles, prefix) | ||
2902 | 155 | self.compile_rc(qrc_file, py_file) | ||
2903 | 156 | finally: | ||
2904 | 157 | os.unlink(qrc_file) | ||
2905 | 158 | |||
2906 | 159 | def run(self): | ||
2907 | 160 | """Execute the command.""" | ||
2908 | 161 | self._wrapuic() | ||
2909 | 162 | basepath = os.path.join('data', 'qt') | ||
2910 | 163 | # TODO: build the resource files so that we can include them | ||
2911 | 164 | #self.build_rc(os.path.join(basepath, 'icons_rc.py'), | ||
2912 | 165 | # os.path.join(os.path.dirname(__file__), 'icons'), | ||
2913 | 166 | # '/icons') | ||
2914 | 167 | for dirpath, _, filenames in os.walk(basepath): | ||
2915 | 168 | for filename in filenames: | ||
2916 | 169 | if filename.endswith('.ui'): | ||
2917 | 170 | self.compile_ui(os.path.join(dirpath, filename)) | ||
2918 | 171 | elif filename.endswith('.qrc'): | ||
2919 | 172 | self.compile_rc(os.path.join(dirpath, filename)) | ||
2920 | 173 | |||
2921 | 174 | build_extra.build_extra.run(self) | ||
2922 | 175 | |||
2923 | 176 | # pylint: disable=E1002 | ||
2924 | 177 | _wrappeduic = False | ||
2925 | 178 | |||
2926 | 179 | @classmethod | ||
2927 | 180 | def _wrapuic(cls): | ||
2928 | 181 | """Wrap uic to use gettext's _() in place of tr()""" | ||
2929 | 182 | if cls._wrappeduic: | ||
2930 | 183 | return | ||
2931 | 184 | |||
2932 | 185 | from PyQt4.uic.Compiler import compiler, qtproxies, indenter | ||
2933 | 186 | |||
2934 | 187 | # pylint: disable=C0103 | ||
2935 | 188 | class _UICompiler(compiler.UICompiler): | ||
2936 | 189 | """Speciallized compiler for qt .ui files.""" | ||
2937 | 190 | def createToplevelWidget(self, classname, widgetname): | ||
2938 | 191 | o = indenter.getIndenter() | ||
2939 | 192 | o.level = 0 | ||
2940 | 193 | o.write('from gettext import gettext as _') | ||
2941 | 194 | return super(_UICompiler, self).createToplevelWidget(classname, | ||
2942 | 195 | widgetname) | ||
2943 | 196 | compiler.UICompiler = _UICompiler | ||
2944 | 197 | |||
2945 | 198 | class _i18n_string(qtproxies.i18n_string): | ||
2946 | 199 | """Provide a translated text.""" | ||
2947 | 200 | |||
2948 | 201 | def __str__(self): | ||
2949 | 202 | return "_('%s')" % self.string.encode('string-escape') | ||
2950 | 203 | |||
2951 | 204 | qtproxies.i18n_string = _i18n_string | ||
2952 | 205 | |||
2953 | 206 | cls._wrappeduic = True | ||
2954 | 207 | # pylint: enable=C0103 | ||
2955 | 208 | # pylint: enable=E1002 | ||
2956 | 209 | |||
2957 | 210 | |||
2958 | 211 | class InstallerClean(DistUtilsExtra.auto.clean_build_tree): | ||
2959 | 212 | """Class to clean up after the build.""" | ||
2960 | 213 | |||
2961 | 214 | def run(self): | ||
2962 | 215 | """Clean up the built files.""" | ||
2963 | 216 | for built_file in CLEANFILES: | ||
2964 | 217 | if os.path.exists(built_file): | ||
2965 | 218 | os.unlink(built_file) | ||
2966 | 219 | |||
2967 | 220 | for dirpath, _, filenames in os.walk(os.path.join(QT_UI_DIR)): | ||
2968 | 221 | for current_file in filenames: | ||
2969 | 222 | if current_file.endswith('_ui.py') or\ | ||
2970 | 223 | current_file.endswith('_rc.py'): | ||
2971 | 224 | os.unlink(os.path.join(dirpath, current_file)) | ||
2972 | 225 | |||
2973 | 226 | DistUtilsExtra.auto.clean_build_tree.run(self) | ||
2974 | 227 | |||
2975 | 228 | |||
2976 | 229 | DistUtilsExtra.auto.setup( | ||
2977 | 230 | name='ubuntuone-windows-installer', | ||
2978 | 231 | version='3.1', | ||
2979 | 232 | license='GPL v3', | ||
2980 | 233 | author='Roberto Alsina', | ||
2981 | 234 | author_email='roberto.alsina@canonical.com', | ||
2982 | 235 | description='Ubuntu One Install Wizard', | ||
2983 | 236 | long_description='Application to perform initial setup of a ' | ||
2984 | 237 | 'Ubuntu One account.', | ||
2985 | 238 | url='https://launchpad.net/ubuntuone-windows-installer', | ||
2986 | 239 | packages=[ | ||
2987 | 240 | 'ubuntuone_installer', 'ubuntuone_installer.gui', | ||
2988 | 241 | 'ubuntuone_installer.gui.qt', | ||
2989 | 242 | ], | ||
2990 | 243 | extra_path='ubuntuone_installer', | ||
2991 | 244 | cmdclass={ | ||
2992 | 245 | 'install': InstallerInstall, | ||
2993 | 246 | 'build': InstallerBuild, | ||
2994 | 247 | 'clean': InstallerClean, | ||
2995 | 248 | }, | ||
2996 | 249 | ) | ||
2997 | 250 | 0 | ||
2998 | === removed directory 'ubuntuone_installer' | |||
2999 | === removed file 'ubuntuone_installer/__init__.py' | |||
3000 | --- ubuntuone_installer/__init__.py 2011-06-22 10:47:08 +0000 | |||
3001 | +++ ubuntuone_installer/__init__.py 1970-01-01 00:00:00 +0000 | |||
3002 | @@ -1,27 +0,0 @@ | |||
3003 | 1 | # -*- coding: utf-8 -*- | ||
3004 | 2 | |||
3005 | 3 | # Authors: Natalia B Bidart <natalia.bidart@canonical.com> | ||
3006 | 4 | # Authors: Alejandro J. Cura <alecu@canonical.com> | ||
3007 | 5 | # | ||
3008 | 6 | # Copyright 2010 Canonical Ltd. | ||
3009 | 7 | # | ||
3010 | 8 | # This program is free software: you can redistribute it and/or modify it | ||
3011 | 9 | # under the terms of the GNU General Public License version 3, as published | ||
3012 | 10 | # by the Free Software Foundation. | ||
3013 | 11 | # | ||
3014 | 12 | # This program is distributed in the hope that it will be useful, but | ||
3015 | 13 | # WITHOUT ANY WARRANTY; without even the implied warranties of | ||
3016 | 14 | # MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR | ||
3017 | 15 | # PURPOSE. See the GNU General Public License for more details. | ||
3018 | 16 | # | ||
3019 | 17 | # You should have received a copy of the GNU General Public License along | ||
3020 | 18 | # with this program. If not, see <http://www.gnu.org/licenses/>. | ||
3021 | 19 | |||
3022 | 20 | """The windows installer for Ubuntu One. | ||
3023 | 21 | |||
3024 | 22 | The installer is a wizard that sets up the basic account and configuration for | ||
3025 | 23 | a Ubuntu One user on windows. | ||
3026 | 24 | """ | ||
3027 | 25 | |||
3028 | 26 | # constants | ||
3029 | 27 | TRANSLATION_DOMAIN = 'ubuntuone-installer' | ||
3030 | 28 | 0 | ||
3031 | === removed directory 'ubuntuone_installer/gui' | |||
3032 | === removed file 'ubuntuone_installer/gui/__init__.py' | |||
3033 | --- ubuntuone_installer/gui/__init__.py 2011-09-05 21:12:02 +0000 | |||
3034 | +++ ubuntuone_installer/gui/__init__.py 1970-01-01 00:00:00 +0000 | |||
3035 | @@ -1,35 +0,0 @@ | |||
3036 | 1 | # -*- coding: utf-8 -*- | ||
3037 | 2 | |||
3038 | 3 | # Authors: Natalia B Bidart <natalia.bidart@canonical.com> | ||
3039 | 4 | # | ||
3040 | 5 | # Copyright 2011 Canonical Ltd. | ||
3041 | 6 | # | ||
3042 | 7 | # This program is free software: you can redistribute it and/or modify it | ||
3043 | 8 | # under the terms of the GNU General Public License version 3, as published | ||
3044 | 9 | # by the Free Software Foundation. | ||
3045 | 10 | # | ||
3046 | 11 | # This program is distributed in the hope that it will be useful, but | ||
3047 | 12 | # WITHOUT ANY WARRANTY; without even the implied warranties of | ||
3048 | 13 | # MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR | ||
3049 | 14 | # PURPOSE. See the GNU General Public License for more details. | ||
3050 | 15 | # | ||
3051 | 16 | # You should have received a copy of the GNU General Public License along | ||
3052 | 17 | # with this program. If not, see <http://www.gnu.org/licenses/>. | ||
3053 | 18 | |||
3054 | 19 | """The Installer UI for Ubuntu One.""" | ||
3055 | 20 | |||
3056 | 21 | import gettext | ||
3057 | 22 | |||
3058 | 23 | _ = gettext.gettext | ||
3059 | 24 | |||
3060 | 25 | ARE_YOU_SURE_1 = _("You can restart the setup process at any time " | ||
3061 | 26 | "by clicking on Ubuntu One in your Start menu.") | ||
3062 | 27 | ARE_YOU_SURE_2 = _("If you need to know more about Ubuntu One, then please " | ||
3063 | 28 | "go to %(url)s") | ||
3064 | 29 | LOCAL_FOLDERS_TITLE = _("Syncing your computer with the cloud") | ||
3065 | 30 | LOCAL_FOLDERS_SPACE_HEADER = _("Space (%s)") | ||
3066 | 31 | LOCAL_FOLDERS_OFFER_LABEL = _("The folders you have selected to sync " | ||
3067 | 32 | "take over your %(quota)s space. You can remove some folders or add " | ||
3068 | 33 | "some extra space") | ||
3069 | 34 | LOCAL_FOLDERS_CALCULATING = _("Calculating") | ||
3070 | 35 | NEXT = _("Next") | ||
3071 | 36 | 0 | ||
3072 | === removed directory 'ubuntuone_installer/gui/qt' | |||
3073 | === removed file 'ubuntuone_installer/gui/qt/__init__.py' | |||
3074 | --- ubuntuone_installer/gui/qt/__init__.py 2011-09-02 13:36:36 +0000 | |||
3075 | +++ ubuntuone_installer/gui/qt/__init__.py 1970-01-01 00:00:00 +0000 | |||
3076 | @@ -1,36 +0,0 @@ | |||
3077 | 1 | # -*- coding: utf-8 -*- | ||
3078 | 2 | |||
3079 | 3 | # Authors: Natalia B Bidart <natalia.bidart@canonical.com> | ||
3080 | 4 | # | ||
3081 | 5 | # Copyright 2010 Canonical Ltd. | ||
3082 | 6 | # | ||
3083 | 7 | # This program is free software: you can redistribute it and/or modify it | ||
3084 | 8 | # under the terms of the GNU General Public License version 3, as published | ||
3085 | 9 | # by the Free Software Foundation. | ||
3086 | 10 | # | ||
3087 | 11 | # This program is distributed in the hope that it will be useful, but | ||
3088 | 12 | # WITHOUT ANY WARRANTY; without even the implied warranties of | ||
3089 | 13 | # MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR | ||
3090 | 14 | # PURPOSE. See the GNU General Public License for more details. | ||
3091 | 15 | # | ||
3092 | 16 | # You should have received a copy of the GNU General Public License along | ||
3093 | 17 | # with this program. If not, see <http://www.gnu.org/licenses/>. | ||
3094 | 18 | |||
3095 | 19 | """The Qt graphical interface for the Ubuntu One Installer.""" | ||
3096 | 20 | |||
3097 | 21 | |||
3098 | 22 | LICENSE_CONTENT = """<html> | ||
3099 | 23 | <body style="font-family:Ubuntu"> | ||
3100 | 24 | <h2>License Agreement</h2> | ||
3101 | 25 | <p>This program is free software: you can redistribute it and/or modify | ||
3102 | 26 | it under the terms of the GNU General Public License version 3, as | ||
3103 | 27 | published by the Free Software Foundation.</p> | ||
3104 | 28 | <p>Ubuntu One Basic is free, while additional service add-ons may be | ||
3105 | 29 | paid for services.</p> | ||
3106 | 30 | <p>As free software, this programme is distributed without warranty. | ||
3107 | 31 | See the GNU General Public License for more details at | ||
3108 | 32 | <a href='http://www.gnu.org/licenses' | ||
3109 | 33 | style="color:#dd4814;">http://www.gnu.org/licenses</a> | ||
3110 | 34 | </p> | ||
3111 | 35 | </body> | ||
3112 | 36 | <html>""" | ||
3113 | 37 | 0 | ||
3114 | === removed file 'ubuntuone_installer/gui/qt/are_you_sure.py' | |||
3115 | --- ubuntuone_installer/gui/qt/are_you_sure.py 2011-07-27 15:09:28 +0000 | |||
3116 | +++ ubuntuone_installer/gui/qt/are_you_sure.py 1970-01-01 00:00:00 +0000 | |||
3117 | @@ -1,47 +0,0 @@ | |||
3118 | 1 | # -*- coding: utf-8 -*- | ||
3119 | 2 | |||
3120 | 3 | # Authors: Roberto Alsina <roberto.alsina@canonical.com> | ||
3121 | 4 | # | ||
3122 | 5 | # Copyright 2011 Canonical Ltd. | ||
3123 | 6 | # | ||
3124 | 7 | # This program is free software: you can redistribute it and/or modify it | ||
3125 | 8 | # under the terms of the GNU General Public License version 3, as published | ||
3126 | 9 | # by the Free Software Foundation. | ||
3127 | 10 | # | ||
3128 | 11 | # This program is distributed in the hope that it will be useful, but | ||
3129 | 12 | # WITHOUT ANY WARRANTY; without even the implied warranties of | ||
3130 | 13 | # MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR | ||
3131 | 14 | # PURPOSE. See the GNU General Public License for more details. | ||
3132 | 15 | # | ||
3133 | 16 | # You should have received a copy of the GNU General Public License along | ||
3134 | 17 | # with this program. If not, see <http://www.gnu.org/licenses/>. | ||
3135 | 18 | |||
3136 | 19 | """The "Are you sure" dialog.""" | ||
3137 | 20 | |||
3138 | 21 | import gettext | ||
3139 | 22 | |||
3140 | 23 | from PyQt4 import QtGui | ||
3141 | 24 | |||
3142 | 25 | from ubuntuone.platform.credentials import APP_NAME | ||
3143 | 26 | |||
3144 | 27 | from ubuntuone_installer.gui.qt.ui import are_you_sure_ui | ||
3145 | 28 | from ubuntuone_installer.gui import ( | ||
3146 | 29 | ARE_YOU_SURE_1, | ||
3147 | 30 | ARE_YOU_SURE_2, | ||
3148 | 31 | ) | ||
3149 | 32 | |||
3150 | 33 | _ = gettext.gettext | ||
3151 | 34 | |||
3152 | 35 | |||
3153 | 36 | class AreYouSure(QtGui.QDialog): | ||
3154 | 37 | |||
3155 | 38 | """A 'Are you sure?' dialog.""" | ||
3156 | 39 | |||
3157 | 40 | def __init__(self, *args, **kwargs): | ||
3158 | 41 | super(AreYouSure, self).__init__(*args, **kwargs) | ||
3159 | 42 | self.ui = are_you_sure_ui.Ui_Dialog() | ||
3160 | 43 | self.ui.setupUi(self) | ||
3161 | 44 | self.setWindowTitle(APP_NAME) | ||
3162 | 45 | link = u'<a href="https://one.ubuntu.com">https://one.ubuntu.com</a>' | ||
3163 | 46 | msg = (u"%s<p>%s" % (ARE_YOU_SURE_1, ARE_YOU_SURE_2)) % {"url": link} | ||
3164 | 47 | self.ui.message_label.setText(msg) | ||
3165 | 48 | 0 | ||
3166 | === removed file 'ubuntuone_installer/gui/qt/currentuser.py' | |||
3167 | --- ubuntuone_installer/gui/qt/currentuser.py 2011-08-02 20:16:28 +0000 | |||
3168 | +++ ubuntuone_installer/gui/qt/currentuser.py 1970-01-01 00:00:00 +0000 | |||
3169 | @@ -1,55 +0,0 @@ | |||
3170 | 1 | # -*- coding: utf-8 -*- | ||
3171 | 2 | |||
3172 | 3 | # Authors: Roberto Alsina <roberto.alsina@canonical.com> | ||
3173 | 4 | # | ||
3174 | 5 | # Copyright 2011 Canonical Ltd. | ||
3175 | 6 | # | ||
3176 | 7 | # This program is free software: you can redistribute it and/or modify it | ||
3177 | 8 | # under the terms of the GNU General Public License version 3, as published | ||
3178 | 9 | # by the Free Software Foundation. | ||
3179 | 10 | # | ||
3180 | 11 | # This program is distributed in the hope that it will be useful, but | ||
3181 | 12 | # WITHOUT ANY WARRANTY; without even the implied warranties of | ||
3182 | 13 | # MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR | ||
3183 | 14 | # PURPOSE. See the GNU General Public License for more details. | ||
3184 | 15 | # | ||
3185 | 16 | # You should have received a copy of the GNU General Public License along | ||
3186 | 17 | # with this program. If not, see <http://www.gnu.org/licenses/>. | ||
3187 | 18 | |||
3188 | 19 | """Custom controller for current user page.""" | ||
3189 | 20 | |||
3190 | 21 | from twisted.internet.defer import inlineCallbacks | ||
3191 | 22 | |||
3192 | 23 | from ubuntu_sso.qt import controllers | ||
3193 | 24 | |||
3194 | 25 | from ubuntuone.platform.credentials import ( | ||
3195 | 26 | CredentialsManagementTool, | ||
3196 | 27 | CredentialsError, | ||
3197 | 28 | ) | ||
3198 | 29 | |||
3199 | 30 | from ubuntuone_installer.logger import setup_logging | ||
3200 | 31 | |||
3201 | 32 | # Invalid name logger | ||
3202 | 33 | # pylint: disable=C0103 | ||
3203 | 34 | logger = setup_logging('qt.currentuser') | ||
3204 | 35 | # pylint: enable=C0103 | ||
3205 | 36 | |||
3206 | 37 | |||
3207 | 38 | class CurrentUserController(controllers.CurrentUserController): | ||
3208 | 39 | """Custom controller for current user page.""" | ||
3209 | 40 | |||
3210 | 41 | @inlineCallbacks | ||
3211 | 42 | def login(self, *args): | ||
3212 | 43 | """Perform the login using the self.backend.""" | ||
3213 | 44 | email = unicode(self.view.ui.email_edit.text()) | ||
3214 | 45 | password = unicode(self.view.ui.password_edit.text()) | ||
3215 | 46 | credtool = CredentialsManagementTool() | ||
3216 | 47 | try: | ||
3217 | 48 | d = yield credtool.login_email_password( | ||
3218 | 49 | email=email, | ||
3219 | 50 | password=password, | ||
3220 | 51 | ) | ||
3221 | 52 | self.on_logged_in(self.view.wizard().app_name, d) | ||
3222 | 53 | except CredentialsError, e: | ||
3223 | 54 | logger.exception("Error getting credentials:") | ||
3224 | 55 | self.on_login_error(e.args[0]) | ||
3225 | 56 | 0 | ||
3226 | === removed file 'ubuntuone_installer/gui/qt/enhanced_check_box.py' | |||
3227 | --- ubuntuone_installer/gui/qt/enhanced_check_box.py 2011-08-29 13:48:32 +0000 | |||
3228 | +++ ubuntuone_installer/gui/qt/enhanced_check_box.py 1970-01-01 00:00:00 +0000 | |||
3229 | @@ -1,50 +0,0 @@ | |||
3230 | 1 | # -*- coding: utf-8 -*- | ||
3231 | 2 | |||
3232 | 3 | # Authors: Diego Sarmentero <diego.sarmentero@canonical.com> | ||
3233 | 4 | # | ||
3234 | 5 | # Copyright 2011 Canonical Ltd. | ||
3235 | 6 | # | ||
3236 | 7 | # This program is free software: you can redistribute it and/or modify it | ||
3237 | 8 | # under the terms of the GNU General Public License version 3, as published | ||
3238 | 9 | # by the Free Software Foundation. | ||
3239 | 10 | # | ||
3240 | 11 | # This program is distributed in the hope that it will be useful, but | ||
3241 | 12 | # WITHOUT ANY WARRANTY; without even the implied warranties of | ||
3242 | 13 | # MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR | ||
3243 | 14 | # PURPOSE. See the GNU General Public License for more details. | ||
3244 | 15 | # | ||
3245 | 16 | # You should have received a copy of the GNU General Public License along | ||
3246 | 17 | # with this program. If not, see <http://www.gnu.org/licenses/>. | ||
3247 | 18 | |||
3248 | 19 | """Customized Check Box to support links.""" | ||
3249 | 20 | |||
3250 | 21 | from PyQt4 import QtGui | ||
3251 | 22 | |||
3252 | 23 | |||
3253 | 24 | class EnhancedCheckBox(QtGui.QCheckBox): | ||
3254 | 25 | """Enhanced QCheckBox to support links in the message displayed.""" | ||
3255 | 26 | |||
3256 | 27 | def __init__(self, text=""): | ||
3257 | 28 | QtGui.QCheckBox.__init__(self) | ||
3258 | 29 | hbox = QtGui.QHBoxLayout() | ||
3259 | 30 | self.text_label = QtGui.QLabel(text) | ||
3260 | 31 | self.text_label.setOpenExternalLinks(True) | ||
3261 | 32 | padding = self.iconSize().width() | ||
3262 | 33 | self.text_label.setStyleSheet("padding-left: {0}px;".format(padding)) | ||
3263 | 34 | hbox.addWidget(self.text_label) | ||
3264 | 35 | self.setLayout(hbox) | ||
3265 | 36 | |||
3266 | 37 | self.stateChanged.connect(self.text_label.setFocus) | ||
3267 | 38 | |||
3268 | 39 | def text(self): | ||
3269 | 40 | """Return the text of this widget.""" | ||
3270 | 41 | return self.text_label.text() | ||
3271 | 42 | |||
3272 | 43 | # Invalid name "setText" | ||
3273 | 44 | # pylint: disable=C0103 | ||
3274 | 45 | |||
3275 | 46 | def setText(self, text): | ||
3276 | 47 | """Set a new text to this widget.""" | ||
3277 | 48 | self.text_label.setText(text) | ||
3278 | 49 | |||
3279 | 50 | # pylint: enable=C0103 | ||
3280 | 51 | 0 | ||
3281 | === removed file 'ubuntuone_installer/gui/qt/folders.py' | |||
3282 | --- ubuntuone_installer/gui/qt/folders.py 2012-03-16 15:27:09 +0000 | |||
3283 | +++ ubuntuone_installer/gui/qt/folders.py 1970-01-01 00:00:00 +0000 | |||
3284 | @@ -1,71 +0,0 @@ | |||
3285 | 1 | # -*- coding: utf-8 -*- | ||
3286 | 2 | |||
3287 | 3 | # Authors: Roberto Alsina <roberto.alsina@canonical.com> | ||
3288 | 4 | # Diego Sarmentero <diego.sarmentero@canonical.com> | ||
3289 | 5 | # | ||
3290 | 6 | # Copyright 2011 Canonical Ltd. | ||
3291 | 7 | # | ||
3292 | 8 | # This program is free software: you can redistribute it and/or modify it | ||
3293 | 9 | # under the terms of the GNU General Public License version 3, as published | ||
3294 | 10 | # by the Free Software Foundation. | ||
3295 | 11 | # | ||
3296 | 12 | # This program is distributed in the hope that it will be useful, but | ||
3297 | 13 | # WITHOUT ANY WARRANTY; without even the implied warranties of | ||
3298 | 14 | # MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR | ||
3299 | 15 | # PURPOSE. See the GNU General Public License for more details. | ||
3300 | 16 | # | ||
3301 | 17 | # You should have received a copy of the GNU General Public License along | ||
3302 | 18 | # with this program. If not, see <http://www.gnu.org/licenses/>. | ||
3303 | 19 | |||
3304 | 20 | """Page to list folders in a Ubuntu One account.""" | ||
3305 | 21 | |||
3306 | 22 | import gettext | ||
3307 | 23 | |||
3308 | 24 | from PyQt4 import QtGui, QtCore | ||
3309 | 25 | from ubuntu_sso.qt.gui import SSOWizardPage | ||
3310 | 26 | from ubuntuone.controlpanel.gui.qt import folders | ||
3311 | 27 | |||
3312 | 28 | from ubuntuone_installer.gui import NEXT | ||
3313 | 29 | from ubuntuone_installer.gui.qt.ui import folders_ui | ||
3314 | 30 | |||
3315 | 31 | _ = gettext.gettext | ||
3316 | 32 | |||
3317 | 33 | |||
3318 | 34 | class FoldersPage(SSOWizardPage): | ||
3319 | 35 | """Wizard page to list and manage an account's folders.""" | ||
3320 | 36 | |||
3321 | 37 | def __init__(self, parent=None): | ||
3322 | 38 | super(FoldersPage, self).__init__(folders_ui.Ui_Form(), None, parent) | ||
3323 | 39 | self.setTitle(_("Syncing the cloud to your computer")) | ||
3324 | 40 | self.setSubTitle(_("These are your folders in your cloud. " | ||
3325 | 41 | "Select the ones you want to sync with this computer.")) | ||
3326 | 42 | self.folders_widget = folders.FoldersPanel() | ||
3327 | 43 | self.layout().insertWidget( | ||
3328 | 44 | self.layout().count() - 1, self.folders_widget) | ||
3329 | 45 | self.folders_widget.ui.share_publish_button.hide() | ||
3330 | 46 | self.folders_widget.ui.add_folder_button.hide() | ||
3331 | 47 | self.folders_widget.ui.folders.setHeaderHidden(True) | ||
3332 | 48 | self.folders_widget.ui.folders.setColumnHidden(2, True) | ||
3333 | 49 | |||
3334 | 50 | # Invalid name "initializePage" | ||
3335 | 51 | # pylint: disable=C0103 | ||
3336 | 52 | |||
3337 | 53 | def initializePage(self): | ||
3338 | 54 | """Set Folders Page navigation buttons.""" | ||
3339 | 55 | self.wizard().setOption(QtGui.QWizard.HaveCustomButton1, False) | ||
3340 | 56 | self.wizard().setOption(QtGui.QWizard.HaveCustomButton2, False) | ||
3341 | 57 | self.wizard().setButtonLayout([ | ||
3342 | 58 | QtGui.QWizard.Stretch, | ||
3343 | 59 | QtGui.QWizard.NextButton]) | ||
3344 | 60 | self.wizard().setButtonText(QtGui.QWizard.NextButton, | ||
3345 | 61 | NEXT) | ||
3346 | 62 | self.wizard()._next_id = self.wizard().local_folders_page_id | ||
3347 | 63 | |||
3348 | 64 | # pylint: enable=C0103 | ||
3349 | 65 | |||
3350 | 66 | @QtCore.pyqtSlot() | ||
3351 | 67 | def on_check_settings_button_clicked(self): | ||
3352 | 68 | """Show the Preferences Page when the user click on Settings button.""" | ||
3353 | 69 | self.wizard()._next_id = \ | ||
3354 | 70 | self.wizard().preferences_page_id | ||
3355 | 71 | self.wizard().next() | ||
3356 | 72 | 0 | ||
3357 | === removed file 'ubuntuone_installer/gui/qt/forgotten.py' | |||
3358 | --- ubuntuone_installer/gui/qt/forgotten.py 2011-09-21 18:24:39 +0000 | |||
3359 | +++ ubuntuone_installer/gui/qt/forgotten.py 1970-01-01 00:00:00 +0000 | |||
3360 | @@ -1,33 +0,0 @@ | |||
3361 | 1 | # -*- coding: utf-8 -*- | ||
3362 | 2 | |||
3363 | 3 | # Authors: Roberto Alsina <roberto.alsina@canonical.com> | ||
3364 | 4 | # | ||
3365 | 5 | # Copyright 2011 Canonical Ltd. | ||
3366 | 6 | # | ||
3367 | 7 | # This program is free software: you can redistribute it and/or modify it | ||
3368 | 8 | # under the terms of the GNU General Public License version 3, as published | ||
3369 | 9 | # by the Free Software Foundation. | ||
3370 | 10 | # | ||
3371 | 11 | # This program is distributed in the hope that it will be useful, but | ||
3372 | 12 | # WITHOUT ANY WARRANTY; without even the implied warranties of | ||
3373 | 13 | # MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR | ||
3374 | 14 | # PURPOSE. See the GNU General Public License for more details. | ||
3375 | 15 | # | ||
3376 | 16 | # You should have received a copy of the GNU General Public License along | ||
3377 | 17 | # with this program. If not, see <http://www.gnu.org/licenses/>. | ||
3378 | 18 | |||
3379 | 19 | """Custom forgotten password controller.""" | ||
3380 | 20 | |||
3381 | 21 | from ubuntu_sso.qt import controllers | ||
3382 | 22 | |||
3383 | 23 | |||
3384 | 24 | class ForgottenPasswordController(controllers.ForgottenPasswordController): | ||
3385 | 25 | """A custom forgotten password controller. | ||
3386 | 26 | |||
3387 | 27 | This controller hides the overlay as needed. | ||
3388 | 28 | """ | ||
3389 | 29 | |||
3390 | 30 | def on_password_reset_error(self, app_name, error): | ||
3391 | 31 | """Hide the overlay, then do as the default controller does.""" | ||
3392 | 32 | super(ForgottenPasswordController, | ||
3393 | 33 | self).on_password_reset_error(app_name, error) | ||
3394 | 34 | 0 | ||
3395 | === removed file 'ubuntuone_installer/gui/qt/gui.py' | |||
3396 | --- ubuntuone_installer/gui/qt/gui.py 2012-03-16 15:27:09 +0000 | |||
3397 | +++ ubuntuone_installer/gui/qt/gui.py 1970-01-01 00:00:00 +0000 | |||
3398 | @@ -1,604 +0,0 @@ | |||
3399 | 1 | # -*- coding: utf-8 -*- | ||
3400 | 2 | # | ||
3401 | 3 | # Copyright 2011 Canonical Ltd. | ||
3402 | 4 | # | ||
3403 | 5 | # This program is free software: you can redistribute it and/or modify it | ||
3404 | 6 | # under the terms of the GNU General Public License version 3, as published | ||
3405 | 7 | # by the Free Software Foundation. | ||
3406 | 8 | # | ||
3407 | 9 | # This program is distributed in the hope that it will be useful, but | ||
3408 | 10 | # WITHOUT ANY WARRANTY; without even the implied warranties of | ||
3409 | 11 | # MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR | ||
3410 | 12 | # PURPOSE. See the GNU General Public License for more details. | ||
3411 | 13 | # | ||
3412 | 14 | # You should have received a copy of the GNU General Public License along | ||
3413 | 15 | # with this program. If not, see <http://www.gnu.org/licenses/>. | ||
3414 | 16 | |||
3415 | 17 | """The user interface for the Ubuntu One Installer.""" | ||
3416 | 18 | |||
3417 | 19 | import gettext | ||
3418 | 20 | |||
3419 | 21 | from twisted.internet import defer | ||
3420 | 22 | from PyQt4 import QtGui, QtCore | ||
3421 | 23 | |||
3422 | 24 | from ubuntu_sso import networkstate | ||
3423 | 25 | from ubuntu_sso.qt.gui import ( | ||
3424 | 26 | SSOWizardPage, | ||
3425 | 27 | EmailVerificationPage, | ||
3426 | 28 | ErrorPage, | ||
3427 | 29 | ForgottenPasswordPage, | ||
3428 | 30 | ResetPasswordPage, | ||
3429 | 31 | ) | ||
3430 | 32 | from ubuntu_sso.utils.ui import ( | ||
3431 | 33 | SUCCESS, | ||
3432 | 34 | ) | ||
3433 | 35 | from ubuntu_sso.qt.current_user_sign_in_ui import \ | ||
3434 | 36 | Ui_CurrentUserSignInPage | ||
3435 | 37 | from ubuntu_sso.qt.email_verification_ui import \ | ||
3436 | 38 | Ui_EmailVerificationPage | ||
3437 | 39 | from ubuntu_sso.qt.error_message_ui import Ui_ErrorPage | ||
3438 | 40 | from ubuntu_sso.qt.success_message_ui import Ui_SuccessPage | ||
3439 | 41 | from ubuntu_sso.qt.forgotten_password_ui import \ | ||
3440 | 42 | Ui_ForgottenPasswordPage | ||
3441 | 43 | from ubuntu_sso.qt.reset_password_ui import Ui_ResetPasswordPage | ||
3442 | 44 | from ubuntu_sso.qt.controllers import ( | ||
3443 | 45 | ChooseSignInController, | ||
3444 | 46 | EmailVerificationController, | ||
3445 | 47 | ErrorController, | ||
3446 | 48 | ResetPasswordController, | ||
3447 | 49 | SetUpAccountController, | ||
3448 | 50 | SuccessController, | ||
3449 | 51 | ) | ||
3450 | 52 | |||
3451 | 53 | from ubuntuone.controlpanel import backend | ||
3452 | 54 | from ubuntuone.controlpanel.gui.qt.loadingoverlay import LoadingOverlay | ||
3453 | 55 | |||
3454 | 56 | from ubuntuone.platform.credentials import ( | ||
3455 | 57 | APP_NAME, | ||
3456 | 58 | TC_URL, | ||
3457 | 59 | ) | ||
3458 | 60 | |||
3459 | 61 | # Module used to include the resources into this file | ||
3460 | 62 | # pylint: disable=W0611 | ||
3461 | 63 | from ubuntuone_installer.gui.qt.ui import images_rc | ||
3462 | 64 | # pylint: enable=W0611 | ||
3463 | 65 | from ubuntuone_installer.logger import setup_logging | ||
3464 | 66 | from ubuntuone_installer.gui.qt.ui import ( | ||
3465 | 67 | choose_sign_in_ui, | ||
3466 | 68 | congratulations_ui, | ||
3467 | 69 | license_ui, | ||
3468 | 70 | setup_account_ui, | ||
3469 | 71 | ) | ||
3470 | 72 | |||
3471 | 73 | from ubuntuone_installer.gui import qt | ||
3472 | 74 | from ubuntuone_installer.gui.qt.are_you_sure import AreYouSure | ||
3473 | 75 | from ubuntuone_installer.gui.qt.currentuser import CurrentUserController | ||
3474 | 76 | from ubuntuone_installer.gui.qt.folders import FoldersPage | ||
3475 | 77 | from ubuntuone_installer.gui.qt.forgotten import ForgottenPasswordController | ||
3476 | 78 | from ubuntuone_installer.gui.qt.local_folders import LocalFoldersPage | ||
3477 | 79 | from ubuntuone_installer.gui.qt.network_detection import NetworkDetectionPage | ||
3478 | 80 | from ubuntuone_installer.gui.qt.preferences import PreferencesPage | ||
3479 | 81 | from ubuntuone_installer.gui.qt.sync_now_or_later import SyncNowOrLaterPage | ||
3480 | 82 | from ubuntuone_installer.gui.qt.setup_account import SetupAccountPage | ||
3481 | 83 | from ubuntuone_installer.gui.qt.side_widget import SideWidget | ||
3482 | 84 | |||
3483 | 85 | _ = gettext.gettext | ||
3484 | 86 | CONGRATULATIONS = _("Congratulations") | ||
3485 | 87 | CREDENTIALS_ERROR_TITLE = _("Error getting credentials") | ||
3486 | 88 | CREDENTIALS_ERROR = _('Application will close.\n\n%r') | ||
3487 | 89 | SIGN_IN = _("Sign in to Ubuntu One") | ||
3488 | 90 | SIGN_IN_SUBTITLE = _("Sign in with your existing Ubuntu One" | ||
3489 | 91 | " username and password.") | ||
3490 | 92 | SKIP_TOUR = _("Skip tour, go to Dashboard") | ||
3491 | 93 | START_SETUP = _("Start setup") | ||
3492 | 94 | SUCCESSFUL_LOGIN = _("Login successful") | ||
3493 | 95 | TITLE_STYLE = "<span style=\"font-size:24px\">%s</span>" | ||
3494 | 96 | UPDATE_TITLE = _("Updates are available") | ||
3495 | 97 | UPDATE_SOFTWARE = _("There is a new version of Ubuntu One available. " | ||
3496 | 98 | "Do you want to perform an upgrade?") | ||
3497 | 99 | REMOVE_OLD_BETA_TITLE = _("Remove old Beta") | ||
3498 | 100 | REMOVE_OLD_BETA = _("The old Ubuntu One Beta is installed in your system. Do " | ||
3499 | 101 | "you want to uninstall it?") | ||
3500 | 102 | REMOVE_OLD_BETA_ERROR = _("There was an error uninstall the old beta. Please " | ||
3501 | 103 | "do this step manually") | ||
3502 | 104 | MIGRATE_OLD_BETA_DATA_TITLE = _("Migrate old data") | ||
3503 | 105 | MIGRATE_OLD_BETA = _("Do you want to migrate the files from the old Ubuntu " | ||
3504 | 106 | "One Beta location to the new one?") | ||
3505 | 107 | MIGRATE_OLD_BETA_DATA_ERROR = _("There was an error migrating your data. " | ||
3506 | 108 | "Please do this step manually.") | ||
3507 | 109 | |||
3508 | 110 | # Invalid name logger | ||
3509 | 111 | # pylint: disable=C0103 | ||
3510 | 112 | logger = setup_logging('qt.gui') | ||
3511 | 113 | # pylint: enable=C0103 | ||
3512 | 114 | |||
3513 | 115 | |||
3514 | 116 | def _ask_user_question(title, question): | ||
3515 | 117 | """Ask the user a Yes/No question.""" | ||
3516 | 118 | result = QtGui.QMessageBox.question(None, title, question, | ||
3517 | 119 | QtGui.QMessageBox.Yes, QtGui.QMessageBox.No) | ||
3518 | 120 | return result == QtGui.QMessageBox.Yes | ||
3519 | 121 | |||
3520 | 122 | |||
3521 | 123 | def user_wants_to_update(): | ||
3522 | 124 | """Ask the user if he really wants to update the software.""" | ||
3523 | 125 | return _ask_user_question(UPDATE_TITLE, UPDATE_SOFTWARE) | ||
3524 | 126 | |||
3525 | 127 | |||
3526 | 128 | def user_wants_to_remove_old_beta(): | ||
3527 | 129 | """Ask the user if he really wants to remove the old beta.""" | ||
3528 | 130 | return _ask_user_question(REMOVE_OLD_BETA_TITLE, REMOVE_OLD_BETA) | ||
3529 | 131 | |||
3530 | 132 | |||
3531 | 133 | def user_wants_to_migrate_data(): | ||
3532 | 134 | """Ask the user if he really wants to migrate the data.""" | ||
3533 | 135 | return _ask_user_question(MIGRATE_OLD_BETA_DATA_TITLE, MIGRATE_OLD_BETA) | ||
3534 | 136 | |||
3535 | 137 | |||
3536 | 138 | def _warn_user(title, message): | ||
3537 | 139 | """Warn the user.""" | ||
3538 | 140 | QtGui.QMessageBox.warning(None, title, message, QtGui.QMessageBox.Ok) | ||
3539 | 141 | |||
3540 | 142 | |||
3541 | 143 | def warn_user_beta_not_removed(): | ||
3542 | 144 | """Let the user know that the data was not migrated.""" | ||
3543 | 145 | _warn_user(REMOVE_OLD_BETA_TITLE, REMOVE_OLD_BETA_ERROR) | ||
3544 | 146 | |||
3545 | 147 | |||
3546 | 148 | def warn_user_data_not_migrated(): | ||
3547 | 149 | """Let the user know that the data was not migrated.""" | ||
3548 | 150 | _warn_user(MIGRATE_OLD_BETA_DATA_TITLE, MIGRATE_OLD_BETA_DATA_ERROR) | ||
3549 | 151 | |||
3550 | 152 | |||
3551 | 153 | class LicensePage(SSOWizardPage): | ||
3552 | 154 | """Wizard Page that displays the license info and links to the GPL.""" | ||
3553 | 155 | |||
3554 | 156 | def __init__(self, parent=None): | ||
3555 | 157 | super(LicensePage, self).__init__(license_ui.Ui_Form(), None, parent) | ||
3556 | 158 | self.header.setVisible(False) | ||
3557 | 159 | self.ui.textBrowser.setHtml(qt.LICENSE_CONTENT) | ||
3558 | 160 | self.agree_button = None | ||
3559 | 161 | |||
3560 | 162 | # Invalid names of Qt-inherited methods | ||
3561 | 163 | # pylint: disable=C0103 | ||
3562 | 164 | |||
3563 | 165 | def initializePage(self): | ||
3564 | 166 | """Setup UI details.""" | ||
3565 | 167 | # Set the right texts and connections for buttons | ||
3566 | 168 | self.setButtonText(QtGui.QWizard.CustomButton1, _("Agree && continue")) | ||
3567 | 169 | self.setButtonText(QtGui.QWizard.CancelButton, | ||
3568 | 170 | _("Disagree && uninstall")) | ||
3569 | 171 | |||
3570 | 172 | # This is just to catch an exception thrown when nothing | ||
3571 | 173 | # is connected to the signal. It's not an exceptional | ||
3572 | 174 | # condition at all. | ||
3573 | 175 | try: | ||
3574 | 176 | self.wizard().customButtonClicked.disconnect() | ||
3575 | 177 | except TypeError: | ||
3576 | 178 | pass | ||
3577 | 179 | |||
3578 | 180 | self.wizard().setButtonLayout([ | ||
3579 | 181 | QtGui.QWizard.CancelButton, | ||
3580 | 182 | QtGui.QWizard.BackButton, | ||
3581 | 183 | QtGui.QWizard.Stretch, | ||
3582 | 184 | QtGui.QWizard.CustomButton1]) | ||
3583 | 185 | |||
3584 | 186 | self.agree_button = self.wizard().button(QtGui.QWizard.CustomButton1) | ||
3585 | 187 | self.agree_button.setDefault(True) | ||
3586 | 188 | self.agree_button.style().unpolish(self.agree_button) | ||
3587 | 189 | self.agree_button.style().polish(self.agree_button) | ||
3588 | 190 | self.wizard().customButtonClicked.connect(self.check_connection) | ||
3589 | 191 | |||
3590 | 192 | # pylint: disable=W0212 | ||
3591 | 193 | @defer.inlineCallbacks | ||
3592 | 194 | def check_connection(self, button_id): | ||
3593 | 195 | """Decide next ID based on network detection.""" | ||
3594 | 196 | if button_id == QtGui.QWizard.CustomButton1: | ||
3595 | 197 | connected = yield self.wizard().check_connection() | ||
3596 | 198 | if connected: | ||
3597 | 199 | self.next = self.wizard().SIGN_IN_PAGE_ID | ||
3598 | 200 | else: | ||
3599 | 201 | self.next = self.wizard()._next_id | ||
3600 | 202 | self.wizard().next() | ||
3601 | 203 | # pylint: enable=W0212 | ||
3602 | 204 | |||
3603 | 205 | def nextId(self): | ||
3604 | 206 | """Return the next page ID.""" | ||
3605 | 207 | return self.next | ||
3606 | 208 | |||
3607 | 209 | |||
3608 | 210 | class SignInPage(SSOWizardPage): | ||
3609 | 211 | """Wizard Page that lets the user Sign into Ubuntu One.""" | ||
3610 | 212 | |||
3611 | 213 | # Invalid names of Qt-inherited methods | ||
3612 | 214 | # pylint: disable=C0103 | ||
3613 | 215 | |||
3614 | 216 | def initializePage(self): | ||
3615 | 217 | """Setup UI details.""" | ||
3616 | 218 | self.ui.cancel_button.setText(_("Close window and setup later")) | ||
3617 | 219 | self.ui.cancel_button.clicked.connect(self.wizard().reject) | ||
3618 | 220 | # Layout without custom button 1, | ||
3619 | 221 | # without finish button | ||
3620 | 222 | # without cancel | ||
3621 | 223 | self.wizard().setButtonLayout([ | ||
3622 | 224 | QtGui.QWizard.Stretch, | ||
3623 | 225 | QtGui.QWizard.NextButton]) | ||
3624 | 226 | |||
3625 | 227 | def showEvent(self, event): | ||
3626 | 228 | """Set existing_account_button as default when the page is shown.""" | ||
3627 | 229 | super(SignInPage, self).showEvent(event) | ||
3628 | 230 | self.ui.existing_account_button.setDefault(True) | ||
3629 | 231 | self.ui.existing_account_button.style().unpolish( | ||
3630 | 232 | self.ui.existing_account_button) | ||
3631 | 233 | self.ui.existing_account_button.style().polish( | ||
3632 | 234 | self.ui.existing_account_button) | ||
3633 | 235 | |||
3634 | 236 | def nextId(self): | ||
3635 | 237 | """Provide the next id.""" | ||
3636 | 238 | return self.next | ||
3637 | 239 | |||
3638 | 240 | |||
3639 | 241 | class CurrentUserSignInPage(SSOWizardPage): | ||
3640 | 242 | """Wizard Page that lets a current user Sign into Ubuntu One.""" | ||
3641 | 243 | |||
3642 | 244 | # Invalid names of Qt-inherited methods | ||
3643 | 245 | # pylint: disable=C0103 | ||
3644 | 246 | |||
3645 | 247 | def nextId(self): | ||
3646 | 248 | """Provide the next id.""" | ||
3647 | 249 | return self.next | ||
3648 | 250 | |||
3649 | 251 | def initializePage(self): | ||
3650 | 252 | """Setup UI details.""" | ||
3651 | 253 | self.setButtonText(QtGui.QWizard.CancelButton, | ||
3652 | 254 | _("Cancel")) | ||
3653 | 255 | # Layout without custom button 1, | ||
3654 | 256 | # without finish button | ||
3655 | 257 | self.wizard().setButtonLayout([ | ||
3656 | 258 | QtGui.QWizard.BackButton, | ||
3657 | 259 | QtGui.QWizard.Stretch]) | ||
3658 | 260 | |||
3659 | 261 | # Set sign_in_button as default when the page is shown. | ||
3660 | 262 | self.ui.sign_in_button.setDefault(True) | ||
3661 | 263 | self.ui.sign_in_button.setEnabled(False) | ||
3662 | 264 | self.ui.sign_in_button.setProperty("DisabledState", | ||
3663 | 265 | not self.ui.sign_in_button.isEnabled()) | ||
3664 | 266 | self.ui.sign_in_button.style().unpolish( | ||
3665 | 267 | self.ui.sign_in_button) | ||
3666 | 268 | self.ui.sign_in_button.style().polish( | ||
3667 | 269 | self.ui.sign_in_button) | ||
3668 | 270 | |||
3669 | 271 | def cleanupPage(self): | ||
3670 | 272 | """Reset the state of the wizard if Verification code was visited.""" | ||
3671 | 273 | self.wizard()._next_id = None | ||
3672 | 274 | |||
3673 | 275 | |||
3674 | 276 | class SuccessPage(SSOWizardPage): | ||
3675 | 277 | """Shown after SSO login, before setup.""" | ||
3676 | 278 | |||
3677 | 279 | # Invalid names of Qt-inherited methods | ||
3678 | 280 | # pylint: disable=C0103 | ||
3679 | 281 | |||
3680 | 282 | def __init__(self, parent=None): | ||
3681 | 283 | super(SuccessPage, self).__init__( | ||
3682 | 284 | Ui_SuccessPage(), | ||
3683 | 285 | SuccessController(title=SUCCESSFUL_LOGIN), parent) | ||
3684 | 286 | self.backend = backend.ControlBackend() | ||
3685 | 287 | self.finish_button = None | ||
3686 | 288 | self.next_button = None | ||
3687 | 289 | self.ui.image_label.setPixmap( | ||
3688 | 290 | QtGui.QPixmap(':/win_installer_graphic.png')) | ||
3689 | 291 | |||
3690 | 292 | def initializePage(self): | ||
3691 | 293 | """Setup UI details.""" | ||
3692 | 294 | self.wizard().setButtonLayout([ | ||
3693 | 295 | QtGui.QWizard.Stretch, | ||
3694 | 296 | QtGui.QWizard.FinishButton, | ||
3695 | 297 | QtGui.QWizard.NextButton, | ||
3696 | 298 | ]) | ||
3697 | 299 | self.setFinalPage(True) | ||
3698 | 300 | self.wizard().setButtonText(QtGui.QWizard.FinishButton, | ||
3699 | 301 | SKIP_TOUR) | ||
3700 | 302 | self.wizard().setButtonText(QtGui.QWizard.NextButton, | ||
3701 | 303 | START_SETUP) | ||
3702 | 304 | self.finish_button = self.wizard().button(QtGui.QWizard.FinishButton) | ||
3703 | 305 | self.next_button = self.wizard().button(QtGui.QWizard.NextButton) | ||
3704 | 306 | self.finish_button.style().unpolish(self.finish_button) | ||
3705 | 307 | self.finish_button.style().polish(self.finish_button) | ||
3706 | 308 | self.next_button.setDefault(True) | ||
3707 | 309 | self.next_button.style().unpolish(self.next_button) | ||
3708 | 310 | self.next_button.style().polish(self.next_button) | ||
3709 | 311 | self.backend.connect_files() | ||
3710 | 312 | |||
3711 | 313 | self.ui.success_message_body.setText( | ||
3712 | 314 | SUCCESS % {'app_name': self.wizard().app_name}) | ||
3713 | 315 | |||
3714 | 316 | def nextId(self): | ||
3715 | 317 | """Provide the next id.""" | ||
3716 | 318 | return self.next | ||
3717 | 319 | |||
3718 | 320 | |||
3719 | 321 | class CongratulationsPage(SSOWizardPage): | ||
3720 | 322 | """Final page of the wizard.""" | ||
3721 | 323 | |||
3722 | 324 | def __init__(self, parent=None): | ||
3723 | 325 | super(CongratulationsPage, self).__init__( | ||
3724 | 326 | congratulations_ui.Ui_Form(), None, parent) | ||
3725 | 327 | self.setFinalPage(True) | ||
3726 | 328 | self.setTitle(CONGRATULATIONS) | ||
3727 | 329 | |||
3728 | 330 | # Invalid names of Qt-inherited methods | ||
3729 | 331 | # pylint: disable=C0103 | ||
3730 | 332 | |||
3731 | 333 | def initializePage(self): | ||
3732 | 334 | """Setup UI details.""" | ||
3733 | 335 | # We need custom buttons | ||
3734 | 336 | self.wizard().setButtonText(QtGui.QWizard.FinishButton, | ||
3735 | 337 | _("Go to my Ubuntu One dashboard")) | ||
3736 | 338 | # Layout without custom button 1, | ||
3737 | 339 | self.wizard().setButtonLayout([ | ||
3738 | 340 | QtGui.QWizard.Stretch, | ||
3739 | 341 | QtGui.QWizard.FinishButton]) | ||
3740 | 342 | # Set FinishButton as default when the page is shown. | ||
3741 | 343 | self.wizard().button(QtGui.QWizard.FinishButton).setDefault(True) | ||
3742 | 344 | self.wizard().button(QtGui.QWizard.FinishButton).style().unpolish( | ||
3743 | 345 | self.wizard().button(QtGui.QWizard.FinishButton)) | ||
3744 | 346 | self.wizard().button(QtGui.QWizard.FinishButton).style().polish( | ||
3745 | 347 | self.wizard().button(QtGui.QWizard.FinishButton)) | ||
3746 | 348 | |||
3747 | 349 | # Add syncdaemon to autostart | ||
3748 | 350 | qt.utils.add_syncdaemon_to_autostart() | ||
3749 | 351 | |||
3750 | 352 | |||
3751 | 353 | class MainWindow(QtGui.QWizard): | ||
3752 | 354 | |||
3753 | 355 | """The Main Window of the Installer wizard.""" | ||
3754 | 356 | |||
3755 | 357 | # Invalid constant names and Qt-inherited methods | ||
3756 | 358 | # pylint: disable=C0103 | ||
3757 | 359 | |||
3758 | 360 | LICENSE_PAGE = 0 | ||
3759 | 361 | SIGNIN_PAGE = 1 | ||
3760 | 362 | SYNC_NOW_OR_LATER_PAGE = 2 | ||
3761 | 363 | CONGRATULATIONS_PAGE = 3 | ||
3762 | 364 | |||
3763 | 365 | # definition of the signals raised by the widget (for SSO) | ||
3764 | 366 | recoverableError = QtCore.pyqtSignal('QString', 'QString') | ||
3765 | 367 | loginSuccess = QtCore.pyqtSignal('QString', 'QString') | ||
3766 | 368 | registrationIncomplete = QtCore.pyqtSignal('QString', 'QString') | ||
3767 | 369 | registrationSuccess = QtCore.pyqtSignal('QString', 'QString') | ||
3768 | 370 | userCancellation = QtCore.pyqtSignal('QString') | ||
3769 | 371 | |||
3770 | 372 | def __init__(self, close_callback=None, installing=False): | ||
3771 | 373 | """Initialize this instance.""" | ||
3772 | 374 | # Used to decide the next page dynamically | ||
3773 | 375 | self._next_id = None | ||
3774 | 376 | |||
3775 | 377 | # Data for SSO | ||
3776 | 378 | self.app_name = APP_NAME | ||
3777 | 379 | self.tc_url = TC_URL | ||
3778 | 380 | # help_text is not displayed in the UI from design | ||
3779 | 381 | self.help_text = "" | ||
3780 | 382 | |||
3781 | 383 | super(MainWindow, self).__init__() | ||
3782 | 384 | # Set windows flags | ||
3783 | 385 | flags = self.windowFlags() & ~QtCore.Qt.WindowContextHelpButtonHint | ||
3784 | 386 | self.setWindowFlags(flags) | ||
3785 | 387 | |||
3786 | 388 | self.setWindowTitle(APP_NAME) | ||
3787 | 389 | self.setMinimumHeight(538) | ||
3788 | 390 | self.setMinimumWidth(740) | ||
3789 | 391 | self.setWizardStyle(self.ModernStyle) | ||
3790 | 392 | self.close_callback = close_callback | ||
3791 | 393 | |||
3792 | 394 | # Label for Form Errors | ||
3793 | 395 | self.form_errors_label = QtGui.QLabel() | ||
3794 | 396 | self.form_errors_label.setObjectName("form_errors") | ||
3795 | 397 | self.form_errors_label.hide() | ||
3796 | 398 | |||
3797 | 399 | self.setSideWidget(SideWidget()) | ||
3798 | 400 | self.overlay = LoadingOverlay(self) | ||
3799 | 401 | self.overlay.hide() | ||
3800 | 402 | |||
3801 | 403 | self.setOption(self.NoBackButtonOnStartPage, True) | ||
3802 | 404 | |||
3803 | 405 | # PyQt doesn't support the (int, page) version of addPage, so | ||
3804 | 406 | # Add the pages in the right order | ||
3805 | 407 | # pylint: disable=C0103 | ||
3806 | 408 | self.license_page = LicensePage() | ||
3807 | 409 | self.LICENSE_PAGE = self.addPage(self.license_page) | ||
3808 | 410 | self.network_page = NetworkDetectionPage() | ||
3809 | 411 | |||
3810 | 412 | #SSO Pages | ||
3811 | 413 | title_page = TITLE_STYLE % SIGN_IN | ||
3812 | 414 | self.sign_in_controller = ChooseSignInController( | ||
3813 | 415 | title=title_page) | ||
3814 | 416 | self.sign_in_page = SignInPage( | ||
3815 | 417 | ui=choose_sign_in_ui.Ui_ChooseSignInPage(), | ||
3816 | 418 | controller=self.sign_in_controller, | ||
3817 | 419 | parent=self) | ||
3818 | 420 | if not installing: | ||
3819 | 421 | self.sign_in_page.ui.message_label.setText("") | ||
3820 | 422 | |||
3821 | 423 | self.setup_controller = SetUpAccountController(message_box=self) | ||
3822 | 424 | self.setup_account = SetupAccountPage( | ||
3823 | 425 | setup_account_ui.Ui_SetUpAccountPage(), | ||
3824 | 426 | self.setup_controller, | ||
3825 | 427 | parent=self) | ||
3826 | 428 | |||
3827 | 429 | email_controller = EmailVerificationController(message_box=self) | ||
3828 | 430 | email_verification_page = Ui_EmailVerificationPage() | ||
3829 | 431 | self.email_verification = EmailVerificationPage( | ||
3830 | 432 | email_verification_page, | ||
3831 | 433 | email_controller) | ||
3832 | 434 | self.email_verification.next_button.clicked.connect( | ||
3833 | 435 | self.overlay.show) | ||
3834 | 436 | |||
3835 | 437 | title_page = TITLE_STYLE % SIGN_IN | ||
3836 | 438 | self.current_user_controller = CurrentUserController( | ||
3837 | 439 | title=title_page, subtitle=SIGN_IN_SUBTITLE, | ||
3838 | 440 | message_box=self) | ||
3839 | 441 | self.current_user = CurrentUserSignInPage(Ui_CurrentUserSignInPage(), | ||
3840 | 442 | self.current_user_controller, | ||
3841 | 443 | parent=self) | ||
3842 | 444 | self.current_user.ui.sign_in_button.clicked.connect( | ||
3843 | 445 | self.overlay.show) | ||
3844 | 446 | |||
3845 | 447 | self.success = SuccessPage(self) | ||
3846 | 448 | self.error_controller = ErrorController() | ||
3847 | 449 | self.error = ErrorPage(Ui_ErrorPage(), self.error_controller) | ||
3848 | 450 | |||
3849 | 451 | self.forgotten_pwd_controller = ForgottenPasswordController( | ||
3850 | 452 | message_box=self) | ||
3851 | 453 | self.forgotten = ForgottenPasswordPage(Ui_ForgottenPasswordPage(), | ||
3852 | 454 | self.forgotten_pwd_controller, | ||
3853 | 455 | parent=self) | ||
3854 | 456 | self.forgotten.ui.send_button.clicked.connect( | ||
3855 | 457 | self.overlay.show) | ||
3856 | 458 | |||
3857 | 459 | self.reset_password_controller = ResetPasswordController( | ||
3858 | 460 | message_box=self) | ||
3859 | 461 | self.reset_password = ResetPasswordPage(Ui_ResetPasswordPage(), | ||
3860 | 462 | self.reset_password_controller, | ||
3861 | 463 | parent=self) | ||
3862 | 464 | self.reset_password.ui.reset_password_button.clicked.connect( | ||
3863 | 465 | self.overlay.show) | ||
3864 | 466 | |||
3865 | 467 | self.SIGN_IN_PAGE_ID = self.addPage(self.sign_in_page) | ||
3866 | 468 | self.NETWORK_DETECTION_PAGE_ID = self.addPage(self.network_page) | ||
3867 | 469 | self.setup_account_page_id = self.addPage(self.setup_account) | ||
3868 | 470 | self.email_verification_page_id = self.addPage(self.email_verification) | ||
3869 | 471 | self.current_user_page_id = self.addPage(self.current_user) | ||
3870 | 472 | self.SUCCESS_PAGE = self.addPage(self.success) | ||
3871 | 473 | self.ERROR_PAGE = self.addPage(self.error) | ||
3872 | 474 | self.forgotten_password_page_id = self.addPage(self.forgotten) | ||
3873 | 475 | self.reset_password_page_id = self.addPage(self.reset_password) | ||
3874 | 476 | |||
3875 | 477 | self.loginSuccess.connect(self.login_success_slot) | ||
3876 | 478 | self.registrationIncomplete.connect(self.registration_incomplete) | ||
3877 | 479 | self.registrationSuccess.connect(self.registration_success_slot) | ||
3878 | 480 | |||
3879 | 481 | # End of SSO pages | ||
3880 | 482 | |||
3881 | 483 | self.SYNC_NOW_OR_LATER_PAGE = self.addPage(SyncNowOrLaterPage()) | ||
3882 | 484 | self.folders_page = FoldersPage() | ||
3883 | 485 | self.folders_page_id = self.addPage(self.folders_page) | ||
3884 | 486 | self.local_folders_page = LocalFoldersPage() | ||
3885 | 487 | self.local_folders_page_id = self.addPage(self.local_folders_page) | ||
3886 | 488 | self.preferences_page = PreferencesPage() | ||
3887 | 489 | self.preferences_page_id = self.addPage(self.preferences_page) | ||
3888 | 490 | self.CONGRATULATIONS_PAGE = self.addPage(CongratulationsPage()) | ||
3889 | 491 | |||
3890 | 492 | self.currentIdChanged.connect(self.on_currentIdChanged) | ||
3891 | 493 | # Set Wizard buttons style | ||
3892 | 494 | self.button(QtGui.QWizard.NextButton).setDefault(True) | ||
3893 | 495 | |||
3894 | 496 | self.set_start_page(installing) | ||
3895 | 497 | |||
3896 | 498 | # Invalid name "closeEvent" | ||
3897 | 499 | # pylint: disable=C0103 | ||
3898 | 500 | |||
3899 | 501 | @defer.inlineCallbacks | ||
3900 | 502 | def set_start_page(self, installing): | ||
3901 | 503 | """Set the Wizard start page based in some conditions.""" | ||
3902 | 504 | connected = yield self.check_connection() | ||
3903 | 505 | if installing: | ||
3904 | 506 | self.setStartId(self.LICENSE_PAGE) | ||
3905 | 507 | elif connected: | ||
3906 | 508 | self.setStartId(self.SIGNIN_PAGE) | ||
3907 | 509 | else: | ||
3908 | 510 | self.setStartId(self._next_id) | ||
3909 | 511 | self.restart() | ||
3910 | 512 | |||
3911 | 513 | def critical(self, message, page=None): | ||
3912 | 514 | """Show a message at the bottom of the page on form errors.""" | ||
3913 | 515 | self.overlay.hide() | ||
3914 | 516 | self.form_errors_label.setText(message) | ||
3915 | 517 | self.form_errors_label.show() | ||
3916 | 518 | if page is None and self.currentPage(): | ||
3917 | 519 | self.currentPage().layout().addWidget(self.form_errors_label) | ||
3918 | 520 | elif page is not None: | ||
3919 | 521 | page.layout().addWidget(self.form_errors_label) | ||
3920 | 522 | |||
3921 | 523 | def next(self): | ||
3922 | 524 | """Show the next page to display and remove the form errors label.""" | ||
3923 | 525 | self.overlay.hide() | ||
3924 | 526 | self.form_errors_label.hide() | ||
3925 | 527 | if self.currentPage().layout(): | ||
3926 | 528 | self.currentPage().layout().removeWidget(self.form_errors_label) | ||
3927 | 529 | self.form_errors_label.setParent(None) | ||
3928 | 530 | super(MainWindow, self).next() | ||
3929 | 531 | |||
3930 | 532 | def nextId(self): | ||
3931 | 533 | """Selects which page to display next.""" | ||
3932 | 534 | if self._next_id is not None: | ||
3933 | 535 | return self._next_id | ||
3934 | 536 | else: | ||
3935 | 537 | return QtGui.QWizard.nextId(self) | ||
3936 | 538 | |||
3937 | 539 | @defer.inlineCallbacks | ||
3938 | 540 | def check_connection(self): | ||
3939 | 541 | """Return is machine is connected, False set Network Page as next.""" | ||
3940 | 542 | # pylint: disable=W0703 | ||
3941 | 543 | connected = yield networkstate.is_machine_connected() | ||
3942 | 544 | if not connected: | ||
3943 | 545 | self._next_id = self.NETWORK_DETECTION_PAGE_ID | ||
3944 | 546 | defer.returnValue(connected) | ||
3945 | 547 | # pylint: enable=W0703 | ||
3946 | 548 | |||
3947 | 549 | def login_success_slot(self): | ||
3948 | 550 | """Called on successful login.""" | ||
3949 | 551 | self._next_id = self.SUCCESS_PAGE | ||
3950 | 552 | self.next() | ||
3951 | 553 | self._next_id = self.SYNC_NOW_OR_LATER_PAGE | ||
3952 | 554 | |||
3953 | 555 | def registration_incomplete(self): | ||
3954 | 556 | """Called when registration wasn't completed.""" | ||
3955 | 557 | self._next_id = self.email_verification_page_id | ||
3956 | 558 | self.next() | ||
3957 | 559 | self._next_id = self.SUCCESS_PAGE | ||
3958 | 560 | |||
3959 | 561 | def registration_success_slot(self): | ||
3960 | 562 | """Called on successful registration.""" | ||
3961 | 563 | self._next_id = self.SUCCESS_PAGE | ||
3962 | 564 | self.next() | ||
3963 | 565 | self._next_id = self.SYNC_NOW_OR_LATER_PAGE | ||
3964 | 566 | |||
3965 | 567 | def done(self, result): | ||
3966 | 568 | """The main window is being closed, call any custom callback.""" | ||
3967 | 569 | # Finished, not cancelled | ||
3968 | 570 | if result == 1: # Cancelled | ||
3969 | 571 | qt.utils.start_control_panel() | ||
3970 | 572 | elif self.currentId() == self.LICENSE_PAGE: | ||
3971 | 573 | if AreYouSure(self).exec_() == QtGui.QDialog.Accepted: | ||
3972 | 574 | qt.utils.uninstall_application() | ||
3973 | 575 | else: | ||
3974 | 576 | return | ||
3975 | 577 | elif self.currentId() != self.CONGRATULATIONS_PAGE: | ||
3976 | 578 | if AreYouSure(self).exec_() == QtGui.QDialog.Rejected: | ||
3977 | 579 | return | ||
3978 | 580 | if self.close_callback is not None: | ||
3979 | 581 | self.close_callback() | ||
3980 | 582 | QtGui.QWizard.done(self, result) | ||
3981 | 583 | self.userCancellation.emit(self.app_name) | ||
3982 | 584 | |||
3983 | 585 | def on_currentIdChanged(self, page_id): | ||
3984 | 586 | """The current page changed.""" | ||
3985 | 587 | if page_id < self.SIGNIN_PAGE: | ||
3986 | 588 | self.sideWidget().ui.states_frame.hide() | ||
3987 | 589 | self.sideWidget().set_stage(0) | ||
3988 | 590 | elif page_id < self.SYNC_NOW_OR_LATER_PAGE: | ||
3989 | 591 | self.sideWidget().ui.states_frame.show() | ||
3990 | 592 | self.sideWidget().set_stage(1) | ||
3991 | 593 | elif page_id < self.CONGRATULATIONS_PAGE: | ||
3992 | 594 | self.sideWidget().set_stage(3) | ||
3993 | 595 | else: | ||
3994 | 596 | self.sideWidget().set_stage(4) | ||
3995 | 597 | |||
3996 | 598 | # Invalid name "resizeEvent" | ||
3997 | 599 | # pylint: disable=C0103 | ||
3998 | 600 | |||
3999 | 601 | def resizeEvent(self, event): | ||
4000 | 602 | """Resize the overlay to fit all the widget.""" | ||
4001 | 603 | QtGui.QWizard.resizeEvent(self, event) | ||
4002 | 604 | self.overlay.resize(event.size()) | ||
4003 | 605 | 0 | ||
4004 | === removed file 'ubuntuone_installer/gui/qt/local_folders.py' | |||
4005 | --- ubuntuone_installer/gui/qt/local_folders.py 2012-03-16 15:27:09 +0000 | |||
4006 | +++ ubuntuone_installer/gui/qt/local_folders.py 1970-01-01 00:00:00 +0000 | |||
4007 | @@ -1,310 +0,0 @@ | |||
4008 | 1 | # -*- coding: utf-8 -*- | ||
4009 | 2 | |||
4010 | 3 | # Authors: Roberto Alsina <roberto.alsina@canonical.com> | ||
4011 | 4 | # | ||
4012 | 5 | # Copyright 2011 Canonical Ltd. | ||
4013 | 6 | # | ||
4014 | 7 | # This program is free software: you can redistribute it and/or modify it | ||
4015 | 8 | # under the terms of the GNU General Public License version 3, as published | ||
4016 | 9 | # by the Free Software Foundation. | ||
4017 | 10 | # | ||
4018 | 11 | # This program is distributed in the hope that it will be useful, but | ||
4019 | 12 | # WITHOUT ANY WARRANTY; without even the implied warranties of | ||
4020 | 13 | # MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR | ||
4021 | 14 | # PURPOSE. See the GNU General Public License for more details. | ||
4022 | 15 | # | ||
4023 | 16 | # You should have received a copy of the GNU General Public License along | ||
4024 | 17 | # with this program. If not, see <http://www.gnu.org/licenses/>. | ||
4025 | 18 | |||
4026 | 19 | """Widget to create UDFs in the Windows Install Wizard.""" | ||
4027 | 20 | |||
4028 | 21 | import os | ||
4029 | 22 | import threading | ||
4030 | 23 | import Queue | ||
4031 | 24 | |||
4032 | 25 | from twisted.internet.defer import inlineCallbacks, returnValue | ||
4033 | 26 | from PyQt4 import QtGui, QtCore | ||
4034 | 27 | from ubuntuone.controlpanel import backend | ||
4035 | 28 | from ubuntuone.controlpanel.gui import ( | ||
4036 | 29 | humanize, | ||
4037 | 30 | sign_url, | ||
4038 | 31 | FOLDER_INVALID_PATH, | ||
4039 | 32 | ) | ||
4040 | 33 | from ubuntuone.controlpanel.web_client.txwebclient import timestamp_checker | ||
4041 | 34 | from ubuntuone.platform.credentials import CredentialsManagementTool | ||
4042 | 35 | from ubuntu_sso.qt.gui import SSOWizardPage | ||
4043 | 36 | |||
4044 | 37 | from ubuntuone_installer.gui.qt.ui import local_folders_ui | ||
4045 | 38 | from ubuntuone_installer.gui.qt.utils import default_folders | ||
4046 | 39 | from ubuntuone_installer.gui import ( | ||
4047 | 40 | LOCAL_FOLDERS_TITLE, | ||
4048 | 41 | LOCAL_FOLDERS_SPACE_HEADER, | ||
4049 | 42 | LOCAL_FOLDERS_OFFER_LABEL, | ||
4050 | 43 | LOCAL_FOLDERS_CALCULATING, | ||
4051 | 44 | NEXT, | ||
4052 | 45 | ) | ||
4053 | 46 | |||
4054 | 47 | from ubuntuone_installer.logger import setup_logging | ||
4055 | 48 | |||
4056 | 49 | |||
4057 | 50 | # Invalid name logger | ||
4058 | 51 | # pylint: disable=C0103 | ||
4059 | 52 | logger = setup_logging('qt.local_folders') | ||
4060 | 53 | # pylint: enable=C0103 | ||
4061 | 54 | |||
4062 | 55 | |||
4063 | 56 | class FolderItem(QtGui.QTreeWidgetItem): | ||
4064 | 57 | """Class representing a folder in the folder list UI.""" | ||
4065 | 58 | def __init__(self, strings, path=None, queue=None, | ||
4066 | 59 | calculate=True, volume_id=None): | ||
4067 | 60 | super(FolderItem, self).__init__(strings) | ||
4068 | 61 | self.thread = CalculateSize(path, queue) | ||
4069 | 62 | # Don't calculate sizes of UDFs | ||
4070 | 63 | if calculate and not volume_id: | ||
4071 | 64 | self.thread.start() | ||
4072 | 65 | self.size = None | ||
4073 | 66 | else: | ||
4074 | 67 | self.size = 0 | ||
4075 | 68 | self.path = path | ||
4076 | 69 | self.setCheckState(0, QtCore.Qt.Unchecked) | ||
4077 | 70 | self.volume_id = volume_id | ||
4078 | 71 | |||
4079 | 72 | |||
4080 | 73 | class CalculateSize(threading.Thread): | ||
4081 | 74 | """Class to calculate the size of a folder in the background.""" | ||
4082 | 75 | def __init__(self, path_name, queue): | ||
4083 | 76 | self.path_name = path_name | ||
4084 | 77 | self.queue = queue | ||
4085 | 78 | self._stop = False | ||
4086 | 79 | super(CalculateSize, self).__init__() | ||
4087 | 80 | self.daemon = True | ||
4088 | 81 | |||
4089 | 82 | def run(self): | ||
4090 | 83 | total_size = 0 | ||
4091 | 84 | for dirpath, _, filenames in os.walk(self.path_name): | ||
4092 | 85 | for f in filenames: | ||
4093 | 86 | fp = os.path.join(dirpath, f) | ||
4094 | 87 | total_size += os.path.getsize(fp) | ||
4095 | 88 | self.queue.put([self.path_name, total_size]) | ||
4096 | 89 | |||
4097 | 90 | |||
4098 | 91 | class LocalFoldersPage(SSOWizardPage): | ||
4099 | 92 | """Wizard page to create UDFs in the Windows Installer.""" | ||
4100 | 93 | |||
4101 | 94 | def __init__(self, parent=None): | ||
4102 | 95 | super(LocalFoldersPage, self).__init__( | ||
4103 | 96 | local_folders_ui.Ui_Form(), None, parent) | ||
4104 | 97 | self.setTitle(LOCAL_FOLDERS_TITLE) | ||
4105 | 98 | self.setSubTitle() | ||
4106 | 99 | header_view = self.ui.folder_list.header() | ||
4107 | 100 | header_view.setResizeMode(0, header_view.Stretch) | ||
4108 | 101 | self.queue = Queue.Queue() | ||
4109 | 102 | self.timer = QtCore.QTimer() | ||
4110 | 103 | self.items = {} | ||
4111 | 104 | self.folders_info = None | ||
4112 | 105 | self.account_info = None | ||
4113 | 106 | self.has_back_button = True | ||
4114 | 107 | self.cp_backend = backend.ControlBackend() | ||
4115 | 108 | |||
4116 | 109 | # initializePage is inherited | ||
4117 | 110 | # pylint: disable=C0103 | ||
4118 | 111 | def initializePage(self): | ||
4119 | 112 | """UI details.""" | ||
4120 | 113 | if self.has_back_button: | ||
4121 | 114 | self.wizard().setButtonLayout([ | ||
4122 | 115 | QtGui.QWizard.BackButton, | ||
4123 | 116 | QtGui.QWizard.Stretch, | ||
4124 | 117 | QtGui.QWizard.NextButton]) | ||
4125 | 118 | else: | ||
4126 | 119 | self.wizard().setButtonLayout([ | ||
4127 | 120 | QtGui.QWizard.Stretch, | ||
4128 | 121 | QtGui.QWizard.NextButton]) | ||
4129 | 122 | self.wizard().setButtonText(QtGui.QWizard.NextButton, | ||
4130 | 123 | NEXT) | ||
4131 | 124 | self.wizard()._next_id = self.wizard().CONGRATULATIONS_PAGE | ||
4132 | 125 | # Start with this invisible | ||
4133 | 126 | self.ui.offer_frame.setVisible(False) | ||
4134 | 127 | # Show overlay until we have server data | ||
4135 | 128 | self.wizard().overlay.show() | ||
4136 | 129 | self.get_info() | ||
4137 | 130 | |||
4138 | 131 | def cleanupPage(self): | ||
4139 | 132 | """Initialize previous page when going back.""" | ||
4140 | 133 | self.wizard().folders_page.initializePage() | ||
4141 | 134 | |||
4142 | 135 | @inlineCallbacks | ||
4143 | 136 | def get_info(self): | ||
4144 | 137 | """Get information from CP backend and fill folder list.""" | ||
4145 | 138 | # pylint: disable=W0702 | ||
4146 | 139 | try: | ||
4147 | 140 | volumes_info = yield self.cp_backend.volumes_info() | ||
4148 | 141 | self.account_info = yield self.cp_backend.account_info() | ||
4149 | 142 | self.folders_info = [] | ||
4150 | 143 | for _, _, volumes in volumes_info: | ||
4151 | 144 | for volume in volumes: | ||
4152 | 145 | if volume[u'type'] == u"UDF": | ||
4153 | 146 | self.folders_info.append(volume) | ||
4154 | 147 | self.ui.folder_list.clear() | ||
4155 | 148 | self.items = {} | ||
4156 | 149 | for folder in self.folders_info: | ||
4157 | 150 | if folder['subscribed']: | ||
4158 | 151 | item = yield self.add_folder( | ||
4159 | 152 | os.path.expanduser(folder['path']), | ||
4160 | 153 | validate=False, | ||
4161 | 154 | volume_id=folder['volume_id'], | ||
4162 | 155 | calculate=False, | ||
4163 | 156 | ) | ||
4164 | 157 | if item: | ||
4165 | 158 | item.setCheckState(0, QtCore.Qt.Checked) | ||
4166 | 159 | item.size = 0 | ||
4167 | 160 | for folder_name in default_folders(): | ||
4168 | 161 | item = yield self.add_folder(folder_name, validate=True) | ||
4169 | 162 | self.timer.start(2000) | ||
4170 | 163 | self.timer.timeout.connect(self.update_sizes) | ||
4171 | 164 | self.wizard().currentIdChanged.connect(self.changed_page) | ||
4172 | 165 | except: | ||
4173 | 166 | logger.exception("Error getting backend info:") | ||
4174 | 167 | finally: | ||
4175 | 168 | self.wizard().overlay.hide() | ||
4176 | 169 | |||
4177 | 170 | @QtCore.pyqtSlot("int") | ||
4178 | 171 | @inlineCallbacks | ||
4179 | 172 | def changed_page(self, page_id): | ||
4180 | 173 | """When moving to next page, create/[un]subscribe UDFs.""" | ||
4181 | 174 | self.timer.stop() | ||
4182 | 175 | try: | ||
4183 | 176 | self.wizard().currentIdChanged.disconnect(self.changed_page) | ||
4184 | 177 | except KeyError: | ||
4185 | 178 | pass | ||
4186 | 179 | if page_id == self.wizard().CONGRATULATIONS_PAGE: | ||
4187 | 180 | # The page following this one | ||
4188 | 181 | self.wizard().overlay.show() | ||
4189 | 182 | for path, item in self.items.items(): | ||
4190 | 183 | if item.checkState(0) == QtCore.Qt.Checked: | ||
4191 | 184 | if item.volume_id: | ||
4192 | 185 | yield self.cp_backend.change_volume_settings( | ||
4193 | 186 | item.volume_id, | ||
4194 | 187 | dict(subscribed=True)) | ||
4195 | 188 | else: | ||
4196 | 189 | yield self.cp_backend.create_folder(path) | ||
4197 | 190 | else: | ||
4198 | 191 | if item.volume_id: | ||
4199 | 192 | yield self.cp_backend.change_volume_settings( | ||
4200 | 193 | item.volume_id, | ||
4201 | 194 | dict(subscribed=False)) | ||
4202 | 195 | self.wizard().overlay.hide() | ||
4203 | 196 | |||
4204 | 197 | @inlineCallbacks | ||
4205 | 198 | def add_folder(self, path, validate=True, calculate=True, volume_id=None): | ||
4206 | 199 | """Add a folder to the list.""" | ||
4207 | 200 | if path in self.items: | ||
4208 | 201 | returnValue(None) | ||
4209 | 202 | if validate: | ||
4210 | 203 | is_valid = yield self.cp_backend.validate_path_for_folder(path) | ||
4211 | 204 | else: | ||
4212 | 205 | is_valid = True | ||
4213 | 206 | if is_valid: | ||
4214 | 207 | item = FolderItem([path, ""], | ||
4215 | 208 | path=path, | ||
4216 | 209 | queue=self.queue, | ||
4217 | 210 | volume_id=volume_id, | ||
4218 | 211 | calculate=calculate) | ||
4219 | 212 | self.ui.folder_list.addTopLevelItem(item) | ||
4220 | 213 | self.items[path] = item | ||
4221 | 214 | returnValue(item) | ||
4222 | 215 | returnValue(None) | ||
4223 | 216 | |||
4224 | 217 | def update_sizes(self): | ||
4225 | 218 | """Poll the queue were the threads put the size info.""" | ||
4226 | 219 | while True: | ||
4227 | 220 | try: | ||
4228 | 221 | path, size = self.queue.get(False) | ||
4229 | 222 | except Queue.Empty: | ||
4230 | 223 | break | ||
4231 | 224 | else: | ||
4232 | 225 | item = self.items.get(path) | ||
4233 | 226 | if item: | ||
4234 | 227 | item.size = size | ||
4235 | 228 | try: | ||
4236 | 229 | item.setText(1, humanize(size)) | ||
4237 | 230 | except RuntimeError: | ||
4238 | 231 | del self.items[path] | ||
4239 | 232 | total = long(self.account_info['quota_used']) | ||
4240 | 233 | for path, item in self.items.items(): | ||
4241 | 234 | if item.size is None: | ||
4242 | 235 | total = LOCAL_FOLDERS_CALCULATING | ||
4243 | 236 | break | ||
4244 | 237 | if not item.volume_id and item.checkState(0) == QtCore.Qt.Checked: | ||
4245 | 238 | # Existing UDFs are already accounted for, count if marked. | ||
4246 | 239 | total += item.size | ||
4247 | 240 | if isinstance(total, long): | ||
4248 | 241 | self.show_hide_offer(total) | ||
4249 | 242 | total = humanize(total) | ||
4250 | 243 | else: | ||
4251 | 244 | self.show_hide_offer(0) | ||
4252 | 245 | self.ui.folder_list.headerItem().setText( | ||
4253 | 246 | 1, LOCAL_FOLDERS_SPACE_HEADER % total) | ||
4254 | 247 | |||
4255 | 248 | def show_hide_offer(self, cur_size): | ||
4256 | 249 | """Show or hide the offer to buy space according to the total size.""" | ||
4257 | 250 | quota = self.account_info['quota_total'] | ||
4258 | 251 | if cur_size > quota: | ||
4259 | 252 | self.ui.offer_frame.setVisible(True) | ||
4260 | 253 | else: | ||
4261 | 254 | self.ui.offer_frame.setVisible(False) | ||
4262 | 255 | self.ui.offer_label.setText(LOCAL_FOLDERS_OFFER_LABEL % | ||
4263 | 256 | {"quota": humanize(quota)}) | ||
4264 | 257 | |||
4265 | 258 | def stop_threads(self): | ||
4266 | 259 | """Stop all pending threads.""" | ||
4267 | 260 | for _, item in self.items: | ||
4268 | 261 | item.thread._stop = True | ||
4269 | 262 | |||
4270 | 263 | # itemClicked is a Qt signal name. | ||
4271 | 264 | # pylint: disable=C0103 | ||
4272 | 265 | def on_folder_list_itemChanged(self, item, column): | ||
4273 | 266 | """Delete folder from the list.""" | ||
4274 | 267 | if column == 0: | ||
4275 | 268 | self.update_sizes() | ||
4276 | 269 | |||
4277 | 270 | @inlineCallbacks | ||
4278 | 271 | @QtCore.pyqtSlot() | ||
4279 | 272 | def on_add_storage_button_clicked(self): | ||
4280 | 273 | """user clicked on the "Add more storage" button.""" | ||
4281 | 274 | # Really want to catch everything | ||
4282 | 275 | # pylint: disable=W0702 | ||
4283 | 276 | url = "https://one.ubuntu.com/services/#storage_panel" | ||
4284 | 277 | try: | ||
4285 | 278 | credtool = CredentialsManagementTool() | ||
4286 | 279 | creds = yield credtool.find_credentials() | ||
4287 | 280 | except: | ||
4288 | 281 | logger.exception('Error while trying to get credentials:') | ||
4289 | 282 | creds = {} | ||
4290 | 283 | if creds: | ||
4291 | 284 | timestamp = yield timestamp_checker.get_faithful_time() | ||
4292 | 285 | signed_url = yield sign_url(url, creds, timestamp) | ||
4293 | 286 | else: | ||
4294 | 287 | signed_url = url | ||
4295 | 288 | QtGui.QDesktopServices.openUrl(QtCore.QUrl(signed_url)) | ||
4296 | 289 | |||
4297 | 290 | @inlineCallbacks | ||
4298 | 291 | @QtCore.pyqtSlot() | ||
4299 | 292 | def on_add_folder_button_clicked(self): | ||
4300 | 293 | """user clicked on the "Add Folder" button.""" | ||
4301 | 294 | folder = QtGui.QFileDialog.getExistingDirectory( | ||
4302 | 295 | parent=self, | ||
4303 | 296 | options=QtGui.QFileDialog.DontUseNativeDialog) | ||
4304 | 297 | folder = unicode(QtCore.QDir.toNativeSeparators(folder)) | ||
4305 | 298 | if folder == '': | ||
4306 | 299 | return | ||
4307 | 300 | |||
4308 | 301 | is_valid = yield self.cp_backend.validate_path_for_folder(folder) | ||
4309 | 302 | if not is_valid: | ||
4310 | 303 | user_home = os.path.expanduser('~') | ||
4311 | 304 | text = FOLDER_INVALID_PATH % {'folder_path': folder, | ||
4312 | 305 | 'home_folder': user_home} | ||
4313 | 306 | QtGui.QMessageBox.warning(self, '', text, QtGui.QMessageBox.Close) | ||
4314 | 307 | return | ||
4315 | 308 | item = yield self.add_folder(folder, validate=False, volume_id=False) | ||
4316 | 309 | if item is not None: | ||
4317 | 310 | item.setCheckState(0, QtCore.Qt.Checked) | ||
4318 | 311 | 0 | ||
4319 | === removed directory 'ubuntuone_installer/gui/qt/main' | |||
4320 | === removed file 'ubuntuone_installer/gui/qt/main/__init__.py' | |||
4321 | --- ubuntuone_installer/gui/qt/main/__init__.py 2011-11-11 19:27:39 +0000 | |||
4322 | +++ ubuntuone_installer/gui/qt/main/__init__.py 1970-01-01 00:00:00 +0000 | |||
4323 | @@ -1,60 +0,0 @@ | |||
4324 | 1 | # -*- coding: utf-8 -*- | ||
4325 | 2 | # | ||
4326 | 3 | # Copyright 2011 Canonical Ltd. | ||
4327 | 4 | # | ||
4328 | 5 | # This program is free software: you can redistribute it and/or modify it | ||
4329 | 6 | # under the terms of the GNU General Public License version 3, as published | ||
4330 | 7 | # by the Free Software Foundation. | ||
4331 | 8 | # | ||
4332 | 9 | # This program is distributed in the hope that it will be useful, but | ||
4333 | 10 | # WITHOUT ANY WARRANTY; without even the implied warranties of | ||
4334 | 11 | # MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR | ||
4335 | 12 | # PURPOSE. See the GNU General Public License for more details. | ||
4336 | 13 | # | ||
4337 | 14 | # You should have received a copy of the GNU General Public License along | ||
4338 | 15 | # with this program. If not, see <http://www.gnu.org/licenses/>. | ||
4339 | 16 | |||
4340 | 17 | """Provide the correct reactor and ui integration.""" | ||
4341 | 18 | |||
4342 | 19 | import sys | ||
4343 | 20 | |||
4344 | 21 | from PyQt4 import QtGui | ||
4345 | 22 | |||
4346 | 23 | # Module used to include the resources into this file | ||
4347 | 24 | # Unused import images_rc, pylint: disable=W0611 | ||
4348 | 25 | from ubuntuone_installer.gui.qt.ui import images_rc | ||
4349 | 26 | # pylint: enable=W0611 | ||
4350 | 27 | |||
4351 | 28 | |||
4352 | 29 | # Invalid name "source", pylint: disable=C0103 | ||
4353 | 30 | if sys.platform == 'win32': | ||
4354 | 31 | from ubuntuone_installer.gui.qt.main import windows | ||
4355 | 32 | source = windows | ||
4356 | 33 | else: | ||
4357 | 34 | from ubuntuone_installer.gui.qt.main import linux | ||
4358 | 35 | source = linux | ||
4359 | 36 | # pylint: enable=C0103 | ||
4360 | 37 | |||
4361 | 38 | |||
4362 | 39 | def main(installing=False): | ||
4363 | 40 | """Start the Qt reactor and open the main window.""" | ||
4364 | 41 | # The following cannot be imported outside this function | ||
4365 | 42 | # because u1trial already provides a reactor. | ||
4366 | 43 | |||
4367 | 44 | # The main loop MUST be initialized before importing the reactor | ||
4368 | 45 | app = QtGui.QApplication(sys.argv) | ||
4369 | 46 | source.main(app) | ||
4370 | 47 | |||
4371 | 48 | # Reimport 'qt4reactor', 'reactor', pylint: disable=W0404 | ||
4372 | 49 | import qt4reactor | ||
4373 | 50 | qt4reactor.install() | ||
4374 | 51 | |||
4375 | 52 | from twisted.internet import reactor | ||
4376 | 53 | from ubuntuone_installer.gui.qt.utils import check_credentials | ||
4377 | 54 | # pylint: enable=W0404 | ||
4378 | 55 | |||
4379 | 56 | # Module 'reactor' has no 'run'/'stop' member, pylint: disable=E1101 | ||
4380 | 57 | reactor.callWhenRunning(check_credentials, | ||
4381 | 58 | installing=installing, stop_cb=reactor.stop) | ||
4382 | 59 | reactor.run() | ||
4383 | 60 | # pylint: enable=E1101 | ||
4384 | 61 | 0 | ||
4385 | === removed file 'ubuntuone_installer/gui/qt/main/linux.py' | |||
4386 | --- ubuntuone_installer/gui/qt/main/linux.py 2011-11-11 19:27:39 +0000 | |||
4387 | +++ ubuntuone_installer/gui/qt/main/linux.py 1970-01-01 00:00:00 +0000 | |||
4388 | @@ -1,30 +0,0 @@ | |||
4389 | 1 | # -*- coding: utf-8 -*- | ||
4390 | 2 | # | ||
4391 | 3 | # Copyright 2011 Canonical Ltd. | ||
4392 | 4 | # | ||
4393 | 5 | # This program is free software: you can redistribute it and/or modify it | ||
4394 | 6 | # under the terms of the GNU General Public License version 3, as published | ||
4395 | 7 | # by the Free Software Foundation. | ||
4396 | 8 | # | ||
4397 | 9 | # This program is distributed in the hope that it will be useful, but | ||
4398 | 10 | # WITHOUT ANY WARRANTY; without even the implied warranties of | ||
4399 | 11 | # MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR | ||
4400 | 12 | # PURPOSE. See the GNU General Public License for more details. | ||
4401 | 13 | # | ||
4402 | 14 | # You should have received a copy of the GNU General Public License along | ||
4403 | 15 | # with this program. If not, see <http://www.gnu.org/licenses/>. | ||
4404 | 16 | |||
4405 | 17 | """Main method to be used on linux.""" | ||
4406 | 18 | |||
4407 | 19 | from dbus.mainloop.qt import DBusQtMainLoop | ||
4408 | 20 | from PyQt4 import QtCore | ||
4409 | 21 | |||
4410 | 22 | |||
4411 | 23 | def main(app): | ||
4412 | 24 | """Apply style sheet.""" | ||
4413 | 25 | # The DBus main loop MUST be initialized before importing the reactor | ||
4414 | 26 | DBusQtMainLoop(set_as_default=True) | ||
4415 | 27 | |||
4416 | 28 | # Apply Style Sheet -- The linux version may be different | ||
4417 | 29 | qss = QtCore.QResource(":/ubuntuone.qss") | ||
4418 | 30 | app.setStyleSheet(qss.data()) | ||
4419 | 31 | 0 | ||
4420 | === removed file 'ubuntuone_installer/gui/qt/main/windows.py' | |||
4421 | --- ubuntuone_installer/gui/qt/main/windows.py 2012-01-18 12:37:40 +0000 | |||
4422 | +++ ubuntuone_installer/gui/qt/main/windows.py 1970-01-01 00:00:00 +0000 | |||
4423 | @@ -1,33 +0,0 @@ | |||
4424 | 1 | # -*- coding: utf-8 -*- | ||
4425 | 2 | # | ||
4426 | 3 | # Copyright 2011 Canonical Ltd. | ||
4427 | 4 | # | ||
4428 | 5 | # This program is free software: you can redistribute it and/or modify it | ||
4429 | 6 | # under the terms of the GNU General Public License version 3, as published | ||
4430 | 7 | # by the Free Software Foundation. | ||
4431 | 8 | # | ||
4432 | 9 | # This program is distributed in the hope that it will be useful, but | ||
4433 | 10 | # WITHOUT ANY WARRANTY; without even the implied warranties of | ||
4434 | 11 | # MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR | ||
4435 | 12 | # PURPOSE. See the GNU General Public License for more details. | ||
4436 | 13 | # | ||
4437 | 14 | # You should have received a copy of the GNU General Public License along | ||
4438 | 15 | # with this program. If not, see <http://www.gnu.org/licenses/>. | ||
4439 | 16 | |||
4440 | 17 | """Main method to be used on windows.""" | ||
4441 | 18 | |||
4442 | 19 | from PyQt4 import QtGui, QtCore | ||
4443 | 20 | |||
4444 | 21 | |||
4445 | 22 | def main(app): | ||
4446 | 23 | """Apply style sheet and fonts.""" | ||
4447 | 24 | # Apply font to the entire application | ||
4448 | 25 | QtGui.QFontDatabase.addApplicationFont(':/Ubuntu-R.ttf') | ||
4449 | 26 | QtGui.QFontDatabase.addApplicationFont(':/Ubuntu-B.ttf') | ||
4450 | 27 | |||
4451 | 28 | # Set Application Icon | ||
4452 | 29 | app.setWindowIcon(QtGui.QIcon(":/ubuntu_one_favicon.png")) | ||
4453 | 30 | |||
4454 | 31 | # Apply Style Sheet -- The windows version may be different | ||
4455 | 32 | qss = QtCore.QResource(":/ubuntuone.qss") | ||
4456 | 33 | app.setStyleSheet(qss.data()) | ||
4457 | 34 | 0 | ||
4458 | === removed file 'ubuntuone_installer/gui/qt/network_detection.py' | |||
4459 | --- ubuntuone_installer/gui/qt/network_detection.py 2012-01-25 12:37:01 +0000 | |||
4460 | +++ ubuntuone_installer/gui/qt/network_detection.py 1970-01-01 00:00:00 +0000 | |||
4461 | @@ -1,76 +0,0 @@ | |||
4462 | 1 | # -*- coding: utf-8 *-* | ||
4463 | 2 | # | ||
4464 | 3 | # Copyright 2011 Canonical Ltd. | ||
4465 | 4 | # | ||
4466 | 5 | # This program is free software: you can redistribute it and/or modify it | ||
4467 | 6 | # under the terms of the GNU General Public License version 3, as published | ||
4468 | 7 | # by the Free Software Foundation. | ||
4469 | 8 | # | ||
4470 | 9 | # This program is distributed in the hope that it will be useful, but | ||
4471 | 10 | # WITHOUT ANY WARRANTY; without even the implied warranties of | ||
4472 | 11 | # MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR | ||
4473 | 12 | # PURPOSE. See the GNU General Public License for more details. | ||
4474 | 13 | # | ||
4475 | 14 | # You should have received a copy of the GNU General Public License along | ||
4476 | 15 | # with this program. If not, see <http://www.gnu.org/licenses/>. | ||
4477 | 16 | |||
4478 | 17 | """Widget to show if we don't detect a network connection.""" | ||
4479 | 18 | |||
4480 | 19 | import gettext | ||
4481 | 20 | |||
4482 | 21 | from twisted.internet import defer | ||
4483 | 22 | from PyQt4 import QtGui | ||
4484 | 23 | |||
4485 | 24 | from ubuntu_sso import networkstate | ||
4486 | 25 | |||
4487 | 26 | from ubuntuone_installer.gui.qt.ui import network_detection_ui | ||
4488 | 27 | |||
4489 | 28 | _ = gettext.gettext | ||
4490 | 29 | |||
4491 | 30 | |||
4492 | 31 | class NetworkDetectionPage(QtGui.QWizardPage): | ||
4493 | 32 | |||
4494 | 33 | """Widget to show if we don't detect a network connection.""" | ||
4495 | 34 | |||
4496 | 35 | def __init__(self, parent=None): | ||
4497 | 36 | super(NetworkDetectionPage, self).__init__(parent) | ||
4498 | 37 | self.setTitle(_("Installing Ubuntu One")) | ||
4499 | 38 | self.ui = network_detection_ui.Ui_Form() | ||
4500 | 39 | self.ui.setupUi(self) | ||
4501 | 40 | self.btn_try_again = None | ||
4502 | 41 | |||
4503 | 42 | # pylint: disable=C0103 | ||
4504 | 43 | def initializePage(self): | ||
4505 | 44 | """Set UI details.""" | ||
4506 | 45 | self.wizard()._next_id = None | ||
4507 | 46 | |||
4508 | 47 | self.setButtonText(QtGui.QWizard.CustomButton1, _("Try again")) | ||
4509 | 48 | self.setButtonText(QtGui.QWizard.CancelButton, | ||
4510 | 49 | _("Close window and set up later")) | ||
4511 | 50 | self.wizard().setButtonLayout([ | ||
4512 | 51 | QtGui.QWizard.Stretch, | ||
4513 | 52 | QtGui.QWizard.CustomButton1, | ||
4514 | 53 | QtGui.QWizard.CancelButton, | ||
4515 | 54 | ]) | ||
4516 | 55 | |||
4517 | 56 | try: | ||
4518 | 57 | self.wizard().customButtonClicked.disconnect() | ||
4519 | 58 | except TypeError: | ||
4520 | 59 | pass | ||
4521 | 60 | |||
4522 | 61 | self.btn_try_again = self.wizard().button(QtGui.QWizard.CustomButton1) | ||
4523 | 62 | self.btn_try_again.setDefault(True) | ||
4524 | 63 | self.btn_try_again.style().unpolish(self.btn_try_again) | ||
4525 | 64 | self.btn_try_again.style().polish(self.btn_try_again) | ||
4526 | 65 | self.wizard().customButtonClicked.connect(self.try_again) | ||
4527 | 66 | # pylint: enable=C0103 | ||
4528 | 67 | |||
4529 | 68 | @defer.inlineCallbacks | ||
4530 | 69 | def try_again(self, button_id=QtGui.QWizard.CustomButton1): | ||
4531 | 70 | """Test the connection again.""" | ||
4532 | 71 | if button_id == QtGui.QWizard.CustomButton1: | ||
4533 | 72 | d = yield networkstate.is_machine_connected() | ||
4534 | 73 | if d: | ||
4535 | 74 | self.wizard()._next_id = self.wizard().SIGN_IN_PAGE_ID | ||
4536 | 75 | self.wizard().next() | ||
4537 | 76 | self.wizard()._next_id = None | ||
4538 | 77 | 0 | ||
4539 | === removed file 'ubuntuone_installer/gui/qt/preferences.py' | |||
4540 | --- ubuntuone_installer/gui/qt/preferences.py 2012-03-16 15:27:09 +0000 | |||
4541 | +++ ubuntuone_installer/gui/qt/preferences.py 1970-01-01 00:00:00 +0000 | |||
4542 | @@ -1,98 +0,0 @@ | |||
4543 | 1 | # -*- coding: utf-8 -*- | ||
4544 | 2 | |||
4545 | 3 | # Authors: Roberto Alsina <roberto.alsina@canonical.com> | ||
4546 | 4 | # Diego Sarmentero <diego.sarmentero@canonical.com> | ||
4547 | 5 | # | ||
4548 | 6 | # Copyright 2011 Canonical Ltd. | ||
4549 | 7 | # | ||
4550 | 8 | # This program is free software: you can redistribute it and/or modify it | ||
4551 | 9 | # under the terms of the GNU General Public License version 3, as published | ||
4552 | 10 | # by the Free Software Foundation. | ||
4553 | 11 | # | ||
4554 | 12 | # This program is distributed in the hope that it will be useful, but | ||
4555 | 13 | # WITHOUT ANY WARRANTY; without even the implied warranties of | ||
4556 | 14 | # MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR | ||
4557 | 15 | # PURPOSE. See the GNU General Public License for more details. | ||
4558 | 16 | # | ||
4559 | 17 | # You should have received a copy of the GNU General Public License along | ||
4560 | 18 | # with this program. If not, see <http://www.gnu.org/licenses/>. | ||
4561 | 19 | |||
4562 | 20 | """Page to list folders in a Ubuntu One account.""" | ||
4563 | 21 | |||
4564 | 22 | import gettext | ||
4565 | 23 | |||
4566 | 24 | from PyQt4 import QtGui | ||
4567 | 25 | from ubuntuone.controlpanel.gui.qt import preferences | ||
4568 | 26 | from ubuntu_sso.qt.gui import SSOWizardPage | ||
4569 | 27 | |||
4570 | 28 | from ubuntuone_installer.gui.qt.ui import preferences_ui | ||
4571 | 29 | |||
4572 | 30 | _ = gettext.gettext | ||
4573 | 31 | |||
4574 | 32 | |||
4575 | 33 | class PreferencesPage(SSOWizardPage): | ||
4576 | 34 | """Wizard page to list and manage an account's folders.""" | ||
4577 | 35 | |||
4578 | 36 | def __init__(self, parent=None): | ||
4579 | 37 | super(PreferencesPage, self).__init__( | ||
4580 | 38 | preferences_ui.Ui_Form(), None, parent) | ||
4581 | 39 | self.preferences_widget = preferences.PreferencesPanel() | ||
4582 | 40 | self.layout().addWidget(self.preferences_widget) | ||
4583 | 41 | self.preferences_widget.ui.apply_changes_button.hide() | ||
4584 | 42 | self.preferences_widget.ui.restore_defaults_button.hide() | ||
4585 | 43 | |||
4586 | 44 | # Invalid name "initializePage" | ||
4587 | 45 | # pylint: disable=C0103 | ||
4588 | 46 | |||
4589 | 47 | def initializePage(self): | ||
4590 | 48 | """Initialize the page before the Wizard show it.""" | ||
4591 | 49 | self.wizard().setOption(QtGui.QWizard.HaveCustomButton1, True) | ||
4592 | 50 | self.wizard().setOption(QtGui.QWizard.HaveCustomButton2, True) | ||
4593 | 51 | # This is just to catch an exception thrown when nothing | ||
4594 | 52 | # is connected to the signal. It's not an exceptional | ||
4595 | 53 | # condition at all. | ||
4596 | 54 | try: | ||
4597 | 55 | self.wizard().customButtonClicked.disconnect() | ||
4598 | 56 | except TypeError: | ||
4599 | 57 | pass | ||
4600 | 58 | self.wizard()._next_id = None | ||
4601 | 59 | self.setButtonText(QtGui.QWizard.CustomButton1, | ||
4602 | 60 | _("Apply these settings >")) | ||
4603 | 61 | self.setButtonText(QtGui.QWizard.CustomButton2, _("Default settings")) | ||
4604 | 62 | |||
4605 | 63 | self.wizard().setButtonLayout([ | ||
4606 | 64 | QtGui.QWizard.BackButton, | ||
4607 | 65 | QtGui.QWizard.Stretch, | ||
4608 | 66 | QtGui.QWizard.CustomButton2, | ||
4609 | 67 | QtGui.QWizard.CustomButton1]) | ||
4610 | 68 | self.wizard().button(QtGui.QWizard.CustomButton1).setDefault(True) | ||
4611 | 69 | self.wizard().button(QtGui.QWizard.CustomButton1).style().unpolish( | ||
4612 | 70 | self.wizard().button(QtGui.QWizard.CustomButton1)) | ||
4613 | 71 | self.wizard().button(QtGui.QWizard.CustomButton1).style().polish( | ||
4614 | 72 | self.wizard().button(QtGui.QWizard.CustomButton1)) | ||
4615 | 73 | |||
4616 | 74 | self.wizard().customButtonClicked.connect(self._button_clicked) | ||
4617 | 75 | |||
4618 | 76 | # pylint: enable=C0103 | ||
4619 | 77 | |||
4620 | 78 | def _button_clicked(self, btn): | ||
4621 | 79 | """Receive custom wizard buttons clicks.""" | ||
4622 | 80 | if btn == QtGui.QWizard.CustomButton1: | ||
4623 | 81 | self.preferences_widget.on_apply_changes_button_clicked() | ||
4624 | 82 | self.cleanupPage() | ||
4625 | 83 | self.wizard().back() | ||
4626 | 84 | elif btn == QtGui.QWizard.CustomButton2: | ||
4627 | 85 | self.preferences_widget.on_restore_defaults_button_clicked() | ||
4628 | 86 | |||
4629 | 87 | # Invalid name "cleanupPage" | ||
4630 | 88 | # pylint: disable=C0103 | ||
4631 | 89 | def cleanupPage(self): | ||
4632 | 90 | """Execute this cleanup function when the back button is pressed.""" | ||
4633 | 91 | self.wizard().setOption(QtGui.QWizard.HaveCustomButton1, False) | ||
4634 | 92 | self.wizard().setOption(QtGui.QWizard.HaveCustomButton2, False) | ||
4635 | 93 | self.wizard().setButtonLayout([ | ||
4636 | 94 | QtGui.QWizard.BackButton, | ||
4637 | 95 | QtGui.QWizard.Stretch, | ||
4638 | 96 | QtGui.QWizard.NextButton]) | ||
4639 | 97 | self.wizard().folders_page.initializePage() | ||
4640 | 98 | # pylint: enable=C0103 | ||
4641 | 99 | 0 | ||
4642 | === removed file 'ubuntuone_installer/gui/qt/setup_account.py' | |||
4643 | --- ubuntuone_installer/gui/qt/setup_account.py 2012-03-16 15:27:09 +0000 | |||
4644 | +++ ubuntuone_installer/gui/qt/setup_account.py 1970-01-01 00:00:00 +0000 | |||
4645 | @@ -1,226 +0,0 @@ | |||
4646 | 1 | # -*- coding: utf-8 -*- | ||
4647 | 2 | |||
4648 | 3 | # Authors: Roberto Alsina <roberto.alsina@canonical.com> | ||
4649 | 4 | # | ||
4650 | 5 | # Copyright 2011 Canonical Ltd. | ||
4651 | 6 | # | ||
4652 | 7 | # This program is free software: you can redistribute it and/or modify it | ||
4653 | 8 | # under the terms of the GNU General Public License version 3, as published | ||
4654 | 9 | # by the Free Software Foundation. | ||
4655 | 10 | # | ||
4656 | 11 | # This program is distributed in the hope that it will be useful, but | ||
4657 | 12 | # WITHOUT ANY WARRANTY; without even the implied warranties of | ||
4658 | 13 | # MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR | ||
4659 | 14 | # PURPOSE. See the GNU General Public License for more details. | ||
4660 | 15 | # | ||
4661 | 16 | # You should have received a copy of the GNU General Public License along | ||
4662 | 17 | # with this program. If not, see <http://www.gnu.org/licenses/>. | ||
4663 | 18 | |||
4664 | 19 | """Customized Setup Account page for SSO.""" | ||
4665 | 20 | |||
4666 | 21 | import gettext | ||
4667 | 22 | import re | ||
4668 | 23 | |||
4669 | 24 | from PyQt4 import QtGui, QtCore | ||
4670 | 25 | |||
4671 | 26 | from ubuntu_sso.qt import common | ||
4672 | 27 | from ubuntu_sso.qt import gui as sso_gui | ||
4673 | 28 | from ubuntu_sso.utils.ui import SET_UP_ACCOUNT_BUTTON | ||
4674 | 29 | |||
4675 | 30 | from ubuntuone_installer.gui.qt import enhanced_check_box | ||
4676 | 31 | |||
4677 | 32 | _ = gettext.gettext | ||
4678 | 33 | |||
4679 | 34 | # pylint: disable=C0103 | ||
4680 | 35 | ERROR = u'<font color="#df2d1f"><b> %s </b></font>' | ||
4681 | 36 | TITLE_STYLE = "<span style=\"font-size:24px\">%s</span>" | ||
4682 | 37 | |||
4683 | 38 | EMAIL = _("Email") | ||
4684 | 39 | EMPTY_NAME = _("Please enter your name") | ||
4685 | 40 | INVALID_EMAIL = _("Please enter a valid email address") | ||
4686 | 41 | EMAIL_MATCH = _("The email addresses do not match") | ||
4687 | 42 | NAME = _("Name") | ||
4688 | 43 | PASSWORD = _("Create a password") | ||
4689 | 44 | RETYPE_EMAIL = _("Retype email") | ||
4690 | 45 | RETYPE_PASSWORD = _("Retype password") | ||
4691 | 46 | SUBTITLE = _("You only need to set up your account " | ||
4692 | 47 | "once to get access to Ubuntu One across your devices.") | ||
4693 | 48 | TERMS = _("By signing up to Ubuntu One you agree to our " | ||
4694 | 49 | "{terms_and_conditions} and {privacy_policy}") | ||
4695 | 50 | TERMS_LINK = _("<a href='https://one.ubuntu.com/terms/'>" | ||
4696 | 51 | "<span style='color:#df2d1f;'>Terms of Service</span></a>") | ||
4697 | 52 | PRIVACY_POLICY_LINK = _("<a href='https://one.ubuntu.com/privacy/'>" | ||
4698 | 53 | "<span style='color:#df2d1f;'>Privacy Policy" | ||
4699 | 54 | "</span></a></font>") | ||
4700 | 55 | TITLE = _("Sign Up to Ubuntu One") | ||
4701 | 56 | |||
4702 | 57 | |||
4703 | 58 | class SetupAccountPage(sso_gui.SetupAccountPage): | ||
4704 | 59 | """Customized Setup Account page for SSO.""" | ||
4705 | 60 | |||
4706 | 61 | def __init__(self, *args, **kwargs): | ||
4707 | 62 | super(SetupAccountPage, self).__init__(*args, **kwargs) | ||
4708 | 63 | self.ui.password_edit.textEdited.connect( | ||
4709 | 64 | lambda: common.password_assistance(self.ui.password_edit, | ||
4710 | 65 | self.ui.password_assistance, | ||
4711 | 66 | common.NORMAL)) | ||
4712 | 67 | terms = TERMS.format(terms_and_conditions=TERMS_LINK, | ||
4713 | 68 | privacy_policy=PRIVACY_POLICY_LINK) | ||
4714 | 69 | self.terms_checkbox = enhanced_check_box.EnhancedCheckBox(terms) | ||
4715 | 70 | self.ui.hlayout_check.addWidget(self.terms_checkbox) | ||
4716 | 71 | |||
4717 | 72 | self.set_up_button = None | ||
4718 | 73 | self.captcha_received = False | ||
4719 | 74 | |||
4720 | 75 | # Invalid name "initializePage" | ||
4721 | 76 | # pylint: disable=C0103 | ||
4722 | 77 | |||
4723 | 78 | def initializePage(self): | ||
4724 | 79 | """Setup UI details.""" | ||
4725 | 80 | # We need to override some texts from SSO | ||
4726 | 81 | # to match our spec | ||
4727 | 82 | title_page = TITLE_STYLE % TITLE | ||
4728 | 83 | self.setTitle(title_page) | ||
4729 | 84 | self.setSubTitle(SUBTITLE) | ||
4730 | 85 | # Set Setup Account button | ||
4731 | 86 | self.wizard().setOption(QtGui.QWizard.HaveCustomButton3, True) | ||
4732 | 87 | try: | ||
4733 | 88 | self.wizard().customButtonClicked.disconnect() | ||
4734 | 89 | except TypeError: | ||
4735 | 90 | pass | ||
4736 | 91 | self.setButtonText(QtGui.QWizard.CustomButton3, SET_UP_ACCOUNT_BUTTON) | ||
4737 | 92 | self.set_up_button = self.wizard().button(QtGui.QWizard.CustomButton3) | ||
4738 | 93 | self.set_up_button.clicked.connect(self.wizard().overlay.show) | ||
4739 | 94 | self.set_up_button.clicked.connect(self.controller.set_next_validation) | ||
4740 | 95 | self.set_up_button.setEnabled(False) | ||
4741 | 96 | |||
4742 | 97 | self.ui.name_label.setText(NAME) | ||
4743 | 98 | self.ui.email_label.setText(EMAIL) | ||
4744 | 99 | self.ui.confirm_email_label.setText(RETYPE_EMAIL) | ||
4745 | 100 | self.ui.password_label.setText(PASSWORD) | ||
4746 | 101 | self.ui.confirm_password_label.setText(RETYPE_PASSWORD) | ||
4747 | 102 | self.ui.password_info_label.hide() | ||
4748 | 103 | |||
4749 | 104 | # Button setup | ||
4750 | 105 | self.wizard().setButtonLayout([ | ||
4751 | 106 | QtGui.QWizard.BackButton, | ||
4752 | 107 | QtGui.QWizard.Stretch, | ||
4753 | 108 | QtGui.QWizard.CustomButton3]) | ||
4754 | 109 | |||
4755 | 110 | common.password_default_assistance(self.ui.password_assistance) | ||
4756 | 111 | # Hide assistance labels by default | ||
4757 | 112 | self.ui.name_assistance.setVisible(False) | ||
4758 | 113 | self.ui.email_assistance.setVisible(False) | ||
4759 | 114 | self.ui.confirm_email_assistance.setVisible(False) | ||
4760 | 115 | self.ui.password_assistance.setVisible(False) | ||
4761 | 116 | self.ui.refresh_label.setVisible(True) | ||
4762 | 117 | |||
4763 | 118 | def focus_changed(self, old, now): | ||
4764 | 119 | """Check who has the focus to activate password popups if necessary.""" | ||
4765 | 120 | if old == self.ui.name_edit: | ||
4766 | 121 | self.name_assistance() | ||
4767 | 122 | elif old == self.ui.email_edit: | ||
4768 | 123 | self.email_assistance() | ||
4769 | 124 | elif old == self.ui.confirm_email_edit: | ||
4770 | 125 | self.confirm_email_assistance() | ||
4771 | 126 | elif old == self.ui.confirm_password_edit: | ||
4772 | 127 | common.password_check_match(self.ui.password_edit, | ||
4773 | 128 | self.ui.confirm_password_edit, | ||
4774 | 129 | self.ui.password_assistance) | ||
4775 | 130 | if now == self.ui.password_edit: | ||
4776 | 131 | self.ui.password_assistance.setVisible(True) | ||
4777 | 132 | |||
4778 | 133 | def name_assistance(self): | ||
4779 | 134 | """Show help for the name field.""" | ||
4780 | 135 | text = unicode(self.ui.name_edit.text()) | ||
4781 | 136 | if not text.strip(): | ||
4782 | 137 | self.set_error_message(self.ui.name_assistance, | ||
4783 | 138 | EMPTY_NAME) | ||
4784 | 139 | common.check_as_invalid(self.ui.name_edit) | ||
4785 | 140 | else: | ||
4786 | 141 | self.ui.name_assistance.setVisible(False) | ||
4787 | 142 | common.check_as_valid(self.ui.name_edit) | ||
4788 | 143 | |||
4789 | 144 | def email_assistance(self): | ||
4790 | 145 | """Show help for the email field.""" | ||
4791 | 146 | text = unicode(self.ui.email_edit.text()) | ||
4792 | 147 | if not is_correct_email(text): | ||
4793 | 148 | self.set_error_message(self.ui.email_assistance, | ||
4794 | 149 | INVALID_EMAIL) | ||
4795 | 150 | common.check_as_invalid(self.ui.email_edit) | ||
4796 | 151 | else: | ||
4797 | 152 | self.ui.email_assistance.setVisible(False) | ||
4798 | 153 | common.check_as_valid(self.ui.email_edit) | ||
4799 | 154 | |||
4800 | 155 | def confirm_email_assistance(self): | ||
4801 | 156 | """Show help for the confirm email field.""" | ||
4802 | 157 | text1 = unicode(self.ui.email_edit.text()) | ||
4803 | 158 | text2 = unicode(self.ui.confirm_email_edit.text()) | ||
4804 | 159 | if text1 != text2: | ||
4805 | 160 | self.set_error_message(self.ui.confirm_email_assistance, | ||
4806 | 161 | EMAIL_MATCH) | ||
4807 | 162 | common.check_as_invalid(self.ui.confirm_email_edit) | ||
4808 | 163 | else: | ||
4809 | 164 | self.ui.confirm_email_assistance.setVisible(False) | ||
4810 | 165 | common.check_as_valid(self.ui.confirm_email_edit) | ||
4811 | 166 | |||
4812 | 167 | def set_error_message(self, label, msg): | ||
4813 | 168 | """Set the message to the proper label applying the error style.""" | ||
4814 | 169 | label.setText(ERROR % msg) | ||
4815 | 170 | label.setVisible(True) | ||
4816 | 171 | |||
4817 | 172 | def showEvent(self, event): | ||
4818 | 173 | """Set set_up_button as default button when the page is shown.""" | ||
4819 | 174 | # This method should stays here because if we move it to initializePage | ||
4820 | 175 | # set_up_button won't take the proper style for hover and press | ||
4821 | 176 | if self.set_up_button is not None: | ||
4822 | 177 | self.set_up_button.setVisible(True) | ||
4823 | 178 | self.set_up_button.setDefault(True) | ||
4824 | 179 | if not self.set_up_button.isEnabled(): | ||
4825 | 180 | self.set_up_button.setProperty("DisabledState", True) | ||
4826 | 181 | self.set_up_button.style().unpolish(self.set_up_button) | ||
4827 | 182 | self.set_up_button.style().polish(self.set_up_button) | ||
4828 | 183 | self.connect(QtGui.QApplication.instance(), | ||
4829 | 184 | QtCore.SIGNAL("focusChanged(QWidget*, QWidget*)"), | ||
4830 | 185 | self.focus_changed) | ||
4831 | 186 | super(SetupAccountPage, self).showEvent(event) | ||
4832 | 187 | if not self.captcha_received: | ||
4833 | 188 | self.wizard().overlay.show() | ||
4834 | 189 | |||
4835 | 190 | def hideEvent(self, event): | ||
4836 | 191 | """Disconnect the focusChanged signal when the page change.""" | ||
4837 | 192 | if self.set_up_button is not None: | ||
4838 | 193 | self.set_up_button.setVisible(False) | ||
4839 | 194 | try: | ||
4840 | 195 | self.disconnect(QtGui.QApplication.instance(), | ||
4841 | 196 | QtCore.SIGNAL("focusChanged(QWidget*, QWidget*)"), | ||
4842 | 197 | self.focus_changed) | ||
4843 | 198 | except TypeError: | ||
4844 | 199 | pass | ||
4845 | 200 | super(SetupAccountPage, self).hideEvent(event) | ||
4846 | 201 | |||
4847 | 202 | def on_captcha_refreshing(self): | ||
4848 | 203 | """Show overlay when captcha is refreshing.""" | ||
4849 | 204 | if self.isVisible(): | ||
4850 | 205 | self.wizard().overlay.show() | ||
4851 | 206 | self.captcha_received = False | ||
4852 | 207 | |||
4853 | 208 | def on_captcha_refresh_complete(self): | ||
4854 | 209 | """Hide overlay when captcha finished refreshing.""" | ||
4855 | 210 | self.wizard().overlay.hide() | ||
4856 | 211 | self.captcha_received = True | ||
4857 | 212 | |||
4858 | 213 | |||
4859 | 214 | def is_min_required_password(password): | ||
4860 | 215 | """Return if the password meets the minimum requirements.""" | ||
4861 | 216 | if (len(password) < 8 or | ||
4862 | 217 | re.search('[A-Z]', password) is None or | ||
4863 | 218 | re.search('\d+', password) is None): | ||
4864 | 219 | return False | ||
4865 | 220 | return True | ||
4866 | 221 | |||
4867 | 222 | |||
4868 | 223 | # FIXME: this should do the same check as SSO's server side | ||
4869 | 224 | def is_correct_email(email_address): | ||
4870 | 225 | """Return if the email is correct.""" | ||
4871 | 226 | return '@' in email_address | ||
4872 | 227 | 0 | ||
4873 | === removed file 'ubuntuone_installer/gui/qt/side_widget.py' | |||
4874 | --- ubuntuone_installer/gui/qt/side_widget.py 2011-09-02 12:58:29 +0000 | |||
4875 | +++ ubuntuone_installer/gui/qt/side_widget.py 1970-01-01 00:00:00 +0000 | |||
4876 | @@ -1,69 +0,0 @@ | |||
4877 | 1 | # -*- coding: utf-8 -*- | ||
4878 | 2 | |||
4879 | 3 | # Authors: Roberto Alsina <roberto.alsina@canonical.com> | ||
4880 | 4 | # | ||
4881 | 5 | # Copyright 2011 Canonical Ltd. | ||
4882 | 6 | # | ||
4883 | 7 | # This program is free software: you can redistribute it and/or modify it | ||
4884 | 8 | # under the terms of the GNU General Public License version 3, as published | ||
4885 | 9 | # by the Free Software Foundation. | ||
4886 | 10 | # | ||
4887 | 11 | # This program is distributed in the hope that it will be useful, but | ||
4888 | 12 | # WITHOUT ANY WARRANTY; without even the implied warranties of | ||
4889 | 13 | # MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR | ||
4890 | 14 | # PURPOSE. See the GNU General Public License for more details. | ||
4891 | 15 | # | ||
4892 | 16 | # You should have received a copy of the GNU General Public License along | ||
4893 | 17 | # with this program. If not, see <http://www.gnu.org/licenses/>. | ||
4894 | 18 | |||
4895 | 19 | """Wizard's side widget.""" | ||
4896 | 20 | |||
4897 | 21 | from PyQt4 import QtGui | ||
4898 | 22 | |||
4899 | 23 | from ubuntuone_installer.gui.qt.ui import side_widget_ui | ||
4900 | 24 | # Module used ti include the resources into this file | ||
4901 | 25 | # pylint: disable=W0611 | ||
4902 | 26 | from ubuntuone_installer.gui.qt.ui import images_rc | ||
4903 | 27 | # pylint: enable=W0611 | ||
4904 | 28 | |||
4905 | 29 | |||
4906 | 30 | class SideWidget(QtGui.QFrame): | ||
4907 | 31 | |||
4908 | 32 | """Wizard's side widget.""" | ||
4909 | 33 | |||
4910 | 34 | install_stage = 0 | ||
4911 | 35 | signin_stage = 1 | ||
4912 | 36 | select_sync_folders_stage = 2 | ||
4913 | 37 | sync_stage = 3 | ||
4914 | 38 | |||
4915 | 39 | def __init__(self, *args, **kwargs): | ||
4916 | 40 | super(SideWidget, self).__init__(*args, **kwargs) | ||
4917 | 41 | self.ui = side_widget_ui.Ui_SideWidget() | ||
4918 | 42 | self.ui.setupUi(self) | ||
4919 | 43 | self.stage = 0 | ||
4920 | 44 | |||
4921 | 45 | def set_stage(self, stage): | ||
4922 | 46 | """Switch to the desired stage.""" | ||
4923 | 47 | self.stage = stage | ||
4924 | 48 | self.ui.install_label.setEnabled(stage >= 0) | ||
4925 | 49 | self.ui.sign_in_label.setEnabled(stage >= 1) | ||
4926 | 50 | self.ui.select_folders_label.setEnabled(stage >= 2) | ||
4927 | 51 | self.ui.sync_label.setEnabled(stage >= 3) | ||
4928 | 52 | self.set_stage_icon(self.ui.install_icon_label, self.install_stage) | ||
4929 | 53 | self.set_stage_icon(self.ui.sign_icon_label, self.signin_stage) | ||
4930 | 54 | self.set_stage_icon(self.ui.folders_icon_label, | ||
4931 | 55 | self.select_sync_folders_stage) | ||
4932 | 56 | self.set_stage_icon(self.ui.sync_icon_label, self.sync_stage) | ||
4933 | 57 | |||
4934 | 58 | def set_stage_icon(self, label, label_stage): | ||
4935 | 59 | """Set the label icon depending on the proper state.""" | ||
4936 | 60 | if self.stage == label_stage and label == self.ui.sync_icon_label: | ||
4937 | 61 | label.setPixmap(QtGui.QPixmap(":/progress_finish_orange.png")) | ||
4938 | 62 | elif self.stage == label_stage: | ||
4939 | 63 | label.setPixmap(QtGui.QPixmap(":/progress_arrow_orange.png")) | ||
4940 | 64 | elif self.stage > label_stage: | ||
4941 | 65 | label.setPixmap(QtGui.QPixmap(":/progress_tick.png")) | ||
4942 | 66 | elif label == self.ui.sync_icon_label: | ||
4943 | 67 | label.setPixmap(QtGui.QPixmap(":/progress_finish_grey.png")) | ||
4944 | 68 | else: | ||
4945 | 69 | label.setPixmap(QtGui.QPixmap(":/progress_arrow_grey.png")) | ||
4946 | 70 | 0 | ||
4947 | === removed file 'ubuntuone_installer/gui/qt/sync_now_or_later.py' | |||
4948 | --- ubuntuone_installer/gui/qt/sync_now_or_later.py 2012-01-02 13:51:03 +0000 | |||
4949 | +++ ubuntuone_installer/gui/qt/sync_now_or_later.py 1970-01-01 00:00:00 +0000 | |||
4950 | @@ -1,83 +0,0 @@ | |||
4951 | 1 | # -*- coding: utf-8 -*- | ||
4952 | 2 | # | ||
4953 | 3 | # Copyright 2011 Canonical Ltd. | ||
4954 | 4 | # | ||
4955 | 5 | # This program is free software: you can redistribute it and/or modify it | ||
4956 | 6 | # under the terms of the GNU General Public License version 3, as published | ||
4957 | 7 | # by the Free Software Foundation. | ||
4958 | 8 | # | ||
4959 | 9 | # This program is distributed in the hope that it will be useful, but | ||
4960 | 10 | # WITHOUT ANY WARRANTY; without even the implied warranties of | ||
4961 | 11 | # MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR | ||
4962 | 12 | # PURPOSE. See the GNU General Public License for more details. | ||
4963 | 13 | # | ||
4964 | 14 | # You should have received a copy of the GNU General Public License along | ||
4965 | 15 | # with this program. If not, see <http://www.gnu.org/licenses/>. | ||
4966 | 16 | |||
4967 | 17 | """The user interface for the Ubuntu One Installer.""" | ||
4968 | 18 | |||
4969 | 19 | from PyQt4 import QtGui | ||
4970 | 20 | from twisted.internet.defer import inlineCallbacks | ||
4971 | 21 | from ubuntuone.controlpanel import backend | ||
4972 | 22 | |||
4973 | 23 | from ubuntuone_installer.gui import NEXT | ||
4974 | 24 | from ubuntuone_installer.logger import setup_logging | ||
4975 | 25 | |||
4976 | 26 | # Invalid name logger | ||
4977 | 27 | # pylint: disable=C0103 | ||
4978 | 28 | logger = setup_logging('qt.sync_now_or_later') | ||
4979 | 29 | # pylint: enable=C0103 | ||
4980 | 30 | |||
4981 | 31 | |||
4982 | 32 | class SyncNowOrLaterPage(QtGui.QWizardPage): | ||
4983 | 33 | """User can choose whether to sync now, later, or selectively""" | ||
4984 | 34 | |||
4985 | 35 | def __init__(self, parent=None): | ||
4986 | 36 | QtGui.QWizardPage.__init__(self, parent) | ||
4987 | 37 | self.has_cloud_folders = False | ||
4988 | 38 | self.cp_backend = None | ||
4989 | 39 | |||
4990 | 40 | # Invalid names of Qt-inherited methods | ||
4991 | 41 | # pylint: disable=C0103 | ||
4992 | 42 | |||
4993 | 43 | def initializePage(self): | ||
4994 | 44 | """Setup UI details""" | ||
4995 | 45 | self.wizard().setOption(QtGui.QWizard.HaveCustomButton1, False) | ||
4996 | 46 | self.wizard().setOption(QtGui.QWizard.NoCancelButton, True) | ||
4997 | 47 | self.wizard()._next_id = None | ||
4998 | 48 | self.wizard().overlay.show() | ||
4999 | 49 | self.wizard().setButtonText(QtGui.QWizard.NextButton, | ||
5000 | 50 | NEXT) |
The diff has been truncated for viewing.
+9056