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
=== removed file '.bzrignore'
--- .bzrignore 2011-06-21 16:17:47 +0000
+++ .bzrignore 1970-01-01 00:00:00 +0000
@@ -1,9 +0,0 @@
1_trial_temp
2*.service
3MANIFEST
4build/
5dist/
6po/ubuntuone-installer.pot
7ubuntuone_installer/gui/qt/ui/*_ui.py
8ubuntuone_installer/gui/qt/ui/*_rc.py
9qtreactor/
100
=== removed directory 'bin'
=== removed file 'bin/ubuntuone-installer-qt'
--- bin/ubuntuone-installer-qt 2011-09-14 14:12:02 +0000
+++ bin/ubuntuone-installer-qt 1970-01-01 00:00:00 +0000
@@ -1,51 +0,0 @@
1#!/usr/bin/python
2# -*- coding: utf-8 -*-
3
4# Authors: Natalia B Bidart <natalia.bidart@canonical.com>
5# Eric Casteleijn <eric.casteleijn@canonical.com>
6# Roberto Alsina <roberto.alsina@canonical.com>
7#
8# Copyright 2010 Canonical Ltd.
9#
10# This program is free software: you can redistribute it and/or modify it
11# under the terms of the GNU General Public License version 3, as published
12# by the Free Software Foundation.
13#
14# This program is distributed in the hope that it will be useful, but
15# WITHOUT ANY WARRANTY; without even the implied warranties of
16# MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
17# PURPOSE. See the GNU General Public License for more details.
18#
19# You should have received a copy of the GNU General Public License along
20# with this program. If not, see <http://www.gnu.org/licenses/>.
21"""Execute the graphical interface for the Ubuntu One installer."""
22
23# Invalid name "ubuntuone-installer-qt", pylint: disable=C0103
24
25import gettext
26import sys
27
28from optparse import OptionParser
29
30from ubuntuone_installer import TRANSLATION_DOMAIN
31
32gettext.textdomain(TRANSLATION_DOMAIN)
33# import the GUI after the translation domain has been set
34from ubuntuone_installer.gui.qt import main
35
36
37def parser_options():
38 """Parse command line parameters."""
39 usage = "Usage: %prog [option]"
40 result = OptionParser(usage=usage)
41 result.add_option("-i", "--installer", dest="installer",
42 action="store_true",
43 default=False, help="To be used by the installer: "
44 "Show license page, offer uninstall on cancel.")
45 return result
46
47
48if __name__ == "__main__":
49 parser = parser_options()
50 (options, args) = parser.parse_args(sys.argv)
51 main.main(installing=options.installer)
520
=== removed directory 'data'
=== removed file 'data/Ubuntu-B.ttf'
53Binary files data/Ubuntu-B.ttf 2011-07-27 14:53:56 +0000 and data/Ubuntu-B.ttf 1970-01-01 00:00:00 +0000 differ1Binary 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
=== removed file 'data/Ubuntu-R.ttf'
54Binary files data/Ubuntu-R.ttf 2011-07-12 03:24:48 +0000 and data/Ubuntu-R.ttf 1970-01-01 00:00:00 +0000 differ2Binary 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
=== removed file 'data/balloon_shape.png'
55Binary files data/balloon_shape.png 2011-07-13 03:14:18 +0000 and data/balloon_shape.png 1970-01-01 00:00:00 +0000 differ3Binary 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
=== removed file 'data/folder.png'
56Binary files data/folder.png 2011-08-08 21:48:11 +0000 and data/folder.png 1970-01-01 00:00:00 +0000 differ4Binary files data/folder.png 2011-08-08 21:48:11 +0000 and data/folder.png 1970-01-01 00:00:00 +0000 differ
=== removed file 'data/password_hint_ok.png'
57Binary 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 differ5Binary 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
=== removed file 'data/password_hint_warning.png'
58Binary 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 differ6Binary 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
=== removed file 'data/progress_arrow_grey.png'
59Binary 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 differ7Binary 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
=== removed file 'data/progress_arrow_orange.png'
60Binary 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 differ8Binary 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
=== removed file 'data/progress_finish_grey.png'
61Binary 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 differ9Binary 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
=== removed file 'data/progress_finish_orange.png'
62Binary 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 differ10Binary 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
=== removed file 'data/progress_tick.png'
63Binary files data/progress_tick.png 2011-07-12 03:24:48 +0000 and data/progress_tick.png 1970-01-01 00:00:00 +0000 differ11Binary 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
=== removed directory 'data/qt'
=== removed file 'data/qt/are_you_sure.ui'
--- data/qt/are_you_sure.ui 2011-09-05 17:53:44 +0000
+++ data/qt/are_you_sure.ui 1970-01-01 00:00:00 +0000
@@ -1,156 +0,0 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<ui version="4.0">
3 <class>Dialog</class>
4 <widget class="QDialog" name="Dialog">
5 <property name="geometry">
6 <rect>
7 <x>0</x>
8 <y>0</y>
9 <width>386</width>
10 <height>196</height>
11 </rect>
12 </property>
13 <property name="windowTitle">
14 <string>Dialog</string>
15 </property>
16 <layout class="QVBoxLayout" name="verticalLayout">
17 <item>
18 <widget class="QLabel" name="label">
19 <property name="text">
20 <string>Are you sure you want to cancel setting up Ubuntu One?</string>
21 </property>
22 <property name="textFormat">
23 <enum>Qt::PlainText</enum>
24 </property>
25 </widget>
26 </item>
27 <item>
28 <widget class="QLabel" name="message_label">
29 <property name="text">
30 <string>PLACEHOLDER TEXT</string>
31 </property>
32 <property name="textFormat">
33 <enum>Qt::AutoText</enum>
34 </property>
35 <property name="wordWrap">
36 <bool>true</bool>
37 </property>
38 <property name="openExternalLinks">
39 <bool>true</bool>
40 </property>
41 </widget>
42 </item>
43 <item>
44 <spacer name="verticalSpacer">
45 <property name="orientation">
46 <enum>Qt::Vertical</enum>
47 </property>
48 <property name="sizeHint" stdset="0">
49 <size>
50 <width>20</width>
51 <height>40</height>
52 </size>
53 </property>
54 </spacer>
55 </item>
56 <item>
57 <layout class="QHBoxLayout" name="horizontalLayout">
58 <item>
59 <spacer name="horizontalSpacer">
60 <property name="orientation">
61 <enum>Qt::Horizontal</enum>
62 </property>
63 <property name="sizeHint" stdset="0">
64 <size>
65 <width>40</width>
66 <height>20</height>
67 </size>
68 </property>
69 </spacer>
70 </item>
71 <item>
72 <widget class="QPushButton" name="pushButton">
73 <property name="text">
74 <string>Yes, I want to cancel</string>
75 </property>
76 <property name="autoDefault">
77 <bool>false</bool>
78 </property>
79 </widget>
80 </item>
81 <item>
82 <spacer name="horizontalSpacer_2">
83 <property name="orientation">
84 <enum>Qt::Horizontal</enum>
85 </property>
86 <property name="sizeHint" stdset="0">
87 <size>
88 <width>40</width>
89 <height>20</height>
90 </size>
91 </property>
92 </spacer>
93 </item>
94 <item>
95 <widget class="QPushButton" name="pushButton_2">
96 <property name="text">
97 <string>No, continue setting up</string>
98 </property>
99 <property name="default">
100 <bool>true</bool>
101 </property>
102 </widget>
103 </item>
104 <item>
105 <spacer name="horizontalSpacer_3">
106 <property name="orientation">
107 <enum>Qt::Horizontal</enum>
108 </property>
109 <property name="sizeHint" stdset="0">
110 <size>
111 <width>40</width>
112 <height>20</height>
113 </size>
114 </property>
115 </spacer>
116 </item>
117 </layout>
118 </item>
119 </layout>
120 </widget>
121 <resources/>
122 <connections>
123 <connection>
124 <sender>pushButton_2</sender>
125 <signal>clicked()</signal>
126 <receiver>Dialog</receiver>
127 <slot>reject()</slot>
128 <hints>
129 <hint type="sourcelabel">
130 <x>272</x>
131 <y>174</y>
132 </hint>
133 <hint type="destinationlabel">
134 <x>330</x>
135 <y>129</y>
136 </hint>
137 </hints>
138 </connection>
139 <connection>
140 <sender>pushButton</sender>
141 <signal>clicked()</signal>
142 <receiver>Dialog</receiver>
143 <slot>accept()</slot>
144 <hints>
145 <hint type="sourcelabel">
146 <x>118</x>
147 <y>167</y>
148 </hint>
149 <hint type="destinationlabel">
150 <x>163</x>
151 <y>122</y>
152 </hint>
153 </hints>
154 </connection>
155 </connections>
156</ui>
1570
=== removed file 'data/qt/choose_sign_in.ui'
--- data/qt/choose_sign_in.ui 2011-09-02 12:58:29 +0000
+++ data/qt/choose_sign_in.ui 1970-01-01 00:00:00 +0000
@@ -1,171 +0,0 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<ui version="4.0">
3 <class>ChooseSignInPage</class>
4 <widget class="QWizardPage" name="ChooseSignInPage">
5 <property name="geometry">
6 <rect>
7 <x>0</x>
8 <y>0</y>
9 <width>432</width>
10 <height>387</height>
11 </rect>
12 </property>
13 <property name="windowTitle">
14 <string>WizardPage</string>
15 </property>
16 <layout class="QVBoxLayout" name="verticalLayout_2">
17 <property name="leftMargin">
18 <number>0</number>
19 </property>
20 <property name="topMargin">
21 <number>0</number>
22 </property>
23 <property name="rightMargin">
24 <number>0</number>
25 </property>
26 <item>
27 <layout class="QHBoxLayout" name="horizontalLayout_2">
28 <item>
29 <widget class="QLabel" name="image_label">
30 <property name="sizePolicy">
31 <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
32 <horstretch>0</horstretch>
33 <verstretch>0</verstretch>
34 </sizepolicy>
35 </property>
36 <property name="minimumSize">
37 <size>
38 <width>400</width>
39 <height>150</height>
40 </size>
41 </property>
42 <property name="text">
43 <string/>
44 </property>
45 <property name="textFormat">
46 <enum>Qt::PlainText</enum>
47 </property>
48 <property name="pixmap">
49 <pixmap resource="images.qrc">:/win_installer_graphic.png</pixmap>
50 </property>
51 <property name="alignment">
52 <set>Qt::AlignCenter</set>
53 </property>
54 <property name="wordWrap">
55 <bool>true</bool>
56 </property>
57 </widget>
58 </item>
59 </layout>
60 </item>
61 <item>
62 <widget class="QLabel" name="message_label">
63 <property name="font">
64 <font>
65 <pointsize>11</pointsize>
66 <weight>50</weight>
67 <bold>false</bold>
68 </font>
69 </property>
70 <property name="text">
71 <string>Congratulations, Ubuntu One is installed!</string>
72 </property>
73 <property name="alignment">
74 <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
75 </property>
76 </widget>
77 </item>
78 <item>
79 <spacer name="verticalSpacer_3">
80 <property name="orientation">
81 <enum>Qt::Vertical</enum>
82 </property>
83 <property name="sizeType">
84 <enum>QSizePolicy::Fixed</enum>
85 </property>
86 <property name="sizeHint" stdset="0">
87 <size>
88 <width>20</width>
89 <height>30</height>
90 </size>
91 </property>
92 </spacer>
93 </item>
94 <item>
95 <layout class="QHBoxLayout" name="horizontalLayout">
96 <item>
97 <spacer name="horizontalSpacer_2">
98 <property name="orientation">
99 <enum>Qt::Horizontal</enum>
100 </property>
101 <property name="sizeHint" stdset="0">
102 <size>
103 <width>20</width>
104 <height>20</height>
105 </size>
106 </property>
107 </spacer>
108 </item>
109 <item>
110 <layout class="QVBoxLayout" name="verticalLayout">
111 <item>
112 <widget class="QPushButton" name="existing_account_button">
113 <property name="text">
114 <string/>
115 </property>
116 </widget>
117 </item>
118 <item>
119 <widget class="QPushButton" name="setup_account_button">
120 <property name="text">
121 <string/>
122 </property>
123 </widget>
124 </item>
125 <item>
126 <widget class="QPushButton" name="cancel_button">
127 <property name="text">
128 <string/>
129 </property>
130 </widget>
131 </item>
132 </layout>
133 </item>
134 <item>
135 <spacer name="horizontalSpacer">
136 <property name="orientation">
137 <enum>Qt::Horizontal</enum>
138 </property>
139 <property name="sizeType">
140 <enum>QSizePolicy::Expanding</enum>
141 </property>
142 <property name="sizeHint" stdset="0">
143 <size>
144 <width>20</width>
145 <height>20</height>
146 </size>
147 </property>
148 </spacer>
149 </item>
150 </layout>
151 </item>
152 <item>
153 <spacer name="verticalSpacer_2">
154 <property name="orientation">
155 <enum>Qt::Vertical</enum>
156 </property>
157 <property name="sizeHint" stdset="0">
158 <size>
159 <width>20</width>
160 <height>50</height>
161 </size>
162 </property>
163 </spacer>
164 </item>
165 </layout>
166 </widget>
167 <resources>
168 <include location="images.qrc"/>
169 </resources>
170 <connections/>
171</ui>
1720
=== removed file 'data/qt/congratulations.ui'
--- data/qt/congratulations.ui 2011-11-17 20:05:33 +0000
+++ data/qt/congratulations.ui 1970-01-01 00:00:00 +0000
@@ -1,138 +0,0 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<ui version="4.0">
3 <class>Form</class>
4 <widget class="QWidget" name="Form">
5 <property name="geometry">
6 <rect>
7 <x>0</x>
8 <y>0</y>
9 <width>622</width>
10 <height>362</height>
11 </rect>
12 </property>
13 <property name="windowTitle">
14 <string>Form</string>
15 </property>
16 <layout class="QVBoxLayout" name="verticalLayout_2">
17 <property name="spacing">
18 <number>24</number>
19 </property>
20 <property name="topMargin">
21 <number>0</number>
22 </property>
23 <item>
24 <layout class="QHBoxLayout" name="horizontalLayout_2">
25 <item>
26 <spacer name="horizontalSpacer">
27 <property name="orientation">
28 <enum>Qt::Horizontal</enum>
29 </property>
30 <property name="sizeHint" stdset="0">
31 <size>
32 <width>40</width>
33 <height>20</height>
34 </size>
35 </property>
36 </spacer>
37 </item>
38 <item>
39 <widget class="QLabel" name="image_label">
40 <property name="text">
41 <string/>
42 </property>
43 <property name="pixmap">
44 <pixmap resource="images.qrc">:/win_installer_graphic.png</pixmap>
45 </property>
46 </widget>
47 </item>
48 <item>
49 <spacer name="horizontalSpacer_2">
50 <property name="orientation">
51 <enum>Qt::Horizontal</enum>
52 </property>
53 <property name="sizeHint" stdset="0">
54 <size>
55 <width>40</width>
56 <height>20</height>
57 </size>
58 </property>
59 </spacer>
60 </item>
61 </layout>
62 </item>
63 <item>
64 <widget class="QLabel" name="label_3">
65 <property name="text">
66 <string>Ubuntu One is installed, set up and is ready to go!</string>
67 </property>
68 </widget>
69 </item>
70 <item>
71 <widget class="QWidget" name="progressContainer" native="true">
72 <property name="layoutDirection">
73 <enum>Qt::RightToLeft</enum>
74 </property>
75 <layout class="QHBoxLayout" name="horizontalLayout">
76 <property name="spacing">
77 <number>0</number>
78 </property>
79 <property name="margin">
80 <number>0</number>
81 </property>
82 <item>
83 <widget class="QLabel" name="label_4">
84 <property name="text">
85 <string/>
86 </property>
87 </widget>
88 </item>
89 <item>
90 <layout class="QVBoxLayout" name="verticalLayout">
91 <item>
92 <widget class="QLabel" name="label_5">
93 <property name="font">
94 <font>
95 <weight>75</weight>
96 <bold>true</bold>
97 </font>
98 </property>
99 <property name="text">
100 <string>Sync in progress...</string>
101 </property>
102 </widget>
103 </item>
104 <item>
105 <widget class="QLabel" name="label_6">
106 <property name="text">
107 <string>Your selected folders have started to sync in the background, launch the dashboard to get more information about the sync in progress.</string>
108 </property>
109 <property name="wordWrap">
110 <bool>true</bool>
111 </property>
112 </widget>
113 </item>
114 </layout>
115 </item>
116 </layout>
117 </widget>
118 </item>
119 <item>
120 <spacer name="verticalSpacer">
121 <property name="orientation">
122 <enum>Qt::Vertical</enum>
123 </property>
124 <property name="sizeHint" stdset="0">
125 <size>
126 <width>20</width>
127 <height>40</height>
128 </size>
129 </property>
130 </spacer>
131 </item>
132 </layout>
133 </widget>
134 <resources>
135 <include location="images.qrc"/>
136 </resources>
137 <connections/>
138</ui>
1390
=== removed file 'data/qt/folders.ui'
--- data/qt/folders.ui 2011-09-08 02:33:23 +0000
+++ data/qt/folders.ui 1970-01-01 00:00:00 +0000
@@ -1,61 +0,0 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<ui version="4.0">
3 <class>Form</class>
4 <widget class="QWidget" name="Form">
5 <property name="geometry">
6 <rect>
7 <x>0</x>
8 <y>0</y>
9 <width>480</width>
10 <height>374</height>
11 </rect>
12 </property>
13 <property name="windowTitle">
14 <string>Form</string>
15 </property>
16 <layout class="QVBoxLayout" name="verticalLayout">
17 <property name="topMargin">
18 <number>0</number>
19 </property>
20 <item>
21 <layout class="QHBoxLayout" name="horizontalLayout">
22 <item>
23 <spacer name="horizontalSpacer">
24 <property name="orientation">
25 <enum>Qt::Horizontal</enum>
26 </property>
27 <property name="sizeHint" stdset="0">
28 <size>
29 <width>40</width>
30 <height>20</height>
31 </size>
32 </property>
33 </spacer>
34 </item>
35 <item>
36 <widget class="QPushButton" name="check_settings_button">
37 <property name="text">
38 <string>Check settings</string>
39 </property>
40 </widget>
41 </item>
42 <item>
43 <spacer name="horizontalSpacer_2">
44 <property name="orientation">
45 <enum>Qt::Horizontal</enum>
46 </property>
47 <property name="sizeHint" stdset="0">
48 <size>
49 <width>40</width>
50 <height>20</height>
51 </size>
52 </property>
53 </spacer>
54 </item>
55 </layout>
56 </item>
57 </layout>
58 </widget>
59 <resources/>
60 <connections/>
61</ui>
620
=== removed file 'data/qt/images.qrc'
--- data/qt/images.qrc 2011-08-08 21:48:11 +0000
+++ data/qt/images.qrc 1970-01-01 00:00:00 +0000
@@ -1,20 +0,0 @@
1<RCC>
2 <qresource prefix="/">
3 <file>../balloon_shape.png</file>
4 <file>../password_hint_ok.png</file>
5 <file>../password_hint_warning.png</file>
6 <file>../Ubuntu-R.ttf</file>
7 <file>../Ubuntu-B.ttf</file>
8 <file>ubuntuone.qss</file>
9 <file>../progress_arrow_grey.png</file>
10 <file>../u1_logo.png</file>
11 <file>../progress_arrow_orange.png</file>
12 <file>../progress_finish_grey.png</file>
13 <file>../progress_finish_orange.png</file>
14 <file>../progress_tick.png</file>
15 <file>../u1icon.png</file>
16 <file>../ubuntu_one_favicon.png</file>
17 <file>../win_installer_graphic.png</file>
18 <file>../folder.png</file>
19 </qresource>
20</RCC>
210
=== removed file 'data/qt/license.ui'
--- data/qt/license.ui 2011-09-07 11:30:30 +0000
+++ data/qt/license.ui 1970-01-01 00:00:00 +0000
@@ -1,34 +0,0 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<ui version="4.0">
3 <class>Form</class>
4 <widget class="QWidget" name="Form">
5 <property name="geometry">
6 <rect>
7 <x>0</x>
8 <y>0</y>
9 <width>400</width>
10 <height>300</height>
11 </rect>
12 </property>
13 <property name="windowTitle">
14 <string>Form</string>
15 </property>
16 <layout class="QVBoxLayout" name="verticalLayout">
17 <property name="topMargin">
18 <number>0</number>
19 </property>
20 <item>
21 <widget class="QTextBrowser" name="textBrowser">
22 <property name="openExternalLinks">
23 <bool>true</bool>
24 </property>
25 <property name="openLinks">
26 <bool>true</bool>
27 </property>
28 </widget>
29 </item>
30 </layout>
31 </widget>
32 <resources/>
33 <connections/>
34</ui>
350
=== removed file 'data/qt/local_folders.ui'
--- data/qt/local_folders.ui 2011-09-08 02:33:23 +0000
+++ data/qt/local_folders.ui 1970-01-01 00:00:00 +0000
@@ -1,172 +0,0 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<ui version="4.0">
3 <class>Form</class>
4 <widget class="QWidget" name="Form">
5 <property name="geometry">
6 <rect>
7 <x>0</x>
8 <y>0</y>
9 <width>519</width>
10 <height>536</height>
11 </rect>
12 </property>
13 <property name="windowTitle">
14 <string>Form</string>
15 </property>
16 <layout class="QVBoxLayout" name="verticalLayout_2">
17 <property name="topMargin">
18 <number>0</number>
19 </property>
20 <item>
21 <widget class="QLabel" name="label">
22 <property name="text">
23 <string>Ok! Now it's time to choose which folder sync to the cloud from this computer.
24We started by suggesting a few.</string>
25 </property>
26 <property name="textFormat">
27 <enum>Qt::PlainText</enum>
28 </property>
29 <property name="wordWrap">
30 <bool>true</bool>
31 </property>
32 </widget>
33 </item>
34 <item>
35 <widget class="QTreeWidget" name="folder_list">
36 <property name="indentation">
37 <number>0</number>
38 </property>
39 <property name="rootIsDecorated">
40 <bool>false</bool>
41 </property>
42 <property name="uniformRowHeights">
43 <bool>true</bool>
44 </property>
45 <property name="allColumnsShowFocus">
46 <bool>true</bool>
47 </property>
48 <attribute name="headerStretchLastSection">
49 <bool>false</bool>
50 </attribute>
51 <column>
52 <property name="text">
53 <string>Sync these folders on my computer</string>
54 </property>
55 </column>
56 <column>
57 <property name="text">
58 <string>Space (Total)</string>
59 </property>
60 </column>
61 </widget>
62 </item>
63 <item>
64 <layout class="QHBoxLayout" name="horizontalLayout_3">
65 <item>
66 <spacer name="horizontalSpacer_4">
67 <property name="orientation">
68 <enum>Qt::Horizontal</enum>
69 </property>
70 <property name="sizeHint" stdset="0">
71 <size>
72 <width>40</width>
73 <height>20</height>
74 </size>
75 </property>
76 </spacer>
77 </item>
78 <item>
79 <widget class="QPushButton" name="add_folder_button">
80 <property name="text">
81 <string>Add a folder from this computer</string>
82 </property>
83 <property name="DisabledState" stdset="0">
84 <bool>false</bool>
85 </property>
86 </widget>
87 </item>
88 <item>
89 <spacer name="horizontalSpacer_5">
90 <property name="orientation">
91 <enum>Qt::Horizontal</enum>
92 </property>
93 <property name="sizeHint" stdset="0">
94 <size>
95 <width>40</width>
96 <height>20</height>
97 </size>
98 </property>
99 </spacer>
100 </item>
101 </layout>
102 </item>
103 <item>
104 <widget class="QFrame" name="offer_frame">
105 <property name="frameShape">
106 <enum>QFrame::StyledPanel</enum>
107 </property>
108 <property name="frameShadow">
109 <enum>QFrame::Raised</enum>
110 </property>
111 <layout class="QVBoxLayout" name="verticalLayout">
112 <property name="leftMargin">
113 <number>0</number>
114 </property>
115 <property name="rightMargin">
116 <number>0</number>
117 </property>
118 <item>
119 <widget class="QLabel" name="offer_label">
120 <property name="text">
121 <string>The folders you have selected to sync take over your 5GB storage space by 6.5GB. You can remove some folders or add some extra storage now.</string>
122 </property>
123 <property name="wordWrap">
124 <bool>true</bool>
125 </property>
126 </widget>
127 </item>
128 <item>
129 <layout class="QHBoxLayout" name="horizontalLayout">
130 <item>
131 <spacer name="horizontalSpacer">
132 <property name="orientation">
133 <enum>Qt::Horizontal</enum>
134 </property>
135 <property name="sizeHint" stdset="0">
136 <size>
137 <width>40</width>
138 <height>20</height>
139 </size>
140 </property>
141 </spacer>
142 </item>
143 <item>
144 <widget class="QPushButton" name="add_storage_button">
145 <property name="text">
146 <string>Add more storage</string>
147 </property>
148 </widget>
149 </item>
150 <item>
151 <spacer name="horizontalSpacer_2">
152 <property name="orientation">
153 <enum>Qt::Horizontal</enum>
154 </property>
155 <property name="sizeHint" stdset="0">
156 <size>
157 <width>40</width>
158 <height>20</height>
159 </size>
160 </property>
161 </spacer>
162 </item>
163 </layout>
164 </item>
165 </layout>
166 </widget>
167 </item>
168 </layout>
169 </widget>
170 <resources/>
171 <connections/>
172</ui>
1730
=== removed file 'data/qt/network_detection.ui'
--- data/qt/network_detection.ui 2011-09-26 20:28:46 +0000
+++ data/qt/network_detection.ui 1970-01-01 00:00:00 +0000
@@ -1,150 +0,0 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<ui version="4.0">
3 <class>Form</class>
4 <widget class="QWizardPage" name="Form">
5 <property name="geometry">
6 <rect>
7 <x>0</x>
8 <y>0</y>
9 <width>541</width>
10 <height>365</height>
11 </rect>
12 </property>
13 <property name="windowTitle">
14 <string>WizardPage</string>
15 </property>
16 <layout class="QVBoxLayout" name="verticalLayout">
17 <item>
18 <layout class="QHBoxLayout" name="horizontalLayout_2">
19 <item>
20 <spacer name="horizontalSpacer_3">
21 <property name="orientation">
22 <enum>Qt::Horizontal</enum>
23 </property>
24 <property name="sizeHint" stdset="0">
25 <size>
26 <width>40</width>
27 <height>20</height>
28 </size>
29 </property>
30 </spacer>
31 </item>
32 <item>
33 <widget class="QLabel" name="image_label">
34 <property name="sizePolicy">
35 <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
36 <horstretch>0</horstretch>
37 <verstretch>0</verstretch>
38 </sizepolicy>
39 </property>
40 <property name="minimumSize">
41 <size>
42 <width>400</width>
43 <height>150</height>
44 </size>
45 </property>
46 <property name="text">
47 <string/>
48 </property>
49 <property name="textFormat">
50 <enum>Qt::PlainText</enum>
51 </property>
52 <property name="pixmap">
53 <pixmap resource="images.qrc">:/win_installer_graphic.png</pixmap>
54 </property>
55 <property name="alignment">
56 <set>Qt::AlignCenter</set>
57 </property>
58 <property name="wordWrap">
59 <bool>true</bool>
60 </property>
61 </widget>
62 </item>
63 <item>
64 <spacer name="horizontalSpacer_4">
65 <property name="orientation">
66 <enum>Qt::Horizontal</enum>
67 </property>
68 <property name="sizeHint" stdset="0">
69 <size>
70 <width>40</width>
71 <height>20</height>
72 </size>
73 </property>
74 </spacer>
75 </item>
76 </layout>
77 </item>
78 <item>
79 <widget class="QLabel" name="message_label">
80 <property name="text">
81 <string>Ubuntu One has installed!</string>
82 </property>
83 <property name="alignment">
84 <set>Qt::AlignCenter</set>
85 </property>
86 </widget>
87 </item>
88 <item>
89 <layout class="QHBoxLayout" name="horizontalLayout">
90 <item>
91 <spacer name="horizontalSpacer">
92 <property name="orientation">
93 <enum>Qt::Horizontal</enum>
94 </property>
95 <property name="sizeHint" stdset="0">
96 <size>
97 <width>40</width>
98 <height>20</height>
99 </size>
100 </property>
101 </spacer>
102 </item>
103 <item>
104 <widget class="QLabel" name="label">
105 <property name="text">
106 <string>Are you online? We can't detect an internet connection - you will need to be connected to set up Ubuntu One</string>
107 </property>
108 <property name="textFormat">
109 <enum>Qt::PlainText</enum>
110 </property>
111 <property name="wordWrap">
112 <bool>true</bool>
113 </property>
114 </widget>
115 </item>
116 <item>
117 <spacer name="horizontalSpacer_2">
118 <property name="orientation">
119 <enum>Qt::Horizontal</enum>
120 </property>
121 <property name="sizeHint" stdset="0">
122 <size>
123 <width>40</width>
124 <height>20</height>
125 </size>
126 </property>
127 </spacer>
128 </item>
129 </layout>
130 </item>
131 <item>
132 <spacer name="verticalSpacer">
133 <property name="orientation">
134 <enum>Qt::Vertical</enum>
135 </property>
136 <property name="sizeHint" stdset="0">
137 <size>
138 <width>20</width>
139 <height>76</height>
140 </size>
141 </property>
142 </spacer>
143 </item>
144 </layout>
145 </widget>
146 <resources>
147 <include location="images.qrc"/>
148 </resources>
149 <connections/>
150</ui>
1510
=== removed file 'data/qt/preferences.ui'
--- data/qt/preferences.ui 2011-09-02 12:58:29 +0000
+++ data/qt/preferences.ui 1970-01-01 00:00:00 +0000
@@ -1,24 +0,0 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<ui version="4.0">
3 <class>Form</class>
4 <widget class="QWidget" name="Form">
5 <property name="geometry">
6 <rect>
7 <x>0</x>
8 <y>0</y>
9 <width>480</width>
10 <height>374</height>
11 </rect>
12 </property>
13 <property name="windowTitle">
14 <string>Form</string>
15 </property>
16 <layout class="QVBoxLayout" name="verticalLayout">
17 <property name="topMargin">
18 <number>0</number>
19 </property>
20 </layout>
21 </widget>
22 <resources/>
23 <connections/>
24</ui>
250
=== removed file 'data/qt/setup_account.ui'
--- data/qt/setup_account.ui 2011-09-02 12:58:29 +0000
+++ data/qt/setup_account.ui 1970-01-01 00:00:00 +0000
@@ -1,670 +0,0 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<ui version="4.0">
3 <class>SetUpAccountPage</class>
4 <widget class="QWizardPage" name="SetUpAccountPage">
5 <property name="geometry">
6 <rect>
7 <x>0</x>
8 <y>0</y>
9 <width>543</width>
10 <height>523</height>
11 </rect>
12 </property>
13 <property name="sizePolicy">
14 <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
15 <horstretch>0</horstretch>
16 <verstretch>0</verstretch>
17 </sizepolicy>
18 </property>
19 <property name="maximumSize">
20 <size>
21 <width>16777215</width>
22 <height>16777215</height>
23 </size>
24 </property>
25 <property name="windowTitle">
26 <string>WizardPage</string>
27 </property>
28 <layout class="QVBoxLayout" name="verticalLayout">
29 <property name="spacing">
30 <number>0</number>
31 </property>
32 <property name="leftMargin">
33 <number>0</number>
34 </property>
35 <property name="topMargin">
36 <number>0</number>
37 </property>
38 <property name="rightMargin">
39 <number>3</number>
40 </property>
41 <property name="bottomMargin">
42 <number>0</number>
43 </property>
44 <item>
45 <layout class="QGridLayout" name="gridLayout" columnminimumwidth="310,220">
46 <item row="0" column="0">
47 <widget class="QLabel" name="password_info_label">
48 <property name="sizePolicy">
49 <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
50 <horstretch>0</horstretch>
51 <verstretch>0</verstretch>
52 </sizepolicy>
53 </property>
54 <property name="text">
55 <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>
56 </property>
57 <property name="wordWrap">
58 <bool>true</bool>
59 </property>
60 </widget>
61 </item>
62 <item row="1" column="0">
63 <layout class="QVBoxLayout" name="verticalLayout">
64 <property name="spacing">
65 <number>3</number>
66 </property>
67 <item>
68 <widget class="QLabel" name="name_label">
69 <property name="font">
70 <font>
71 <weight>75</weight>
72 <bold>true</bold>
73 </font>
74 </property>
75 <property name="text">
76 <string>name_label</string>
77 </property>
78 </widget>
79 </item>
80 <item>
81 <widget class="QLineEdit" name="name_edit">
82 <property name="sizePolicy">
83 <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
84 <horstretch>0</horstretch>
85 <verstretch>0</verstretch>
86 </sizepolicy>
87 </property>
88 <property name="minimumSize">
89 <size>
90 <width>300</width>
91 <height>0</height>
92 </size>
93 </property>
94 <property name="maximumSize">
95 <size>
96 <width>300</width>
97 <height>16777215</height>
98 </size>
99 </property>
100 <property name="font">
101 <font>
102 <pointsize>11</pointsize>
103 </font>
104 </property>
105 <property name="formError" stdset="0">
106 <bool>false</bool>
107 </property>
108 </widget>
109 </item>
110 </layout>
111 </item>
112 <item row="3" column="0">
113 <layout class="QVBoxLayout" name="verticalLayout">
114 <property name="spacing">
115 <number>3</number>
116 </property>
117 <item>
118 <widget class="QLabel" name="email_label">
119 <property name="font">
120 <font>
121 <weight>75</weight>
122 <bold>true</bold>
123 </font>
124 </property>
125 <property name="text">
126 <string>email_label</string>
127 </property>
128 </widget>
129 </item>
130 <item>
131 <widget class="QLineEdit" name="email_edit">
132 <property name="sizePolicy">
133 <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
134 <horstretch>0</horstretch>
135 <verstretch>0</verstretch>
136 </sizepolicy>
137 </property>
138 <property name="minimumSize">
139 <size>
140 <width>300</width>
141 <height>0</height>
142 </size>
143 </property>
144 <property name="maximumSize">
145 <size>
146 <width>300</width>
147 <height>16777215</height>
148 </size>
149 </property>
150 <property name="font">
151 <font>
152 <pointsize>11</pointsize>
153 </font>
154 </property>
155 <property name="placeholderText">
156 <string/>
157 </property>
158 <property name="formError" stdset="0">
159 <bool>false</bool>
160 </property>
161 </widget>
162 </item>
163 </layout>
164 </item>
165 <item row="4" column="0">
166 <layout class="QVBoxLayout" name="verticalLayout">
167 <property name="spacing">
168 <number>3</number>
169 </property>
170 <item>
171 <widget class="QLabel" name="confirm_email_label">
172 <property name="font">
173 <font>
174 <weight>75</weight>
175 <bold>true</bold>
176 </font>
177 </property>
178 <property name="text">
179 <string>confirm_email_label</string>
180 </property>
181 </widget>
182 </item>
183 <item>
184 <widget class="QLineEdit" name="confirm_email_edit">
185 <property name="sizePolicy">
186 <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
187 <horstretch>0</horstretch>
188 <verstretch>0</verstretch>
189 </sizepolicy>
190 </property>
191 <property name="minimumSize">
192 <size>
193 <width>300</width>
194 <height>0</height>
195 </size>
196 </property>
197 <property name="maximumSize">
198 <size>
199 <width>300</width>
200 <height>16777215</height>
201 </size>
202 </property>
203 <property name="font">
204 <font>
205 <pointsize>11</pointsize>
206 </font>
207 </property>
208 <property name="placeholderText">
209 <string/>
210 </property>
211 <property name="formError" stdset="0">
212 <bool>false</bool>
213 </property>
214 </widget>
215 </item>
216 </layout>
217 </item>
218 <item row="6" column="0">
219 <layout class="QVBoxLayout" name="verticalLayout">
220 <property name="spacing">
221 <number>3</number>
222 </property>
223 <item>
224 <widget class="QLabel" name="password_label">
225 <property name="font">
226 <font>
227 <weight>75</weight>
228 <bold>true</bold>
229 </font>
230 </property>
231 <property name="text">
232 <string>password_label</string>
233 </property>
234 </widget>
235 </item>
236 <item>
237 <widget class="QLineEdit" name="password_edit">
238 <property name="sizePolicy">
239 <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
240 <horstretch>0</horstretch>
241 <verstretch>0</verstretch>
242 </sizepolicy>
243 </property>
244 <property name="minimumSize">
245 <size>
246 <width>300</width>
247 <height>0</height>
248 </size>
249 </property>
250 <property name="maximumSize">
251 <size>
252 <width>300</width>
253 <height>16777215</height>
254 </size>
255 </property>
256 <property name="font">
257 <font>
258 <pointsize>11</pointsize>
259 </font>
260 </property>
261 <property name="toolTip">
262 <string>Your password must be at least 8 characters long and at least contain one number and one upper later.</string>
263 </property>
264 <property name="statusTip">
265 <string/>
266 </property>
267 <property name="echoMode">
268 <enum>QLineEdit::Password</enum>
269 </property>
270 <property name="placeholderText">
271 <string/>
272 </property>
273 <property name="formError" stdset="0">
274 <bool>false</bool>
275 </property>
276 </widget>
277 </item>
278 </layout>
279 </item>
280 <item row="7" column="0">
281 <layout class="QVBoxLayout" name="verticalLayout">
282 <property name="spacing">
283 <number>3</number>
284 </property>
285 <item>
286 <widget class="QLabel" name="confirm_password_label">
287 <property name="font">
288 <font>
289 <weight>75</weight>
290 <bold>true</bold>
291 </font>
292 </property>
293 <property name="text">
294 <string>confirm_password_label</string>
295 </property>
296 </widget>
297 </item>
298 <item>
299 <widget class="QLineEdit" name="confirm_password_edit">
300 <property name="sizePolicy">
301 <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
302 <horstretch>0</horstretch>
303 <verstretch>0</verstretch>
304 </sizepolicy>
305 </property>
306 <property name="minimumSize">
307 <size>
308 <width>300</width>
309 <height>0</height>
310 </size>
311 </property>
312 <property name="maximumSize">
313 <size>
314 <width>300</width>
315 <height>16777215</height>
316 </size>
317 </property>
318 <property name="font">
319 <font>
320 <pointsize>11</pointsize>
321 </font>
322 </property>
323 <property name="echoMode">
324 <enum>QLineEdit::Password</enum>
325 </property>
326 <property name="placeholderText">
327 <string/>
328 </property>
329 <property name="formError" stdset="0">
330 <bool>false</bool>
331 </property>
332 </widget>
333 </item>
334 </layout>
335 </item>
336 <item row="9" column="0">
337 <layout class="QVBoxLayout" name="verticalLayout">
338 <property name="spacing">
339 <number>3</number>
340 </property>
341 <item>
342 <widget class="QLabel" name="captcha_view">
343 <property name="sizePolicy">
344 <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
345 <horstretch>0</horstretch>
346 <verstretch>0</verstretch>
347 </sizepolicy>
348 </property>
349 <property name="minimumSize">
350 <size>
351 <width>300</width>
352 <height>57</height>
353 </size>
354 </property>
355 <property name="maximumSize">
356 <size>
357 <width>300</width>
358 <height>16777215</height>
359 </size>
360 </property>
361 <property name="styleSheet">
362 <string notr="true">background-color: white</string>
363 </property>
364 <property name="frameShape">
365 <enum>QFrame::Box</enum>
366 </property>
367 <property name="text">
368 <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>
369 </property>
370 </widget>
371 </item>
372 <item>
373 <widget class="QLineEdit" name="captcha_solution_edit">
374 <property name="sizePolicy">
375 <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
376 <horstretch>0</horstretch>
377 <verstretch>0</verstretch>
378 </sizepolicy>
379 </property>
380 <property name="minimumSize">
381 <size>
382 <width>300</width>
383 <height>0</height>
384 </size>
385 </property>
386 <property name="maximumSize">
387 <size>
388 <width>300</width>
389 <height>16777215</height>
390 </size>
391 </property>
392 <property name="font">
393 <font>
394 <pointsize>11</pointsize>
395 </font>
396 </property>
397 <property name="locale">
398 <locale language="English" country="UnitedStates"/>
399 </property>
400 <property name="inputMask">
401 <string/>
402 </property>
403 <property name="text">
404 <string/>
405 </property>
406 <property name="placeholderText">
407 <string/>
408 </property>
409 <property name="formError" stdset="0">
410 <bool>false</bool>
411 </property>
412 </widget>
413 </item>
414 </layout>
415 </item>
416 <item row="9" column="1">
417 <widget class="QLabel" name="refresh_label">
418 <property name="sizePolicy">
419 <sizepolicy hsizetype="Maximum" vsizetype="Preferred">
420 <horstretch>0</horstretch>
421 <verstretch>0</verstretch>
422 </sizepolicy>
423 </property>
424 <property name="minimumSize">
425 <size>
426 <width>220</width>
427 <height>0</height>
428 </size>
429 </property>
430 <property name="maximumSize">
431 <size>
432 <width>220</width>
433 <height>16777215</height>
434 </size>
435 </property>
436 <property name="locale">
437 <locale language="English" country="UnitedStates"/>
438 </property>
439 <property name="text">
440 <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>
441 </property>
442 <property name="wordWrap">
443 <bool>true</bool>
444 </property>
445 <property name="indent">
446 <number>0</number>
447 </property>
448 </widget>
449 </item>
450 <item row="1" column="1">
451 <layout class="QVBoxLayout" name="verticalLayout_7">
452 <property name="spacing">
453 <number>0</number>
454 </property>
455 <property name="leftMargin">
456 <number>0</number>
457 </property>
458 <item>
459 <widget class="QLabel" name="name_assistance">
460 <property name="sizePolicy">
461 <sizepolicy hsizetype="Maximum" vsizetype="Preferred">
462 <horstretch>0</horstretch>
463 <verstretch>0</verstretch>
464 </sizepolicy>
465 </property>
466 <property name="minimumSize">
467 <size>
468 <width>220</width>
469 <height>0</height>
470 </size>
471 </property>
472 <property name="maximumSize">
473 <size>
474 <width>220</width>
475 <height>16777215</height>
476 </size>
477 </property>
478 <property name="text">
479 <string>name_assistance</string>
480 </property>
481 <property name="alignment">
482 <set>Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft</set>
483 </property>
484 <property name="wordWrap">
485 <bool>true</bool>
486 </property>
487 </widget>
488 </item>
489 </layout>
490 </item>
491 <item row="3" column="1">
492 <layout class="QVBoxLayout" name="verticalLayout_8">
493 <property name="spacing">
494 <number>0</number>
495 </property>
496 <property name="leftMargin">
497 <number>0</number>
498 </property>
499 <item>
500 <widget class="QLabel" name="email_assistance">
501 <property name="sizePolicy">
502 <sizepolicy hsizetype="Maximum" vsizetype="Preferred">
503 <horstretch>0</horstretch>
504 <verstretch>0</verstretch>
505 </sizepolicy>
506 </property>
507 <property name="minimumSize">
508 <size>
509 <width>220</width>
510 <height>0</height>
511 </size>
512 </property>
513 <property name="maximumSize">
514 <size>
515 <width>220</width>
516 <height>16777215</height>
517 </size>
518 </property>
519 <property name="text">
520 <string>email_assistance</string>
521 </property>
522 <property name="alignment">
523 <set>Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft</set>
524 </property>
525 <property name="wordWrap">
526 <bool>true</bool>
527 </property>
528 </widget>
529 </item>
530 </layout>
531 </item>
532 <item row="4" column="1">
533 <layout class="QVBoxLayout" name="verticalLayout_9">
534 <property name="spacing">
535 <number>0</number>
536 </property>
537 <property name="leftMargin">
538 <number>0</number>
539 </property>
540 <item>
541 <widget class="QLabel" name="confirm_email_assistance">
542 <property name="sizePolicy">
543 <sizepolicy hsizetype="Maximum" vsizetype="Preferred">
544 <horstretch>0</horstretch>
545 <verstretch>0</verstretch>
546 </sizepolicy>
547 </property>
548 <property name="minimumSize">
549 <size>
550 <width>220</width>
551 <height>0</height>
552 </size>
553 </property>
554 <property name="maximumSize">
555 <size>
556 <width>220</width>
557 <height>16777215</height>
558 </size>
559 </property>
560 <property name="text">
561 <string>confirm_email_assistance</string>
562 </property>
563 <property name="alignment">
564 <set>Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft</set>
565 </property>
566 <property name="wordWrap">
567 <bool>true</bool>
568 </property>
569 <property name="indent">
570 <number>0</number>
571 </property>
572 </widget>
573 </item>
574 </layout>
575 </item>
576 <item row="6" column="1" rowspan="2">
577 <widget class="QLabel" name="password_assistance">
578 <property name="sizePolicy">
579 <sizepolicy hsizetype="Maximum" vsizetype="Preferred">
580 <horstretch>0</horstretch>
581 <verstretch>0</verstretch>
582 </sizepolicy>
583 </property>
584 <property name="minimumSize">
585 <size>
586 <width>220</width>
587 <height>0</height>
588 </size>
589 </property>
590 <property name="maximumSize">
591 <size>
592 <width>220</width>
593 <height>16777215</height>
594 </size>
595 </property>
596 <property name="text">
597 <string>password_assistance</string>
598 </property>
599 <property name="wordWrap">
600 <bool>true</bool>
601 </property>
602 <property name="indent">
603 <number>17</number>
604 </property>
605 </widget>
606 </item>
607 <item row="2" column="1">
608 <spacer name="verticalSpacer">
609 <property name="orientation">
610 <enum>Qt::Vertical</enum>
611 </property>
612 <property name="sizeType">
613 <enum>QSizePolicy::Fixed</enum>
614 </property>
615 <property name="sizeHint" stdset="0">
616 <size>
617 <width>20</width>
618 <height>15</height>
619 </size>
620 </property>
621 </spacer>
622 </item>
623 <item row="5" column="1">
624 <spacer name="verticalSpacer_2">
625 <property name="orientation">
626 <enum>Qt::Vertical</enum>
627 </property>
628 <property name="sizeType">
629 <enum>QSizePolicy::Fixed</enum>
630 </property>
631 <property name="sizeHint" stdset="0">
632 <size>
633 <width>20</width>
634 <height>15</height>
635 </size>
636 </property>
637 </spacer>
638 </item>
639 <item row="8" column="1">
640 <spacer name="verticalSpacer_3">
641 <property name="orientation">
642 <enum>Qt::Vertical</enum>
643 </property>
644 <property name="sizeType">
645 <enum>QSizePolicy::Fixed</enum>
646 </property>
647 <property name="sizeHint" stdset="0">
648 <size>
649 <width>20</width>
650 <height>15</height>
651 </size>
652 </property>
653 </spacer>
654 </item>
655 </layout>
656 </item>
657 <item>
658 <layout class="QHBoxLayout" name="hlayout_check">
659 <property name="spacing">
660 <number>0</number>
661 </property>
662 </layout>
663 </item>
664 </layout>
665 </widget>
666 <resources>
667 <include location="images.qrc"/>
668 </resources>
669 <connections/>
670</ui>
6710
=== removed file 'data/qt/side_widget.ui'
--- data/qt/side_widget.ui 2011-09-02 12:58:29 +0000
+++ data/qt/side_widget.ui 1970-01-01 00:00:00 +0000
@@ -1,235 +0,0 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<ui version="4.0">
3 <class>SideWidget</class>
4 <widget class="QFrame" name="SideWidget">
5 <property name="geometry">
6 <rect>
7 <x>0</x>
8 <y>0</y>
9 <width>170</width>
10 <height>466</height>
11 </rect>
12 </property>
13 <property name="sizePolicy">
14 <sizepolicy hsizetype="Minimum" vsizetype="Preferred">
15 <horstretch>0</horstretch>
16 <verstretch>0</verstretch>
17 </sizepolicy>
18 </property>
19 <property name="minimumSize">
20 <size>
21 <width>170</width>
22 <height>466</height>
23 </size>
24 </property>
25 <property name="windowTitle">
26 <string>Frame</string>
27 </property>
28 <property name="frameShape">
29 <enum>QFrame::StyledPanel</enum>
30 </property>
31 <property name="frameShadow">
32 <enum>QFrame::Raised</enum>
33 </property>
34 <layout class="QVBoxLayout" name="verticalLayout">
35 <property name="spacing">
36 <number>40</number>
37 </property>
38 <property name="margin">
39 <number>0</number>
40 </property>
41 <item>
42 <widget class="QLabel" name="ubuntu_one_logo_label">
43 <property name="sizePolicy">
44 <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
45 <horstretch>0</horstretch>
46 <verstretch>0</verstretch>
47 </sizepolicy>
48 </property>
49 <property name="text">
50 <string/>
51 </property>
52 <property name="pixmap">
53 <pixmap resource="images.qrc">:/u1_logo.png</pixmap>
54 </property>
55 </widget>
56 </item>
57 <item>
58 <widget class="QFrame" name="states_frame">
59 <property name="sizePolicy">
60 <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
61 <horstretch>0</horstretch>
62 <verstretch>0</verstretch>
63 </sizepolicy>
64 </property>
65 <property name="frameShape">
66 <enum>QFrame::StyledPanel</enum>
67 </property>
68 <property name="frameShadow">
69 <enum>QFrame::Raised</enum>
70 </property>
71 <layout class="QVBoxLayout" name="verticalLayout_2">
72 <property name="spacing">
73 <number>20</number>
74 </property>
75 <property name="margin">
76 <number>0</number>
77 </property>
78 <item>
79 <layout class="QHBoxLayout" name="horizontalLayout">
80 <property name="spacing">
81 <number>7</number>
82 </property>
83 <item>
84 <widget class="QLabel" name="install_icon_label">
85 <property name="sizePolicy">
86 <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
87 <horstretch>0</horstretch>
88 <verstretch>0</verstretch>
89 </sizepolicy>
90 </property>
91 <property name="text">
92 <string/>
93 </property>
94 <property name="pixmap">
95 <pixmap resource="images.qrc">:/progress_arrow_grey.png</pixmap>
96 </property>
97 </widget>
98 </item>
99 <item>
100 <widget class="QLabel" name="install_label">
101 <property name="enabled">
102 <bool>true</bool>
103 </property>
104 <property name="text">
105 <string>Install</string>
106 </property>
107 </widget>
108 </item>
109 </layout>
110 </item>
111 <item>
112 <layout class="QHBoxLayout" name="horizontalLayout_2">
113 <property name="spacing">
114 <number>7</number>
115 </property>
116 <property name="sizeConstraint">
117 <enum>QLayout::SetDefaultConstraint</enum>
118 </property>
119 <item>
120 <widget class="QLabel" name="sign_icon_label">
121 <property name="sizePolicy">
122 <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
123 <horstretch>0</horstretch>
124 <verstretch>0</verstretch>
125 </sizepolicy>
126 </property>
127 <property name="text">
128 <string/>
129 </property>
130 <property name="pixmap">
131 <pixmap resource="images.qrc">:/progress_arrow_grey.png</pixmap>
132 </property>
133 </widget>
134 </item>
135 <item>
136 <widget class="QLabel" name="sign_in_label">
137 <property name="enabled">
138 <bool>true</bool>
139 </property>
140 <property name="text">
141 <string>Sign In</string>
142 </property>
143 </widget>
144 </item>
145 </layout>
146 </item>
147 <item>
148 <layout class="QHBoxLayout" name="horizontalLayout_4">
149 <property name="spacing">
150 <number>7</number>
151 </property>
152 <item>
153 <widget class="QLabel" name="folders_icon_label">
154 <property name="sizePolicy">
155 <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
156 <horstretch>0</horstretch>
157 <verstretch>0</verstretch>
158 </sizepolicy>
159 </property>
160 <property name="text">
161 <string/>
162 </property>
163 <property name="pixmap">
164 <pixmap resource="images.qrc">:/progress_arrow_grey.png</pixmap>
165 </property>
166 </widget>
167 </item>
168 <item>
169 <widget class="QLabel" name="select_folders_label">
170 <property name="enabled">
171 <bool>true</bool>
172 </property>
173 <property name="text">
174 <string>Select sync folders</string>
175 </property>
176 </widget>
177 </item>
178 </layout>
179 </item>
180 <item>
181 <layout class="QHBoxLayout" name="horizontalLayout_5">
182 <property name="spacing">
183 <number>7</number>
184 </property>
185 <item>
186 <widget class="QLabel" name="sync_icon_label">
187 <property name="sizePolicy">
188 <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
189 <horstretch>0</horstretch>
190 <verstretch>0</verstretch>
191 </sizepolicy>
192 </property>
193 <property name="text">
194 <string/>
195 </property>
196 <property name="pixmap">
197 <pixmap resource="images.qrc">:/progress_finish_grey.png</pixmap>
198 </property>
199 </widget>
200 </item>
201 <item>
202 <widget class="QLabel" name="sync_label">
203 <property name="enabled">
204 <bool>true</bool>
205 </property>
206 <property name="text">
207 <string>Sync, stream, share!</string>
208 </property>
209 </widget>
210 </item>
211 </layout>
212 </item>
213 </layout>
214 </widget>
215 </item>
216 <item>
217 <spacer name="verticalSpacer">
218 <property name="orientation">
219 <enum>Qt::Vertical</enum>
220 </property>
221 <property name="sizeHint" stdset="0">
222 <size>
223 <width>20</width>
224 <height>40</height>
225 </size>
226 </property>
227 </spacer>
228 </item>
229 </layout>
230 </widget>
231 <resources>
232 <include location="images.qrc"/>
233 </resources>
234 <connections/>
235</ui>
2360
=== removed file 'data/qt/sign_in.ui'
--- data/qt/sign_in.ui 2011-09-02 12:58:29 +0000
+++ data/qt/sign_in.ui 1970-01-01 00:00:00 +0000
@@ -1,75 +0,0 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<ui version="4.0">
3 <class>Form</class>
4 <widget class="QWidget" name="Form">
5 <property name="geometry">
6 <rect>
7 <x>0</x>
8 <y>0</y>
9 <width>400</width>
10 <height>300</height>
11 </rect>
12 </property>
13 <property name="windowTitle">
14 <string>Form</string>
15 </property>
16 <layout class="QVBoxLayout" name="verticalLayout">
17 <property name="topMargin">
18 <number>0</number>
19 </property>
20 <item>
21 <widget class="QLabel" name="label">
22 <property name="font">
23 <font>
24 <pointsize>14</pointsize>
25 <weight>75</weight>
26 <bold>true</bold>
27 </font>
28 </property>
29 <property name="text">
30 <string>Sync, stream, share</string>
31 </property>
32 </widget>
33 </item>
34 <item>
35 <spacer name="verticalSpacer">
36 <property name="orientation">
37 <enum>Qt::Vertical</enum>
38 </property>
39 <property name="sizeHint" stdset="0">
40 <size>
41 <width>20</width>
42 <height>163</height>
43 </size>
44 </property>
45 </spacer>
46 </item>
47 <item>
48 <widget class="QPushButton" name="sign_in">
49 <property name="text">
50 <string>Sign me in with my existing Ubuntu one account</string>
51 </property>
52 <property name="default">
53 <bool>false</bool>
54 </property>
55 </widget>
56 </item>
57 <item>
58 <widget class="QPushButton" name="sign_up">
59 <property name="text">
60 <string>I don't have an account, sign me up</string>
61 </property>
62 </widget>
63 </item>
64 <item>
65 <widget class="QPushButton" name="sign_off">
66 <property name="text">
67 <string>Close window and setup later</string>
68 </property>
69 </widget>
70 </item>
71 </layout>
72 </widget>
73 <resources/>
74 <connections/>
75</ui>
760
=== removed file 'data/qt/ubuntuone.qss'
--- data/qt/ubuntuone.qss 2011-09-02 12:58:29 +0000
+++ data/qt/ubuntuone.qss 1970-01-01 00:00:00 +0000
@@ -1,179 +0,0 @@
1QWidget {
2 font-family: "Ubuntu";
3 color: #333333;
4}
5
6QFrame#SideWidget {
7 background-color: white;
8 border-style: dotted;
9 border-color: #939389;
10 border-right-width: 1px;
11 color: white;
12 min-height: 100px;
13}
14
15QWizard,
16QDialog {
17 background-color: white;
18}
19
20QLabel#password_assistance {
21 border-image: url(":/balloon_shape.png");
22}
23
24QLineEdit {
25 border: 1px solid #aea79f;
26}
27
28QLabel#install_label,
29QLabel#sign_in_label,
30QLabel#choose_services_label,
31QLabel#select_folders_label,
32QLabel#sync_label {
33 font-size: 14px;
34}
35
36QTextEdit {
37 background-color: #ffffff;
38 border: none;
39}
40
41QPushButton {
42 border-radius: 5px;
43 border-style: solid;
44 padding: 6px;
45 padding-left: 20px;
46 padding-right: 20px;
47 border-width: 1px;
48 height: 14px;
49}
50
51QPushButton[default="true"] {
52 background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
53 stop: 0 #fe9e84,stop: 1.0 #dd4814);
54 color: white;
55 border-color: #999999;
56}
57
58QPushButton:hover[default="true"] {
59 background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
60 stop: 0 #ffb19c,stop: 1.0 #dd4814);
61 color: white;
62 border-color: #999999;
63}
64
65QPushButton:pressed[default="true"] {
66 background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
67 stop: 0 #b93f14,stop: 1.0 #dd4814);
68 color: white;
69 border-color: #999999;
70}
71
72QPushButton[default="false"] {
73 background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
74 stop: 0 #ffffff,stop: 1.0 #e6e6e6);
75 color: #333333;
76 border-color: #999999;
77}
78
79QPushButton:hover[default="false"] {
80 background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
81 stop: 0 #ffffff,stop: 1.0 #ededed);
82 color: #333333;
83 border-color: #999999;
84}
85
86QPushButton:pressed[default="false"] {
87 background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
88 stop: 0 #d9d9d9,stop: 1.0 #fefefe);
89 color: #333333;
90 border-color: #999999;
91}
92
93QPushButton[DisabledState="true"] {
94 background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
95 stop: 0 #eaeaea, stop: 1.0 #cacaca);
96 color: #595959;
97 border-color: #939389;
98}
99
100QPushButton[DisabledState="false"] {
101 background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
102 stop: 0 #fe9e84,stop: 1.0 #dd4814);
103 color: white;
104 border-color: #999999;
105}
106
107QPushButton:hover[DisabledState="false"] {
108 background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
109 stop: 0 #ffb19c,stop: 1.0 #dd4814);
110 color: white;
111 border-color: #999999;
112}
113
114QPushButton:pressed[DisabledState="false"] {
115 background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
116 stop: 0 #b93f14,stop: 1.0 #dd4814);
117 color: white;
118 border-color: #999999;
119}
120
121QFrame#frm_box {
122 background: #ffffff;
123 border-radius: 5px;
124 border-style: solid;
125 border-color: #939389;
126 border-width: 1px;
127 color: white;
128 min-height: 100px;
129}
130
131QFrame#frm_box > QLabel {
132 font-size: 24px;
133}
134
135QLabel#image_label {
136 border-style: dotted;
137 border-color: #939389;
138 border-bottom-width: 1px;
139 border-top-width: 1px;
140}
141
142QLabel#title_label {
143 font-size: 20px;
144}
145
146QGroupBox {
147 padding-top: 30px;
148 border: none;
149 margin-top: 1ex;
150 font: bold 15px;
151}
152
153QGroupBox::title {
154 color: #333333;
155}
156
157QGroupBox#bandwidth_settings {
158 border-style: dotted;
159 border-color: #939389;
160 border-bottom-width: 1px;
161}
162
163QTreeView {
164 background: #f7f6f5;
165 alternate-background-color: #efedec;
166}
167
168QLabel#form_errors {
169 font: bold 14px;
170 color: #df2d1f;
171}
172
173QLineEdit[formError="true"] {
174 background-color: #ffe5e5;
175}
176
177QLineEdit[formError="false"] {
178 background-color: white;
179}
1800
=== removed file 'data/u1_logo.png'
181Binary files data/u1_logo.png 2011-07-12 03:24:48 +0000 and data/u1_logo.png 1970-01-01 00:00:00 +0000 differ1Binary 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
=== removed file 'data/u1icon.png'
182Binary files data/u1icon.png 2011-07-12 03:24:48 +0000 and data/u1icon.png 1970-01-01 00:00:00 +0000 differ2Binary files data/u1icon.png 2011-07-12 03:24:48 +0000 and data/u1icon.png 1970-01-01 00:00:00 +0000 differ
=== removed file 'data/ubuntu_one_favicon.png'
183Binary 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 differ3Binary 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
=== removed file 'data/win_installer_graphic.png'
184Binary 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 differ4Binary 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
=== removed directory 'po'
=== removed file 'pylintrc'
--- pylintrc 2011-06-22 21:40:10 +0000
+++ pylintrc 1970-01-01 00:00:00 +0000
@@ -1,305 +0,0 @@
1# lint Python modules using external checkers.
2#
3# This is the main checker controlling the other ones and the reports
4# generation. It is itself both a raw checker and an astng checker in order
5# to:
6# * handle message activation / deactivation at the module level
7# * handle some basic but necessary stats'data (number of classes, methods...)
8#
9[MASTER]
10
11# Specify a configuration file.
12#rcfile=
13
14# Python code to execute, usually for sys.path manipulation such as
15# pygtk.require().
16#init-hook=
17
18# Profiled execution.
19profile=no
20
21# Add <file or directory> to the black list. It should be a base name, not a
22# path. You may set this option multiple times.
23ignore=ui,qtreactor
24
25# Pickle collected data for later comparisons.
26persistent=no
27
28# List of plugins (as comma separated values of python modules names) to load,
29# usually to register additional checkers.
30load-plugins=
31
32
33[MESSAGES CONTROL]
34
35# Enable only checker(s) with the given id(s). This option conflicts with the
36# disable-checker option
37#enable-checker=
38
39# Enable all checker(s) except those with the given id(s). This option
40# conflicts with the enable-checker option
41#disable-checker=
42
43# Enable all messages in the listed categories.
44#enable-cat=
45
46# Disable all messages in the listed categories.
47#disable-cat=
48
49# Disable the message(s) with the given id(s) or categories
50# W0142: Used * or ** magic
51# W0613: Unused argument 'yyy'
52disable=R,I,W0142,W0613,W0511
53
54
55[REPORTS]
56
57# Set the output format. Available formats are text, parseable, colorized, msvs
58# (visual studio) and html
59output-format=text
60
61# Include message's id in output
62include-ids=yes
63
64# Put messages in a separate file for each module / package specified on the
65# command line instead of printing them on stdout. Reports (if any) will be
66# written in a file name "pylint_global.[txt|html]".
67files-output=no
68
69# Tells whether to display a full report or only the messages
70reports=no
71
72# Python expression which should return a note less than 10 (10 is the highest
73# note). You have access to the variables errors warning, statement which
74# respectively contain the number of errors / warnings messages and the total
75# number of statements analyzed. This is used by the global evaluation report
76# (R0004).
77evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)
78
79# Add a comment according to your evaluation note. This is used by the global
80# evaluation report (R0004).
81comment=no
82
83# Enable the report(s) with the given id(s).
84#enable-report=
85
86# Disable the report(s) with the given id(s).
87#disable-report=
88
89
90# try to find bugs in the code using type inference
91#
92[TYPECHECK]
93
94# Tells whether missing members accessed in mixin class should be ignored. A
95# mixin class is detected if its name ends with "mixin" (case insensitive).
96ignore-mixin-members=yes
97
98# List of classes names for which member attributes should not be checked
99# (useful for classes with attributes dynamically set).
100ignored-classes=
101
102# When zope mode is activated, add a predefined set of Zope acquired attributes
103# to generated-members.
104zope=no
105
106# List of members which are set dynamically and missed by pylint inference
107# system, and so shouldn't trigger E0201 when accessed.
108generated-members=REQUEST,acl_users,aq_parent
109
110
111# checks for
112# * unused variables / imports
113# * undefined variables
114# * redefinition of variable from builtins or from an outer scope
115# * use of variable before assignment
116#
117[VARIABLES]
118
119# Tells whether we should check for unused import in __init__ files.
120init-import=yes
121
122# A regular expression matching names used for dummy variables (i.e. not used).
123dummy-variables-rgx=_|dummy
124
125# List of additional names supposed to be defined in builtins. Remember that
126# you should avoid to define new builtins when possible.
127additional-builtins=
128
129
130# checks for :
131# * doc strings
132# * modules / classes / functions / methods / arguments / variables name
133# * number of arguments, local variables, branches, returns and statements in
134# functions, methods
135# * required module attributes
136# * dangerous default values as arguments
137# * redefinition of function / method / class
138# * uses of the global statement
139#
140[BASIC]
141
142# Required attributes for module, separated by a comma
143required-attributes=
144
145# Regular expression which should only match functions or classes name which do
146# not require a docstring
147no-docstring-rgx=(__.*__|setUp|tearDown)
148
149# Regular expression which should only match correct module names
150module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
151
152# Regular expression which should only match correct module level names
153const-rgx=(([A-Z_][A-Z0-9_]*)|(__.*__))$
154
155# Regular expression which should only match correct class names
156class-rgx=[A-Z_][a-zA-Z0-9]+$
157
158# Regular expression which should only match correct function names
159function-rgx=[a-z_][a-z0-9_]{2,79}$
160
161# Regular expression which should only match correct method names
162method-rgx=([a-z_][a-z0-9_]{2,79}$|setUp|tearDown)
163
164# Regular expression which should only match correct instance attribute names
165attr-rgx=[a-z_][a-z0-9_]{1,30}$
166
167# Regular expression which should only match correct argument names
168argument-rgx=[a-z_][a-z0-9_]{1,30}$
169
170# Regular expression which should only match correct variable names
171variable-rgx=[a-z_][a-z0-9_]{1,30}$
172
173# Regular expression which should only match correct list comprehension /
174# generator expression variable names
175inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$
176
177# Good variable names which should always be accepted, separated by a comma
178good-names=d,e,f,g,i,j,k,ex,logger,Run,_
179
180# Bad variable names which should always be refused, separated by a comma
181bad-names=foo,bar,baz,toto,tutu,tata
182
183# List of builtins function names that should not be used, separated by a comma
184bad-functions=apply,input,reduce
185
186
187# checks for sign of poor/misdesign:
188# * number of methods, attributes, local variables...
189# * size, complexity of functions, methods
190#
191[DESIGN]
192
193# Maximum number of arguments for function / method
194max-args=5
195
196# Maximum number of locals for function / method body
197max-locals=15
198
199# Maximum number of return / yield for function / method body
200max-returns=6
201
202# Maximum number of branch for function / method body
203max-branchs=12
204
205# Maximum number of statements in function / method body
206max-statements=50
207
208# Maximum number of parents for a class (see R0901).
209max-parents=7
210
211# Maximum number of attributes for a class (see R0902).
212max-attributes=7
213
214# Minimum number of public methods for a class (see R0903).
215min-public-methods=2
216
217# Maximum number of public methods for a class (see R0904).
218max-public-methods=20
219
220
221# checks for :
222# * methods without self as first argument
223# * overridden methods signature
224# * access only to existent members via self
225# * attributes not defined in the __init__ method
226# * supported interfaces implementation
227# * unreachable code
228#
229[CLASSES]
230
231# List of interface methods to ignore, separated by a comma. This is used for
232# instance to not check methods defines in Zopes Interface base class.
233#ignore-iface-methods=isImplementedBy,deferred,extends,names,namesAndDescriptions,queryDescriptionFor,getBases,getDescriptionFor,getDoc,getName,getTaggedValue,getTaggedValueTags,isEqualOrExtendedBy,setTaggedValue,isImplementedByInstancesOf,adaptWith,is_implemented_by,providedBy
234
235# List of method names used to declare (i.e. assign) instance attributes.
236defining-attr-methods=__init__,__new__,setUp
237
238
239# checks for
240# * external modules dependencies
241# * relative / wildcard imports
242# * cyclic imports
243# * uses of deprecated modules
244#
245[IMPORTS]
246
247# Deprecated modules which should not be used, separated by a comma
248deprecated-modules=regsub,string,TERMIOS,Bastion,rexec
249
250# Create a graph of every (i.e. internal and external) dependencies in the
251# given file (report RP0402 must not be disabled)
252import-graph=
253
254# Create a graph of external dependencies in the given file (report RP0402 must
255# not be disabled)
256ext-import-graph=
257
258# Create a graph of internal dependencies in the given file (report RP0402 must
259# not be disabled)
260int-import-graph=
261
262
263# checks for :
264# * unauthorized constructions
265# * strict indentation
266# * line length
267# * use of <> instead of !=
268#
269[FORMAT]
270
271# Maximum number of characters on a single line.
272max-line-length=79
273
274# Maximum number of lines in a module
275max-module-lines=2500
276
277# String used as indentation unit. This is usually " " (4 spaces) or "\t" (1
278# tab).
279indent-string=' '
280
281
282# checks for similarities and duplicated code. This computation may be
283# memory / CPU intensive, so you should disable it if you experiments some
284# problems.
285#
286[SIMILARITIES]
287
288# Minimum lines number of a similarity.
289min-similarity-lines=4
290
291# Ignore comments when computing similarities.
292ignore-comments=yes
293
294# Ignore docstrings when computing similarities.
295ignore-docstrings=yes
296
297
298# checks for:
299# * warning notes in the code like FIXME, XXX
300# * PEP 263: source code with non ascii character but no encoding declaration
301#
302[MISCELLANEOUS]
303
304# List of note tags to take in consideration, separated by a comma.
305notes=FIXME,XXX,TODO,fixme,xxx,todo
3060
=== removed file 'run-tests'
--- run-tests 2011-09-15 17:49:32 +0000
+++ run-tests 1970-01-01 00:00:00 +0000
@@ -1,44 +0,0 @@
1#! /bin/bash
2#
3# Author: Natalia Bidart <natalia.bidart@canonical.com>
4#
5# Copyright 2010 Canonical Ltd.
6#
7# This program is free software: you can redistribute it and/or modify it
8# under the terms of the GNU General Public License version 3, as published
9# by the Free Software Foundation.
10#
11# This program is distributed in the hope that it will be useful, but
12# WITHOUT ANY WARRANTY; without even the implied warranties of
13# MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
14# PURPOSE. See the GNU General Public License for more details.
15#
16# You should have received a copy of the GNU General Public License along
17# with this program. If not, see <http://www.gnu.org/licenses/>.
18
19set -e
20
21if [ $# -ne 0 ]; then
22 # run specific module given by the caller
23 MODULE="$@"
24else
25 # run all tests, useful for tarmac and reviews
26 MODULE="ubuntuone_installer"
27fi
28
29style_check() {
30 ./setup.py clean
31 u1lint
32 if [ -x `which pep8` ]; then
33 pep8 --exclude '.svn,CVS,.bzr,.hg,.git,*_ui.py,*_rc.py' --repeat .
34 else
35 echo "Please install the 'pep8' package."
36 fi
37}
38
39./setup.py build
40echo "Running test suite for ""$MODULE"
41`which xvfb-run` u1trial -i "test_windows.py" --reactor=qt4 --gui "$MODULE"
42style_check
43rm -rf _trial_temp
44rm -rf build
450
=== removed file 'run-tests.bat'
--- run-tests.bat 2012-01-31 16:33:13 +0000
+++ run-tests.bat 1970-01-01 00:00:00 +0000
@@ -1,125 +0,0 @@
1:: Author: Manuel de la Pena <manuel@canonical.com>
2::
3:: Copyright 2010 Canonical Ltd.
4::
5:: This program is free software: you can redistribute it and/or modify it
6:: under the terms of the GNU General Public License version 3, as published
7:: by the Free Software Foundation.
8::
9:: This program is distributed in the hope that it will be useful, but
10:: WITHOUT ANY WARRANTY; without even the implied warranties of
11:: MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
12:: PURPOSE. See the GNU General Public License for more details.
13::
14:: You should have received a copy of the GNU General Public License along
15:: with this program. If not, see <http://www.gnu.org/licenses/>.
16@ECHO off
17
18:: We could have Python 2.6 or 2.7 on Windows. In order to check availability,
19:: we should first check for 2.7, and run the tests, otherwise fall back to 2.6.
20SET REGQUERY27="REG QUERY HKLM\Software\Python\PythonCore\2.7\InstallPath /ve"
21SET REGQUERY2732="REG QUERY HKLM\Software\Wow6432Node\Python\PythonCore\2.7\InstallPath /ve"
22SET REGQUERY26="REG QUERY HKLM\Software\Python\PythonCore\2.6\InstallPath /ve"
23SET REGQUERY2632="REG QUERY HKLM\Software\Wow6432Node\Python\PythonCore\2.6\InstallPath /ve"
24SET PYTHONEXEPATH=""
25
26:: This is very annoying; FOR /F will work differently depending on the output
27:: of reg which is not consistent between OS versions (XP, 7). We must choose
28:: the tokens according to OS version.
29SET PYTHONPATHTOKENS=3
30VER | FIND "XP" > nul
31IF %ERRORLEVEL% == 0 (
32 SET PYTHONPATHTOKENS=4)
33
34ECHO Checking if python 2.7 is in the system
35
36:: Look for python 2.7
37FOR /F "tokens=%PYTHONPATHTOKENS%" %%A IN ('%REGQUERY27%') DO @SET PYTHONEXEPATH=%%A
38IF NOT %PYTHONEXEPATH% == "" (
39 GOTO :PYTHONPRESENT)
40
41ECHO Checking if python 2.6 is in the system
42:: we do not have python 2.7 in the system, try to find 2.6
43FOR /F "tokens=%PYTHONPATHTOKENS%" %%A IN ('%REGQUERY26%') DO @SET PYTHONEXEPATH=%%A
44
45IF NOT %PYTHONEXEPATH% == "" (
46 GOTO :PYTHONPRESENT)
47
48:: we do not have python (2.6 or 2.7) this could hapen in the case that the
49:: user installed the 32version in a 64 machine, let check if the software was installed in the wow key
50
51:: Look for python 2.7 in WoW64
52ECHO Checking if python 2.7 32 is in the system
53FOR /F "tokens=%PYTHONPATHTOKENS%" %%A IN ('%REGQUERY2732%') DO @SET PYTHONEXEPATH=%%A
54
55IF NOT %PYTHONEXEPATH% == "" (
56 GOTO :PYTHONPRESENT)
57
58ECHO Checking if python 2.6 32 is in the system
59:: we do not have python 2.7 in the system, try to find 2.6
60FOR /F "tokens=%PYTHONPATHTOKENS%" %%A IN ('%REGQUERY2632%') DO @SET PYTHONEXEPATH=%%A
61IF NOT %PYTHONEXEPATH% == "" (
62 GOTO :PYTHONPRESENT)
63
64ECHO Please ensure you have python installed
65GOTO :END
66
67:PYTHONPRESENT
68
69:: throw the first parameter away if is /skip-lint,
70:: the way we do this is to ensure that /skip-lint
71:: is the first parameter and copy all the rest in a loop
72:: the main reason for that is that %* is not affected
73:: by SHIFT, that is, it allways have all passed parameters
74
75SET PARAMS=%*
76SET SKIPLINT=0
77IF "%1" == "/skip-lint" (
78 SET SKIPLINT=1
79 GOTO :CLEANPARAMS
80)ELSE (
81 GOTO :CONTINUEBATCH)
82:CLEANPARAMS
83
84SHIFT
85SET PARAMS=%1
86:GETREST
87SHIFT
88if [%1]==[] (
89 GOTO CONTINUEBATCH)
90SET PARAMS=%PARAMS% %1
91GOTO GETREST
92:CONTINUEBATCH
93
94ECHO Python found, building auto-generated modules...
95:: call setup.py build so that the qt uic is called
96::START "Build code" /D%CD% /WAIT "%PYTHONEXEPATH%\python.exe" setup.py build
97"%PYTHONEXEPATH%\python.exe" setup.py build
98
99ECHO Running tests
100
101:: execute the tests with a number of ignored linux only modules
102"%PYTHONEXEPATH%\python.exe" "%PYTHONEXEPATH%\Scripts\u1trial" -i "test_linux.py" --gui --reactor=qt4 -c %PARAMS% ubuntuone_installer
103
104:: Clean the build from the setup.py
105ECHO Cleaning the generated code before running the style checks...
106
107"%PYTHONEXEPATH%\python.exe" setup.py clean
108
109IF %SKIPLINT% == 1 (
110 ECHO Skipping style checks
111 GOTO :CLEAN)
112
113ECHO Performing style checks...
114set USE_PYFLAKES=1
115"%PYTHONEXEPATH%\python.exe" "%PYTHONEXEPATH%\Scripts\u1lint" ubuntuone_installer
116:: test for style if we can, if pep8 is not present, move to the end
117IF EXIST "%PYTHONEXEPATH%\Scripts\pep8.exe" (
118 "%PYTHONEXEPATH%\Scripts\pep8.exe" --repeat --exclude="*_ui.py,*_rc.py" .
119
120:CLEAN
121:: Delete the temp folders
122RMDIR /s /q _trial_temp
123RMDIR /s /q .coverage
124:END
125
1260
=== removed file 'setup.py'
--- setup.py 2012-01-03 20:47:17 +0000
+++ setup.py 1970-01-01 00:00:00 +0000
@@ -1,249 +0,0 @@
1#!/usr/bin/env python
2# setup.py - Build system for Ubuntu One Installer package
3#
4# Authors: Natalia B. Bidart <natalia.bidart@canonical.com>
5# Manuel de la Pena <manuel@canonical.com>
6# Alejandro J. Cura <alecu@canonical.com>
7#
8# Copyright 2010-2011 Canonical Ltd.
9#
10# This program is free software: you can redistribute it and/or modify it
11# under the terms of the GNU General Public License version 3, as published
12# by the Free Software Foundation.
13#
14# This program is distributed in the hope that it will be useful, but
15# WITHOUT ANY WARRANTY; without even the implied warranties of
16# MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
17# PURPOSE. See the GNU General Public License for more details.
18#
19# You should have received a copy of the GNU General Public License along
20# with this program. If not, see <http://www.gnu.org/licenses/>.
21"""Setup.py: build, distribute, clean."""
22
23# pylint: disable=W0404
24
25import os
26import sys
27
28try:
29 import DistUtilsExtra.auto
30 from DistUtilsExtra.command import build_extra
31except ImportError:
32 print >> sys.stderr, 'To build this program you need '\
33 'https://launchpad.net/python-distutils-extra'
34 sys.exit(1)
35assert DistUtilsExtra.auto.__version__ >= '2.18', \
36 'needs DistUtilsExtra.auto >= 2.18'
37
38from distutils import log
39
40POT_FILE = 'po/ubuntuone-installer.pot'
41MESSAGE_ENTRY = 'ubuntuone-installer'
42CONSTANTS = 'ubuntuone_installer/constants.py'
43
44CLEANFILES = [
45 MESSAGE_ENTRY, CONSTANTS, POT_FILE,
46 'MANIFEST']
47QT_UI_DIR = os.path.join('ubuntuone_installer', 'gui', 'qt', 'ui')
48
49
50def replace_prefix(prefix):
51 """Replace every '@prefix@' with prefix within 'filename' content."""
52 # replace .service file, DATA_DIR constant
53 for filename in (MESSAGE_ENTRY, CONSTANTS):
54 with open(filename + '.in') as in_file:
55 content = in_file.read()
56 with open(filename, 'w') as out_file:
57 out_file.write(content.replace('@prefix@', prefix))
58
59
60class InstallerInstall(DistUtilsExtra.auto.install_auto):
61 """Class to install proper files."""
62
63 def run(self):
64 """Do the install.
65
66 Read from *.service.in and generate .service files by replacing
67 @prefix@ by self.prefix.
68
69 """
70 replace_prefix(self.prefix)
71 DistUtilsExtra.auto.install_auto.run(self)
72
73
74class InstallerBuild(build_extra.build_extra):
75 """Build PyQt (.ui) files and resources."""
76
77 description = "build PyQt GUIs (.ui) and resources (.qrc)"
78
79 def compile_ui(self, ui_file, py_file=None):
80 """Compile the .ui files to python modules."""
81 # Search for pyuic4 in python bin dir, then in the $Path.
82 if py_file is None:
83 # go from the ui_file in the data folder to the
84 # python file in the qt moodule
85 py_file = os.path.split(ui_file)[1]
86 py_file = os.path.splitext(py_file)[0] + '_ui.py'
87 py_file = os.path.join(QT_UI_DIR, py_file)
88 # we indeed want to catch Exception, is ugly but we need it
89 # pylint: disable=W0703
90 try:
91 # import the uic compiler from pyqt and generate the .py files
92 # something similar could be done with pyside but that is left
93 # as an exercise for the reader.
94 from PyQt4 import uic
95 fp = open(py_file, 'w')
96 uic.compileUi(ui_file, fp)
97 fp.close()
98 log.info('Compiled %s into %s', ui_file, py_file)
99 except Exception, e:
100 self.warn('Unable to compile user interface %s: %s' % (py_file, e))
101 if not os.path.exists(py_file) or not file(py_file).read():
102 raise SystemExit(1)
103 return
104 # pylint: enable=W0703
105
106 def compile_rc(self, qrc_file, py_file=None):
107 """Compile the resources that will be included with the project."""
108 import PyQt4
109 # Search for pyuic4 in python bin dir, then in the $Path.
110 if py_file is None:
111 py_file = os.path.split(qrc_file)[1]
112 py_file = os.path.splitext(py_file)[0] + '_rc.py'
113 py_file = os.path.join(QT_UI_DIR, py_file)
114 path = os.getenv('PATH')
115 os.putenv('PATH', path + os.path.pathsep + os.path.join(
116 os.path.dirname(PyQt4.__file__), 'bin'))
117 if os.system('pyrcc4 -no-compress "%s" -o "%s"' %
118 (qrc_file, py_file)) > 0:
119 self.warn('Unable to generate python module {py_file}'
120 ' for resource file {qrc_file}'.format(
121 py_file=py_file, qrc_file=qrc_file))
122 if not os.path.exists(py_file) or not file(py_file).read():
123 raise SystemExit(1)
124 else:
125 log.info('compiled %s into %s' % (qrc_file, py_file))
126 os.putenv('PATH', path)
127
128 def _generate_qrc(self, qrc_file, srcfiles, prefix):
129 """Generate the qrc file for the given src files."""
130 basedir = os.path.dirname(qrc_file)
131 f = open(qrc_file, 'w')
132 try:
133 f.write('<!DOCTYPE RCC><RCC version="1.0">\n')
134 import cgi
135 f.write(' <qresource prefix="%s">\n' % cgi.escape(prefix))
136 for e in srcfiles:
137 relpath = e[len(basedir) + 1:]
138 f.write(' <file>%s</file>\n'
139 % cgi.escape(relpath.replace(os.path.sep, '/')))
140 f.write(' </qresource>\n')
141 f.write('</RCC>\n')
142 finally:
143 f.close()
144
145 def build_rc(self, py_file, basedir, prefix='/'):
146 """Generate compiled resource including any files under basedir"""
147 # For details, see http://doc.qt.nokia.com/latest/resources.html
148 qrc_file = os.path.join(basedir, '%s.qrc' % os.path.basename(basedir))
149 srcfiles = [os.path.join(root, e)
150 for root, _dirs, files in os.walk(basedir) for e in files]
151 # NOTE: Here we cannot detect deleted files. In such cases, we need
152 # to remove .qrc manually.
153 try:
154 self._generate_qrc(qrc_file, srcfiles, prefix)
155 self.compile_rc(qrc_file, py_file)
156 finally:
157 os.unlink(qrc_file)
158
159 def run(self):
160 """Execute the command."""
161 self._wrapuic()
162 basepath = os.path.join('data', 'qt')
163 # TODO: build the resource files so that we can include them
164 #self.build_rc(os.path.join(basepath, 'icons_rc.py'),
165 # os.path.join(os.path.dirname(__file__), 'icons'),
166 # '/icons')
167 for dirpath, _, filenames in os.walk(basepath):
168 for filename in filenames:
169 if filename.endswith('.ui'):
170 self.compile_ui(os.path.join(dirpath, filename))
171 elif filename.endswith('.qrc'):
172 self.compile_rc(os.path.join(dirpath, filename))
173
174 build_extra.build_extra.run(self)
175
176 # pylint: disable=E1002
177 _wrappeduic = False
178
179 @classmethod
180 def _wrapuic(cls):
181 """Wrap uic to use gettext's _() in place of tr()"""
182 if cls._wrappeduic:
183 return
184
185 from PyQt4.uic.Compiler import compiler, qtproxies, indenter
186
187 # pylint: disable=C0103
188 class _UICompiler(compiler.UICompiler):
189 """Speciallized compiler for qt .ui files."""
190 def createToplevelWidget(self, classname, widgetname):
191 o = indenter.getIndenter()
192 o.level = 0
193 o.write('from gettext import gettext as _')
194 return super(_UICompiler, self).createToplevelWidget(classname,
195 widgetname)
196 compiler.UICompiler = _UICompiler
197
198 class _i18n_string(qtproxies.i18n_string):
199 """Provide a translated text."""
200
201 def __str__(self):
202 return "_('%s')" % self.string.encode('string-escape')
203
204 qtproxies.i18n_string = _i18n_string
205
206 cls._wrappeduic = True
207 # pylint: enable=C0103
208 # pylint: enable=E1002
209
210
211class InstallerClean(DistUtilsExtra.auto.clean_build_tree):
212 """Class to clean up after the build."""
213
214 def run(self):
215 """Clean up the built files."""
216 for built_file in CLEANFILES:
217 if os.path.exists(built_file):
218 os.unlink(built_file)
219
220 for dirpath, _, filenames in os.walk(os.path.join(QT_UI_DIR)):
221 for current_file in filenames:
222 if current_file.endswith('_ui.py') or\
223 current_file.endswith('_rc.py'):
224 os.unlink(os.path.join(dirpath, current_file))
225
226 DistUtilsExtra.auto.clean_build_tree.run(self)
227
228
229DistUtilsExtra.auto.setup(
230 name='ubuntuone-windows-installer',
231 version='3.1',
232 license='GPL v3',
233 author='Roberto Alsina',
234 author_email='roberto.alsina@canonical.com',
235 description='Ubuntu One Install Wizard',
236 long_description='Application to perform initial setup of a '
237 'Ubuntu One account.',
238 url='https://launchpad.net/ubuntuone-windows-installer',
239 packages=[
240 'ubuntuone_installer', 'ubuntuone_installer.gui',
241 'ubuntuone_installer.gui.qt',
242 ],
243 extra_path='ubuntuone_installer',
244 cmdclass={
245 'install': InstallerInstall,
246 'build': InstallerBuild,
247 'clean': InstallerClean,
248 },
249)
2500
=== removed directory 'ubuntuone_installer'
=== removed file 'ubuntuone_installer/__init__.py'
--- ubuntuone_installer/__init__.py 2011-06-22 10:47:08 +0000
+++ ubuntuone_installer/__init__.py 1970-01-01 00:00:00 +0000
@@ -1,27 +0,0 @@
1# -*- coding: utf-8 -*-
2
3# Authors: Natalia B Bidart <natalia.bidart@canonical.com>
4# Authors: Alejandro J. Cura <alecu@canonical.com>
5#
6# Copyright 2010 Canonical Ltd.
7#
8# This program is free software: you can redistribute it and/or modify it
9# under the terms of the GNU General Public License version 3, as published
10# by the Free Software Foundation.
11#
12# This program is distributed in the hope that it will be useful, but
13# WITHOUT ANY WARRANTY; without even the implied warranties of
14# MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
15# PURPOSE. See the GNU General Public License for more details.
16#
17# You should have received a copy of the GNU General Public License along
18# with this program. If not, see <http://www.gnu.org/licenses/>.
19
20"""The windows installer for Ubuntu One.
21
22The installer is a wizard that sets up the basic account and configuration for
23a Ubuntu One user on windows.
24"""
25
26# constants
27TRANSLATION_DOMAIN = 'ubuntuone-installer'
280
=== removed directory 'ubuntuone_installer/gui'
=== removed file 'ubuntuone_installer/gui/__init__.py'
--- ubuntuone_installer/gui/__init__.py 2011-09-05 21:12:02 +0000
+++ ubuntuone_installer/gui/__init__.py 1970-01-01 00:00:00 +0000
@@ -1,35 +0,0 @@
1# -*- coding: utf-8 -*-
2
3# Authors: Natalia B Bidart <natalia.bidart@canonical.com>
4#
5# Copyright 2011 Canonical Ltd.
6#
7# This program is free software: you can redistribute it and/or modify it
8# under the terms of the GNU General Public License version 3, as published
9# by the Free Software Foundation.
10#
11# This program is distributed in the hope that it will be useful, but
12# WITHOUT ANY WARRANTY; without even the implied warranties of
13# MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
14# PURPOSE. See the GNU General Public License for more details.
15#
16# You should have received a copy of the GNU General Public License along
17# with this program. If not, see <http://www.gnu.org/licenses/>.
18
19"""The Installer UI for Ubuntu One."""
20
21import gettext
22
23_ = gettext.gettext
24
25ARE_YOU_SURE_1 = _("You can restart the setup process at any time "
26 "by clicking on Ubuntu One in your Start menu.")
27ARE_YOU_SURE_2 = _("If you need to know more about Ubuntu One, then please "
28 "go to %(url)s")
29LOCAL_FOLDERS_TITLE = _("Syncing your computer with the cloud")
30LOCAL_FOLDERS_SPACE_HEADER = _("Space (%s)")
31LOCAL_FOLDERS_OFFER_LABEL = _("The folders you have selected to sync "
32 "take over your %(quota)s space. You can remove some folders or add "
33 "some extra space")
34LOCAL_FOLDERS_CALCULATING = _("Calculating")
35NEXT = _("Next")
360
=== removed directory 'ubuntuone_installer/gui/qt'
=== removed file 'ubuntuone_installer/gui/qt/__init__.py'
--- ubuntuone_installer/gui/qt/__init__.py 2011-09-02 13:36:36 +0000
+++ ubuntuone_installer/gui/qt/__init__.py 1970-01-01 00:00:00 +0000
@@ -1,36 +0,0 @@
1# -*- coding: utf-8 -*-
2
3# Authors: Natalia B Bidart <natalia.bidart@canonical.com>
4#
5# Copyright 2010 Canonical Ltd.
6#
7# This program is free software: you can redistribute it and/or modify it
8# under the terms of the GNU General Public License version 3, as published
9# by the Free Software Foundation.
10#
11# This program is distributed in the hope that it will be useful, but
12# WITHOUT ANY WARRANTY; without even the implied warranties of
13# MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
14# PURPOSE. See the GNU General Public License for more details.
15#
16# You should have received a copy of the GNU General Public License along
17# with this program. If not, see <http://www.gnu.org/licenses/>.
18
19"""The Qt graphical interface for the Ubuntu One Installer."""
20
21
22LICENSE_CONTENT = """<html>
23 <body style="font-family:Ubuntu">
24 <h2>License Agreement</h2>
25 <p>This program is free software: you can redistribute it and/or modify
26 it under the terms of the GNU General Public License version 3, as
27 published by the Free Software Foundation.</p>
28 <p>Ubuntu One Basic is free, while additional service add-ons may be
29 paid for services.</p>
30 <p>As free software, this programme is distributed without warranty.
31 See the GNU General Public License for more details at
32 <a href='http://www.gnu.org/licenses'
33 style="color:#dd4814;">http://www.gnu.org/licenses</a>
34 </p>
35 </body>
36<html>"""
370
=== removed file 'ubuntuone_installer/gui/qt/are_you_sure.py'
--- ubuntuone_installer/gui/qt/are_you_sure.py 2011-07-27 15:09:28 +0000
+++ ubuntuone_installer/gui/qt/are_you_sure.py 1970-01-01 00:00:00 +0000
@@ -1,47 +0,0 @@
1# -*- coding: utf-8 -*-
2
3# Authors: Roberto Alsina <roberto.alsina@canonical.com>
4#
5# Copyright 2011 Canonical Ltd.
6#
7# This program is free software: you can redistribute it and/or modify it
8# under the terms of the GNU General Public License version 3, as published
9# by the Free Software Foundation.
10#
11# This program is distributed in the hope that it will be useful, but
12# WITHOUT ANY WARRANTY; without even the implied warranties of
13# MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
14# PURPOSE. See the GNU General Public License for more details.
15#
16# You should have received a copy of the GNU General Public License along
17# with this program. If not, see <http://www.gnu.org/licenses/>.
18
19"""The "Are you sure" dialog."""
20
21import gettext
22
23from PyQt4 import QtGui
24
25from ubuntuone.platform.credentials import APP_NAME
26
27from ubuntuone_installer.gui.qt.ui import are_you_sure_ui
28from ubuntuone_installer.gui import (
29 ARE_YOU_SURE_1,
30 ARE_YOU_SURE_2,
31)
32
33_ = gettext.gettext
34
35
36class AreYouSure(QtGui.QDialog):
37
38 """A 'Are you sure?' dialog."""
39
40 def __init__(self, *args, **kwargs):
41 super(AreYouSure, self).__init__(*args, **kwargs)
42 self.ui = are_you_sure_ui.Ui_Dialog()
43 self.ui.setupUi(self)
44 self.setWindowTitle(APP_NAME)
45 link = u'<a href="https://one.ubuntu.com">https://one.ubuntu.com</a>'
46 msg = (u"%s<p>%s" % (ARE_YOU_SURE_1, ARE_YOU_SURE_2)) % {"url": link}
47 self.ui.message_label.setText(msg)
480
=== removed file 'ubuntuone_installer/gui/qt/currentuser.py'
--- ubuntuone_installer/gui/qt/currentuser.py 2011-08-02 20:16:28 +0000
+++ ubuntuone_installer/gui/qt/currentuser.py 1970-01-01 00:00:00 +0000
@@ -1,55 +0,0 @@
1# -*- coding: utf-8 -*-
2
3# Authors: Roberto Alsina <roberto.alsina@canonical.com>
4#
5# Copyright 2011 Canonical Ltd.
6#
7# This program is free software: you can redistribute it and/or modify it
8# under the terms of the GNU General Public License version 3, as published
9# by the Free Software Foundation.
10#
11# This program is distributed in the hope that it will be useful, but
12# WITHOUT ANY WARRANTY; without even the implied warranties of
13# MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
14# PURPOSE. See the GNU General Public License for more details.
15#
16# You should have received a copy of the GNU General Public License along
17# with this program. If not, see <http://www.gnu.org/licenses/>.
18
19"""Custom controller for current user page."""
20
21from twisted.internet.defer import inlineCallbacks
22
23from ubuntu_sso.qt import controllers
24
25from ubuntuone.platform.credentials import (
26 CredentialsManagementTool,
27 CredentialsError,
28)
29
30from ubuntuone_installer.logger import setup_logging
31
32# Invalid name logger
33# pylint: disable=C0103
34logger = setup_logging('qt.currentuser')
35# pylint: enable=C0103
36
37
38class CurrentUserController(controllers.CurrentUserController):
39 """Custom controller for current user page."""
40
41 @inlineCallbacks
42 def login(self, *args):
43 """Perform the login using the self.backend."""
44 email = unicode(self.view.ui.email_edit.text())
45 password = unicode(self.view.ui.password_edit.text())
46 credtool = CredentialsManagementTool()
47 try:
48 d = yield credtool.login_email_password(
49 email=email,
50 password=password,
51 )
52 self.on_logged_in(self.view.wizard().app_name, d)
53 except CredentialsError, e:
54 logger.exception("Error getting credentials:")
55 self.on_login_error(e.args[0])
560
=== removed file 'ubuntuone_installer/gui/qt/enhanced_check_box.py'
--- ubuntuone_installer/gui/qt/enhanced_check_box.py 2011-08-29 13:48:32 +0000
+++ ubuntuone_installer/gui/qt/enhanced_check_box.py 1970-01-01 00:00:00 +0000
@@ -1,50 +0,0 @@
1# -*- coding: utf-8 -*-
2
3# Authors: Diego Sarmentero <diego.sarmentero@canonical.com>
4#
5# Copyright 2011 Canonical Ltd.
6#
7# This program is free software: you can redistribute it and/or modify it
8# under the terms of the GNU General Public License version 3, as published
9# by the Free Software Foundation.
10#
11# This program is distributed in the hope that it will be useful, but
12# WITHOUT ANY WARRANTY; without even the implied warranties of
13# MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
14# PURPOSE. See the GNU General Public License for more details.
15#
16# You should have received a copy of the GNU General Public License along
17# with this program. If not, see <http://www.gnu.org/licenses/>.
18
19"""Customized Check Box to support links."""
20
21from PyQt4 import QtGui
22
23
24class EnhancedCheckBox(QtGui.QCheckBox):
25 """Enhanced QCheckBox to support links in the message displayed."""
26
27 def __init__(self, text=""):
28 QtGui.QCheckBox.__init__(self)
29 hbox = QtGui.QHBoxLayout()
30 self.text_label = QtGui.QLabel(text)
31 self.text_label.setOpenExternalLinks(True)
32 padding = self.iconSize().width()
33 self.text_label.setStyleSheet("padding-left: {0}px;".format(padding))
34 hbox.addWidget(self.text_label)
35 self.setLayout(hbox)
36
37 self.stateChanged.connect(self.text_label.setFocus)
38
39 def text(self):
40 """Return the text of this widget."""
41 return self.text_label.text()
42
43 # Invalid name "setText"
44 # pylint: disable=C0103
45
46 def setText(self, text):
47 """Set a new text to this widget."""
48 self.text_label.setText(text)
49
50 # pylint: enable=C0103
510
=== removed file 'ubuntuone_installer/gui/qt/folders.py'
--- ubuntuone_installer/gui/qt/folders.py 2012-03-16 15:27:09 +0000
+++ ubuntuone_installer/gui/qt/folders.py 1970-01-01 00:00:00 +0000
@@ -1,71 +0,0 @@
1# -*- coding: utf-8 -*-
2
3# Authors: Roberto Alsina <roberto.alsina@canonical.com>
4# Diego Sarmentero <diego.sarmentero@canonical.com>
5#
6# Copyright 2011 Canonical Ltd.
7#
8# This program is free software: you can redistribute it and/or modify it
9# under the terms of the GNU General Public License version 3, as published
10# by the Free Software Foundation.
11#
12# This program is distributed in the hope that it will be useful, but
13# WITHOUT ANY WARRANTY; without even the implied warranties of
14# MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
15# PURPOSE. See the GNU General Public License for more details.
16#
17# You should have received a copy of the GNU General Public License along
18# with this program. If not, see <http://www.gnu.org/licenses/>.
19
20"""Page to list folders in a Ubuntu One account."""
21
22import gettext
23
24from PyQt4 import QtGui, QtCore
25from ubuntu_sso.qt.gui import SSOWizardPage
26from ubuntuone.controlpanel.gui.qt import folders
27
28from ubuntuone_installer.gui import NEXT
29from ubuntuone_installer.gui.qt.ui import folders_ui
30
31_ = gettext.gettext
32
33
34class FoldersPage(SSOWizardPage):
35 """Wizard page to list and manage an account's folders."""
36
37 def __init__(self, parent=None):
38 super(FoldersPage, self).__init__(folders_ui.Ui_Form(), None, parent)
39 self.setTitle(_("Syncing the cloud to your computer"))
40 self.setSubTitle(_("These are your folders in your cloud. "
41 "Select the ones you want to sync with this computer."))
42 self.folders_widget = folders.FoldersPanel()
43 self.layout().insertWidget(
44 self.layout().count() - 1, self.folders_widget)
45 self.folders_widget.ui.share_publish_button.hide()
46 self.folders_widget.ui.add_folder_button.hide()
47 self.folders_widget.ui.folders.setHeaderHidden(True)
48 self.folders_widget.ui.folders.setColumnHidden(2, True)
49
50 # Invalid name "initializePage"
51 # pylint: disable=C0103
52
53 def initializePage(self):
54 """Set Folders Page navigation buttons."""
55 self.wizard().setOption(QtGui.QWizard.HaveCustomButton1, False)
56 self.wizard().setOption(QtGui.QWizard.HaveCustomButton2, False)
57 self.wizard().setButtonLayout([
58 QtGui.QWizard.Stretch,
59 QtGui.QWizard.NextButton])
60 self.wizard().setButtonText(QtGui.QWizard.NextButton,
61 NEXT)
62 self.wizard()._next_id = self.wizard().local_folders_page_id
63
64 # pylint: enable=C0103
65
66 @QtCore.pyqtSlot()
67 def on_check_settings_button_clicked(self):
68 """Show the Preferences Page when the user click on Settings button."""
69 self.wizard()._next_id = \
70 self.wizard().preferences_page_id
71 self.wizard().next()
720
=== removed file 'ubuntuone_installer/gui/qt/forgotten.py'
--- ubuntuone_installer/gui/qt/forgotten.py 2011-09-21 18:24:39 +0000
+++ ubuntuone_installer/gui/qt/forgotten.py 1970-01-01 00:00:00 +0000
@@ -1,33 +0,0 @@
1# -*- coding: utf-8 -*-
2
3# Authors: Roberto Alsina <roberto.alsina@canonical.com>
4#
5# Copyright 2011 Canonical Ltd.
6#
7# This program is free software: you can redistribute it and/or modify it
8# under the terms of the GNU General Public License version 3, as published
9# by the Free Software Foundation.
10#
11# This program is distributed in the hope that it will be useful, but
12# WITHOUT ANY WARRANTY; without even the implied warranties of
13# MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
14# PURPOSE. See the GNU General Public License for more details.
15#
16# You should have received a copy of the GNU General Public License along
17# with this program. If not, see <http://www.gnu.org/licenses/>.
18
19"""Custom forgotten password controller."""
20
21from ubuntu_sso.qt import controllers
22
23
24class ForgottenPasswordController(controllers.ForgottenPasswordController):
25 """A custom forgotten password controller.
26
27 This controller hides the overlay as needed.
28 """
29
30 def on_password_reset_error(self, app_name, error):
31 """Hide the overlay, then do as the default controller does."""
32 super(ForgottenPasswordController,
33 self).on_password_reset_error(app_name, error)
340
=== removed file 'ubuntuone_installer/gui/qt/gui.py'
--- ubuntuone_installer/gui/qt/gui.py 2012-03-16 15:27:09 +0000
+++ ubuntuone_installer/gui/qt/gui.py 1970-01-01 00:00:00 +0000
@@ -1,604 +0,0 @@
1# -*- coding: utf-8 -*-
2#
3# Copyright 2011 Canonical Ltd.
4#
5# This program is free software: you can redistribute it and/or modify it
6# under the terms of the GNU General Public License version 3, as published
7# by the Free Software Foundation.
8#
9# This program is distributed in the hope that it will be useful, but
10# WITHOUT ANY WARRANTY; without even the implied warranties of
11# MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
12# PURPOSE. See the GNU General Public License for more details.
13#
14# You should have received a copy of the GNU General Public License along
15# with this program. If not, see <http://www.gnu.org/licenses/>.
16
17"""The user interface for the Ubuntu One Installer."""
18
19import gettext
20
21from twisted.internet import defer
22from PyQt4 import QtGui, QtCore
23
24from ubuntu_sso import networkstate
25from ubuntu_sso.qt.gui import (
26 SSOWizardPage,
27 EmailVerificationPage,
28 ErrorPage,
29 ForgottenPasswordPage,
30 ResetPasswordPage,
31)
32from ubuntu_sso.utils.ui import (
33 SUCCESS,
34)
35from ubuntu_sso.qt.current_user_sign_in_ui import \
36 Ui_CurrentUserSignInPage
37from ubuntu_sso.qt.email_verification_ui import \
38 Ui_EmailVerificationPage
39from ubuntu_sso.qt.error_message_ui import Ui_ErrorPage
40from ubuntu_sso.qt.success_message_ui import Ui_SuccessPage
41from ubuntu_sso.qt.forgotten_password_ui import \
42 Ui_ForgottenPasswordPage
43from ubuntu_sso.qt.reset_password_ui import Ui_ResetPasswordPage
44from ubuntu_sso.qt.controllers import (
45 ChooseSignInController,
46 EmailVerificationController,
47 ErrorController,
48 ResetPasswordController,
49 SetUpAccountController,
50 SuccessController,
51)
52
53from ubuntuone.controlpanel import backend
54from ubuntuone.controlpanel.gui.qt.loadingoverlay import LoadingOverlay
55
56from ubuntuone.platform.credentials import (
57 APP_NAME,
58 TC_URL,
59)
60
61# Module used to include the resources into this file
62# pylint: disable=W0611
63from ubuntuone_installer.gui.qt.ui import images_rc
64# pylint: enable=W0611
65from ubuntuone_installer.logger import setup_logging
66from ubuntuone_installer.gui.qt.ui import (
67 choose_sign_in_ui,
68 congratulations_ui,
69 license_ui,
70 setup_account_ui,
71)
72
73from ubuntuone_installer.gui import qt
74from ubuntuone_installer.gui.qt.are_you_sure import AreYouSure
75from ubuntuone_installer.gui.qt.currentuser import CurrentUserController
76from ubuntuone_installer.gui.qt.folders import FoldersPage
77from ubuntuone_installer.gui.qt.forgotten import ForgottenPasswordController
78from ubuntuone_installer.gui.qt.local_folders import LocalFoldersPage
79from ubuntuone_installer.gui.qt.network_detection import NetworkDetectionPage
80from ubuntuone_installer.gui.qt.preferences import PreferencesPage
81from ubuntuone_installer.gui.qt.sync_now_or_later import SyncNowOrLaterPage
82from ubuntuone_installer.gui.qt.setup_account import SetupAccountPage
83from ubuntuone_installer.gui.qt.side_widget import SideWidget
84
85_ = gettext.gettext
86CONGRATULATIONS = _("Congratulations")
87CREDENTIALS_ERROR_TITLE = _("Error getting credentials")
88CREDENTIALS_ERROR = _('Application will close.\n\n%r')
89SIGN_IN = _("Sign in to Ubuntu One")
90SIGN_IN_SUBTITLE = _("Sign in with your existing Ubuntu One"
91 " username and password.")
92SKIP_TOUR = _("Skip tour, go to Dashboard")
93START_SETUP = _("Start setup")
94SUCCESSFUL_LOGIN = _("Login successful")
95TITLE_STYLE = "<span style=\"font-size:24px\">%s</span>"
96UPDATE_TITLE = _("Updates are available")
97UPDATE_SOFTWARE = _("There is a new version of Ubuntu One available. "
98 "Do you want to perform an upgrade?")
99REMOVE_OLD_BETA_TITLE = _("Remove old Beta")
100REMOVE_OLD_BETA = _("The old Ubuntu One Beta is installed in your system. Do "
101 "you want to uninstall it?")
102REMOVE_OLD_BETA_ERROR = _("There was an error uninstall the old beta. Please "
103 "do this step manually")
104MIGRATE_OLD_BETA_DATA_TITLE = _("Migrate old data")
105MIGRATE_OLD_BETA = _("Do you want to migrate the files from the old Ubuntu "
106 "One Beta location to the new one?")
107MIGRATE_OLD_BETA_DATA_ERROR = _("There was an error migrating your data. "
108 "Please do this step manually.")
109
110# Invalid name logger
111# pylint: disable=C0103
112logger = setup_logging('qt.gui')
113# pylint: enable=C0103
114
115
116def _ask_user_question(title, question):
117 """Ask the user a Yes/No question."""
118 result = QtGui.QMessageBox.question(None, title, question,
119 QtGui.QMessageBox.Yes, QtGui.QMessageBox.No)
120 return result == QtGui.QMessageBox.Yes
121
122
123def user_wants_to_update():
124 """Ask the user if he really wants to update the software."""
125 return _ask_user_question(UPDATE_TITLE, UPDATE_SOFTWARE)
126
127
128def user_wants_to_remove_old_beta():
129 """Ask the user if he really wants to remove the old beta."""
130 return _ask_user_question(REMOVE_OLD_BETA_TITLE, REMOVE_OLD_BETA)
131
132
133def user_wants_to_migrate_data():
134 """Ask the user if he really wants to migrate the data."""
135 return _ask_user_question(MIGRATE_OLD_BETA_DATA_TITLE, MIGRATE_OLD_BETA)
136
137
138def _warn_user(title, message):
139 """Warn the user."""
140 QtGui.QMessageBox.warning(None, title, message, QtGui.QMessageBox.Ok)
141
142
143def warn_user_beta_not_removed():
144 """Let the user know that the data was not migrated."""
145 _warn_user(REMOVE_OLD_BETA_TITLE, REMOVE_OLD_BETA_ERROR)
146
147
148def warn_user_data_not_migrated():
149 """Let the user know that the data was not migrated."""
150 _warn_user(MIGRATE_OLD_BETA_DATA_TITLE, MIGRATE_OLD_BETA_DATA_ERROR)
151
152
153class LicensePage(SSOWizardPage):
154 """Wizard Page that displays the license info and links to the GPL."""
155
156 def __init__(self, parent=None):
157 super(LicensePage, self).__init__(license_ui.Ui_Form(), None, parent)
158 self.header.setVisible(False)
159 self.ui.textBrowser.setHtml(qt.LICENSE_CONTENT)
160 self.agree_button = None
161
162 # Invalid names of Qt-inherited methods
163 # pylint: disable=C0103
164
165 def initializePage(self):
166 """Setup UI details."""
167 # Set the right texts and connections for buttons
168 self.setButtonText(QtGui.QWizard.CustomButton1, _("Agree && continue"))
169 self.setButtonText(QtGui.QWizard.CancelButton,
170 _("Disagree && uninstall"))
171
172 # This is just to catch an exception thrown when nothing
173 # is connected to the signal. It's not an exceptional
174 # condition at all.
175 try:
176 self.wizard().customButtonClicked.disconnect()
177 except TypeError:
178 pass
179
180 self.wizard().setButtonLayout([
181 QtGui.QWizard.CancelButton,
182 QtGui.QWizard.BackButton,
183 QtGui.QWizard.Stretch,
184 QtGui.QWizard.CustomButton1])
185
186 self.agree_button = self.wizard().button(QtGui.QWizard.CustomButton1)
187 self.agree_button.setDefault(True)
188 self.agree_button.style().unpolish(self.agree_button)
189 self.agree_button.style().polish(self.agree_button)
190 self.wizard().customButtonClicked.connect(self.check_connection)
191
192 # pylint: disable=W0212
193 @defer.inlineCallbacks
194 def check_connection(self, button_id):
195 """Decide next ID based on network detection."""
196 if button_id == QtGui.QWizard.CustomButton1:
197 connected = yield self.wizard().check_connection()
198 if connected:
199 self.next = self.wizard().SIGN_IN_PAGE_ID
200 else:
201 self.next = self.wizard()._next_id
202 self.wizard().next()
203 # pylint: enable=W0212
204
205 def nextId(self):
206 """Return the next page ID."""
207 return self.next
208
209
210class SignInPage(SSOWizardPage):
211 """Wizard Page that lets the user Sign into Ubuntu One."""
212
213 # Invalid names of Qt-inherited methods
214 # pylint: disable=C0103
215
216 def initializePage(self):
217 """Setup UI details."""
218 self.ui.cancel_button.setText(_("Close window and setup later"))
219 self.ui.cancel_button.clicked.connect(self.wizard().reject)
220 # Layout without custom button 1,
221 # without finish button
222 # without cancel
223 self.wizard().setButtonLayout([
224 QtGui.QWizard.Stretch,
225 QtGui.QWizard.NextButton])
226
227 def showEvent(self, event):
228 """Set existing_account_button as default when the page is shown."""
229 super(SignInPage, self).showEvent(event)
230 self.ui.existing_account_button.setDefault(True)
231 self.ui.existing_account_button.style().unpolish(
232 self.ui.existing_account_button)
233 self.ui.existing_account_button.style().polish(
234 self.ui.existing_account_button)
235
236 def nextId(self):
237 """Provide the next id."""
238 return self.next
239
240
241class CurrentUserSignInPage(SSOWizardPage):
242 """Wizard Page that lets a current user Sign into Ubuntu One."""
243
244 # Invalid names of Qt-inherited methods
245 # pylint: disable=C0103
246
247 def nextId(self):
248 """Provide the next id."""
249 return self.next
250
251 def initializePage(self):
252 """Setup UI details."""
253 self.setButtonText(QtGui.QWizard.CancelButton,
254 _("Cancel"))
255 # Layout without custom button 1,
256 # without finish button
257 self.wizard().setButtonLayout([
258 QtGui.QWizard.BackButton,
259 QtGui.QWizard.Stretch])
260
261 # Set sign_in_button as default when the page is shown.
262 self.ui.sign_in_button.setDefault(True)
263 self.ui.sign_in_button.setEnabled(False)
264 self.ui.sign_in_button.setProperty("DisabledState",
265 not self.ui.sign_in_button.isEnabled())
266 self.ui.sign_in_button.style().unpolish(
267 self.ui.sign_in_button)
268 self.ui.sign_in_button.style().polish(
269 self.ui.sign_in_button)
270
271 def cleanupPage(self):
272 """Reset the state of the wizard if Verification code was visited."""
273 self.wizard()._next_id = None
274
275
276class SuccessPage(SSOWizardPage):
277 """Shown after SSO login, before setup."""
278
279 # Invalid names of Qt-inherited methods
280 # pylint: disable=C0103
281
282 def __init__(self, parent=None):
283 super(SuccessPage, self).__init__(
284 Ui_SuccessPage(),
285 SuccessController(title=SUCCESSFUL_LOGIN), parent)
286 self.backend = backend.ControlBackend()
287 self.finish_button = None
288 self.next_button = None
289 self.ui.image_label.setPixmap(
290 QtGui.QPixmap(':/win_installer_graphic.png'))
291
292 def initializePage(self):
293 """Setup UI details."""
294 self.wizard().setButtonLayout([
295 QtGui.QWizard.Stretch,
296 QtGui.QWizard.FinishButton,
297 QtGui.QWizard.NextButton,
298 ])
299 self.setFinalPage(True)
300 self.wizard().setButtonText(QtGui.QWizard.FinishButton,
301 SKIP_TOUR)
302 self.wizard().setButtonText(QtGui.QWizard.NextButton,
303 START_SETUP)
304 self.finish_button = self.wizard().button(QtGui.QWizard.FinishButton)
305 self.next_button = self.wizard().button(QtGui.QWizard.NextButton)
306 self.finish_button.style().unpolish(self.finish_button)
307 self.finish_button.style().polish(self.finish_button)
308 self.next_button.setDefault(True)
309 self.next_button.style().unpolish(self.next_button)
310 self.next_button.style().polish(self.next_button)
311 self.backend.connect_files()
312
313 self.ui.success_message_body.setText(
314 SUCCESS % {'app_name': self.wizard().app_name})
315
316 def nextId(self):
317 """Provide the next id."""
318 return self.next
319
320
321class CongratulationsPage(SSOWizardPage):
322 """Final page of the wizard."""
323
324 def __init__(self, parent=None):
325 super(CongratulationsPage, self).__init__(
326 congratulations_ui.Ui_Form(), None, parent)
327 self.setFinalPage(True)
328 self.setTitle(CONGRATULATIONS)
329
330 # Invalid names of Qt-inherited methods
331 # pylint: disable=C0103
332
333 def initializePage(self):
334 """Setup UI details."""
335 # We need custom buttons
336 self.wizard().setButtonText(QtGui.QWizard.FinishButton,
337 _("Go to my Ubuntu One dashboard"))
338 # Layout without custom button 1,
339 self.wizard().setButtonLayout([
340 QtGui.QWizard.Stretch,
341 QtGui.QWizard.FinishButton])
342 # Set FinishButton as default when the page is shown.
343 self.wizard().button(QtGui.QWizard.FinishButton).setDefault(True)
344 self.wizard().button(QtGui.QWizard.FinishButton).style().unpolish(
345 self.wizard().button(QtGui.QWizard.FinishButton))
346 self.wizard().button(QtGui.QWizard.FinishButton).style().polish(
347 self.wizard().button(QtGui.QWizard.FinishButton))
348
349 # Add syncdaemon to autostart
350 qt.utils.add_syncdaemon_to_autostart()
351
352
353class MainWindow(QtGui.QWizard):
354
355 """The Main Window of the Installer wizard."""
356
357 # Invalid constant names and Qt-inherited methods
358 # pylint: disable=C0103
359
360 LICENSE_PAGE = 0
361 SIGNIN_PAGE = 1
362 SYNC_NOW_OR_LATER_PAGE = 2
363 CONGRATULATIONS_PAGE = 3
364
365 # definition of the signals raised by the widget (for SSO)
366 recoverableError = QtCore.pyqtSignal('QString', 'QString')
367 loginSuccess = QtCore.pyqtSignal('QString', 'QString')
368 registrationIncomplete = QtCore.pyqtSignal('QString', 'QString')
369 registrationSuccess = QtCore.pyqtSignal('QString', 'QString')
370 userCancellation = QtCore.pyqtSignal('QString')
371
372 def __init__(self, close_callback=None, installing=False):
373 """Initialize this instance."""
374 # Used to decide the next page dynamically
375 self._next_id = None
376
377 # Data for SSO
378 self.app_name = APP_NAME
379 self.tc_url = TC_URL
380 # help_text is not displayed in the UI from design
381 self.help_text = ""
382
383 super(MainWindow, self).__init__()
384 # Set windows flags
385 flags = self.windowFlags() & ~QtCore.Qt.WindowContextHelpButtonHint
386 self.setWindowFlags(flags)
387
388 self.setWindowTitle(APP_NAME)
389 self.setMinimumHeight(538)
390 self.setMinimumWidth(740)
391 self.setWizardStyle(self.ModernStyle)
392 self.close_callback = close_callback
393
394 # Label for Form Errors
395 self.form_errors_label = QtGui.QLabel()
396 self.form_errors_label.setObjectName("form_errors")
397 self.form_errors_label.hide()
398
399 self.setSideWidget(SideWidget())
400 self.overlay = LoadingOverlay(self)
401 self.overlay.hide()
402
403 self.setOption(self.NoBackButtonOnStartPage, True)
404
405 # PyQt doesn't support the (int, page) version of addPage, so
406 # Add the pages in the right order
407 # pylint: disable=C0103
408 self.license_page = LicensePage()
409 self.LICENSE_PAGE = self.addPage(self.license_page)
410 self.network_page = NetworkDetectionPage()
411
412 #SSO Pages
413 title_page = TITLE_STYLE % SIGN_IN
414 self.sign_in_controller = ChooseSignInController(
415 title=title_page)
416 self.sign_in_page = SignInPage(
417 ui=choose_sign_in_ui.Ui_ChooseSignInPage(),
418 controller=self.sign_in_controller,
419 parent=self)
420 if not installing:
421 self.sign_in_page.ui.message_label.setText("")
422
423 self.setup_controller = SetUpAccountController(message_box=self)
424 self.setup_account = SetupAccountPage(
425 setup_account_ui.Ui_SetUpAccountPage(),
426 self.setup_controller,
427 parent=self)
428
429 email_controller = EmailVerificationController(message_box=self)
430 email_verification_page = Ui_EmailVerificationPage()
431 self.email_verification = EmailVerificationPage(
432 email_verification_page,
433 email_controller)
434 self.email_verification.next_button.clicked.connect(
435 self.overlay.show)
436
437 title_page = TITLE_STYLE % SIGN_IN
438 self.current_user_controller = CurrentUserController(
439 title=title_page, subtitle=SIGN_IN_SUBTITLE,
440 message_box=self)
441 self.current_user = CurrentUserSignInPage(Ui_CurrentUserSignInPage(),
442 self.current_user_controller,
443 parent=self)
444 self.current_user.ui.sign_in_button.clicked.connect(
445 self.overlay.show)
446
447 self.success = SuccessPage(self)
448 self.error_controller = ErrorController()
449 self.error = ErrorPage(Ui_ErrorPage(), self.error_controller)
450
451 self.forgotten_pwd_controller = ForgottenPasswordController(
452 message_box=self)
453 self.forgotten = ForgottenPasswordPage(Ui_ForgottenPasswordPage(),
454 self.forgotten_pwd_controller,
455 parent=self)
456 self.forgotten.ui.send_button.clicked.connect(
457 self.overlay.show)
458
459 self.reset_password_controller = ResetPasswordController(
460 message_box=self)
461 self.reset_password = ResetPasswordPage(Ui_ResetPasswordPage(),
462 self.reset_password_controller,
463 parent=self)
464 self.reset_password.ui.reset_password_button.clicked.connect(
465 self.overlay.show)
466
467 self.SIGN_IN_PAGE_ID = self.addPage(self.sign_in_page)
468 self.NETWORK_DETECTION_PAGE_ID = self.addPage(self.network_page)
469 self.setup_account_page_id = self.addPage(self.setup_account)
470 self.email_verification_page_id = self.addPage(self.email_verification)
471 self.current_user_page_id = self.addPage(self.current_user)
472 self.SUCCESS_PAGE = self.addPage(self.success)
473 self.ERROR_PAGE = self.addPage(self.error)
474 self.forgotten_password_page_id = self.addPage(self.forgotten)
475 self.reset_password_page_id = self.addPage(self.reset_password)
476
477 self.loginSuccess.connect(self.login_success_slot)
478 self.registrationIncomplete.connect(self.registration_incomplete)
479 self.registrationSuccess.connect(self.registration_success_slot)
480
481 # End of SSO pages
482
483 self.SYNC_NOW_OR_LATER_PAGE = self.addPage(SyncNowOrLaterPage())
484 self.folders_page = FoldersPage()
485 self.folders_page_id = self.addPage(self.folders_page)
486 self.local_folders_page = LocalFoldersPage()
487 self.local_folders_page_id = self.addPage(self.local_folders_page)
488 self.preferences_page = PreferencesPage()
489 self.preferences_page_id = self.addPage(self.preferences_page)
490 self.CONGRATULATIONS_PAGE = self.addPage(CongratulationsPage())
491
492 self.currentIdChanged.connect(self.on_currentIdChanged)
493 # Set Wizard buttons style
494 self.button(QtGui.QWizard.NextButton).setDefault(True)
495
496 self.set_start_page(installing)
497
498 # Invalid name "closeEvent"
499 # pylint: disable=C0103
500
501 @defer.inlineCallbacks
502 def set_start_page(self, installing):
503 """Set the Wizard start page based in some conditions."""
504 connected = yield self.check_connection()
505 if installing:
506 self.setStartId(self.LICENSE_PAGE)
507 elif connected:
508 self.setStartId(self.SIGNIN_PAGE)
509 else:
510 self.setStartId(self._next_id)
511 self.restart()
512
513 def critical(self, message, page=None):
514 """Show a message at the bottom of the page on form errors."""
515 self.overlay.hide()
516 self.form_errors_label.setText(message)
517 self.form_errors_label.show()
518 if page is None and self.currentPage():
519 self.currentPage().layout().addWidget(self.form_errors_label)
520 elif page is not None:
521 page.layout().addWidget(self.form_errors_label)
522
523 def next(self):
524 """Show the next page to display and remove the form errors label."""
525 self.overlay.hide()
526 self.form_errors_label.hide()
527 if self.currentPage().layout():
528 self.currentPage().layout().removeWidget(self.form_errors_label)
529 self.form_errors_label.setParent(None)
530 super(MainWindow, self).next()
531
532 def nextId(self):
533 """Selects which page to display next."""
534 if self._next_id is not None:
535 return self._next_id
536 else:
537 return QtGui.QWizard.nextId(self)
538
539 @defer.inlineCallbacks
540 def check_connection(self):
541 """Return is machine is connected, False set Network Page as next."""
542 # pylint: disable=W0703
543 connected = yield networkstate.is_machine_connected()
544 if not connected:
545 self._next_id = self.NETWORK_DETECTION_PAGE_ID
546 defer.returnValue(connected)
547 # pylint: enable=W0703
548
549 def login_success_slot(self):
550 """Called on successful login."""
551 self._next_id = self.SUCCESS_PAGE
552 self.next()
553 self._next_id = self.SYNC_NOW_OR_LATER_PAGE
554
555 def registration_incomplete(self):
556 """Called when registration wasn't completed."""
557 self._next_id = self.email_verification_page_id
558 self.next()
559 self._next_id = self.SUCCESS_PAGE
560
561 def registration_success_slot(self):
562 """Called on successful registration."""
563 self._next_id = self.SUCCESS_PAGE
564 self.next()
565 self._next_id = self.SYNC_NOW_OR_LATER_PAGE
566
567 def done(self, result):
568 """The main window is being closed, call any custom callback."""
569 # Finished, not cancelled
570 if result == 1: # Cancelled
571 qt.utils.start_control_panel()
572 elif self.currentId() == self.LICENSE_PAGE:
573 if AreYouSure(self).exec_() == QtGui.QDialog.Accepted:
574 qt.utils.uninstall_application()
575 else:
576 return
577 elif self.currentId() != self.CONGRATULATIONS_PAGE:
578 if AreYouSure(self).exec_() == QtGui.QDialog.Rejected:
579 return
580 if self.close_callback is not None:
581 self.close_callback()
582 QtGui.QWizard.done(self, result)
583 self.userCancellation.emit(self.app_name)
584
585 def on_currentIdChanged(self, page_id):
586 """The current page changed."""
587 if page_id < self.SIGNIN_PAGE:
588 self.sideWidget().ui.states_frame.hide()
589 self.sideWidget().set_stage(0)
590 elif page_id < self.SYNC_NOW_OR_LATER_PAGE:
591 self.sideWidget().ui.states_frame.show()
592 self.sideWidget().set_stage(1)
593 elif page_id < self.CONGRATULATIONS_PAGE:
594 self.sideWidget().set_stage(3)
595 else:
596 self.sideWidget().set_stage(4)
597
598 # Invalid name "resizeEvent"
599 # pylint: disable=C0103
600
601 def resizeEvent(self, event):
602 """Resize the overlay to fit all the widget."""
603 QtGui.QWizard.resizeEvent(self, event)
604 self.overlay.resize(event.size())
6050
=== removed file 'ubuntuone_installer/gui/qt/local_folders.py'
--- ubuntuone_installer/gui/qt/local_folders.py 2012-03-16 15:27:09 +0000
+++ ubuntuone_installer/gui/qt/local_folders.py 1970-01-01 00:00:00 +0000
@@ -1,310 +0,0 @@
1# -*- coding: utf-8 -*-
2
3# Authors: Roberto Alsina <roberto.alsina@canonical.com>
4#
5# Copyright 2011 Canonical Ltd.
6#
7# This program is free software: you can redistribute it and/or modify it
8# under the terms of the GNU General Public License version 3, as published
9# by the Free Software Foundation.
10#
11# This program is distributed in the hope that it will be useful, but
12# WITHOUT ANY WARRANTY; without even the implied warranties of
13# MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
14# PURPOSE. See the GNU General Public License for more details.
15#
16# You should have received a copy of the GNU General Public License along
17# with this program. If not, see <http://www.gnu.org/licenses/>.
18
19"""Widget to create UDFs in the Windows Install Wizard."""
20
21import os
22import threading
23import Queue
24
25from twisted.internet.defer import inlineCallbacks, returnValue
26from PyQt4 import QtGui, QtCore
27from ubuntuone.controlpanel import backend
28from ubuntuone.controlpanel.gui import (
29 humanize,
30 sign_url,
31 FOLDER_INVALID_PATH,
32)
33from ubuntuone.controlpanel.web_client.txwebclient import timestamp_checker
34from ubuntuone.platform.credentials import CredentialsManagementTool
35from ubuntu_sso.qt.gui import SSOWizardPage
36
37from ubuntuone_installer.gui.qt.ui import local_folders_ui
38from ubuntuone_installer.gui.qt.utils import default_folders
39from ubuntuone_installer.gui import (
40 LOCAL_FOLDERS_TITLE,
41 LOCAL_FOLDERS_SPACE_HEADER,
42 LOCAL_FOLDERS_OFFER_LABEL,
43 LOCAL_FOLDERS_CALCULATING,
44 NEXT,
45)
46
47from ubuntuone_installer.logger import setup_logging
48
49
50# Invalid name logger
51# pylint: disable=C0103
52logger = setup_logging('qt.local_folders')
53# pylint: enable=C0103
54
55
56class FolderItem(QtGui.QTreeWidgetItem):
57 """Class representing a folder in the folder list UI."""
58 def __init__(self, strings, path=None, queue=None,
59 calculate=True, volume_id=None):
60 super(FolderItem, self).__init__(strings)
61 self.thread = CalculateSize(path, queue)
62 # Don't calculate sizes of UDFs
63 if calculate and not volume_id:
64 self.thread.start()
65 self.size = None
66 else:
67 self.size = 0
68 self.path = path
69 self.setCheckState(0, QtCore.Qt.Unchecked)
70 self.volume_id = volume_id
71
72
73class CalculateSize(threading.Thread):
74 """Class to calculate the size of a folder in the background."""
75 def __init__(self, path_name, queue):
76 self.path_name = path_name
77 self.queue = queue
78 self._stop = False
79 super(CalculateSize, self).__init__()
80 self.daemon = True
81
82 def run(self):
83 total_size = 0
84 for dirpath, _, filenames in os.walk(self.path_name):
85 for f in filenames:
86 fp = os.path.join(dirpath, f)
87 total_size += os.path.getsize(fp)
88 self.queue.put([self.path_name, total_size])
89
90
91class LocalFoldersPage(SSOWizardPage):
92 """Wizard page to create UDFs in the Windows Installer."""
93
94 def __init__(self, parent=None):
95 super(LocalFoldersPage, self).__init__(
96 local_folders_ui.Ui_Form(), None, parent)
97 self.setTitle(LOCAL_FOLDERS_TITLE)
98 self.setSubTitle()
99 header_view = self.ui.folder_list.header()
100 header_view.setResizeMode(0, header_view.Stretch)
101 self.queue = Queue.Queue()
102 self.timer = QtCore.QTimer()
103 self.items = {}
104 self.folders_info = None
105 self.account_info = None
106 self.has_back_button = True
107 self.cp_backend = backend.ControlBackend()
108
109 # initializePage is inherited
110 # pylint: disable=C0103
111 def initializePage(self):
112 """UI details."""
113 if self.has_back_button:
114 self.wizard().setButtonLayout([
115 QtGui.QWizard.BackButton,
116 QtGui.QWizard.Stretch,
117 QtGui.QWizard.NextButton])
118 else:
119 self.wizard().setButtonLayout([
120 QtGui.QWizard.Stretch,
121 QtGui.QWizard.NextButton])
122 self.wizard().setButtonText(QtGui.QWizard.NextButton,
123 NEXT)
124 self.wizard()._next_id = self.wizard().CONGRATULATIONS_PAGE
125 # Start with this invisible
126 self.ui.offer_frame.setVisible(False)
127 # Show overlay until we have server data
128 self.wizard().overlay.show()
129 self.get_info()
130
131 def cleanupPage(self):
132 """Initialize previous page when going back."""
133 self.wizard().folders_page.initializePage()
134
135 @inlineCallbacks
136 def get_info(self):
137 """Get information from CP backend and fill folder list."""
138 # pylint: disable=W0702
139 try:
140 volumes_info = yield self.cp_backend.volumes_info()
141 self.account_info = yield self.cp_backend.account_info()
142 self.folders_info = []
143 for _, _, volumes in volumes_info:
144 for volume in volumes:
145 if volume[u'type'] == u"UDF":
146 self.folders_info.append(volume)
147 self.ui.folder_list.clear()
148 self.items = {}
149 for folder in self.folders_info:
150 if folder['subscribed']:
151 item = yield self.add_folder(
152 os.path.expanduser(folder['path']),
153 validate=False,
154 volume_id=folder['volume_id'],
155 calculate=False,
156 )
157 if item:
158 item.setCheckState(0, QtCore.Qt.Checked)
159 item.size = 0
160 for folder_name in default_folders():
161 item = yield self.add_folder(folder_name, validate=True)
162 self.timer.start(2000)
163 self.timer.timeout.connect(self.update_sizes)
164 self.wizard().currentIdChanged.connect(self.changed_page)
165 except:
166 logger.exception("Error getting backend info:")
167 finally:
168 self.wizard().overlay.hide()
169
170 @QtCore.pyqtSlot("int")
171 @inlineCallbacks
172 def changed_page(self, page_id):
173 """When moving to next page, create/[un]subscribe UDFs."""
174 self.timer.stop()
175 try:
176 self.wizard().currentIdChanged.disconnect(self.changed_page)
177 except KeyError:
178 pass
179 if page_id == self.wizard().CONGRATULATIONS_PAGE:
180 # The page following this one
181 self.wizard().overlay.show()
182 for path, item in self.items.items():
183 if item.checkState(0) == QtCore.Qt.Checked:
184 if item.volume_id:
185 yield self.cp_backend.change_volume_settings(
186 item.volume_id,
187 dict(subscribed=True))
188 else:
189 yield self.cp_backend.create_folder(path)
190 else:
191 if item.volume_id:
192 yield self.cp_backend.change_volume_settings(
193 item.volume_id,
194 dict(subscribed=False))
195 self.wizard().overlay.hide()
196
197 @inlineCallbacks
198 def add_folder(self, path, validate=True, calculate=True, volume_id=None):
199 """Add a folder to the list."""
200 if path in self.items:
201 returnValue(None)
202 if validate:
203 is_valid = yield self.cp_backend.validate_path_for_folder(path)
204 else:
205 is_valid = True
206 if is_valid:
207 item = FolderItem([path, ""],
208 path=path,
209 queue=self.queue,
210 volume_id=volume_id,
211 calculate=calculate)
212 self.ui.folder_list.addTopLevelItem(item)
213 self.items[path] = item
214 returnValue(item)
215 returnValue(None)
216
217 def update_sizes(self):
218 """Poll the queue were the threads put the size info."""
219 while True:
220 try:
221 path, size = self.queue.get(False)
222 except Queue.Empty:
223 break
224 else:
225 item = self.items.get(path)
226 if item:
227 item.size = size
228 try:
229 item.setText(1, humanize(size))
230 except RuntimeError:
231 del self.items[path]
232 total = long(self.account_info['quota_used'])
233 for path, item in self.items.items():
234 if item.size is None:
235 total = LOCAL_FOLDERS_CALCULATING
236 break
237 if not item.volume_id and item.checkState(0) == QtCore.Qt.Checked:
238 # Existing UDFs are already accounted for, count if marked.
239 total += item.size
240 if isinstance(total, long):
241 self.show_hide_offer(total)
242 total = humanize(total)
243 else:
244 self.show_hide_offer(0)
245 self.ui.folder_list.headerItem().setText(
246 1, LOCAL_FOLDERS_SPACE_HEADER % total)
247
248 def show_hide_offer(self, cur_size):
249 """Show or hide the offer to buy space according to the total size."""
250 quota = self.account_info['quota_total']
251 if cur_size > quota:
252 self.ui.offer_frame.setVisible(True)
253 else:
254 self.ui.offer_frame.setVisible(False)
255 self.ui.offer_label.setText(LOCAL_FOLDERS_OFFER_LABEL %
256 {"quota": humanize(quota)})
257
258 def stop_threads(self):
259 """Stop all pending threads."""
260 for _, item in self.items:
261 item.thread._stop = True
262
263 # itemClicked is a Qt signal name.
264 # pylint: disable=C0103
265 def on_folder_list_itemChanged(self, item, column):
266 """Delete folder from the list."""
267 if column == 0:
268 self.update_sizes()
269
270 @inlineCallbacks
271 @QtCore.pyqtSlot()
272 def on_add_storage_button_clicked(self):
273 """user clicked on the "Add more storage" button."""
274 # Really want to catch everything
275 # pylint: disable=W0702
276 url = "https://one.ubuntu.com/services/#storage_panel"
277 try:
278 credtool = CredentialsManagementTool()
279 creds = yield credtool.find_credentials()
280 except:
281 logger.exception('Error while trying to get credentials:')
282 creds = {}
283 if creds:
284 timestamp = yield timestamp_checker.get_faithful_time()
285 signed_url = yield sign_url(url, creds, timestamp)
286 else:
287 signed_url = url
288 QtGui.QDesktopServices.openUrl(QtCore.QUrl(signed_url))
289
290 @inlineCallbacks
291 @QtCore.pyqtSlot()
292 def on_add_folder_button_clicked(self):
293 """user clicked on the "Add Folder" button."""
294 folder = QtGui.QFileDialog.getExistingDirectory(
295 parent=self,
296 options=QtGui.QFileDialog.DontUseNativeDialog)
297 folder = unicode(QtCore.QDir.toNativeSeparators(folder))
298 if folder == '':
299 return
300
301 is_valid = yield self.cp_backend.validate_path_for_folder(folder)
302 if not is_valid:
303 user_home = os.path.expanduser('~')
304 text = FOLDER_INVALID_PATH % {'folder_path': folder,
305 'home_folder': user_home}
306 QtGui.QMessageBox.warning(self, '', text, QtGui.QMessageBox.Close)
307 return
308 item = yield self.add_folder(folder, validate=False, volume_id=False)
309 if item is not None:
310 item.setCheckState(0, QtCore.Qt.Checked)
3110
=== removed directory 'ubuntuone_installer/gui/qt/main'
=== removed file 'ubuntuone_installer/gui/qt/main/__init__.py'
--- ubuntuone_installer/gui/qt/main/__init__.py 2011-11-11 19:27:39 +0000
+++ ubuntuone_installer/gui/qt/main/__init__.py 1970-01-01 00:00:00 +0000
@@ -1,60 +0,0 @@
1# -*- coding: utf-8 -*-
2#
3# Copyright 2011 Canonical Ltd.
4#
5# This program is free software: you can redistribute it and/or modify it
6# under the terms of the GNU General Public License version 3, as published
7# by the Free Software Foundation.
8#
9# This program is distributed in the hope that it will be useful, but
10# WITHOUT ANY WARRANTY; without even the implied warranties of
11# MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
12# PURPOSE. See the GNU General Public License for more details.
13#
14# You should have received a copy of the GNU General Public License along
15# with this program. If not, see <http://www.gnu.org/licenses/>.
16
17"""Provide the correct reactor and ui integration."""
18
19import sys
20
21from PyQt4 import QtGui
22
23# Module used to include the resources into this file
24# Unused import images_rc, pylint: disable=W0611
25from ubuntuone_installer.gui.qt.ui import images_rc
26# pylint: enable=W0611
27
28
29# Invalid name "source", pylint: disable=C0103
30if sys.platform == 'win32':
31 from ubuntuone_installer.gui.qt.main import windows
32 source = windows
33else:
34 from ubuntuone_installer.gui.qt.main import linux
35 source = linux
36# pylint: enable=C0103
37
38
39def main(installing=False):
40 """Start the Qt reactor and open the main window."""
41 # The following cannot be imported outside this function
42 # because u1trial already provides a reactor.
43
44 # The main loop MUST be initialized before importing the reactor
45 app = QtGui.QApplication(sys.argv)
46 source.main(app)
47
48 # Reimport 'qt4reactor', 'reactor', pylint: disable=W0404
49 import qt4reactor
50 qt4reactor.install()
51
52 from twisted.internet import reactor
53 from ubuntuone_installer.gui.qt.utils import check_credentials
54 # pylint: enable=W0404
55
56 # Module 'reactor' has no 'run'/'stop' member, pylint: disable=E1101
57 reactor.callWhenRunning(check_credentials,
58 installing=installing, stop_cb=reactor.stop)
59 reactor.run()
60 # pylint: enable=E1101
610
=== removed file 'ubuntuone_installer/gui/qt/main/linux.py'
--- ubuntuone_installer/gui/qt/main/linux.py 2011-11-11 19:27:39 +0000
+++ ubuntuone_installer/gui/qt/main/linux.py 1970-01-01 00:00:00 +0000
@@ -1,30 +0,0 @@
1# -*- coding: utf-8 -*-
2#
3# Copyright 2011 Canonical Ltd.
4#
5# This program is free software: you can redistribute it and/or modify it
6# under the terms of the GNU General Public License version 3, as published
7# by the Free Software Foundation.
8#
9# This program is distributed in the hope that it will be useful, but
10# WITHOUT ANY WARRANTY; without even the implied warranties of
11# MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
12# PURPOSE. See the GNU General Public License for more details.
13#
14# You should have received a copy of the GNU General Public License along
15# with this program. If not, see <http://www.gnu.org/licenses/>.
16
17"""Main method to be used on linux."""
18
19from dbus.mainloop.qt import DBusQtMainLoop
20from PyQt4 import QtCore
21
22
23def main(app):
24 """Apply style sheet."""
25 # The DBus main loop MUST be initialized before importing the reactor
26 DBusQtMainLoop(set_as_default=True)
27
28 # Apply Style Sheet -- The linux version may be different
29 qss = QtCore.QResource(":/ubuntuone.qss")
30 app.setStyleSheet(qss.data())
310
=== removed file 'ubuntuone_installer/gui/qt/main/windows.py'
--- ubuntuone_installer/gui/qt/main/windows.py 2012-01-18 12:37:40 +0000
+++ ubuntuone_installer/gui/qt/main/windows.py 1970-01-01 00:00:00 +0000
@@ -1,33 +0,0 @@
1# -*- coding: utf-8 -*-
2#
3# Copyright 2011 Canonical Ltd.
4#
5# This program is free software: you can redistribute it and/or modify it
6# under the terms of the GNU General Public License version 3, as published
7# by the Free Software Foundation.
8#
9# This program is distributed in the hope that it will be useful, but
10# WITHOUT ANY WARRANTY; without even the implied warranties of
11# MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
12# PURPOSE. See the GNU General Public License for more details.
13#
14# You should have received a copy of the GNU General Public License along
15# with this program. If not, see <http://www.gnu.org/licenses/>.
16
17"""Main method to be used on windows."""
18
19from PyQt4 import QtGui, QtCore
20
21
22def main(app):
23 """Apply style sheet and fonts."""
24 # Apply font to the entire application
25 QtGui.QFontDatabase.addApplicationFont(':/Ubuntu-R.ttf')
26 QtGui.QFontDatabase.addApplicationFont(':/Ubuntu-B.ttf')
27
28 # Set Application Icon
29 app.setWindowIcon(QtGui.QIcon(":/ubuntu_one_favicon.png"))
30
31 # Apply Style Sheet -- The windows version may be different
32 qss = QtCore.QResource(":/ubuntuone.qss")
33 app.setStyleSheet(qss.data())
340
=== removed file 'ubuntuone_installer/gui/qt/network_detection.py'
--- ubuntuone_installer/gui/qt/network_detection.py 2012-01-25 12:37:01 +0000
+++ ubuntuone_installer/gui/qt/network_detection.py 1970-01-01 00:00:00 +0000
@@ -1,76 +0,0 @@
1# -*- coding: utf-8 *-*
2#
3# Copyright 2011 Canonical Ltd.
4#
5# This program is free software: you can redistribute it and/or modify it
6# under the terms of the GNU General Public License version 3, as published
7# by the Free Software Foundation.
8#
9# This program is distributed in the hope that it will be useful, but
10# WITHOUT ANY WARRANTY; without even the implied warranties of
11# MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
12# PURPOSE. See the GNU General Public License for more details.
13#
14# You should have received a copy of the GNU General Public License along
15# with this program. If not, see <http://www.gnu.org/licenses/>.
16
17"""Widget to show if we don't detect a network connection."""
18
19import gettext
20
21from twisted.internet import defer
22from PyQt4 import QtGui
23
24from ubuntu_sso import networkstate
25
26from ubuntuone_installer.gui.qt.ui import network_detection_ui
27
28_ = gettext.gettext
29
30
31class NetworkDetectionPage(QtGui.QWizardPage):
32
33 """Widget to show if we don't detect a network connection."""
34
35 def __init__(self, parent=None):
36 super(NetworkDetectionPage, self).__init__(parent)
37 self.setTitle(_("Installing Ubuntu One"))
38 self.ui = network_detection_ui.Ui_Form()
39 self.ui.setupUi(self)
40 self.btn_try_again = None
41
42 # pylint: disable=C0103
43 def initializePage(self):
44 """Set UI details."""
45 self.wizard()._next_id = None
46
47 self.setButtonText(QtGui.QWizard.CustomButton1, _("Try again"))
48 self.setButtonText(QtGui.QWizard.CancelButton,
49 _("Close window and set up later"))
50 self.wizard().setButtonLayout([
51 QtGui.QWizard.Stretch,
52 QtGui.QWizard.CustomButton1,
53 QtGui.QWizard.CancelButton,
54 ])
55
56 try:
57 self.wizard().customButtonClicked.disconnect()
58 except TypeError:
59 pass
60
61 self.btn_try_again = self.wizard().button(QtGui.QWizard.CustomButton1)
62 self.btn_try_again.setDefault(True)
63 self.btn_try_again.style().unpolish(self.btn_try_again)
64 self.btn_try_again.style().polish(self.btn_try_again)
65 self.wizard().customButtonClicked.connect(self.try_again)
66 # pylint: enable=C0103
67
68 @defer.inlineCallbacks
69 def try_again(self, button_id=QtGui.QWizard.CustomButton1):
70 """Test the connection again."""
71 if button_id == QtGui.QWizard.CustomButton1:
72 d = yield networkstate.is_machine_connected()
73 if d:
74 self.wizard()._next_id = self.wizard().SIGN_IN_PAGE_ID
75 self.wizard().next()
76 self.wizard()._next_id = None
770
=== removed file 'ubuntuone_installer/gui/qt/preferences.py'
--- ubuntuone_installer/gui/qt/preferences.py 2012-03-16 15:27:09 +0000
+++ ubuntuone_installer/gui/qt/preferences.py 1970-01-01 00:00:00 +0000
@@ -1,98 +0,0 @@
1# -*- coding: utf-8 -*-
2
3# Authors: Roberto Alsina <roberto.alsina@canonical.com>
4# Diego Sarmentero <diego.sarmentero@canonical.com>
5#
6# Copyright 2011 Canonical Ltd.
7#
8# This program is free software: you can redistribute it and/or modify it
9# under the terms of the GNU General Public License version 3, as published
10# by the Free Software Foundation.
11#
12# This program is distributed in the hope that it will be useful, but
13# WITHOUT ANY WARRANTY; without even the implied warranties of
14# MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
15# PURPOSE. See the GNU General Public License for more details.
16#
17# You should have received a copy of the GNU General Public License along
18# with this program. If not, see <http://www.gnu.org/licenses/>.
19
20"""Page to list folders in a Ubuntu One account."""
21
22import gettext
23
24from PyQt4 import QtGui
25from ubuntuone.controlpanel.gui.qt import preferences
26from ubuntu_sso.qt.gui import SSOWizardPage
27
28from ubuntuone_installer.gui.qt.ui import preferences_ui
29
30_ = gettext.gettext
31
32
33class PreferencesPage(SSOWizardPage):
34 """Wizard page to list and manage an account's folders."""
35
36 def __init__(self, parent=None):
37 super(PreferencesPage, self).__init__(
38 preferences_ui.Ui_Form(), None, parent)
39 self.preferences_widget = preferences.PreferencesPanel()
40 self.layout().addWidget(self.preferences_widget)
41 self.preferences_widget.ui.apply_changes_button.hide()
42 self.preferences_widget.ui.restore_defaults_button.hide()
43
44 # Invalid name "initializePage"
45 # pylint: disable=C0103
46
47 def initializePage(self):
48 """Initialize the page before the Wizard show it."""
49 self.wizard().setOption(QtGui.QWizard.HaveCustomButton1, True)
50 self.wizard().setOption(QtGui.QWizard.HaveCustomButton2, True)
51 # This is just to catch an exception thrown when nothing
52 # is connected to the signal. It's not an exceptional
53 # condition at all.
54 try:
55 self.wizard().customButtonClicked.disconnect()
56 except TypeError:
57 pass
58 self.wizard()._next_id = None
59 self.setButtonText(QtGui.QWizard.CustomButton1,
60 _("Apply these settings >"))
61 self.setButtonText(QtGui.QWizard.CustomButton2, _("Default settings"))
62
63 self.wizard().setButtonLayout([
64 QtGui.QWizard.BackButton,
65 QtGui.QWizard.Stretch,
66 QtGui.QWizard.CustomButton2,
67 QtGui.QWizard.CustomButton1])
68 self.wizard().button(QtGui.QWizard.CustomButton1).setDefault(True)
69 self.wizard().button(QtGui.QWizard.CustomButton1).style().unpolish(
70 self.wizard().button(QtGui.QWizard.CustomButton1))
71 self.wizard().button(QtGui.QWizard.CustomButton1).style().polish(
72 self.wizard().button(QtGui.QWizard.CustomButton1))
73
74 self.wizard().customButtonClicked.connect(self._button_clicked)
75
76 # pylint: enable=C0103
77
78 def _button_clicked(self, btn):
79 """Receive custom wizard buttons clicks."""
80 if btn == QtGui.QWizard.CustomButton1:
81 self.preferences_widget.on_apply_changes_button_clicked()
82 self.cleanupPage()
83 self.wizard().back()
84 elif btn == QtGui.QWizard.CustomButton2:
85 self.preferences_widget.on_restore_defaults_button_clicked()
86
87 # Invalid name "cleanupPage"
88 # pylint: disable=C0103
89 def cleanupPage(self):
90 """Execute this cleanup function when the back button is pressed."""
91 self.wizard().setOption(QtGui.QWizard.HaveCustomButton1, False)
92 self.wizard().setOption(QtGui.QWizard.HaveCustomButton2, False)
93 self.wizard().setButtonLayout([
94 QtGui.QWizard.BackButton,
95 QtGui.QWizard.Stretch,
96 QtGui.QWizard.NextButton])
97 self.wizard().folders_page.initializePage()
98 # pylint: enable=C0103
990
=== removed file 'ubuntuone_installer/gui/qt/setup_account.py'
--- ubuntuone_installer/gui/qt/setup_account.py 2012-03-16 15:27:09 +0000
+++ ubuntuone_installer/gui/qt/setup_account.py 1970-01-01 00:00:00 +0000
@@ -1,226 +0,0 @@
1# -*- coding: utf-8 -*-
2
3# Authors: Roberto Alsina <roberto.alsina@canonical.com>
4#
5# Copyright 2011 Canonical Ltd.
6#
7# This program is free software: you can redistribute it and/or modify it
8# under the terms of the GNU General Public License version 3, as published
9# by the Free Software Foundation.
10#
11# This program is distributed in the hope that it will be useful, but
12# WITHOUT ANY WARRANTY; without even the implied warranties of
13# MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
14# PURPOSE. See the GNU General Public License for more details.
15#
16# You should have received a copy of the GNU General Public License along
17# with this program. If not, see <http://www.gnu.org/licenses/>.
18
19"""Customized Setup Account page for SSO."""
20
21import gettext
22import re
23
24from PyQt4 import QtGui, QtCore
25
26from ubuntu_sso.qt import common
27from ubuntu_sso.qt import gui as sso_gui
28from ubuntu_sso.utils.ui import SET_UP_ACCOUNT_BUTTON
29
30from ubuntuone_installer.gui.qt import enhanced_check_box
31
32_ = gettext.gettext
33
34# pylint: disable=C0103
35ERROR = u'<font color="#df2d1f"><b> %s </b></font>'
36TITLE_STYLE = "<span style=\"font-size:24px\">%s</span>"
37
38EMAIL = _("Email")
39EMPTY_NAME = _("Please enter your name")
40INVALID_EMAIL = _("Please enter a valid email address")
41EMAIL_MATCH = _("The email addresses do not match")
42NAME = _("Name")
43PASSWORD = _("Create a password")
44RETYPE_EMAIL = _("Retype email")
45RETYPE_PASSWORD = _("Retype password")
46SUBTITLE = _("You only need to set up your account "
47 "once to get access to Ubuntu One across your devices.")
48TERMS = _("By signing up to Ubuntu One you agree to our "
49 "{terms_and_conditions} and {privacy_policy}")
50TERMS_LINK = _("<a href='https://one.ubuntu.com/terms/'>"
51 "<span style='color:#df2d1f;'>Terms of Service</span></a>")
52PRIVACY_POLICY_LINK = _("<a href='https://one.ubuntu.com/privacy/'>"
53 "<span style='color:#df2d1f;'>Privacy Policy"
54 "</span></a></font>")
55TITLE = _("Sign Up to Ubuntu One")
56
57
58class SetupAccountPage(sso_gui.SetupAccountPage):
59 """Customized Setup Account page for SSO."""
60
61 def __init__(self, *args, **kwargs):
62 super(SetupAccountPage, self).__init__(*args, **kwargs)
63 self.ui.password_edit.textEdited.connect(
64 lambda: common.password_assistance(self.ui.password_edit,
65 self.ui.password_assistance,
66 common.NORMAL))
67 terms = TERMS.format(terms_and_conditions=TERMS_LINK,
68 privacy_policy=PRIVACY_POLICY_LINK)
69 self.terms_checkbox = enhanced_check_box.EnhancedCheckBox(terms)
70 self.ui.hlayout_check.addWidget(self.terms_checkbox)
71
72 self.set_up_button = None
73 self.captcha_received = False
74
75 # Invalid name "initializePage"
76 # pylint: disable=C0103
77
78 def initializePage(self):
79 """Setup UI details."""
80 # We need to override some texts from SSO
81 # to match our spec
82 title_page = TITLE_STYLE % TITLE
83 self.setTitle(title_page)
84 self.setSubTitle(SUBTITLE)
85 # Set Setup Account button
86 self.wizard().setOption(QtGui.QWizard.HaveCustomButton3, True)
87 try:
88 self.wizard().customButtonClicked.disconnect()
89 except TypeError:
90 pass
91 self.setButtonText(QtGui.QWizard.CustomButton3, SET_UP_ACCOUNT_BUTTON)
92 self.set_up_button = self.wizard().button(QtGui.QWizard.CustomButton3)
93 self.set_up_button.clicked.connect(self.wizard().overlay.show)
94 self.set_up_button.clicked.connect(self.controller.set_next_validation)
95 self.set_up_button.setEnabled(False)
96
97 self.ui.name_label.setText(NAME)
98 self.ui.email_label.setText(EMAIL)
99 self.ui.confirm_email_label.setText(RETYPE_EMAIL)
100 self.ui.password_label.setText(PASSWORD)
101 self.ui.confirm_password_label.setText(RETYPE_PASSWORD)
102 self.ui.password_info_label.hide()
103
104 # Button setup
105 self.wizard().setButtonLayout([
106 QtGui.QWizard.BackButton,
107 QtGui.QWizard.Stretch,
108 QtGui.QWizard.CustomButton3])
109
110 common.password_default_assistance(self.ui.password_assistance)
111 # Hide assistance labels by default
112 self.ui.name_assistance.setVisible(False)
113 self.ui.email_assistance.setVisible(False)
114 self.ui.confirm_email_assistance.setVisible(False)
115 self.ui.password_assistance.setVisible(False)
116 self.ui.refresh_label.setVisible(True)
117
118 def focus_changed(self, old, now):
119 """Check who has the focus to activate password popups if necessary."""
120 if old == self.ui.name_edit:
121 self.name_assistance()
122 elif old == self.ui.email_edit:
123 self.email_assistance()
124 elif old == self.ui.confirm_email_edit:
125 self.confirm_email_assistance()
126 elif old == self.ui.confirm_password_edit:
127 common.password_check_match(self.ui.password_edit,
128 self.ui.confirm_password_edit,
129 self.ui.password_assistance)
130 if now == self.ui.password_edit:
131 self.ui.password_assistance.setVisible(True)
132
133 def name_assistance(self):
134 """Show help for the name field."""
135 text = unicode(self.ui.name_edit.text())
136 if not text.strip():
137 self.set_error_message(self.ui.name_assistance,
138 EMPTY_NAME)
139 common.check_as_invalid(self.ui.name_edit)
140 else:
141 self.ui.name_assistance.setVisible(False)
142 common.check_as_valid(self.ui.name_edit)
143
144 def email_assistance(self):
145 """Show help for the email field."""
146 text = unicode(self.ui.email_edit.text())
147 if not is_correct_email(text):
148 self.set_error_message(self.ui.email_assistance,
149 INVALID_EMAIL)
150 common.check_as_invalid(self.ui.email_edit)
151 else:
152 self.ui.email_assistance.setVisible(False)
153 common.check_as_valid(self.ui.email_edit)
154
155 def confirm_email_assistance(self):
156 """Show help for the confirm email field."""
157 text1 = unicode(self.ui.email_edit.text())
158 text2 = unicode(self.ui.confirm_email_edit.text())
159 if text1 != text2:
160 self.set_error_message(self.ui.confirm_email_assistance,
161 EMAIL_MATCH)
162 common.check_as_invalid(self.ui.confirm_email_edit)
163 else:
164 self.ui.confirm_email_assistance.setVisible(False)
165 common.check_as_valid(self.ui.confirm_email_edit)
166
167 def set_error_message(self, label, msg):
168 """Set the message to the proper label applying the error style."""
169 label.setText(ERROR % msg)
170 label.setVisible(True)
171
172 def showEvent(self, event):
173 """Set set_up_button as default button when the page is shown."""
174 # This method should stays here because if we move it to initializePage
175 # set_up_button won't take the proper style for hover and press
176 if self.set_up_button is not None:
177 self.set_up_button.setVisible(True)
178 self.set_up_button.setDefault(True)
179 if not self.set_up_button.isEnabled():
180 self.set_up_button.setProperty("DisabledState", True)
181 self.set_up_button.style().unpolish(self.set_up_button)
182 self.set_up_button.style().polish(self.set_up_button)
183 self.connect(QtGui.QApplication.instance(),
184 QtCore.SIGNAL("focusChanged(QWidget*, QWidget*)"),
185 self.focus_changed)
186 super(SetupAccountPage, self).showEvent(event)
187 if not self.captcha_received:
188 self.wizard().overlay.show()
189
190 def hideEvent(self, event):
191 """Disconnect the focusChanged signal when the page change."""
192 if self.set_up_button is not None:
193 self.set_up_button.setVisible(False)
194 try:
195 self.disconnect(QtGui.QApplication.instance(),
196 QtCore.SIGNAL("focusChanged(QWidget*, QWidget*)"),
197 self.focus_changed)
198 except TypeError:
199 pass
200 super(SetupAccountPage, self).hideEvent(event)
201
202 def on_captcha_refreshing(self):
203 """Show overlay when captcha is refreshing."""
204 if self.isVisible():
205 self.wizard().overlay.show()
206 self.captcha_received = False
207
208 def on_captcha_refresh_complete(self):
209 """Hide overlay when captcha finished refreshing."""
210 self.wizard().overlay.hide()
211 self.captcha_received = True
212
213
214def is_min_required_password(password):
215 """Return if the password meets the minimum requirements."""
216 if (len(password) < 8 or
217 re.search('[A-Z]', password) is None or
218 re.search('\d+', password) is None):
219 return False
220 return True
221
222
223# FIXME: this should do the same check as SSO's server side
224def is_correct_email(email_address):
225 """Return if the email is correct."""
226 return '@' in email_address
2270
=== removed file 'ubuntuone_installer/gui/qt/side_widget.py'
--- ubuntuone_installer/gui/qt/side_widget.py 2011-09-02 12:58:29 +0000
+++ ubuntuone_installer/gui/qt/side_widget.py 1970-01-01 00:00:00 +0000
@@ -1,69 +0,0 @@
1# -*- coding: utf-8 -*-
2
3# Authors: Roberto Alsina <roberto.alsina@canonical.com>
4#
5# Copyright 2011 Canonical Ltd.
6#
7# This program is free software: you can redistribute it and/or modify it
8# under the terms of the GNU General Public License version 3, as published
9# by the Free Software Foundation.
10#
11# This program is distributed in the hope that it will be useful, but
12# WITHOUT ANY WARRANTY; without even the implied warranties of
13# MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
14# PURPOSE. See the GNU General Public License for more details.
15#
16# You should have received a copy of the GNU General Public License along
17# with this program. If not, see <http://www.gnu.org/licenses/>.
18
19"""Wizard's side widget."""
20
21from PyQt4 import QtGui
22
23from ubuntuone_installer.gui.qt.ui import side_widget_ui
24# Module used ti include the resources into this file
25# pylint: disable=W0611
26from ubuntuone_installer.gui.qt.ui import images_rc
27# pylint: enable=W0611
28
29
30class SideWidget(QtGui.QFrame):
31
32 """Wizard's side widget."""
33
34 install_stage = 0
35 signin_stage = 1
36 select_sync_folders_stage = 2
37 sync_stage = 3
38
39 def __init__(self, *args, **kwargs):
40 super(SideWidget, self).__init__(*args, **kwargs)
41 self.ui = side_widget_ui.Ui_SideWidget()
42 self.ui.setupUi(self)
43 self.stage = 0
44
45 def set_stage(self, stage):
46 """Switch to the desired stage."""
47 self.stage = stage
48 self.ui.install_label.setEnabled(stage >= 0)
49 self.ui.sign_in_label.setEnabled(stage >= 1)
50 self.ui.select_folders_label.setEnabled(stage >= 2)
51 self.ui.sync_label.setEnabled(stage >= 3)
52 self.set_stage_icon(self.ui.install_icon_label, self.install_stage)
53 self.set_stage_icon(self.ui.sign_icon_label, self.signin_stage)
54 self.set_stage_icon(self.ui.folders_icon_label,
55 self.select_sync_folders_stage)
56 self.set_stage_icon(self.ui.sync_icon_label, self.sync_stage)
57
58 def set_stage_icon(self, label, label_stage):
59 """Set the label icon depending on the proper state."""
60 if self.stage == label_stage and label == self.ui.sync_icon_label:
61 label.setPixmap(QtGui.QPixmap(":/progress_finish_orange.png"))
62 elif self.stage == label_stage:
63 label.setPixmap(QtGui.QPixmap(":/progress_arrow_orange.png"))
64 elif self.stage > label_stage:
65 label.setPixmap(QtGui.QPixmap(":/progress_tick.png"))
66 elif label == self.ui.sync_icon_label:
67 label.setPixmap(QtGui.QPixmap(":/progress_finish_grey.png"))
68 else:
69 label.setPixmap(QtGui.QPixmap(":/progress_arrow_grey.png"))
700
=== removed file 'ubuntuone_installer/gui/qt/sync_now_or_later.py'
--- ubuntuone_installer/gui/qt/sync_now_or_later.py 2012-01-02 13:51:03 +0000
+++ ubuntuone_installer/gui/qt/sync_now_or_later.py 1970-01-01 00:00:00 +0000
@@ -1,83 +0,0 @@
1# -*- coding: utf-8 -*-
2#
3# Copyright 2011 Canonical Ltd.
4#
5# This program is free software: you can redistribute it and/or modify it
6# under the terms of the GNU General Public License version 3, as published
7# by the Free Software Foundation.
8#
9# This program is distributed in the hope that it will be useful, but
10# WITHOUT ANY WARRANTY; without even the implied warranties of
11# MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
12# PURPOSE. See the GNU General Public License for more details.
13#
14# You should have received a copy of the GNU General Public License along
15# with this program. If not, see <http://www.gnu.org/licenses/>.
16
17"""The user interface for the Ubuntu One Installer."""
18
19from PyQt4 import QtGui
20from twisted.internet.defer import inlineCallbacks
21from ubuntuone.controlpanel import backend
22
23from ubuntuone_installer.gui import NEXT
24from ubuntuone_installer.logger import setup_logging
25
26# Invalid name logger
27# pylint: disable=C0103
28logger = setup_logging('qt.sync_now_or_later')
29# pylint: enable=C0103
30
31
32class SyncNowOrLaterPage(QtGui.QWizardPage):
33 """User can choose whether to sync now, later, or selectively"""
34
35 def __init__(self, parent=None):
36 QtGui.QWizardPage.__init__(self, parent)
37 self.has_cloud_folders = False
38 self.cp_backend = None
39
40 # Invalid names of Qt-inherited methods
41 # pylint: disable=C0103
42
43 def initializePage(self):
44 """Setup UI details"""
45 self.wizard().setOption(QtGui.QWizard.HaveCustomButton1, False)
46 self.wizard().setOption(QtGui.QWizard.NoCancelButton, True)
47 self.wizard()._next_id = None
48 self.wizard().overlay.show()
49 self.wizard().setButtonText(QtGui.QWizard.NextButton,
50 NEXT)
The diff has been truncated for viewing.

Subscribers

People subscribed via source and target branches