Merge lp:~nataliabidart/ubuntuone-windows-installer/wipe-it into lp:ubuntuone-windows-installer

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
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.

To post a comment you must log in.
Revision history for this message
Roberto Alsina (ralsina) wrote :

+9056

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

Subscribers

People subscribed via source and target branches