Merge lp:~nataliabidart/ubuntuone-control-panel/stable-3-0-update-2.99.90 into lp:ubuntuone-control-panel/stable-3-0
- stable-3-0-update-2.99.90
- Merge into stable-3-0
Status: | Merged |
---|---|
Approved by: | Natalia Bidart |
Approved revision: | 253 |
Merged at revision: | 252 |
Proposed branch: | lp:~nataliabidart/ubuntuone-control-panel/stable-3-0-update-2.99.90 |
Merge into: | lp:ubuntuone-control-panel/stable-3-0 |
Diff against target: |
11249 lines (+1476/-8283) 75 files modified
bin/ubuntuone-control-panel-gtk (+0/-54) bin/ubuntuone-control-panel-qt (+8/-37) com.ubuntuone.controlpanel.gui.service.in (+0/-3) data/gtk/dashboard.ui (+0/-198) data/gtk/device.ui (+0/-279) data/gtk/devices.ui (+0/-44) data/gtk/install.ui (+0/-57) data/gtk/management.ui (+0/-334) data/gtk/overview.ui (+0/-308) data/gtk/services.ui (+0/-317) data/gtk/volumes.ui (+0/-98) data/qt/account.ui (+11/-5) data/qt/controlpanel.ui (+14/-11) data/qt/device.ui (+2/-2) data/qt/device_remote.ui (+1/-1) data/qt/devices.ui (+7/-4) data/qt/folders.ui (+16/-13) data/qt/images.qrc (+16/-11) data/qt/loadingoverlay.ui (+1/-4) data/qt/mainwindow.ui (+2/-2) data/qt/preferences.ui (+22/-19) data/qt/side_widget.ui (+214/-0) data/qt/signin.ui (+115/-155) data/qt/ubuntuone.qss (+48/-33) docs/ubuntuone-control-panel-gtk.1 (+0/-15) docs/ubuntuone-control-panel-qt.1 (+27/-0) po/POTFILES.in (+0/-8) run-tests (+3/-8) run-tests.bat (+1/-1) setup.py (+3/-40) ubuntuone/controlpanel/backend.py (+17/-4) ubuntuone/controlpanel/dbustests/test_gui_service.py (+0/-104) ubuntuone/controlpanel/gui/__init__.py (+57/-10) ubuntuone/controlpanel/gui/gtk/__init__.py (+0/-28) ubuntuone/controlpanel/gui/gtk/gui.py (+0/-1667) ubuntuone/controlpanel/gui/gtk/package_manager.py (+0/-62) ubuntuone/controlpanel/gui/gtk/tests/__init__.py (+0/-232) ubuntuone/controlpanel/gui/gtk/tests/test_gui.py (+0/-2179) ubuntuone/controlpanel/gui/gtk/tests/test_gui_basic.py (+0/-780) ubuntuone/controlpanel/gui/gtk/tests/test_package_manager.py (+0/-181) ubuntuone/controlpanel/gui/gtk/tests/test_widgets.py (+0/-205) ubuntuone/controlpanel/gui/gtk/widgets.py (+0/-362) ubuntuone/controlpanel/gui/qt/__init__.py (+2/-1) ubuntuone/controlpanel/gui/qt/account.py (+9/-1) ubuntuone/controlpanel/gui/qt/controlpanel.py (+41/-7) ubuntuone/controlpanel/gui/qt/device.py (+11/-1) ubuntuone/controlpanel/gui/qt/devices.py (+9/-1) ubuntuone/controlpanel/gui/qt/filesyncstatus.py (+3/-13) ubuntuone/controlpanel/gui/qt/folders.py (+18/-5) ubuntuone/controlpanel/gui/qt/gui.py (+5/-1) ubuntuone/controlpanel/gui/qt/loadingoverlay.py (+7/-0) ubuntuone/controlpanel/gui/qt/main/__init__.py (+36/-4) ubuntuone/controlpanel/gui/qt/main/tests/__init__.py (+17/-0) ubuntuone/controlpanel/gui/qt/main/tests/test_main.py (+105/-0) ubuntuone/controlpanel/gui/qt/main/windows.py (+0/-3) ubuntuone/controlpanel/gui/qt/preferences.py (+33/-1) ubuntuone/controlpanel/gui/qt/side_widget.py (+81/-0) ubuntuone/controlpanel/gui/qt/signin.py (+8/-59) ubuntuone/controlpanel/gui/qt/systray.py (+8/-4) ubuntuone/controlpanel/gui/qt/tests/__init__.py (+24/-71) ubuntuone/controlpanel/gui/qt/tests/test_account.py (+0/-5) ubuntuone/controlpanel/gui/qt/tests/test_addfolder.py (+0/-2) ubuntuone/controlpanel/gui/qt/tests/test_controlpanel.py (+19/-20) ubuntuone/controlpanel/gui/qt/tests/test_devices.py (+0/-5) ubuntuone/controlpanel/gui/qt/tests/test_filesyncstatus.py (+13/-26) ubuntuone/controlpanel/gui/qt/tests/test_folders.py (+16/-3) ubuntuone/controlpanel/gui/qt/tests/test_gui.py (+11/-1) ubuntuone/controlpanel/gui/qt/tests/test_preferences.py (+2/-16) ubuntuone/controlpanel/gui/qt/tests/test_side_widget.py (+90/-0) ubuntuone/controlpanel/gui/qt/tests/test_signin.py (+39/-147) ubuntuone/controlpanel/gui/qt/tests/test_wizard.py (+158/-0) ubuntuone/controlpanel/gui/qt/ui/__init__.py (+1/-3) ubuntuone/controlpanel/gui/qt/wizard.py (+110/-0) ubuntuone/controlpanel/gui/tests/__init__.py (+14/-7) ubuntuone/controlpanel/tests/test_web_client.py (+1/-1) |
To merge this branch: | bzr merge lp:~nataliabidart/ubuntuone-control-panel/stable-3-0-update-2.99.90 |
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Roberto Alsina (community) | Approve | ||
Review via email: mp+96155@code.launchpad.net |
Commit message
- Updating from trunk up to revno 276:
[ Natalia B. Bidart <email address hidden> ]
- Increasing timeout for webclient tests.
- Changed the initial signin page so both login and register options
are shown, and when clicked, the user is presented with either the Qt
login dialog, or the Qt registration dialog (LP: #933576).
- 'Apply these settings' button should be at the topmost right corner
in the Settings tab (LP: #944120).
- Handle properly default/non-default buttons (part of LP: #933576).
- Avoid AlreadyInstalle
- No more strings coming up from the Designer ui files (LP: #938626).
- Make gettext return unicode so we can format strings
with unicode variables (LP: #937809).
[ Roberto Alsina <email address hidden> ]
- Added a barebones manpage for ubuntuone-
(LP: #933021).
- Reset the signal handler so that ctrl+c works (LP: #944012).
- Preserved the scrollbar position when clearing/filling the folder
list (LP: #942355).
- Added keyboard shortcuts for quitting the control panel
(LP: #900753).
- Cleanup the ubuntuone-
the main module (LP: #938102).
- Parse Qt options correctly (LP: #910834).
- Migrated to argparse.
[ Rodney Dawes <email address hidden> ]
- Remove the GTK+ 2.x control panel
(LP: #934270).
- Pass ubuntuone-installer as app name to QApplication to avoid
duplication (LP: #939691).
Description of the change
Preview Diff
1 | === removed file 'bin/ubuntuone-control-panel-gtk' |
2 | --- bin/ubuntuone-control-panel-gtk 2012-01-18 14:09:16 +0000 |
3 | +++ bin/ubuntuone-control-panel-gtk 1970-01-01 00:00:00 +0000 |
4 | @@ -1,54 +0,0 @@ |
5 | -#!/usr/bin/python |
6 | -# -*- coding: utf-8 -*- |
7 | - |
8 | -# Authors: Natalia B Bidart <natalia.bidart@canonical.com> |
9 | -# Eric Casteleijn <eric.casteleijn@canonical.com> |
10 | -# |
11 | -# Copyright 2010 Canonical Ltd. |
12 | -# |
13 | -# This program is free software: you can redistribute it and/or modify it |
14 | -# under the terms of the GNU General Public License version 3, as published |
15 | -# by the Free Software Foundation. |
16 | -# |
17 | -# This program is distributed in the hope that it will be useful, but |
18 | -# WITHOUT ANY WARRANTY; without even the implied warranties of |
19 | -# MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR |
20 | -# PURPOSE. See the GNU General Public License for more details. |
21 | -# |
22 | -# You should have received a copy of the GNU General Public License along |
23 | -# with this program. If not, see <http://www.gnu.org/licenses/>. |
24 | -"""Execute the graphical interface for the Ubuntu One control panel.""" |
25 | - |
26 | -# Invalid name "ubuntuone-control-panel-gtk", pylint: disable=C0103 |
27 | - |
28 | -import gettext |
29 | -import sys |
30 | - |
31 | -from optparse import OptionParser |
32 | - |
33 | -from ubuntuone.controlpanel import TRANSLATION_DOMAIN |
34 | - |
35 | -gettext.textdomain(TRANSLATION_DOMAIN) |
36 | -# import the GUI after the translation domain has been set |
37 | -from ubuntuone.controlpanel.gui.gtk import main |
38 | - |
39 | - |
40 | -def parser_options(): |
41 | - """Parse command line parameters.""" |
42 | - usage = "Usage: %prog [option]" |
43 | - result = OptionParser(usage=usage) |
44 | - result.add_option("", "--switch-to", dest="switch_to", type="string", |
45 | - metavar="PANEL_NAME", default="", |
46 | - help="Start Ubuntu One in the " |
47 | - "PANEL_NAME tab. Possible values are: " |
48 | - "dashboard, volumes, devices, applications") |
49 | - result.add_option("-a", "--alert", dest="alert", action="store_true", |
50 | - default=False, help="Start Ubuntu One " |
51 | - "alerting the user to its presence.") |
52 | - return result |
53 | - |
54 | - |
55 | -if __name__ == "__main__": |
56 | - parser = parser_options() |
57 | - (options, args) = parser.parse_args(sys.argv) |
58 | - main(switch_to=options.switch_to, alert=options.alert) |
59 | |
60 | === modified file 'bin/ubuntuone-control-panel-qt' |
61 | --- bin/ubuntuone-control-panel-qt 2012-01-18 14:09:16 +0000 |
62 | +++ bin/ubuntuone-control-panel-qt 2012-03-06 15:41:39 +0000 |
63 | @@ -1,8 +1,5 @@ |
64 | #!/usr/bin/python |
65 | # -*- coding: utf-8 -*- |
66 | - |
67 | -# Authors: Natalia B Bidart <natalia.bidart@canonical.com> |
68 | -# Eric Casteleijn <eric.casteleijn@canonical.com> |
69 | # |
70 | # Copyright 2010 Canonical Ltd. |
71 | # |
72 | @@ -17,47 +14,21 @@ |
73 | # |
74 | # You should have received a copy of the GNU General Public License along |
75 | # with this program. If not, see <http://www.gnu.org/licenses/>. |
76 | + |
77 | """Execute the graphical interface for the Ubuntu One control panel.""" |
78 | |
79 | # Invalid name "ubuntuone-control-panel-qt", pylint: disable=C0103 |
80 | |
81 | -import gettext |
82 | +import signal |
83 | import sys |
84 | |
85 | -from optparse import OptionParser |
86 | - |
87 | -from ubuntuone.controlpanel import TRANSLATION_DOMAIN |
88 | - |
89 | -gettext.textdomain(TRANSLATION_DOMAIN) |
90 | -# import the GUI after the translation domain has been set |
91 | +if sys.platform == 'win32': |
92 | + import qt4reactor |
93 | + qt4reactor.install() |
94 | + |
95 | from ubuntuone.controlpanel.gui.qt import main |
96 | |
97 | |
98 | -def parser_options(): |
99 | - """Parse command line parameters.""" |
100 | - usage = "Usage: %prog [option]" |
101 | - result = OptionParser(usage=usage) |
102 | - result.add_option("", "--switch-to", dest="switch_to", type="string", |
103 | - metavar="PANEL_NAME", default="", |
104 | - help="Start Ubuntu One in the " |
105 | - "PANEL_NAME tab. Possible values are: " |
106 | - "dashboard, volumes, devices, applications") |
107 | - result.add_option("-a", "--alert", dest="alert", action="store_true", |
108 | - default=False, help="Start Ubuntu One " |
109 | - "alerting the user to its presence.") |
110 | - result.add_option("--minimized", dest="minimized", action="store_true", |
111 | - default=False, help="Start Ubuntu One " |
112 | - "only in the notification area, with no visible window. " |
113 | - "Implies --with-icon") |
114 | - result.add_option("--with-icon", dest="with_icon", action="store_true", |
115 | - default=False, help="Start Ubuntu One " |
116 | - "with an icon in the notification area.") |
117 | - return result |
118 | - |
119 | - |
120 | if __name__ == "__main__": |
121 | - parser = parser_options() |
122 | - (options, args) = parser.parse_args(sys.argv) |
123 | - main.main(switch_to=options.switch_to, |
124 | - alert=options.alert, minimized=options.minimized, |
125 | - with_icon=options.with_icon) |
126 | + signal.signal(signal.SIGINT, signal.SIG_DFL) |
127 | + main.main(sys.argv) |
128 | |
129 | === removed file 'com.ubuntuone.controlpanel.gui.service.in' |
130 | --- com.ubuntuone.controlpanel.gui.service.in 2011-03-22 13:04:38 +0000 |
131 | +++ com.ubuntuone.controlpanel.gui.service.in 1970-01-01 00:00:00 +0000 |
132 | @@ -1,3 +0,0 @@ |
133 | -[D-BUS Service] |
134 | -Name=com.ubuntuone.controlpanel.gui |
135 | -Exec=@prefix@/bin/ubuntuone-control-panel-gtk |
136 | |
137 | === added file 'data/banner.png' |
138 | Binary files data/banner.png 1970-01-01 00:00:00 +0000 and data/banner.png 2012-03-06 15:41:39 +0000 differ |
139 | === removed directory 'data/gtk' |
140 | === removed file 'data/gtk/dashboard.ui' |
141 | --- data/gtk/dashboard.ui 2011-07-11 11:19:09 +0000 |
142 | +++ data/gtk/dashboard.ui 1970-01-01 00:00:00 +0000 |
143 | @@ -1,198 +0,0 @@ |
144 | -<?xml version="1.0" encoding="UTF-8"?> |
145 | -<interface> |
146 | - <requires lib="gtk+" version="2.22"/> |
147 | - <!-- interface-naming-policy project-wide --> |
148 | - <object class="GtkAlignment" id="itself"> |
149 | - <property name="visible">True</property> |
150 | - <property name="can_focus">False</property> |
151 | - <property name="yalign">0</property> |
152 | - <property name="yscale">0</property> |
153 | - <child> |
154 | - <object class="GtkHBox" id="account"> |
155 | - <property name="visible">True</property> |
156 | - <property name="can_focus">False</property> |
157 | - <property name="border_width">12</property> |
158 | - <property name="spacing">12</property> |
159 | - <child> |
160 | - <object class="GtkFrame" id="frame2"> |
161 | - <property name="visible">True</property> |
162 | - <property name="can_focus">False</property> |
163 | - <property name="label_xalign">0</property> |
164 | - <property name="shadow_type">out</property> |
165 | - <child> |
166 | - <object class="GtkAlignment" id="alignment2"> |
167 | - <property name="visible">True</property> |
168 | - <property name="can_focus">False</property> |
169 | - <property name="top_padding">12</property> |
170 | - <property name="bottom_padding">12</property> |
171 | - <property name="left_padding">12</property> |
172 | - <property name="right_padding">12</property> |
173 | - <child> |
174 | - <object class="GtkVBox" id="vbox5"> |
175 | - <property name="visible">True</property> |
176 | - <property name="can_focus">False</property> |
177 | - <property name="spacing">12</property> |
178 | - <child> |
179 | - <object class="GtkLabel" id="name_label"> |
180 | - <property name="visible">True</property> |
181 | - <property name="can_focus">False</property> |
182 | - <property name="xalign">0</property> |
183 | - <property name="label">tester name</property> |
184 | - <property name="use_markup">True</property> |
185 | - </object> |
186 | - <packing> |
187 | - <property name="expand">False</property> |
188 | - <property name="fill">True</property> |
189 | - <property name="position">0</property> |
190 | - </packing> |
191 | - </child> |
192 | - <child> |
193 | - <object class="GtkLabel" id="email_label"> |
194 | - <property name="visible">True</property> |
195 | - <property name="can_focus">False</property> |
196 | - <property name="xalign">0</property> |
197 | - <property name="label">a@example.com</property> |
198 | - </object> |
199 | - <packing> |
200 | - <property name="expand">False</property> |
201 | - <property name="fill">True</property> |
202 | - <property name="position">1</property> |
203 | - </packing> |
204 | - </child> |
205 | - <child> |
206 | - <object class="GtkHButtonBox" id="hbuttonbox1"> |
207 | - <property name="visible">True</property> |
208 | - <property name="can_focus">False</property> |
209 | - <child> |
210 | - <object class="GtkLinkButton" id="linkbutton3"> |
211 | - <property name="label" translatable="yes">Edit account details</property> |
212 | - <property name="visible">True</property> |
213 | - <property name="can_focus">True</property> |
214 | - <property name="receives_default">True</property> |
215 | - <property name="use_action_appearance">False</property> |
216 | - <property name="relief">half</property> |
217 | - <property name="uri">http://login.ubuntu.com</property> |
218 | - </object> |
219 | - <packing> |
220 | - <property name="expand">False</property> |
221 | - <property name="fill">False</property> |
222 | - <property name="pack_type">end</property> |
223 | - <property name="position">0</property> |
224 | - </packing> |
225 | - </child> |
226 | - </object> |
227 | - <packing> |
228 | - <property name="expand">False</property> |
229 | - <property name="fill">True</property> |
230 | - <property name="pack_type">end</property> |
231 | - <property name="position">2</property> |
232 | - </packing> |
233 | - </child> |
234 | - </object> |
235 | - </child> |
236 | - </object> |
237 | - </child> |
238 | - <child type="label"> |
239 | - <object class="GtkLabel" id="label1"> |
240 | - <property name="visible">True</property> |
241 | - <property name="can_focus">False</property> |
242 | - <property name="label" translatable="yes"><b>Personal details</b></property> |
243 | - <property name="use_markup">True</property> |
244 | - </object> |
245 | - </child> |
246 | - </object> |
247 | - <packing> |
248 | - <property name="expand">True</property> |
249 | - <property name="fill">True</property> |
250 | - <property name="position">0</property> |
251 | - </packing> |
252 | - </child> |
253 | - <child> |
254 | - <object class="GtkFrame" id="frame1"> |
255 | - <property name="visible">True</property> |
256 | - <property name="can_focus">False</property> |
257 | - <property name="label_xalign">0</property> |
258 | - <property name="shadow_type">out</property> |
259 | - <child> |
260 | - <object class="GtkAlignment" id="alignment3"> |
261 | - <property name="visible">True</property> |
262 | - <property name="can_focus">False</property> |
263 | - <property name="top_padding">12</property> |
264 | - <property name="bottom_padding">12</property> |
265 | - <property name="left_padding">12</property> |
266 | - <property name="right_padding">12</property> |
267 | - <child> |
268 | - <object class="GtkVBox" id="vbox4"> |
269 | - <property name="visible">True</property> |
270 | - <property name="can_focus">False</property> |
271 | - <property name="spacing">12</property> |
272 | - <child> |
273 | - <object class="GtkLabel" id="type_label"> |
274 | - <property name="visible">True</property> |
275 | - <property name="can_focus">False</property> |
276 | - <property name="xalign">0</property> |
277 | - <property name="label">Ubuntu One Basic (2 GB) |
278 | -22GB of awesomeness |
279 | -Total storage 22GB |
280 | -You also have a mobile plan! |
281 | -This is great!</property> |
282 | - </object> |
283 | - <packing> |
284 | - <property name="expand">False</property> |
285 | - <property name="fill">True</property> |
286 | - <property name="position">0</property> |
287 | - </packing> |
288 | - </child> |
289 | - <child> |
290 | - <object class="GtkHButtonBox" id="hbuttonbox2"> |
291 | - <property name="visible">True</property> |
292 | - <property name="can_focus">False</property> |
293 | - <child> |
294 | - <object class="GtkLinkButton" id="linkbutton1"> |
295 | - <property name="label" translatable="yes">Buy storage and plans</property> |
296 | - <property name="visible">True</property> |
297 | - <property name="can_focus">True</property> |
298 | - <property name="receives_default">True</property> |
299 | - <property name="use_action_appearance">False</property> |
300 | - <property name="relief">half</property> |
301 | - <property name="uri">https://one.ubuntu.com/plans/</property> |
302 | - </object> |
303 | - <packing> |
304 | - <property name="expand">False</property> |
305 | - <property name="fill">False</property> |
306 | - <property name="pack_type">end</property> |
307 | - <property name="position">0</property> |
308 | - </packing> |
309 | - </child> |
310 | - </object> |
311 | - <packing> |
312 | - <property name="expand">False</property> |
313 | - <property name="fill">True</property> |
314 | - <property name="pack_type">end</property> |
315 | - <property name="position">1</property> |
316 | - </packing> |
317 | - </child> |
318 | - </object> |
319 | - </child> |
320 | - </object> |
321 | - </child> |
322 | - <child type="label"> |
323 | - <object class="GtkLabel" id="label3"> |
324 | - <property name="visible">True</property> |
325 | - <property name="can_focus">False</property> |
326 | - <property name="label" translatable="yes"><b>Your services</b></property> |
327 | - <property name="use_markup">True</property> |
328 | - </object> |
329 | - </child> |
330 | - </object> |
331 | - <packing> |
332 | - <property name="expand">True</property> |
333 | - <property name="fill">True</property> |
334 | - <property name="pack_type">end</property> |
335 | - <property name="position">1</property> |
336 | - </packing> |
337 | - </child> |
338 | - </object> |
339 | - </child> |
340 | - </object> |
341 | -</interface> |
342 | |
343 | === removed file 'data/gtk/device.ui' |
344 | --- data/gtk/device.ui 2011-07-11 11:19:09 +0000 |
345 | +++ data/gtk/device.ui 1970-01-01 00:00:00 +0000 |
346 | @@ -1,279 +0,0 @@ |
347 | -<?xml version="1.0" encoding="UTF-8"?> |
348 | -<interface> |
349 | - <requires lib="gtk+" version="2.22"/> |
350 | - <!-- interface-naming-policy project-wide --> |
351 | - <object class="GtkAdjustment" id="adjustment1"> |
352 | - <property name="upper">10000</property> |
353 | - <property name="step_increment">1</property> |
354 | - </object> |
355 | - <object class="GtkAdjustment" id="adjustment2"> |
356 | - <property name="upper">10000</property> |
357 | - <property name="step_increment">1</property> |
358 | - </object> |
359 | - <object class="GtkVBox" id="itself"> |
360 | - <property name="visible">True</property> |
361 | - <property name="can_focus">False</property> |
362 | - <property name="border_width">10</property> |
363 | - <property name="spacing">5</property> |
364 | - <child> |
365 | - <object class="GtkHBox" id="hbox1"> |
366 | - <property name="visible">True</property> |
367 | - <property name="can_focus">False</property> |
368 | - <property name="spacing">10</property> |
369 | - <child> |
370 | - <object class="GtkVBox" id="vbox1"> |
371 | - <property name="visible">True</property> |
372 | - <property name="can_focus">False</property> |
373 | - <property name="spacing">5</property> |
374 | - <child> |
375 | - <object class="GtkHBox" id="hbox2"> |
376 | - <property name="visible">True</property> |
377 | - <property name="can_focus">False</property> |
378 | - <child> |
379 | - <object class="GtkImage" id="device_type"> |
380 | - <property name="visible">True</property> |
381 | - <property name="can_focus">False</property> |
382 | - <property name="icon_name">computer</property> |
383 | - </object> |
384 | - <packing> |
385 | - <property name="expand">False</property> |
386 | - <property name="fill">True</property> |
387 | - <property name="position">0</property> |
388 | - </packing> |
389 | - </child> |
390 | - <child> |
391 | - <object class="GtkLabel" id="device_name"> |
392 | - <property name="visible">True</property> |
393 | - <property name="can_focus">False</property> |
394 | - <property name="xalign">0</property> |
395 | - <property name="xpad">5</property> |
396 | - <property name="label">My Laptop</property> |
397 | - <property name="wrap">True</property> |
398 | - </object> |
399 | - <packing> |
400 | - <property name="expand">True</property> |
401 | - <property name="fill">True</property> |
402 | - <property name="position">1</property> |
403 | - </packing> |
404 | - </child> |
405 | - </object> |
406 | - <packing> |
407 | - <property name="expand">True</property> |
408 | - <property name="fill">True</property> |
409 | - <property name="position">0</property> |
410 | - </packing> |
411 | - </child> |
412 | - <child> |
413 | - <object class="GtkAlignment" id="alignment1"> |
414 | - <property name="visible">True</property> |
415 | - <property name="can_focus">False</property> |
416 | - <property name="left_padding">25</property> |
417 | - <child> |
418 | - <object class="GtkVBox" id="config_settings"> |
419 | - <property name="visible">True</property> |
420 | - <property name="can_focus">False</property> |
421 | - <child> |
422 | - <object class="GtkCheckButton" id="show_all_notifications"> |
423 | - <property name="label" translatable="yes">Show activity notifications</property> |
424 | - <property name="visible">True</property> |
425 | - <property name="can_focus">True</property> |
426 | - <property name="receives_default">False</property> |
427 | - <property name="use_action_appearance">False</property> |
428 | - <property name="draw_indicator">True</property> |
429 | - <signal name="toggled" handler="on_show_all_notifications_toggled" swapped="no"/> |
430 | - </object> |
431 | - <packing> |
432 | - <property name="expand">True</property> |
433 | - <property name="fill">True</property> |
434 | - <property name="position">0</property> |
435 | - </packing> |
436 | - </child> |
437 | - <child> |
438 | - <object class="GtkVBox" id="throttling"> |
439 | - <property name="visible">True</property> |
440 | - <property name="can_focus">False</property> |
441 | - <child> |
442 | - <object class="GtkCheckButton" id="limit_bandwidth"> |
443 | - <property name="label" translatable="yes">Limit file sync bandwidth usage</property> |
444 | - <property name="visible">True</property> |
445 | - <property name="can_focus">True</property> |
446 | - <property name="receives_default">False</property> |
447 | - <property name="use_action_appearance">False</property> |
448 | - <property name="draw_indicator">True</property> |
449 | - <signal name="toggled" handler="on_limit_bandwidth_toggled" swapped="no"/> |
450 | - </object> |
451 | - <packing> |
452 | - <property name="expand">True</property> |
453 | - <property name="fill">True</property> |
454 | - <property name="position">0</property> |
455 | - </packing> |
456 | - </child> |
457 | - <child> |
458 | - <object class="GtkTable" id="throttling_limits"> |
459 | - <property name="visible">True</property> |
460 | - <property name="can_focus">False</property> |
461 | - <property name="n_rows">2</property> |
462 | - <property name="n_columns">3</property> |
463 | - <property name="column_spacing">3</property> |
464 | - <property name="row_spacing">3</property> |
465 | - <child> |
466 | - <object class="GtkLabel" id="max_upload_speed_label"> |
467 | - <property name="visible">True</property> |
468 | - <property name="can_focus">False</property> |
469 | - <property name="xalign">0</property> |
470 | - <property name="xpad">22</property> |
471 | - <property name="label" translatable="yes">Max upload speed:</property> |
472 | - <property name="track_visited_links">False</property> |
473 | - </object> |
474 | - </child> |
475 | - <child> |
476 | - <object class="GtkLabel" id="max_download_speed_label"> |
477 | - <property name="visible">True</property> |
478 | - <property name="can_focus">False</property> |
479 | - <property name="xalign">0</property> |
480 | - <property name="xpad">22</property> |
481 | - <property name="label" translatable="yes">Max download speed:</property> |
482 | - </object> |
483 | - <packing> |
484 | - <property name="top_attach">1</property> |
485 | - <property name="bottom_attach">2</property> |
486 | - </packing> |
487 | - </child> |
488 | - <child> |
489 | - <object class="GtkSpinButton" id="max_upload_speed"> |
490 | - <property name="visible">True</property> |
491 | - <property name="can_focus">True</property> |
492 | - <property name="invisible_char">•</property> |
493 | - <property name="activates_default">True</property> |
494 | - <property name="invisible_char_set">True</property> |
495 | - <property name="adjustment">adjustment1</property> |
496 | - <signal name="value-changed" handler="on_max_upload_speed_value_changed" swapped="no"/> |
497 | - </object> |
498 | - <packing> |
499 | - <property name="left_attach">1</property> |
500 | - <property name="right_attach">2</property> |
501 | - <property name="x_options">GTK_FILL</property> |
502 | - <property name="y_options">GTK_FILL</property> |
503 | - </packing> |
504 | - </child> |
505 | - <child> |
506 | - <object class="GtkSpinButton" id="max_download_speed"> |
507 | - <property name="visible">True</property> |
508 | - <property name="can_focus">True</property> |
509 | - <property name="invisible_char">•</property> |
510 | - <property name="activates_default">True</property> |
511 | - <property name="invisible_char_set">True</property> |
512 | - <property name="adjustment">adjustment2</property> |
513 | - <signal name="value-changed" handler="on_max_download_speed_value_changed" swapped="no"/> |
514 | - </object> |
515 | - <packing> |
516 | - <property name="left_attach">1</property> |
517 | - <property name="right_attach">2</property> |
518 | - <property name="top_attach">1</property> |
519 | - <property name="bottom_attach">2</property> |
520 | - </packing> |
521 | - </child> |
522 | - <child> |
523 | - <object class="GtkLabel" id="label1"> |
524 | - <property name="visible">True</property> |
525 | - <property name="can_focus">False</property> |
526 | - <property name="label" translatable="yes">KiB/s</property> |
527 | - </object> |
528 | - <packing> |
529 | - <property name="left_attach">2</property> |
530 | - <property name="right_attach">3</property> |
531 | - </packing> |
532 | - </child> |
533 | - <child> |
534 | - <object class="GtkLabel" id="label2"> |
535 | - <property name="visible">True</property> |
536 | - <property name="can_focus">False</property> |
537 | - <property name="label" translatable="yes">KiB/s</property> |
538 | - </object> |
539 | - <packing> |
540 | - <property name="left_attach">2</property> |
541 | - <property name="right_attach">3</property> |
542 | - <property name="top_attach">1</property> |
543 | - <property name="bottom_attach">2</property> |
544 | - </packing> |
545 | - </child> |
546 | - </object> |
547 | - <packing> |
548 | - <property name="expand">True</property> |
549 | - <property name="fill">True</property> |
550 | - <property name="position">1</property> |
551 | - </packing> |
552 | - </child> |
553 | - </object> |
554 | - <packing> |
555 | - <property name="expand">True</property> |
556 | - <property name="fill">True</property> |
557 | - <property name="position">1</property> |
558 | - </packing> |
559 | - </child> |
560 | - </object> |
561 | - </child> |
562 | - </object> |
563 | - <packing> |
564 | - <property name="expand">False</property> |
565 | - <property name="fill">True</property> |
566 | - <property name="position">1</property> |
567 | - </packing> |
568 | - </child> |
569 | - </object> |
570 | - <packing> |
571 | - <property name="expand">False</property> |
572 | - <property name="fill">True</property> |
573 | - <property name="position">0</property> |
574 | - </packing> |
575 | - </child> |
576 | - <child> |
577 | - <object class="GtkVButtonBox" id="vbuttonbox1"> |
578 | - <property name="visible">True</property> |
579 | - <property name="can_focus">False</property> |
580 | - <property name="layout_style">start</property> |
581 | - <child> |
582 | - <object class="GtkButton" id="remove"> |
583 | - <property name="label">gtk-remove</property> |
584 | - <property name="visible">True</property> |
585 | - <property name="can_focus">True</property> |
586 | - <property name="receives_default">True</property> |
587 | - <property name="use_action_appearance">False</property> |
588 | - <property name="use_stock">True</property> |
589 | - <signal name="activate" handler="on_remove_clicked" swapped="no"/> |
590 | - <signal name="clicked" handler="on_remove_clicked" swapped="no"/> |
591 | - </object> |
592 | - <packing> |
593 | - <property name="expand">False</property> |
594 | - <property name="fill">False</property> |
595 | - <property name="position">0</property> |
596 | - </packing> |
597 | - </child> |
598 | - </object> |
599 | - <packing> |
600 | - <property name="expand">False</property> |
601 | - <property name="fill">True</property> |
602 | - <property name="pack_type">end</property> |
603 | - <property name="position">1</property> |
604 | - </packing> |
605 | - </child> |
606 | - </object> |
607 | - <packing> |
608 | - <property name="expand">False</property> |
609 | - <property name="fill">True</property> |
610 | - <property name="position">0</property> |
611 | - </packing> |
612 | - </child> |
613 | - <child> |
614 | - <object class="GtkLabel" id="warning_label"> |
615 | - <property name="visible">True</property> |
616 | - <property name="can_focus">False</property> |
617 | - </object> |
618 | - <packing> |
619 | - <property name="expand">True</property> |
620 | - <property name="fill">True</property> |
621 | - <property name="position">1</property> |
622 | - </packing> |
623 | - </child> |
624 | - </object> |
625 | -</interface> |
626 | |
627 | === removed file 'data/gtk/devices.ui' |
628 | --- data/gtk/devices.ui 2011-07-11 11:19:09 +0000 |
629 | +++ data/gtk/devices.ui 1970-01-01 00:00:00 +0000 |
630 | @@ -1,44 +0,0 @@ |
631 | -<?xml version="1.0" encoding="UTF-8"?> |
632 | -<interface> |
633 | - <requires lib="gtk+" version="2.22"/> |
634 | - <!-- interface-naming-policy project-wide --> |
635 | - <object class="GtkVBox" id="itself"> |
636 | - <property name="visible">True</property> |
637 | - <property name="can_focus">False</property> |
638 | - <child> |
639 | - <object class="GtkScrolledWindow" id="scrolledwindow1"> |
640 | - <property name="visible">True</property> |
641 | - <property name="can_focus">True</property> |
642 | - <property name="hscrollbar_policy">automatic</property> |
643 | - <property name="vscrollbar_policy">automatic</property> |
644 | - <child> |
645 | - <object class="GtkViewport" id="viewport1"> |
646 | - <property name="visible">True</property> |
647 | - <property name="can_focus">False</property> |
648 | - <property name="resize_mode">queue</property> |
649 | - <child> |
650 | - <object class="GtkAlignment" id="alignment1"> |
651 | - <property name="visible">True</property> |
652 | - <property name="can_focus">False</property> |
653 | - <child> |
654 | - <object class="GtkVBox" id="devices"> |
655 | - <property name="visible">True</property> |
656 | - <property name="can_focus">False</property> |
657 | - <child> |
658 | - <placeholder/> |
659 | - </child> |
660 | - </object> |
661 | - </child> |
662 | - </object> |
663 | - </child> |
664 | - </object> |
665 | - </child> |
666 | - </object> |
667 | - <packing> |
668 | - <property name="expand">True</property> |
669 | - <property name="fill">True</property> |
670 | - <property name="position">0</property> |
671 | - </packing> |
672 | - </child> |
673 | - </object> |
674 | -</interface> |
675 | |
676 | === removed file 'data/gtk/install.ui' |
677 | --- data/gtk/install.ui 2011-07-11 11:19:09 +0000 |
678 | +++ data/gtk/install.ui 1970-01-01 00:00:00 +0000 |
679 | @@ -1,57 +0,0 @@ |
680 | -<?xml version="1.0" encoding="UTF-8"?> |
681 | -<interface> |
682 | - <requires lib="gtk+" version="2.22"/> |
683 | - <!-- interface-naming-policy project-wide --> |
684 | - <object class="GtkImage" id="image1"> |
685 | - <property name="visible">True</property> |
686 | - <property name="can_focus">False</property> |
687 | - <property name="stock">gtk-ok</property> |
688 | - </object> |
689 | - <object class="GtkVBox" id="itself"> |
690 | - <property name="visible">True</property> |
691 | - <property name="can_focus">False</property> |
692 | - <property name="border_width">10</property> |
693 | - <property name="spacing">10</property> |
694 | - <child> |
695 | - <object class="GtkLabel" id="install_label"> |
696 | - <property name="visible">True</property> |
697 | - <property name="can_focus">False</property> |
698 | - <property name="label">label</property> |
699 | - <property name="wrap">True</property> |
700 | - </object> |
701 | - <packing> |
702 | - <property name="expand">True</property> |
703 | - <property name="fill">True</property> |
704 | - <property name="position">0</property> |
705 | - </packing> |
706 | - </child> |
707 | - <child> |
708 | - <object class="GtkHButtonBox" id="install_button_box"> |
709 | - <property name="visible">True</property> |
710 | - <property name="can_focus">False</property> |
711 | - <child> |
712 | - <object class="GtkButton" id="install_button"> |
713 | - <property name="label" translatable="yes">_Install now</property> |
714 | - <property name="visible">True</property> |
715 | - <property name="can_focus">True</property> |
716 | - <property name="receives_default">True</property> |
717 | - <property name="use_action_appearance">False</property> |
718 | - <property name="image">image1</property> |
719 | - <property name="use_underline">True</property> |
720 | - <signal name="clicked" handler="on_install_button_clicked" swapped="no"/> |
721 | - </object> |
722 | - <packing> |
723 | - <property name="expand">False</property> |
724 | - <property name="fill">False</property> |
725 | - <property name="position">0</property> |
726 | - </packing> |
727 | - </child> |
728 | - </object> |
729 | - <packing> |
730 | - <property name="expand">False</property> |
731 | - <property name="fill">True</property> |
732 | - <property name="position">1</property> |
733 | - </packing> |
734 | - </child> |
735 | - </object> |
736 | -</interface> |
737 | |
738 | === removed file 'data/gtk/management.ui' |
739 | --- data/gtk/management.ui 2011-07-11 11:19:09 +0000 |
740 | +++ data/gtk/management.ui 1970-01-01 00:00:00 +0000 |
741 | @@ -1,334 +0,0 @@ |
742 | -<?xml version="1.0" encoding="UTF-8"?> |
743 | -<interface> |
744 | - <requires lib="gtk+" version="2.22"/> |
745 | - <!-- interface-naming-policy project-wide --> |
746 | - <object class="GtkVBox" id="itself"> |
747 | - <property name="visible">True</property> |
748 | - <property name="can_focus">False</property> |
749 | - <child> |
750 | - <object class="GtkEventBox" id="header"> |
751 | - <property name="visible">True</property> |
752 | - <property name="can_focus">False</property> |
753 | - <child> |
754 | - <object class="GtkVBox" id="vbox2"> |
755 | - <property name="visible">True</property> |
756 | - <property name="can_focus">False</property> |
757 | - <child> |
758 | - <object class="GtkHBox" id="status_box"> |
759 | - <property name="visible">True</property> |
760 | - <property name="can_focus">False</property> |
761 | - <property name="border_width">10</property> |
762 | - <property name="spacing">10</property> |
763 | - <child> |
764 | - <object class="GtkVBox" id="quota_box"> |
765 | - <property name="visible">True</property> |
766 | - <property name="can_focus">False</property> |
767 | - <property name="spacing">5</property> |
768 | - <child> |
769 | - <object class="GtkProgressBar" id="quota_progressbar"> |
770 | - <property name="visible">True</property> |
771 | - <property name="can_focus">False</property> |
772 | - </object> |
773 | - <packing> |
774 | - <property name="expand">True</property> |
775 | - <property name="fill">True</property> |
776 | - <property name="position">0</property> |
777 | - </packing> |
778 | - </child> |
779 | - </object> |
780 | - <packing> |
781 | - <property name="expand">False</property> |
782 | - <property name="fill">True</property> |
783 | - <property name="position">0</property> |
784 | - </packing> |
785 | - </child> |
786 | - </object> |
787 | - <packing> |
788 | - <property name="expand">False</property> |
789 | - <property name="fill">True</property> |
790 | - <property name="position">0</property> |
791 | - </packing> |
792 | - </child> |
793 | - <child> |
794 | - <object class="GtkHBox" id="hbox2"> |
795 | - <property name="visible">True</property> |
796 | - <property name="can_focus">False</property> |
797 | - <child> |
798 | - <object class="GtkHSeparator" id="hseparator1"> |
799 | - <property name="visible">True</property> |
800 | - <property name="can_focus">False</property> |
801 | - </object> |
802 | - <packing> |
803 | - <property name="expand">True</property> |
804 | - <property name="fill">True</property> |
805 | - <property name="position">0</property> |
806 | - </packing> |
807 | - </child> |
808 | - <child> |
809 | - <object class="GtkHButtonBox" id="hbuttonbox1"> |
810 | - <property name="visible">True</property> |
811 | - <property name="can_focus">False</property> |
812 | - <property name="layout_style">center</property> |
813 | - <child> |
814 | - <object class="GtkRadioButton" id="dashboard_button"> |
815 | - <property name="label" translatable="yes">Account</property> |
816 | - <property name="visible">True</property> |
817 | - <property name="can_focus">True</property> |
818 | - <property name="receives_default">False</property> |
819 | - <property name="use_action_appearance">False</property> |
820 | - <property name="active">True</property> |
821 | - <property name="draw_indicator">False</property> |
822 | - </object> |
823 | - <packing> |
824 | - <property name="expand">False</property> |
825 | - <property name="fill">False</property> |
826 | - <property name="position">0</property> |
827 | - </packing> |
828 | - </child> |
829 | - <child> |
830 | - <object class="GtkRadioButton" id="volumes_button"> |
831 | - <property name="label" translatable="yes">Cloud Folders</property> |
832 | - <property name="visible">True</property> |
833 | - <property name="can_focus">True</property> |
834 | - <property name="receives_default">False</property> |
835 | - <property name="use_action_appearance">False</property> |
836 | - <property name="draw_indicator">False</property> |
837 | - <property name="group">dashboard_button</property> |
838 | - </object> |
839 | - <packing> |
840 | - <property name="expand">False</property> |
841 | - <property name="fill">False</property> |
842 | - <property name="position">1</property> |
843 | - </packing> |
844 | - </child> |
845 | - <child> |
846 | - <object class="GtkRadioButton" id="shares_button"> |
847 | - <property name="label" translatable="yes">Shares</property> |
848 | - <property name="can_focus">True</property> |
849 | - <property name="receives_default">False</property> |
850 | - <property name="use_action_appearance">False</property> |
851 | - <property name="draw_indicator">False</property> |
852 | - <property name="group">dashboard_button</property> |
853 | - </object> |
854 | - <packing> |
855 | - <property name="expand">False</property> |
856 | - <property name="fill">False</property> |
857 | - <property name="position">2</property> |
858 | - </packing> |
859 | - </child> |
860 | - <child> |
861 | - <object class="GtkRadioButton" id="devices_button"> |
862 | - <property name="label" translatable="yes">Devices</property> |
863 | - <property name="visible">True</property> |
864 | - <property name="can_focus">True</property> |
865 | - <property name="receives_default">False</property> |
866 | - <property name="use_action_appearance">False</property> |
867 | - <property name="draw_indicator">False</property> |
868 | - <property name="group">dashboard_button</property> |
869 | - </object> |
870 | - <packing> |
871 | - <property name="expand">False</property> |
872 | - <property name="fill">False</property> |
873 | - <property name="position">3</property> |
874 | - </packing> |
875 | - </child> |
876 | - <child> |
877 | - <object class="GtkRadioButton" id="services_button"> |
878 | - <property name="label" translatable="yes">Services</property> |
879 | - <property name="visible">True</property> |
880 | - <property name="can_focus">True</property> |
881 | - <property name="receives_default">False</property> |
882 | - <property name="use_action_appearance">False</property> |
883 | - <property name="draw_indicator">False</property> |
884 | - <property name="group">dashboard_button</property> |
885 | - </object> |
886 | - <packing> |
887 | - <property name="expand">False</property> |
888 | - <property name="fill">False</property> |
889 | - <property name="position">4</property> |
890 | - </packing> |
891 | - </child> |
892 | - </object> |
893 | - <packing> |
894 | - <property name="expand">False</property> |
895 | - <property name="fill">True</property> |
896 | - <property name="position">1</property> |
897 | - </packing> |
898 | - </child> |
899 | - <child> |
900 | - <object class="GtkHSeparator" id="hseparator2"> |
901 | - <property name="visible">True</property> |
902 | - <property name="can_focus">False</property> |
903 | - </object> |
904 | - <packing> |
905 | - <property name="expand">True</property> |
906 | - <property name="fill">True</property> |
907 | - <property name="position">2</property> |
908 | - </packing> |
909 | - </child> |
910 | - </object> |
911 | - <packing> |
912 | - <property name="expand">False</property> |
913 | - <property name="fill">True</property> |
914 | - <property name="position">1</property> |
915 | - </packing> |
916 | - </child> |
917 | - </object> |
918 | - </child> |
919 | - </object> |
920 | - <packing> |
921 | - <property name="expand">False</property> |
922 | - <property name="fill">True</property> |
923 | - <property name="position">0</property> |
924 | - </packing> |
925 | - </child> |
926 | - <child> |
927 | - <object class="GtkNotebook" id="notebook"> |
928 | - <property name="visible">True</property> |
929 | - <property name="can_focus">False</property> |
930 | - <property name="show_tabs">False</property> |
931 | - <property name="show_border">False</property> |
932 | - <property name="homogeneous">True</property> |
933 | - </object> |
934 | - <packing> |
935 | - <property name="expand">True</property> |
936 | - <property name="fill">True</property> |
937 | - <property name="position">1</property> |
938 | - </packing> |
939 | - </child> |
940 | - <child> |
941 | - <object class="GtkHBox" id="hbox1"> |
942 | - <property name="visible">True</property> |
943 | - <property name="can_focus">False</property> |
944 | - <property name="border_width">12</property> |
945 | - <child> |
946 | - <object class="GtkAlignment" id="alignment3"> |
947 | - <property name="visible">True</property> |
948 | - <property name="can_focus">False</property> |
949 | - <property name="yalign">1</property> |
950 | - <property name="yscale">0</property> |
951 | - <child> |
952 | - <object class="GtkHButtonBox" id="hbuttonbox3"> |
953 | - <property name="visible">True</property> |
954 | - <property name="can_focus">False</property> |
955 | - <property name="spacing">5</property> |
956 | - <property name="layout_style">start</property> |
957 | - <child> |
958 | - <object class="GtkLinkButton" id="linkbutton2"> |
959 | - <property name="label" translatable="yes">Official Support</property> |
960 | - <property name="visible">True</property> |
961 | - <property name="can_focus">True</property> |
962 | - <property name="receives_default">True</property> |
963 | - <property name="use_action_appearance">False</property> |
964 | - <property name="relief">half</property> |
965 | - <property name="uri">https://one.ubuntu.com/support/</property> |
966 | - </object> |
967 | - <packing> |
968 | - <property name="expand">False</property> |
969 | - <property name="fill">False</property> |
970 | - <property name="position">0</property> |
971 | - </packing> |
972 | - </child> |
973 | - <child> |
974 | - <object class="GtkLinkButton" id="linkbutton4"> |
975 | - <property name="label" translatable="yes">Community Support</property> |
976 | - <property name="visible">True</property> |
977 | - <property name="can_focus">True</property> |
978 | - <property name="receives_default">True</property> |
979 | - <property name="use_action_appearance">False</property> |
980 | - <property name="relief">half</property> |
981 | - <property name="uri">http://askubuntu.com/questions/tagged/ubuntu-one</property> |
982 | - </object> |
983 | - <packing> |
984 | - <property name="expand">False</property> |
985 | - <property name="fill">False</property> |
986 | - <property name="position">1</property> |
987 | - </packing> |
988 | - </child> |
989 | - </object> |
990 | - </child> |
991 | - </object> |
992 | - <packing> |
993 | - <property name="expand">False</property> |
994 | - <property name="fill">True</property> |
995 | - <property name="position">0</property> |
996 | - </packing> |
997 | - </child> |
998 | - <child> |
999 | - <object class="GtkHBox" id="hbox3"> |
1000 | - <property name="visible">True</property> |
1001 | - <property name="can_focus">False</property> |
1002 | - <child> |
1003 | - <object class="GtkLabel" id="label4"> |
1004 | - <property name="visible">True</property> |
1005 | - <property name="can_focus">False</property> |
1006 | - <property name="label" translatable="yes">Talk to us on:</property> |
1007 | - </object> |
1008 | - <packing> |
1009 | - <property name="expand">True</property> |
1010 | - <property name="fill">True</property> |
1011 | - <property name="position">0</property> |
1012 | - </packing> |
1013 | - </child> |
1014 | - <child> |
1015 | - <object class="GtkLinkButton" id="linkbutton5"> |
1016 | - <property name="visible">True</property> |
1017 | - <property name="can_focus">True</property> |
1018 | - <property name="receives_default">True</property> |
1019 | - <property name="use_action_appearance">False</property> |
1020 | - <property name="relief">none</property> |
1021 | - <property name="uri">http://twitter.com/ubuntuone</property> |
1022 | - <child> |
1023 | - <object class="GtkImage" id="twitter_logo"> |
1024 | - <property name="visible">True</property> |
1025 | - <property name="can_focus">False</property> |
1026 | - <property name="tooltip_text" translatable="yes">http://twitter.com/ubuntuone</property> |
1027 | - </object> |
1028 | - </child> |
1029 | - </object> |
1030 | - <packing> |
1031 | - <property name="expand">False</property> |
1032 | - <property name="fill">False</property> |
1033 | - <property name="position">1</property> |
1034 | - </packing> |
1035 | - </child> |
1036 | - <child> |
1037 | - <object class="GtkLinkButton" id="linkbutton6"> |
1038 | - <property name="visible">True</property> |
1039 | - <property name="can_focus">True</property> |
1040 | - <property name="receives_default">True</property> |
1041 | - <property name="use_action_appearance">False</property> |
1042 | - <property name="relief">none</property> |
1043 | - <property name="uri">http://www.facebook.com/ubuntuone</property> |
1044 | - <child> |
1045 | - <object class="GtkImage" id="facebook_logo"> |
1046 | - <property name="visible">True</property> |
1047 | - <property name="can_focus">False</property> |
1048 | - <property name="tooltip_text" translatable="yes">http://www.facebook.com/ubuntuone</property> |
1049 | - </object> |
1050 | - </child> |
1051 | - </object> |
1052 | - <packing> |
1053 | - <property name="expand">True</property> |
1054 | - <property name="fill">True</property> |
1055 | - <property name="position">2</property> |
1056 | - </packing> |
1057 | - </child> |
1058 | - </object> |
1059 | - <packing> |
1060 | - <property name="expand">False</property> |
1061 | - <property name="fill">True</property> |
1062 | - <property name="pack_type">end</property> |
1063 | - <property name="position">1</property> |
1064 | - </packing> |
1065 | - </child> |
1066 | - </object> |
1067 | - <packing> |
1068 | - <property name="expand">False</property> |
1069 | - <property name="fill">True</property> |
1070 | - <property name="pack_type">end</property> |
1071 | - <property name="position">1</property> |
1072 | - </packing> |
1073 | - </child> |
1074 | - </object> |
1075 | -</interface> |
1076 | |
1077 | === removed file 'data/gtk/overview.ui' |
1078 | --- data/gtk/overview.ui 2011-09-14 19:08:52 +0000 |
1079 | +++ data/gtk/overview.ui 1970-01-01 00:00:00 +0000 |
1080 | @@ -1,308 +0,0 @@ |
1081 | -<?xml version="1.0" encoding="UTF-8"?> |
1082 | -<interface> |
1083 | - <requires lib="gtk+" version="2.22"/> |
1084 | - <!-- interface-naming-policy project-wide --> |
1085 | - <object class="GtkVBox" id="itself"> |
1086 | - <property name="visible">True</property> |
1087 | - <property name="can_focus">False</property> |
1088 | - <child> |
1089 | - <object class="GtkEventBox" id="eventbox1"> |
1090 | - <property name="visible">True</property> |
1091 | - <property name="can_focus">False</property> |
1092 | - <child> |
1093 | - <object class="GtkImage" id="banner"> |
1094 | - <property name="visible">True</property> |
1095 | - <property name="can_focus">False</property> |
1096 | - <property name="xpad">12</property> |
1097 | - <property name="ypad">12</property> |
1098 | - </object> |
1099 | - </child> |
1100 | - </object> |
1101 | - <packing> |
1102 | - <property name="expand">True</property> |
1103 | - <property name="fill">True</property> |
1104 | - <property name="position">0</property> |
1105 | - </packing> |
1106 | - </child> |
1107 | - <child> |
1108 | - <object class="GtkLabel" id="label7"> |
1109 | - <property name="visible">True</property> |
1110 | - <property name="can_focus">False</property> |
1111 | - <property name="label" translatable="yes"><span font="24" foreground="#4d4d4d">The Power of Your Personal Cloud</span></property> |
1112 | - <property name="use_markup">True</property> |
1113 | - </object> |
1114 | - <packing> |
1115 | - <property name="expand">True</property> |
1116 | - <property name="fill">True</property> |
1117 | - <property name="position">1</property> |
1118 | - </packing> |
1119 | - </child> |
1120 | - <child> |
1121 | - <object class="GtkHBox" id="hbox1"> |
1122 | - <property name="visible">True</property> |
1123 | - <property name="can_focus">False</property> |
1124 | - <property name="border_width">12</property> |
1125 | - <child> |
1126 | - <object class="GtkTable" id="table1"> |
1127 | - <property name="visible">True</property> |
1128 | - <property name="can_focus">False</property> |
1129 | - <property name="n_rows">4</property> |
1130 | - <property name="n_columns">2</property> |
1131 | - <property name="column_spacing">10</property> |
1132 | - <child> |
1133 | - <object class="GtkImage" id="files_icon"> |
1134 | - <property name="visible">True</property> |
1135 | - <property name="can_focus">False</property> |
1136 | - </object> |
1137 | - <packing> |
1138 | - <property name="x_options">GTK_FILL</property> |
1139 | - <property name="y_options">GTK_FILL</property> |
1140 | - </packing> |
1141 | - </child> |
1142 | - <child> |
1143 | - <object class="GtkImage" id="music_stream_icon"> |
1144 | - <property name="visible">True</property> |
1145 | - <property name="can_focus">False</property> |
1146 | - </object> |
1147 | - <packing> |
1148 | - <property name="top_attach">1</property> |
1149 | - <property name="bottom_attach">2</property> |
1150 | - <property name="x_options">GTK_FILL</property> |
1151 | - <property name="y_options">GTK_FILL</property> |
1152 | - </packing> |
1153 | - </child> |
1154 | - <child> |
1155 | - <object class="GtkImage" id="contacts_icon"> |
1156 | - <property name="visible">True</property> |
1157 | - <property name="can_focus">False</property> |
1158 | - </object> |
1159 | - <packing> |
1160 | - <property name="top_attach">2</property> |
1161 | - <property name="bottom_attach">3</property> |
1162 | - <property name="x_options">GTK_FILL</property> |
1163 | - <property name="y_options">GTK_FILL</property> |
1164 | - </packing> |
1165 | - </child> |
1166 | - <child> |
1167 | - <object class="GtkImage" id="notes_icon"> |
1168 | - <property name="visible">True</property> |
1169 | - <property name="can_focus">False</property> |
1170 | - </object> |
1171 | - <packing> |
1172 | - <property name="top_attach">3</property> |
1173 | - <property name="bottom_attach">4</property> |
1174 | - <property name="x_options">GTK_FILL</property> |
1175 | - <property name="y_options">GTK_FILL</property> |
1176 | - </packing> |
1177 | - </child> |
1178 | - <child> |
1179 | - <object class="GtkLabel" id="label3"> |
1180 | - <property name="visible">True</property> |
1181 | - <property name="can_focus">False</property> |
1182 | - <property name="xalign">0</property> |
1183 | - <property name="label" translatable="yes">Files Anywhere |
1184 | -<span foreground="#909090">Back up and access your files from Ubuntu, Windows, Web or Mobile</span></property> |
1185 | - <property name="use_markup">True</property> |
1186 | - <property name="wrap">True</property> |
1187 | - </object> |
1188 | - <packing> |
1189 | - <property name="left_attach">1</property> |
1190 | - <property name="right_attach">2</property> |
1191 | - </packing> |
1192 | - </child> |
1193 | - <child> |
1194 | - <object class="GtkLabel" id="label4"> |
1195 | - <property name="visible">True</property> |
1196 | - <property name="can_focus">False</property> |
1197 | - <property name="xalign">0</property> |
1198 | - <property name="label" translatable="yes">Keep Connected |
1199 | -<span foreground="#909090">Unify your contacts across Desktop, Mobile and Web</span></property> |
1200 | - <property name="use_markup">True</property> |
1201 | - <property name="wrap">True</property> |
1202 | - </object> |
1203 | - <packing> |
1204 | - <property name="left_attach">1</property> |
1205 | - <property name="right_attach">2</property> |
1206 | - <property name="top_attach">2</property> |
1207 | - <property name="bottom_attach">3</property> |
1208 | - </packing> |
1209 | - </child> |
1210 | - <child> |
1211 | - <object class="GtkLabel" id="label5"> |
1212 | - <property name="visible">True</property> |
1213 | - <property name="can_focus">False</property> |
1214 | - <property name="xalign">0</property> |
1215 | - <property name="label" translatable="yes">Rock Out |
1216 | -<span foreground="#909090">Your entire collection follows you around with music streaming to Android and iPhone</span></property> |
1217 | - <property name="use_markup">True</property> |
1218 | - <property name="wrap">True</property> |
1219 | - </object> |
1220 | - <packing> |
1221 | - <property name="left_attach">1</property> |
1222 | - <property name="right_attach">2</property> |
1223 | - <property name="top_attach">1</property> |
1224 | - <property name="bottom_attach">2</property> |
1225 | - </packing> |
1226 | - </child> |
1227 | - <child> |
1228 | - <object class="GtkLabel" id="label6"> |
1229 | - <property name="visible">True</property> |
1230 | - <property name="can_focus">False</property> |
1231 | - <property name="xalign">0</property> |
1232 | - <property name="label" translatable="yes">Stay Productive |
1233 | -<span foreground="#909090">Keep your Tomboy notes synced</span></property> |
1234 | - <property name="use_markup">True</property> |
1235 | - <property name="wrap">True</property> |
1236 | - </object> |
1237 | - <packing> |
1238 | - <property name="left_attach">1</property> |
1239 | - <property name="right_attach">2</property> |
1240 | - <property name="top_attach">3</property> |
1241 | - <property name="bottom_attach">4</property> |
1242 | - </packing> |
1243 | - </child> |
1244 | - </object> |
1245 | - <packing> |
1246 | - <property name="expand">True</property> |
1247 | - <property name="fill">True</property> |
1248 | - <property name="position">0</property> |
1249 | - </packing> |
1250 | - </child> |
1251 | - <child> |
1252 | - <object class="GtkVBox" id="vbox2"> |
1253 | - <property name="visible">True</property> |
1254 | - <property name="can_focus">False</property> |
1255 | - <child> |
1256 | - <object class="GtkLabel" id="warning_label"> |
1257 | - <property name="visible">True</property> |
1258 | - <property name="can_focus">False</property> |
1259 | - <property name="label">A warning label that can be long. Possible really long, let's see how it behaves.</property> |
1260 | - <property name="wrap">True</property> |
1261 | - </object> |
1262 | - <packing> |
1263 | - <property name="expand">False</property> |
1264 | - <property name="fill">True</property> |
1265 | - <property name="position">0</property> |
1266 | - </packing> |
1267 | - </child> |
1268 | - <child> |
1269 | - <object class="GtkAlignment" id="alignment2"> |
1270 | - <property name="visible">True</property> |
1271 | - <property name="can_focus">False</property> |
1272 | - <property name="xscale">0</property> |
1273 | - <property name="yscale">0</property> |
1274 | - <child> |
1275 | - <object class="GtkVBox" id="vbox3"> |
1276 | - <property name="visible">True</property> |
1277 | - <property name="can_focus">False</property> |
1278 | - <property name="spacing">10</property> |
1279 | - <child> |
1280 | - <object class="GtkButton" id="learn_more_button"> |
1281 | - <property name="visible">True</property> |
1282 | - <property name="can_focus">True</property> |
1283 | - <property name="receives_default">True</property> |
1284 | - <property name="use_action_appearance">False</property> |
1285 | - <signal name="clicked" handler="on_learn_more_button_clicked" swapped="no"/> |
1286 | - <child> |
1287 | - <object class="GtkVBox" id="vbox5"> |
1288 | - <property name="visible">True</property> |
1289 | - <property name="can_focus">False</property> |
1290 | - <child> |
1291 | - <object class="GtkImage" id="image5"> |
1292 | - <property name="visible">True</property> |
1293 | - <property name="can_focus">False</property> |
1294 | - <property name="pixel_size">55</property> |
1295 | - <property name="icon_name">ubuntuone</property> |
1296 | - </object> |
1297 | - <packing> |
1298 | - <property name="expand">True</property> |
1299 | - <property name="fill">True</property> |
1300 | - <property name="position">0</property> |
1301 | - </packing> |
1302 | - </child> |
1303 | - <child> |
1304 | - <object class="GtkLabel" id="label8"> |
1305 | - <property name="visible">True</property> |
1306 | - <property name="can_focus">False</property> |
1307 | - <property name="label" translatable="yes"><span foreground="#909090">Learn More</span></property> |
1308 | - <property name="use_markup">True</property> |
1309 | - </object> |
1310 | - <packing> |
1311 | - <property name="expand">True</property> |
1312 | - <property name="fill">True</property> |
1313 | - <property name="position">1</property> |
1314 | - </packing> |
1315 | - </child> |
1316 | - </object> |
1317 | - </child> |
1318 | - </object> |
1319 | - <packing> |
1320 | - <property name="expand">True</property> |
1321 | - <property name="fill">True</property> |
1322 | - <property name="position">0</property> |
1323 | - </packing> |
1324 | - </child> |
1325 | - <child> |
1326 | - <object class="GtkButton" id="join_now_button"> |
1327 | - <property name="visible">True</property> |
1328 | - <property name="can_focus">True</property> |
1329 | - <property name="can_default">True</property> |
1330 | - <property name="receives_default">True</property> |
1331 | - <property name="use_action_appearance">False</property> |
1332 | - <signal name="clicked" handler="on_join_now_button_clicked" swapped="no"/> |
1333 | - <child> |
1334 | - <object class="GtkLabel" id="label1"> |
1335 | - <property name="visible">True</property> |
1336 | - <property name="can_focus">False</property> |
1337 | - <property name="label" translatable="yes"><span font_size="xx-large" foreground="#4d4d4d">Join now</span></property> |
1338 | - <property name="use_markup">True</property> |
1339 | - </object> |
1340 | - </child> |
1341 | - </object> |
1342 | - <packing> |
1343 | - <property name="expand">False</property> |
1344 | - <property name="fill">True</property> |
1345 | - <property name="position">1</property> |
1346 | - </packing> |
1347 | - </child> |
1348 | - <child> |
1349 | - <object class="GtkLinkButton" id="connect_button"> |
1350 | - <property name="label" translatable="yes">I already have an account!</property> |
1351 | - <property name="visible">True</property> |
1352 | - <property name="can_focus">True</property> |
1353 | - <property name="receives_default">True</property> |
1354 | - <property name="use_action_appearance">False</property> |
1355 | - <property name="relief">none</property> |
1356 | - <signal name="clicked" handler="on_connect_button_clicked" swapped="no"/> |
1357 | - </object> |
1358 | - <packing> |
1359 | - <property name="expand">False</property> |
1360 | - <property name="fill">False</property> |
1361 | - <property name="position">2</property> |
1362 | - </packing> |
1363 | - </child> |
1364 | - </object> |
1365 | - </child> |
1366 | - </object> |
1367 | - <packing> |
1368 | - <property name="expand">True</property> |
1369 | - <property name="fill">True</property> |
1370 | - <property name="position">1</property> |
1371 | - </packing> |
1372 | - </child> |
1373 | - </object> |
1374 | - <packing> |
1375 | - <property name="expand">True</property> |
1376 | - <property name="fill">True</property> |
1377 | - <property name="position">1</property> |
1378 | - </packing> |
1379 | - </child> |
1380 | - </object> |
1381 | - <packing> |
1382 | - <property name="expand">True</property> |
1383 | - <property name="fill">True</property> |
1384 | - <property name="position">2</property> |
1385 | - </packing> |
1386 | - </child> |
1387 | - </object> |
1388 | -</interface> |
1389 | |
1390 | === removed file 'data/gtk/services.ui' |
1391 | --- data/gtk/services.ui 2011-09-14 19:08:52 +0000 |
1392 | +++ data/gtk/services.ui 1970-01-01 00:00:00 +0000 |
1393 | @@ -1,317 +0,0 @@ |
1394 | -<?xml version="1.0" encoding="UTF-8"?> |
1395 | -<interface> |
1396 | - <requires lib="gtk+" version="2.22"/> |
1397 | - <!-- interface-naming-policy project-wide --> |
1398 | - <object class="GtkVBox" id="itself"> |
1399 | - <property name="visible">True</property> |
1400 | - <property name="can_focus">False</property> |
1401 | - <child> |
1402 | - <object class="GtkScrolledWindow" id="scrolledwindow1"> |
1403 | - <property name="visible">True</property> |
1404 | - <property name="can_focus">True</property> |
1405 | - <property name="hscrollbar_policy">automatic</property> |
1406 | - <property name="vscrollbar_policy">automatic</property> |
1407 | - <child> |
1408 | - <object class="GtkViewport" id="viewport1"> |
1409 | - <property name="visible">True</property> |
1410 | - <property name="can_focus">False</property> |
1411 | - <property name="resize_mode">queue</property> |
1412 | - <property name="shadow_type">none</property> |
1413 | - <child> |
1414 | - <object class="GtkAlignment" id="alignment1"> |
1415 | - <property name="visible">True</property> |
1416 | - <property name="can_focus">False</property> |
1417 | - <property name="left_padding">5</property> |
1418 | - <property name="right_padding">5</property> |
1419 | - <child> |
1420 | - <object class="GtkVBox" id="vbox1"> |
1421 | - <property name="visible">True</property> |
1422 | - <property name="can_focus">False</property> |
1423 | - <property name="spacing">5</property> |
1424 | - <child> |
1425 | - <object class="GtkFrame" id="files"> |
1426 | - <property name="visible">True</property> |
1427 | - <property name="can_focus">False</property> |
1428 | - <property name="label_xalign">0</property> |
1429 | - <property name="shadow_type">out</property> |
1430 | - <child> |
1431 | - <object class="GtkAlignment" id="alignment2"> |
1432 | - <property name="visible">True</property> |
1433 | - <property name="can_focus">False</property> |
1434 | - <child> |
1435 | - <object class="GtkHBox" id="hbox2"> |
1436 | - <property name="visible">True</property> |
1437 | - <property name="can_focus">False</property> |
1438 | - <property name="border_width">5</property> |
1439 | - <child> |
1440 | - <object class="GtkTable" id="table1"> |
1441 | - <property name="visible">True</property> |
1442 | - <property name="can_focus">False</property> |
1443 | - <property name="n_rows">3</property> |
1444 | - <property name="n_columns">3</property> |
1445 | - <property name="column_spacing">5</property> |
1446 | - <property name="row_spacing">5</property> |
1447 | - <child> |
1448 | - <object class="GtkCheckButton" id="file_sync_check"> |
1449 | - <property name="visible">True</property> |
1450 | - <property name="can_focus">True</property> |
1451 | - <property name="receives_default">False</property> |
1452 | - <property name="use_action_appearance">False</property> |
1453 | - <property name="draw_indicator">True</property> |
1454 | - </object> |
1455 | - <packing> |
1456 | - <property name="x_options"></property> |
1457 | - <property name="y_options"></property> |
1458 | - </packing> |
1459 | - </child> |
1460 | - <child> |
1461 | - <object class="GtkImage" id="files_icon"> |
1462 | - <property name="visible">True</property> |
1463 | - <property name="can_focus">False</property> |
1464 | - </object> |
1465 | - <packing> |
1466 | - <property name="left_attach">1</property> |
1467 | - <property name="right_attach">2</property> |
1468 | - <property name="x_options"></property> |
1469 | - <property name="y_options"></property> |
1470 | - </packing> |
1471 | - </child> |
1472 | - <child> |
1473 | - <object class="GtkLabel" id="label1"> |
1474 | - <property name="visible">True</property> |
1475 | - <property name="can_focus">False</property> |
1476 | - <property name="xalign">0</property> |
1477 | - <property name="label" translatable="yes">Enable File Sync</property> |
1478 | - </object> |
1479 | - <packing> |
1480 | - <property name="left_attach">2</property> |
1481 | - <property name="right_attach">3</property> |
1482 | - </packing> |
1483 | - </child> |
1484 | - <child> |
1485 | - <object class="GtkLabel" id="label2"> |
1486 | - <property name="visible">True</property> |
1487 | - <property name="can_focus">False</property> |
1488 | - <property name="xalign">0</property> |
1489 | - <property name="yalign">0</property> |
1490 | - <property name="label" translatable="yes"><span font_size="small">Enable and then choose which folders you want to access from the Web or any device you connected to Ubuntu One |
1491 | - |
1492 | -Simply drag and drop any file or folder to your Ubuntu One folder on this computer</span></property> |
1493 | - <property name="use_markup">True</property> |
1494 | - <property name="wrap">True</property> |
1495 | - <property name="width_chars">35</property> |
1496 | - </object> |
1497 | - <packing> |
1498 | - <property name="left_attach">2</property> |
1499 | - <property name="right_attach">3</property> |
1500 | - <property name="top_attach">1</property> |
1501 | - <property name="bottom_attach">2</property> |
1502 | - </packing> |
1503 | - </child> |
1504 | - <child> |
1505 | - <object class="GtkHButtonBox" id="hbuttonbox1"> |
1506 | - <property name="visible">True</property> |
1507 | - <property name="can_focus">False</property> |
1508 | - <child> |
1509 | - <object class="GtkButton" id="file_sync_button"> |
1510 | - <property name="label" translatable="yes">_Show me my Ubuntu One folder</property> |
1511 | - <property name="visible">True</property> |
1512 | - <property name="can_focus">True</property> |
1513 | - <property name="receives_default">True</property> |
1514 | - <property name="use_action_appearance">False</property> |
1515 | - <property name="use_underline">True</property> |
1516 | - <signal name="clicked" handler="on_file_sync_button_clicked" swapped="no"/> |
1517 | - </object> |
1518 | - <packing> |
1519 | - <property name="expand">False</property> |
1520 | - <property name="fill">False</property> |
1521 | - <property name="position">0</property> |
1522 | - </packing> |
1523 | - </child> |
1524 | - </object> |
1525 | - <packing> |
1526 | - <property name="left_attach">2</property> |
1527 | - <property name="right_attach">3</property> |
1528 | - <property name="top_attach">2</property> |
1529 | - <property name="bottom_attach">3</property> |
1530 | - </packing> |
1531 | - </child> |
1532 | - <child> |
1533 | - <placeholder/> |
1534 | - </child> |
1535 | - <child> |
1536 | - <placeholder/> |
1537 | - </child> |
1538 | - <child> |
1539 | - <placeholder/> |
1540 | - </child> |
1541 | - <child> |
1542 | - <placeholder/> |
1543 | - </child> |
1544 | - </object> |
1545 | - <packing> |
1546 | - <property name="expand">False</property> |
1547 | - <property name="fill">True</property> |
1548 | - <property name="position">0</property> |
1549 | - </packing> |
1550 | - </child> |
1551 | - <child> |
1552 | - <object class="GtkImage" id="files_example"> |
1553 | - <property name="visible">True</property> |
1554 | - <property name="can_focus">False</property> |
1555 | - </object> |
1556 | - <packing> |
1557 | - <property name="expand">False</property> |
1558 | - <property name="fill">True</property> |
1559 | - <property name="pack_type">end</property> |
1560 | - <property name="position">1</property> |
1561 | - </packing> |
1562 | - </child> |
1563 | - </object> |
1564 | - </child> |
1565 | - </object> |
1566 | - </child> |
1567 | - <child type="label_item"> |
1568 | - <placeholder/> |
1569 | - </child> |
1570 | - </object> |
1571 | - <packing> |
1572 | - <property name="expand">False</property> |
1573 | - <property name="fill">True</property> |
1574 | - <property name="position">0</property> |
1575 | - </packing> |
1576 | - </child> |
1577 | - <child> |
1578 | - <object class="GtkFrame" id="replications"> |
1579 | - <property name="visible">True</property> |
1580 | - <property name="can_focus">False</property> |
1581 | - <property name="label_xalign">0</property> |
1582 | - <property name="shadow_type">out</property> |
1583 | - <child> |
1584 | - <object class="GtkAlignment" id="alignment3"> |
1585 | - <property name="visible">True</property> |
1586 | - <property name="can_focus">False</property> |
1587 | - <property name="top_padding">6</property> |
1588 | - <child> |
1589 | - <object class="GtkHBox" id="hbox3"> |
1590 | - <property name="visible">True</property> |
1591 | - <property name="can_focus">False</property> |
1592 | - <property name="border_width">5</property> |
1593 | - <child> |
1594 | - <object class="GtkVBox" id="contacts"> |
1595 | - <property name="visible">True</property> |
1596 | - <property name="can_focus">False</property> |
1597 | - <child> |
1598 | - <object class="GtkTable" id="contacts_sync"> |
1599 | - <property name="visible">True</property> |
1600 | - <property name="can_focus">False</property> |
1601 | - <property name="n_rows">2</property> |
1602 | - <property name="n_columns">3</property> |
1603 | - <property name="column_spacing">5</property> |
1604 | - <property name="row_spacing">5</property> |
1605 | - <child> |
1606 | - <object class="GtkCheckButton" id="contacts_check"> |
1607 | - <property name="visible">True</property> |
1608 | - <property name="can_focus">True</property> |
1609 | - <property name="receives_default">False</property> |
1610 | - <property name="use_action_appearance">False</property> |
1611 | - <property name="draw_indicator">True</property> |
1612 | - </object> |
1613 | - <packing> |
1614 | - <property name="x_options"></property> |
1615 | - <property name="y_options"></property> |
1616 | - </packing> |
1617 | - </child> |
1618 | - <child> |
1619 | - <object class="GtkImage" id="contacts_icon"> |
1620 | - <property name="visible">True</property> |
1621 | - <property name="can_focus">False</property> |
1622 | - </object> |
1623 | - <packing> |
1624 | - <property name="left_attach">1</property> |
1625 | - <property name="right_attach">2</property> |
1626 | - <property name="x_options"></property> |
1627 | - <property name="y_options"></property> |
1628 | - </packing> |
1629 | - </child> |
1630 | - <child> |
1631 | - <object class="GtkLabel" id="label4"> |
1632 | - <property name="visible">True</property> |
1633 | - <property name="can_focus">False</property> |
1634 | - <property name="xalign">0</property> |
1635 | - <property name="label" translatable="yes">Enable Contacts Sync</property> |
1636 | - </object> |
1637 | - <packing> |
1638 | - <property name="left_attach">2</property> |
1639 | - <property name="right_attach">3</property> |
1640 | - </packing> |
1641 | - </child> |
1642 | - <child> |
1643 | - <object class="GtkLabel" id="label5"> |
1644 | - <property name="visible">True</property> |
1645 | - <property name="can_focus">True</property> |
1646 | - <property name="xalign">0</property> |
1647 | - <property name="yalign">0</property> |
1648 | - <property name="label" translatable="yes"><span font_size="small">Once enabled, visit the <a href="https://one.ubuntu.com">Ubuntu One website</a> to manage your contacts, including Gmail and Facebook import</span></property> |
1649 | - <property name="use_markup">True</property> |
1650 | - <property name="wrap">True</property> |
1651 | - </object> |
1652 | - <packing> |
1653 | - <property name="left_attach">2</property> |
1654 | - <property name="right_attach">3</property> |
1655 | - <property name="top_attach">1</property> |
1656 | - <property name="bottom_attach">2</property> |
1657 | - </packing> |
1658 | - </child> |
1659 | - <child> |
1660 | - <placeholder/> |
1661 | - </child> |
1662 | - <child> |
1663 | - <placeholder/> |
1664 | - </child> |
1665 | - </object> |
1666 | - <packing> |
1667 | - <property name="expand">False</property> |
1668 | - <property name="fill">True</property> |
1669 | - <property name="position">0</property> |
1670 | - </packing> |
1671 | - </child> |
1672 | - </object> |
1673 | - <packing> |
1674 | - <property name="expand">True</property> |
1675 | - <property name="fill">True</property> |
1676 | - <property name="position">0</property> |
1677 | - </packing> |
1678 | - </child> |
1679 | - <child> |
1680 | - <placeholder/> |
1681 | - </child> |
1682 | - </object> |
1683 | - </child> |
1684 | - </object> |
1685 | - </child> |
1686 | - <child type="label_item"> |
1687 | - <placeholder/> |
1688 | - </child> |
1689 | - </object> |
1690 | - <packing> |
1691 | - <property name="expand">False</property> |
1692 | - <property name="fill">True</property> |
1693 | - <property name="position">1</property> |
1694 | - </packing> |
1695 | - </child> |
1696 | - </object> |
1697 | - </child> |
1698 | - </object> |
1699 | - </child> |
1700 | - </object> |
1701 | - </child> |
1702 | - </object> |
1703 | - <packing> |
1704 | - <property name="expand">True</property> |
1705 | - <property name="fill">True</property> |
1706 | - <property name="position">0</property> |
1707 | - </packing> |
1708 | - </child> |
1709 | - </object> |
1710 | -</interface> |
1711 | |
1712 | === removed file 'data/gtk/volumes.ui' |
1713 | --- data/gtk/volumes.ui 2011-07-11 11:19:09 +0000 |
1714 | +++ data/gtk/volumes.ui 1970-01-01 00:00:00 +0000 |
1715 | @@ -1,98 +0,0 @@ |
1716 | -<?xml version="1.0" encoding="UTF-8"?> |
1717 | -<interface> |
1718 | - <requires lib="gtk+" version="2.22"/> |
1719 | - <!-- interface-naming-policy project-wide --> |
1720 | - <object class="GtkAlignment" id="itself"> |
1721 | - <property name="visible">True</property> |
1722 | - <property name="can_focus">False</property> |
1723 | - <child> |
1724 | - <object class="GtkScrolledWindow" id="scrolledwindow1"> |
1725 | - <property name="visible">True</property> |
1726 | - <property name="can_focus">True</property> |
1727 | - <property name="hscrollbar_policy">automatic</property> |
1728 | - <property name="vscrollbar_policy">automatic</property> |
1729 | - <property name="shadow_type">in</property> |
1730 | - <child> |
1731 | - <object class="GtkTreeView" id="volumes_view"> |
1732 | - <property name="visible">True</property> |
1733 | - <property name="can_focus">True</property> |
1734 | - <property name="model">volumes_store</property> |
1735 | - <property name="rules_hint">True</property> |
1736 | - <property name="tooltip_column">0</property> |
1737 | - <signal name="row-activated" handler="on_volumes_view_row_activated" swapped="no"/> |
1738 | - <child> |
1739 | - <object class="GtkTreeViewColumn" id="treeviewcolumn2"> |
1740 | - <property name="resizable">True</property> |
1741 | - <property name="sizing">autosize</property> |
1742 | - <property name="expand">True</property> |
1743 | - <child> |
1744 | - <object class="GtkCellRendererPixbuf" id="cellrendererpixbuf1"/> |
1745 | - <attributes> |
1746 | - <attribute name="sensitive">1</attribute> |
1747 | - <attribute name="icon-name">2</attribute> |
1748 | - <attribute name="stock-size">5</attribute> |
1749 | - </attributes> |
1750 | - </child> |
1751 | - <child> |
1752 | - <object class="GtkCellRendererText" id="text_renderer"> |
1753 | - <property name="ellipsize">end</property> |
1754 | - <property name="width_chars">80</property> |
1755 | - </object> |
1756 | - <attributes> |
1757 | - <attribute name="markup">0</attribute> |
1758 | - <attribute name="text">0</attribute> |
1759 | - </attributes> |
1760 | - </child> |
1761 | - </object> |
1762 | - </child> |
1763 | - <child> |
1764 | - <object class="GtkTreeViewColumn" id="treeviewcolumn3"> |
1765 | - <property name="sizing">autosize</property> |
1766 | - <property name="title" translatable="yes">Sync locally?</property> |
1767 | - <child> |
1768 | - <object class="GtkCellRendererToggle" id="cellrenderertoggle1"> |
1769 | - <property name="indicator_size">15</property> |
1770 | - <signal name="toggled" handler="on_subscribed_toggled" swapped="no"/> |
1771 | - </object> |
1772 | - <attributes> |
1773 | - <attribute name="sensitive">4</attribute> |
1774 | - <attribute name="visible">3</attribute> |
1775 | - <attribute name="active">1</attribute> |
1776 | - </attributes> |
1777 | - </child> |
1778 | - <child> |
1779 | - <object class="GtkCellRendererText" id="cellrenderertext1"> |
1780 | - <property name="visible">False</property> |
1781 | - </object> |
1782 | - <attributes> |
1783 | - <attribute name="text">6</attribute> |
1784 | - </attributes> |
1785 | - </child> |
1786 | - </object> |
1787 | - </child> |
1788 | - </object> |
1789 | - </child> |
1790 | - </object> |
1791 | - </child> |
1792 | - </object> |
1793 | - <object class="GtkTreeStore" id="volumes_store"> |
1794 | - <columns> |
1795 | - <!-- column-name description --> |
1796 | - <column type="gchararray"/> |
1797 | - <!-- column-name subscribed --> |
1798 | - <column type="gboolean"/> |
1799 | - <!-- column-name icon-name --> |
1800 | - <column type="gchararray"/> |
1801 | - <!-- column-name subscribed-visible --> |
1802 | - <column type="gboolean"/> |
1803 | - <!-- column-name subscribed-sensitive --> |
1804 | - <column type="gboolean"/> |
1805 | - <!-- column-name icon-size --> |
1806 | - <column type="gint"/> |
1807 | - <!-- column-name identifier --> |
1808 | - <column type="gchararray"/> |
1809 | - <!-- column-name path --> |
1810 | - <column type="gchararray"/> |
1811 | - </columns> |
1812 | - </object> |
1813 | -</interface> |
1814 | |
1815 | === renamed file 'data/u1icon.png' => 'data/icon.png' |
1816 | === added file 'data/logo.png' |
1817 | Binary files data/logo.png 1970-01-01 00:00:00 +0000 and data/logo.png 2012-03-06 15:41:39 +0000 differ |
1818 | === added file 'data/progress_arrow_grey.png' |
1819 | Binary files data/progress_arrow_grey.png 1970-01-01 00:00:00 +0000 and data/progress_arrow_grey.png 2012-03-06 15:41:39 +0000 differ |
1820 | === added file 'data/progress_arrow_orange.png' |
1821 | Binary files data/progress_arrow_orange.png 1970-01-01 00:00:00 +0000 and data/progress_arrow_orange.png 2012-03-06 15:41:39 +0000 differ |
1822 | === added file 'data/progress_finish_grey.png' |
1823 | Binary files data/progress_finish_grey.png 1970-01-01 00:00:00 +0000 and data/progress_finish_grey.png 2012-03-06 15:41:39 +0000 differ |
1824 | === added file 'data/progress_finish_orange.png' |
1825 | Binary files data/progress_finish_orange.png 1970-01-01 00:00:00 +0000 and data/progress_finish_orange.png 2012-03-06 15:41:39 +0000 differ |
1826 | === added file 'data/progress_tick.png' |
1827 | Binary files data/progress_tick.png 1970-01-01 00:00:00 +0000 and data/progress_tick.png 2012-03-06 15:41:39 +0000 differ |
1828 | === modified file 'data/qt/account.ui' |
1829 | --- data/qt/account.ui 2011-09-06 13:43:25 +0000 |
1830 | +++ data/qt/account.ui 2012-03-06 15:41:39 +0000 |
1831 | @@ -11,7 +11,7 @@ |
1832 | </rect> |
1833 | </property> |
1834 | <property name="windowTitle"> |
1835 | - <string>Form</string> |
1836 | + <string notr="true">Form</string> |
1837 | </property> |
1838 | <layout class="QVBoxLayout" name="verticalLayout"> |
1839 | <property name="margin"> |
1840 | @@ -25,14 +25,17 @@ |
1841 | <item row="0" column="2"> |
1842 | <widget class="GoToWebButton" name="edit_profile_button"> |
1843 | <property name="text"> |
1844 | - <string>Edit personal details online</string> |
1845 | + <string notr="true">Edit personal details online</string> |
1846 | + </property> |
1847 | + <property name="default"> |
1848 | + <bool>true</bool> |
1849 | </property> |
1850 | </widget> |
1851 | </item> |
1852 | <item row="2" column="0"> |
1853 | <widget class="QGroupBox" name="services"> |
1854 | <property name="title"> |
1855 | - <string>Your services</string> |
1856 | + <string notr="true">Your services</string> |
1857 | </property> |
1858 | <layout class="QVBoxLayout" name="verticalLayout_3"> |
1859 | <property name="leftMargin"> |
1860 | @@ -67,7 +70,7 @@ |
1861 | <item row="0" column="0"> |
1862 | <widget class="QGroupBox" name="profile_info"> |
1863 | <property name="title"> |
1864 | - <string>Personal details</string> |
1865 | + <string notr="true">Personal details</string> |
1866 | </property> |
1867 | <layout class="QVBoxLayout" name="verticalLayout_4"> |
1868 | <property name="leftMargin"> |
1869 | @@ -109,7 +112,10 @@ |
1870 | <item row="2" column="2"> |
1871 | <widget class="GoToWebButton" name="edit_services_button"> |
1872 | <property name="text"> |
1873 | - <string>Edit your services online</string> |
1874 | + <string notr="true">Edit your services online</string> |
1875 | + </property> |
1876 | + <property name="default"> |
1877 | + <bool>true</bool> |
1878 | </property> |
1879 | </widget> |
1880 | </item> |
1881 | |
1882 | === modified file 'data/qt/controlpanel.ui' |
1883 | --- data/qt/controlpanel.ui 2011-09-09 17:16:20 +0000 |
1884 | +++ data/qt/controlpanel.ui 2012-03-06 15:41:39 +0000 |
1885 | @@ -160,7 +160,10 @@ |
1886 | <item> |
1887 | <widget class="GoToWebButton" name="get_more_space_button"> |
1888 | <property name="text"> |
1889 | - <string>Get more storage</string> |
1890 | + <string notr="true">Get more storage</string> |
1891 | + </property> |
1892 | + <property name="default"> |
1893 | + <bool>true</bool> |
1894 | </property> |
1895 | </widget> |
1896 | </item> |
1897 | @@ -235,22 +238,22 @@ |
1898 | </property> |
1899 | <widget class="FoldersPanel" name="folders_tab"> |
1900 | <attribute name="title"> |
1901 | - <string>Folders</string> |
1902 | + <string notr="true">Folders</string> |
1903 | </attribute> |
1904 | </widget> |
1905 | <widget class="DevicesPanel" name="devices_tab"> |
1906 | <attribute name="title"> |
1907 | - <string>Devices</string> |
1908 | + <string notr="true">Devices</string> |
1909 | </attribute> |
1910 | </widget> |
1911 | <widget class="PreferencesPanel" name="preferences_tab"> |
1912 | <attribute name="title"> |
1913 | - <string>Settings</string> |
1914 | + <string notr="true">Settings</string> |
1915 | </attribute> |
1916 | </widget> |
1917 | <widget class="AccountPanel" name="account_tab"> |
1918 | <attribute name="title"> |
1919 | - <string>Account information</string> |
1920 | + <string notr="true">Account information</string> |
1921 | </attribute> |
1922 | </widget> |
1923 | </widget> |
1924 | @@ -260,7 +263,7 @@ |
1925 | </layout> |
1926 | </widget> |
1927 | <widget class="QWidget" name="empty"/> |
1928 | - <widget class="SignInPanel" name="signin"/> |
1929 | + <widget class="UbuntuOneWizard" name="wizard"/> |
1930 | </widget> |
1931 | </item> |
1932 | <item> |
1933 | @@ -287,7 +290,7 @@ |
1934 | <item> |
1935 | <widget class="GoToWebButton" name="help_button"> |
1936 | <property name="text"> |
1937 | - <string>Get help online</string> |
1938 | + <string notr="true">Get help online</string> |
1939 | </property> |
1940 | </widget> |
1941 | </item> |
1942 | @@ -312,7 +315,7 @@ |
1943 | </font> |
1944 | </property> |
1945 | <property name="text"> |
1946 | - <string>Talk to us</string> |
1947 | + <string notr="true">Talk to us</string> |
1948 | </property> |
1949 | </widget> |
1950 | </item> |
1951 | @@ -404,9 +407,9 @@ |
1952 | <container>1</container> |
1953 | </customwidget> |
1954 | <customwidget> |
1955 | - <class>SignInPanel</class> |
1956 | - <extends>QWidget</extends> |
1957 | - <header>ubuntuone.controlpanel.gui.qt.signin</header> |
1958 | + <class>UbuntuOneWizard</class> |
1959 | + <extends>QWizard</extends> |
1960 | + <header>ubuntuone.controlpanel.gui.qt.wizard</header> |
1961 | <container>1</container> |
1962 | </customwidget> |
1963 | </customwidgets> |
1964 | |
1965 | === modified file 'data/qt/device.ui' |
1966 | --- data/qt/device.ui 2011-08-23 16:03:31 +0000 |
1967 | +++ data/qt/device.ui 2012-03-06 15:41:39 +0000 |
1968 | @@ -24,7 +24,7 @@ |
1969 | <item> |
1970 | <widget class="QLabel" name="device_name_label"> |
1971 | <property name="text"> |
1972 | - <string>Local device</string> |
1973 | + <string notr="true">Local device</string> |
1974 | </property> |
1975 | </widget> |
1976 | </item> |
1977 | @@ -44,7 +44,7 @@ |
1978 | <item> |
1979 | <widget class="QPushButton" name="remove_device_button"> |
1980 | <property name="text"> |
1981 | - <string>Remove</string> |
1982 | + <string notr="true">Remove</string> |
1983 | </property> |
1984 | <property name="secondary" stdset="0"> |
1985 | <bool>true</bool> |
1986 | |
1987 | === modified file 'data/qt/device_remote.ui' |
1988 | --- data/qt/device_remote.ui 2011-11-28 15:06:18 +0000 |
1989 | +++ data/qt/device_remote.ui 2012-03-06 15:41:39 +0000 |
1990 | @@ -24,7 +24,7 @@ |
1991 | <item> |
1992 | <widget class="QLabel" name="device_name_label"> |
1993 | <property name="text"> |
1994 | - <string>Local device</string> |
1995 | + <string notr="true">Non local device</string> |
1996 | </property> |
1997 | </widget> |
1998 | </item> |
1999 | |
2000 | === modified file 'data/qt/devices.ui' |
2001 | --- data/qt/devices.ui 2011-08-05 18:07:09 +0000 |
2002 | +++ data/qt/devices.ui 2012-03-06 15:41:39 +0000 |
2003 | @@ -23,7 +23,7 @@ |
2004 | <item> |
2005 | <widget class="QGroupBox" name="local_device"> |
2006 | <property name="title"> |
2007 | - <string>This device</string> |
2008 | + <string notr="true">This device</string> |
2009 | </property> |
2010 | <layout class="QVBoxLayout" name="verticalLayout"> |
2011 | <property name="margin"> |
2012 | @@ -36,9 +36,9 @@ |
2013 | </widget> |
2014 | </item> |
2015 | <item> |
2016 | - <widget class="QGroupBox" name="oher_devices"> |
2017 | + <widget class="QGroupBox" name="other_devices"> |
2018 | <property name="title"> |
2019 | - <string>Other devices</string> |
2020 | + <string notr="true">Other devices</string> |
2021 | </property> |
2022 | <layout class="QVBoxLayout" name="verticalLayout_2"> |
2023 | <property name="margin"> |
2024 | @@ -90,7 +90,10 @@ |
2025 | <item> |
2026 | <widget class="GoToWebButton" name="manage_devices_button"> |
2027 | <property name="text"> |
2028 | - <string>Go to the web page to manage your other devices</string> |
2029 | + <string notr="true">Go to the web page to manage your other devices</string> |
2030 | + </property> |
2031 | + <property name="default"> |
2032 | + <bool>true</bool> |
2033 | </property> |
2034 | </widget> |
2035 | </item> |
2036 | |
2037 | === modified file 'data/qt/folders.ui' |
2038 | --- data/qt/folders.ui 2011-08-23 16:03:31 +0000 |
2039 | +++ data/qt/folders.ui 2012-03-06 15:41:39 +0000 |
2040 | @@ -41,7 +41,7 @@ |
2041 | </sizepolicy> |
2042 | </property> |
2043 | <property name="text"> |
2044 | - <string>Go to the web for public and private sharing options</string> |
2045 | + <string notr="true">Go to the web for public and private sharing options</string> |
2046 | </property> |
2047 | </widget> |
2048 | </item> |
2049 | @@ -101,17 +101,17 @@ |
2050 | </attribute> |
2051 | <column> |
2052 | <property name="text"> |
2053 | - <string>Name</string> |
2054 | - </property> |
2055 | - </column> |
2056 | - <column> |
2057 | - <property name="text"> |
2058 | - <string>Sync Locally?</string> |
2059 | - </property> |
2060 | - </column> |
2061 | - <column> |
2062 | - <property name="text"> |
2063 | - <string>Explore</string> |
2064 | + <string notr="true">Name</string> |
2065 | + </property> |
2066 | + </column> |
2067 | + <column> |
2068 | + <property name="text"> |
2069 | + <string notr="true">Sync Locally?</string> |
2070 | + </property> |
2071 | + </column> |
2072 | + <column> |
2073 | + <property name="text"> |
2074 | + <string notr="true">Explore</string> |
2075 | </property> |
2076 | </column> |
2077 | </widget> |
2078 | @@ -153,7 +153,10 @@ |
2079 | </sizepolicy> |
2080 | </property> |
2081 | <property name="text"> |
2082 | - <string>Add a folder from this computer</string> |
2083 | + <string notr="true">Add a folder from this computer</string> |
2084 | + </property> |
2085 | + <property name="default"> |
2086 | + <bool>true</bool> |
2087 | </property> |
2088 | </widget> |
2089 | </item> |
2090 | |
2091 | === modified file 'data/qt/images.qrc' |
2092 | --- data/qt/images.qrc 2012-01-30 18:49:50 +0000 |
2093 | +++ data/qt/images.qrc 2012-03-06 15:41:39 +0000 |
2094 | @@ -1,20 +1,25 @@ |
2095 | <RCC> |
2096 | <qresource prefix="/"> |
2097 | - <file>../u1icon.png</file> |
2098 | + <file>../banner.png</file> |
2099 | + <file>../computer.png</file> |
2100 | <file>../external_icon_orange.png</file> |
2101 | + <file>../external_icon_white.png</file> |
2102 | + <file>../icon.png</file> |
2103 | + <file>../folder.png</file> |
2104 | + <file>../logo.png</file> |
2105 | + <file>../phone.png</file> |
2106 | + <file>../progress_arrow_grey.png</file> |
2107 | + <file>../progress_arrow_orange.png</file> |
2108 | + <file>../progress_finish_grey.png</file> |
2109 | + <file>../progress_finish_orange.png</file> |
2110 | + <file>../progress_tick.png</file> |
2111 | + <file>../sync_status_alert.png</file> |
2112 | <file>../sync_status_disconnected.png</file> |
2113 | - <file>../sync_status_alert.png</file> |
2114 | + <file>../sync_status_loading.png</file> |
2115 | <file>../sync_status_sync_done.png</file> |
2116 | <file>../sync_status_syncing.png</file> |
2117 | - <file>../sync_status_loading.png</file> |
2118 | - <file>../folder.png</file> |
2119 | - <file>../computer.png</file> |
2120 | - <file>../phone.png</file> |
2121 | - <file>../twitter.png</file> |
2122 | - <file>../twitter.png</file> |
2123 | - <file>../facebook.png</file> |
2124 | - <file>../facebook.png</file> |
2125 | - <file>../external_icon_white.png</file> |
2126 | + <file>../twitter.png</file> |
2127 | + <file>../facebook.png</file> |
2128 | <file>../Ubuntu-R.ttf</file> |
2129 | <file>../Ubuntu-B.ttf</file> |
2130 | <file>ubuntuone.qss</file> |
2131 | |
2132 | === modified file 'data/qt/loadingoverlay.ui' |
2133 | --- data/qt/loadingoverlay.ui 2011-08-05 15:19:12 +0000 |
2134 | +++ data/qt/loadingoverlay.ui 2012-03-06 15:41:39 +0000 |
2135 | @@ -10,9 +10,6 @@ |
2136 | <height>230</height> |
2137 | </rect> |
2138 | </property> |
2139 | - <property name="windowTitle"> |
2140 | - <string>Frame</string> |
2141 | - </property> |
2142 | <layout class="QVBoxLayout" name="verticalLayout"> |
2143 | <property name="topMargin"> |
2144 | <number>30</number> |
2145 | @@ -61,7 +58,7 @@ |
2146 | </font> |
2147 | </property> |
2148 | <property name="text"> |
2149 | - <string>Getting information, please wait...</string> |
2150 | + <string notr="true">Getting information, please wait...</string> |
2151 | </property> |
2152 | </widget> |
2153 | </item> |
2154 | |
2155 | === modified file 'data/qt/mainwindow.ui' |
2156 | --- data/qt/mainwindow.ui 2011-08-18 22:01:02 +0000 |
2157 | +++ data/qt/mainwindow.ui 2012-03-06 15:41:39 +0000 |
2158 | @@ -23,11 +23,11 @@ |
2159 | </size> |
2160 | </property> |
2161 | <property name="windowTitle"> |
2162 | - <string>Ubuntu One</string> |
2163 | + <string notr="true">Ubuntu One</string> |
2164 | </property> |
2165 | <property name="windowIcon"> |
2166 | <iconset resource="images.qrc"> |
2167 | - <normaloff>:/u1icon.png</normaloff>:/u1icon.png</iconset> |
2168 | + <normaloff>:/icon.png</normaloff>:/icon.png</iconset> |
2169 | </property> |
2170 | <widget class="QWidget" name="centralwidget"> |
2171 | <property name="sizePolicy"> |
2172 | |
2173 | === modified file 'data/qt/preferences.ui' |
2174 | --- data/qt/preferences.ui 2011-09-08 22:22:46 +0000 |
2175 | +++ data/qt/preferences.ui 2012-03-06 15:41:39 +0000 |
2176 | @@ -23,7 +23,7 @@ |
2177 | <item> |
2178 | <widget class="QGroupBox" name="bandwidth_settings"> |
2179 | <property name="title"> |
2180 | - <string>Bandwidth Settings</string> |
2181 | + <string notr="true">Bandwidth Settings</string> |
2182 | </property> |
2183 | <layout class="QGridLayout" name="gridLayout"> |
2184 | <property name="margin"> |
2185 | @@ -32,7 +32,7 @@ |
2186 | <item row="0" column="0"> |
2187 | <widget class="QCheckBox" name="limit_uploads_checkbox"> |
2188 | <property name="text"> |
2189 | - <string>Limit upload speed to</string> |
2190 | + <string notr="true">Limit upload speed to</string> |
2191 | </property> |
2192 | </widget> |
2193 | </item> |
2194 | @@ -49,14 +49,14 @@ |
2195 | <item row="0" column="2"> |
2196 | <widget class="QLabel" name="kbps_label_1"> |
2197 | <property name="text"> |
2198 | - <string>Kilobits per second</string> |
2199 | + <string notr="true">Kilobits per second</string> |
2200 | </property> |
2201 | </widget> |
2202 | </item> |
2203 | <item row="2" column="0"> |
2204 | <widget class="QCheckBox" name="limit_downloads_checkbox"> |
2205 | <property name="text"> |
2206 | - <string>Limit download speed to</string> |
2207 | + <string notr="true">Limit download speed to</string> |
2208 | </property> |
2209 | </widget> |
2210 | </item> |
2211 | @@ -73,7 +73,7 @@ |
2212 | <item row="2" column="2"> |
2213 | <widget class="QLabel" name="kbps_label_2"> |
2214 | <property name="text"> |
2215 | - <string>Kilobits per second</string> |
2216 | + <string notr="true">Kilobits per second</string> |
2217 | </property> |
2218 | </widget> |
2219 | </item> |
2220 | @@ -93,7 +93,7 @@ |
2221 | <item row="4" column="0" colspan="3"> |
2222 | <widget class="QLabel" name="label_2"> |
2223 | <property name="text"> |
2224 | - <string>Please note that your files will not sync if you set bandwidth to 0</string> |
2225 | + <string notr="true">Please note that your files will not sync if you set bandwidth to 0</string> |
2226 | </property> |
2227 | <property name="scaledContents"> |
2228 | <bool>false</bool> |
2229 | @@ -122,7 +122,7 @@ |
2230 | <item> |
2231 | <widget class="QGroupBox" name="file_sync_settings"> |
2232 | <property name="title"> |
2233 | - <string>File Sync Settings</string> |
2234 | + <string notr="true">File Sync Settings</string> |
2235 | </property> |
2236 | <layout class="QVBoxLayout" name="verticalLayout_1"> |
2237 | <property name="margin"> |
2238 | @@ -131,28 +131,28 @@ |
2239 | <item> |
2240 | <widget class="QCheckBox" name="autoconnect_checkbox"> |
2241 | <property name="text"> |
2242 | - <string>Connect automatically when computer starts</string> |
2243 | + <string notr="true">Connect automatically when computer starts</string> |
2244 | </property> |
2245 | </widget> |
2246 | </item> |
2247 | <item> |
2248 | <widget class="QCheckBox" name="udf_autosubscribe_checkbox"> |
2249 | <property name="text"> |
2250 | - <string>Automatically sync all new cloud folders to this computer</string> |
2251 | + <string notr="true">Automatically sync all new cloud folders to this computer</string> |
2252 | </property> |
2253 | </widget> |
2254 | </item> |
2255 | <item> |
2256 | <widget class="QCheckBox" name="share_autosubscribe_checkbox"> |
2257 | <property name="text"> |
2258 | - <string>Automatically sync all folders shared with me to this computer</string> |
2259 | + <string notr="true">Automatically sync all folders shared with me to this computer</string> |
2260 | </property> |
2261 | </widget> |
2262 | </item> |
2263 | <item> |
2264 | <widget class="QCheckBox" name="show_all_notifications_checkbox"> |
2265 | <property name="text"> |
2266 | - <string>Allow all notifications to this device</string> |
2267 | + <string notr="true">Allow all notifications to this device</string> |
2268 | </property> |
2269 | </widget> |
2270 | </item> |
2271 | @@ -191,22 +191,25 @@ |
2272 | </spacer> |
2273 | </item> |
2274 | <item> |
2275 | - <widget class="QPushButton" name="apply_changes_button"> |
2276 | - <property name="text"> |
2277 | - <string>Apply these settings</string> |
2278 | - </property> |
2279 | - </widget> |
2280 | - </item> |
2281 | - <item> |
2282 | <widget class="QPushButton" name="restore_defaults_button"> |
2283 | <property name="text"> |
2284 | - <string>Default settings</string> |
2285 | + <string notr="true">Default settings</string> |
2286 | </property> |
2287 | <property name="secondary" stdset="0"> |
2288 | <bool>true</bool> |
2289 | </property> |
2290 | </widget> |
2291 | </item> |
2292 | + <item> |
2293 | + <widget class="QPushButton" name="apply_changes_button"> |
2294 | + <property name="text"> |
2295 | + <string notr="true">Apply these settings</string> |
2296 | + </property> |
2297 | + <property name="default"> |
2298 | + <bool>true</bool> |
2299 | + </property> |
2300 | + </widget> |
2301 | + </item> |
2302 | </layout> |
2303 | </item> |
2304 | </layout> |
2305 | |
2306 | === added file 'data/qt/side_widget.ui' |
2307 | --- data/qt/side_widget.ui 1970-01-01 00:00:00 +0000 |
2308 | +++ data/qt/side_widget.ui 2012-03-06 15:41:39 +0000 |
2309 | @@ -0,0 +1,214 @@ |
2310 | +<?xml version="1.0" encoding="UTF-8"?> |
2311 | +<ui version="4.0"> |
2312 | + <class>SideWidget</class> |
2313 | + <widget class="QFrame" name="SideWidget"> |
2314 | + <property name="geometry"> |
2315 | + <rect> |
2316 | + <x>0</x> |
2317 | + <y>0</y> |
2318 | + <width>170</width> |
2319 | + <height>466</height> |
2320 | + </rect> |
2321 | + </property> |
2322 | + <property name="sizePolicy"> |
2323 | + <sizepolicy hsizetype="Minimum" vsizetype="Preferred"> |
2324 | + <horstretch>0</horstretch> |
2325 | + <verstretch>0</verstretch> |
2326 | + </sizepolicy> |
2327 | + </property> |
2328 | + <property name="minimumSize"> |
2329 | + <size> |
2330 | + <width>170</width> |
2331 | + <height>466</height> |
2332 | + </size> |
2333 | + </property> |
2334 | + <layout class="QVBoxLayout" name="verticalLayout"> |
2335 | + <property name="spacing"> |
2336 | + <number>40</number> |
2337 | + </property> |
2338 | + <property name="margin"> |
2339 | + <number>0</number> |
2340 | + </property> |
2341 | + <item> |
2342 | + <widget class="QLabel" name="ubuntu_one_logo_label"> |
2343 | + <property name="sizePolicy"> |
2344 | + <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> |
2345 | + <horstretch>0</horstretch> |
2346 | + <verstretch>0</verstretch> |
2347 | + </sizepolicy> |
2348 | + </property> |
2349 | + <property name="pixmap"> |
2350 | + <pixmap resource="images.qrc">:/logo.png</pixmap> |
2351 | + </property> |
2352 | + </widget> |
2353 | + </item> |
2354 | + <item> |
2355 | + <widget class="QFrame" name="states_frame"> |
2356 | + <property name="sizePolicy"> |
2357 | + <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> |
2358 | + <horstretch>0</horstretch> |
2359 | + <verstretch>0</verstretch> |
2360 | + </sizepolicy> |
2361 | + </property> |
2362 | + <layout class="QVBoxLayout" name="verticalLayout_2"> |
2363 | + <property name="spacing"> |
2364 | + <number>20</number> |
2365 | + </property> |
2366 | + <property name="margin"> |
2367 | + <number>0</number> |
2368 | + </property> |
2369 | + <item> |
2370 | + <layout class="QHBoxLayout" name="horizontalLayout"> |
2371 | + <property name="spacing"> |
2372 | + <number>7</number> |
2373 | + </property> |
2374 | + <item> |
2375 | + <widget class="QLabel" name="install_icon"> |
2376 | + <property name="sizePolicy"> |
2377 | + <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> |
2378 | + <horstretch>0</horstretch> |
2379 | + <verstretch>0</verstretch> |
2380 | + </sizepolicy> |
2381 | + </property> |
2382 | + <property name="pixmap"> |
2383 | + <pixmap resource="images.qrc">:/progress_arrow_grey.png</pixmap> |
2384 | + </property> |
2385 | + </widget> |
2386 | + </item> |
2387 | + <item> |
2388 | + <widget class="QLabel" name="install_label"> |
2389 | + <property name="enabled"> |
2390 | + <bool>true</bool> |
2391 | + </property> |
2392 | + <property name="text"> |
2393 | + <string notr="true">Install</string> |
2394 | + </property> |
2395 | + </widget> |
2396 | + </item> |
2397 | + </layout> |
2398 | + </item> |
2399 | + <item> |
2400 | + <layout class="QHBoxLayout" name="horizontalLayout_2"> |
2401 | + <property name="spacing"> |
2402 | + <number>7</number> |
2403 | + </property> |
2404 | + <property name="sizeConstraint"> |
2405 | + <enum>QLayout::SetDefaultConstraint</enum> |
2406 | + </property> |
2407 | + <item> |
2408 | + <widget class="QLabel" name="signin_icon"> |
2409 | + <property name="sizePolicy"> |
2410 | + <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> |
2411 | + <horstretch>0</horstretch> |
2412 | + <verstretch>0</verstretch> |
2413 | + </sizepolicy> |
2414 | + </property> |
2415 | + <property name="text"> |
2416 | + <string/> |
2417 | + </property> |
2418 | + <property name="pixmap"> |
2419 | + <pixmap resource="images.qrc">:/progress_arrow_grey.png</pixmap> |
2420 | + </property> |
2421 | + </widget> |
2422 | + </item> |
2423 | + <item> |
2424 | + <widget class="QLabel" name="signin_label"> |
2425 | + <property name="enabled"> |
2426 | + <bool>true</bool> |
2427 | + </property> |
2428 | + <property name="text"> |
2429 | + <string notr="true">Sign In</string> |
2430 | + </property> |
2431 | + </widget> |
2432 | + </item> |
2433 | + </layout> |
2434 | + </item> |
2435 | + <item> |
2436 | + <layout class="QHBoxLayout" name="horizontalLayout_4"> |
2437 | + <property name="spacing"> |
2438 | + <number>7</number> |
2439 | + </property> |
2440 | + <item> |
2441 | + <widget class="QLabel" name="folders_icon"> |
2442 | + <property name="sizePolicy"> |
2443 | + <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> |
2444 | + <horstretch>0</horstretch> |
2445 | + <verstretch>0</verstretch> |
2446 | + </sizepolicy> |
2447 | + </property> |
2448 | + <property name="text"> |
2449 | + <string/> |
2450 | + </property> |
2451 | + <property name="pixmap"> |
2452 | + <pixmap resource="images.qrc">:/progress_arrow_grey.png</pixmap> |
2453 | + </property> |
2454 | + </widget> |
2455 | + </item> |
2456 | + <item> |
2457 | + <widget class="QLabel" name="folders_label"> |
2458 | + <property name="enabled"> |
2459 | + <bool>true</bool> |
2460 | + </property> |
2461 | + <property name="text"> |
2462 | + <string notr="true">Select sync folders</string> |
2463 | + </property> |
2464 | + </widget> |
2465 | + </item> |
2466 | + </layout> |
2467 | + </item> |
2468 | + <item> |
2469 | + <layout class="QHBoxLayout" name="horizontalLayout_5"> |
2470 | + <property name="spacing"> |
2471 | + <number>7</number> |
2472 | + </property> |
2473 | + <item> |
2474 | + <widget class="QLabel" name="sync_icon"> |
2475 | + <property name="sizePolicy"> |
2476 | + <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> |
2477 | + <horstretch>0</horstretch> |
2478 | + <verstretch>0</verstretch> |
2479 | + </sizepolicy> |
2480 | + </property> |
2481 | + <property name="text"> |
2482 | + <string/> |
2483 | + </property> |
2484 | + <property name="pixmap"> |
2485 | + <pixmap resource="images.qrc">:/progress_finish_grey.png</pixmap> |
2486 | + </property> |
2487 | + </widget> |
2488 | + </item> |
2489 | + <item> |
2490 | + <widget class="QLabel" name="sync_label"> |
2491 | + <property name="enabled"> |
2492 | + <bool>true</bool> |
2493 | + </property> |
2494 | + <property name="text"> |
2495 | + <string notr="true">Sync, stream, share!</string> |
2496 | + </property> |
2497 | + </widget> |
2498 | + </item> |
2499 | + </layout> |
2500 | + </item> |
2501 | + </layout> |
2502 | + </widget> |
2503 | + </item> |
2504 | + <item> |
2505 | + <spacer name="verticalSpacer"> |
2506 | + <property name="orientation"> |
2507 | + <enum>Qt::Vertical</enum> |
2508 | + </property> |
2509 | + <property name="sizeHint" stdset="0"> |
2510 | + <size> |
2511 | + <width>20</width> |
2512 | + <height>40</height> |
2513 | + </size> |
2514 | + </property> |
2515 | + </spacer> |
2516 | + </item> |
2517 | + </layout> |
2518 | + </widget> |
2519 | + <resources> |
2520 | + <include location="images.qrc"/> |
2521 | + </resources> |
2522 | + <connections/> |
2523 | +</ui> |
2524 | |
2525 | === modified file 'data/qt/signin.ui' |
2526 | --- data/qt/signin.ui 2011-12-19 21:10:06 +0000 |
2527 | +++ data/qt/signin.ui 2012-03-06 15:41:39 +0000 |
2528 | @@ -6,155 +6,133 @@ |
2529 | <rect> |
2530 | <x>0</x> |
2531 | <y>0</y> |
2532 | - <width>344</width> |
2533 | - <height>312</height> |
2534 | + <width>370</width> |
2535 | + <height>447</height> |
2536 | </rect> |
2537 | </property> |
2538 | - <property name="windowTitle"> |
2539 | - <string>Form</string> |
2540 | - </property> |
2541 | - <layout class="QHBoxLayout" name="horizontalLayout_3"> |
2542 | + <layout class="QVBoxLayout" name="verticalLayout_2"> |
2543 | <property name="margin"> |
2544 | <number>0</number> |
2545 | </property> |
2546 | <item> |
2547 | <widget class="QFrame" name="signin"> |
2548 | <layout class="QVBoxLayout" name="sign_in"> |
2549 | - <property name="spacing"> |
2550 | - <number>15</number> |
2551 | - </property> |
2552 | <property name="margin"> |
2553 | - <number>3</number> |
2554 | + <number>0</number> |
2555 | </property> |
2556 | <item> |
2557 | - <widget class="QLabel" name="sign_in_label"> |
2558 | - <property name="text"> |
2559 | - <string>Sign in to Ubuntu One</string> |
2560 | - </property> |
2561 | - </widget> |
2562 | - </item> |
2563 | - <item> |
2564 | - <widget class="QLabel" name="description_label"> |
2565 | - <property name="text"> |
2566 | - <string>Sign in with your existing Ubuntu One username and password.</string> |
2567 | - </property> |
2568 | - </widget> |
2569 | + <widget class="QFrame" name="frame"> |
2570 | + <layout class="QHBoxLayout" name="horizontalLayout_3"> |
2571 | + <property name="leftMargin"> |
2572 | + <number>0</number> |
2573 | + </property> |
2574 | + <property name="topMargin"> |
2575 | + <number>22</number> |
2576 | + </property> |
2577 | + <property name="rightMargin"> |
2578 | + <number>0</number> |
2579 | + </property> |
2580 | + <property name="bottomMargin"> |
2581 | + <number>0</number> |
2582 | + </property> |
2583 | + <item> |
2584 | + <widget class="QLabel" name="banner"> |
2585 | + <property name="text"> |
2586 | + <string/> |
2587 | + </property> |
2588 | + <property name="textFormat"> |
2589 | + <enum>Qt::PlainText</enum> |
2590 | + </property> |
2591 | + <property name="pixmap"> |
2592 | + <pixmap resource="images.qrc">:/banner.png</pixmap> |
2593 | + </property> |
2594 | + <property name="alignment"> |
2595 | + <set>Qt::AlignCenter</set> |
2596 | + </property> |
2597 | + <property name="wordWrap"> |
2598 | + <bool>true</bool> |
2599 | + </property> |
2600 | + </widget> |
2601 | + </item> |
2602 | + </layout> |
2603 | + </widget> |
2604 | + </item> |
2605 | + <item> |
2606 | + <spacer name="verticalSpacer_2"> |
2607 | + <property name="orientation"> |
2608 | + <enum>Qt::Vertical</enum> |
2609 | + </property> |
2610 | + <property name="sizeHint" stdset="0"> |
2611 | + <size> |
2612 | + <width>20</width> |
2613 | + <height>40</height> |
2614 | + </size> |
2615 | + </property> |
2616 | + </spacer> |
2617 | + </item> |
2618 | + <item> |
2619 | + <widget class="QLabel" name="welcome_label"> |
2620 | + <property name="font"> |
2621 | + <font> |
2622 | + <pointsize>11</pointsize> |
2623 | + <weight>50</weight> |
2624 | + <bold>false</bold> |
2625 | + </font> |
2626 | + </property> |
2627 | + <property name="text"> |
2628 | + <string notr="true">Welcome to Ubuntu One</string> |
2629 | + </property> |
2630 | + <property name="alignment"> |
2631 | + <set>Qt::AlignCenter|Qt::AlignHCenter|Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set> |
2632 | + </property> |
2633 | + </widget> |
2634 | + </item> |
2635 | + <item> |
2636 | + <spacer name="verticalSpacer"> |
2637 | + <property name="orientation"> |
2638 | + <enum>Qt::Vertical</enum> |
2639 | + </property> |
2640 | + <property name="sizeHint" stdset="0"> |
2641 | + <size> |
2642 | + <width>20</width> |
2643 | + <height>40</height> |
2644 | + </size> |
2645 | + </property> |
2646 | + </spacer> |
2647 | </item> |
2648 | <item> |
2649 | <layout class="QHBoxLayout" name="horizontalLayout"> |
2650 | <item> |
2651 | - <layout class="QVBoxLayout" name="verticalLayout_2"> |
2652 | - <property name="spacing"> |
2653 | - <number>15</number> |
2654 | - </property> |
2655 | - <item> |
2656 | - <layout class="QVBoxLayout" name="verticalLayout_4"> |
2657 | - <property name="spacing"> |
2658 | - <number>0</number> |
2659 | - </property> |
2660 | - <item> |
2661 | - <widget class="QLabel" name="email_label"> |
2662 | - <property name="text"> |
2663 | - <string>Email address</string> |
2664 | - </property> |
2665 | - </widget> |
2666 | - </item> |
2667 | - <item> |
2668 | - <widget class="QLineEdit" name="email_entry"> |
2669 | - <property name="text"> |
2670 | - <string/> |
2671 | - </property> |
2672 | - </widget> |
2673 | - </item> |
2674 | - </layout> |
2675 | - </item> |
2676 | - <item> |
2677 | - <layout class="QVBoxLayout" name="verticalLayout_3"> |
2678 | - <property name="spacing"> |
2679 | - <number>0</number> |
2680 | - </property> |
2681 | - <item> |
2682 | - <widget class="QLabel" name="password_label"> |
2683 | - <property name="text"> |
2684 | - <string>Password</string> |
2685 | - </property> |
2686 | - </widget> |
2687 | - </item> |
2688 | - <item> |
2689 | - <widget class="QLineEdit" name="password_entry"> |
2690 | - <property name="echoMode"> |
2691 | - <enum>QLineEdit::Password</enum> |
2692 | - </property> |
2693 | - </widget> |
2694 | - </item> |
2695 | - </layout> |
2696 | - </item> |
2697 | - <item> |
2698 | - <layout class="QHBoxLayout" name="horizontalLayout_2"> |
2699 | - <item> |
2700 | - <widget class="QPushButton" name="signin_button"> |
2701 | - <property name="text"> |
2702 | - <string>Sign in</string> |
2703 | - </property> |
2704 | - <property name="default"> |
2705 | - <bool>true</bool> |
2706 | - </property> |
2707 | - </widget> |
2708 | - </item> |
2709 | - <item> |
2710 | - <widget class="QPushButton" name="cancel_button"> |
2711 | - <property name="text"> |
2712 | - <string>Cancel</string> |
2713 | - </property> |
2714 | - <property name="secondary" stdset="0"> |
2715 | - <bool>true</bool> |
2716 | - </property> |
2717 | - </widget> |
2718 | - </item> |
2719 | - <item> |
2720 | - <spacer name="horizontalSpacer"> |
2721 | - <property name="orientation"> |
2722 | - <enum>Qt::Horizontal</enum> |
2723 | - </property> |
2724 | - <property name="sizeHint" stdset="0"> |
2725 | - <size> |
2726 | - <width>40</width> |
2727 | - <height>20</height> |
2728 | - </size> |
2729 | - </property> |
2730 | - </spacer> |
2731 | - </item> |
2732 | - </layout> |
2733 | - </item> |
2734 | - <item> |
2735 | - <layout class="QHBoxLayout" name="horizontalLayout_4"> |
2736 | - <item> |
2737 | - <widget class="GoToWebButton" name="forgot_password_button"> |
2738 | - <property name="sizePolicy"> |
2739 | - <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> |
2740 | - <horstretch>0</horstretch> |
2741 | - <verstretch>0</verstretch> |
2742 | - </sizepolicy> |
2743 | - </property> |
2744 | - <property name="text"> |
2745 | - <string>Forgot your password?</string> |
2746 | - </property> |
2747 | - </widget> |
2748 | - </item> |
2749 | - <item> |
2750 | - <spacer name="horizontalSpacer_3"> |
2751 | - <property name="orientation"> |
2752 | - <enum>Qt::Horizontal</enum> |
2753 | - </property> |
2754 | - <property name="sizeHint" stdset="0"> |
2755 | - <size> |
2756 | - <width>40</width> |
2757 | - <height>20</height> |
2758 | - </size> |
2759 | - </property> |
2760 | - </spacer> |
2761 | - </item> |
2762 | - </layout> |
2763 | + <spacer name="horizontalSpacer"> |
2764 | + <property name="orientation"> |
2765 | + <enum>Qt::Horizontal</enum> |
2766 | + </property> |
2767 | + <property name="sizeHint" stdset="0"> |
2768 | + <size> |
2769 | + <width>40</width> |
2770 | + <height>20</height> |
2771 | + </size> |
2772 | + </property> |
2773 | + </spacer> |
2774 | + </item> |
2775 | + <item> |
2776 | + <layout class="QVBoxLayout" name="verticalLayout"> |
2777 | + <item> |
2778 | + <widget class="QPushButton" name="login_button"> |
2779 | + <property name="text"> |
2780 | + <string notr="true">Existing account</string> |
2781 | + </property> |
2782 | + <property name="default"> |
2783 | + <bool>true</bool> |
2784 | + </property> |
2785 | + </widget> |
2786 | + </item> |
2787 | + <item> |
2788 | + <widget class="QPushButton" name="register_button"> |
2789 | + <property name="text"> |
2790 | + <string notr="true">Setup new account</string> |
2791 | + </property> |
2792 | + </widget> |
2793 | </item> |
2794 | </layout> |
2795 | </item> |
2796 | @@ -173,31 +151,13 @@ |
2797 | </item> |
2798 | </layout> |
2799 | </item> |
2800 | - <item> |
2801 | - <spacer name="verticalSpacer"> |
2802 | - <property name="orientation"> |
2803 | - <enum>Qt::Vertical</enum> |
2804 | - </property> |
2805 | - <property name="sizeHint" stdset="0"> |
2806 | - <size> |
2807 | - <width>20</width> |
2808 | - <height>40</height> |
2809 | - </size> |
2810 | - </property> |
2811 | - </spacer> |
2812 | - </item> |
2813 | </layout> |
2814 | </widget> |
2815 | </item> |
2816 | </layout> |
2817 | </widget> |
2818 | - <customwidgets> |
2819 | - <customwidget> |
2820 | - <class>GoToWebButton</class> |
2821 | - <extends>QPushButton</extends> |
2822 | - <header>ubuntuone.controlpanel.gui.qt.gotoweb</header> |
2823 | - </customwidget> |
2824 | - </customwidgets> |
2825 | - <resources/> |
2826 | + <resources> |
2827 | + <include location="images.qrc"/> |
2828 | + </resources> |
2829 | <connections/> |
2830 | </ui> |
2831 | |
2832 | === modified file 'data/qt/ubuntuone.qss' |
2833 | --- data/qt/ubuntuone.qss 2011-11-23 17:22:33 +0000 |
2834 | +++ data/qt/ubuntuone.qss 2012-03-06 15:41:39 +0000 |
2835 | @@ -12,9 +12,9 @@ |
2836 | border: none; |
2837 | } |
2838 | |
2839 | -QFrame#signin, |
2840 | +UbuntuOneWizard, |
2841 | QFrame#frame_header { |
2842 | - background: #ffffff; |
2843 | + background: white; |
2844 | border-radius: 5px; |
2845 | border-style: solid; |
2846 | border-color: #939389; |
2847 | @@ -59,6 +59,15 @@ |
2848 | font-size: 24px; |
2849 | } |
2850 | |
2851 | +SideWidget { |
2852 | + background-color: white; |
2853 | + border-style: dotted; |
2854 | + border-color: #939389; |
2855 | + border-right-width: 1px; |
2856 | + color: white; |
2857 | + min-height: 100px; |
2858 | +} |
2859 | + |
2860 | QPushButton { |
2861 | border-radius: 5px; |
2862 | border-style: solid; |
2863 | @@ -68,55 +77,57 @@ |
2864 | border-width: 1px; |
2865 | } |
2866 | |
2867 | -QPushButton[enabled="true"] { |
2868 | +QPushButton:disabled { |
2869 | + background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, |
2870 | + stop: 0 #eaeaea, stop: 1.0 #cacaca); |
2871 | + color: #595959; |
2872 | + border-color: #939389; |
2873 | +} |
2874 | + |
2875 | +QPushButton:enabled { |
2876 | + background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, |
2877 | + stop: 0 #ffffff,stop: 1.0 #e6e6e6); |
2878 | + color: #333333; |
2879 | + border-color: #999999; |
2880 | +} |
2881 | + |
2882 | +QPushButton:enabled:focus, |
2883 | +QPushButton:enabled:hover { |
2884 | + background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, |
2885 | + stop: 0 #ffffff,stop: 1.0 #ededed); |
2886 | + color: #333333; |
2887 | + border-color: #999999; |
2888 | +} |
2889 | + |
2890 | +QPushButton:enabled:pressed { |
2891 | + background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, |
2892 | + stop: 0 #d9d9d9,stop: 1.0 #fefefe); |
2893 | + color: #333333; |
2894 | + border-color: #999999; |
2895 | +} |
2896 | + |
2897 | +QPushButton:default:enabled { |
2898 | background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, |
2899 | stop: 0 #fe9e84,stop: 1.0 #dd4814); |
2900 | color: white; |
2901 | border-color: #999999; |
2902 | } |
2903 | |
2904 | -QPushButton:hover[enabled="true"] { |
2905 | +QPushButton:default:enabled:focus, |
2906 | +QPushButton:default:enabled:hover { |
2907 | background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, |
2908 | stop: 0 #ffb19c,stop: 1.0 #dd4814); |
2909 | color: white; |
2910 | border-color: #999999; |
2911 | } |
2912 | |
2913 | -QPushButton:pressed[enabled="true"] { |
2914 | +QPushButton:default:enabled:pressed { |
2915 | background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, |
2916 | stop: 0 #b93f14,stop: 1.0 #dd4814); |
2917 | color: white; |
2918 | border-color: #999999; |
2919 | } |
2920 | |
2921 | -QPushButton[secondary="true"] { |
2922 | - background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, |
2923 | - stop: 0 #ffffff,stop: 1.0 #e6e6e6); |
2924 | - color: #333333; |
2925 | - border-color: #999999; |
2926 | -} |
2927 | - |
2928 | -QPushButton:hover[secondary="true"] { |
2929 | - background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, |
2930 | - stop: 0 #ffffff,stop: 1.0 #ededed); |
2931 | - color: #333333; |
2932 | - border-color: #999999; |
2933 | -} |
2934 | - |
2935 | -QPushButton:pressed[secondary="true"] { |
2936 | - background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, |
2937 | - stop: 0 #d9d9d9,stop: 1.0 #fefefe); |
2938 | - color: #333333; |
2939 | - border-color: #999999; |
2940 | -} |
2941 | - |
2942 | -QPushButton[enabled="false"] { |
2943 | - background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, |
2944 | - stop: 0 #eaeaea, stop: 1.0 #cacaca); |
2945 | - color: #595959; |
2946 | - border-color: #939389; |
2947 | -} |
2948 | - |
2949 | QPushButton#help_button { |
2950 | background: transparent; |
2951 | border: none; |
2952 | @@ -278,6 +289,10 @@ |
2953 | color: #df2d1f; |
2954 | } |
2955 | |
2956 | +QLabel#welcome_label { |
2957 | + font-size: 20px; |
2958 | +} |
2959 | + |
2960 | QAbstractItemView { |
2961 | border-style: solid; |
2962 | border-color: #898989; |
2963 | |
2964 | === removed file 'docs/ubuntuone-control-panel-gtk.1' |
2965 | --- docs/ubuntuone-control-panel-gtk.1 2011-09-07 13:50:37 +0000 |
2966 | +++ docs/ubuntuone-control-panel-gtk.1 1970-01-01 00:00:00 +0000 |
2967 | @@ -1,15 +0,0 @@ |
2968 | -.TH UBUNTUONE-CONTROL-PANEL-GTK 1 |
2969 | - |
2970 | -.SH NAME |
2971 | -ubuntuone-control-panel-gtk \- A GTK UI for managing an Ubuntu One account |
2972 | - |
2973 | -.SH SYNOPSYS |
2974 | -.B ubutuone-control-panel-gtk |
2975 | - |
2976 | -.SH DESCRIPTION |
2977 | -This manual page briefly documents the |
2978 | -.BR ubuntuone-control-panel-gtk |
2979 | -process, which provides a desktop application to manage an Ubuntu One account. |
2980 | - |
2981 | -.SH AUTHOR |
2982 | -This manual page was written by Natalia Bidart <natalia.bidart@canonical.com> |
2983 | |
2984 | === added file 'docs/ubuntuone-control-panel-qt.1' |
2985 | --- docs/ubuntuone-control-panel-qt.1 1970-01-01 00:00:00 +0000 |
2986 | +++ docs/ubuntuone-control-panel-qt.1 2012-03-06 15:41:39 +0000 |
2987 | @@ -0,0 +1,27 @@ |
2988 | +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.40.4. |
2989 | +.TH UBUNTUONE-CONTROL-PANEL-QT "1" "March 2012" "ubuntuone-control-panel-qt" "User Commands" |
2990 | +.SH NAME |
2991 | +ubuntuone-control-panel-qt \- control panel for Ubuntu One |
2992 | +.SH DESCRIPTION |
2993 | +usage: ubuntuone\-control\-panel\-qt [\-h] [\-\-switch\-to PANEL_NAME] [\-a] |
2994 | +.IP |
2995 | +[\-\-minimized] [\-\-with\-icon] |
2996 | +.SS "optional arguments:" |
2997 | +.TP |
2998 | +\fB\-h\fR, \fB\-\-help\fR |
2999 | +show this help message and exit |
3000 | +.TP |
3001 | +\fB\-\-switch\-to\fR PANEL_NAME |
3002 | +Start Ubuntu One in the PANEL_NAME tab. Possible |
3003 | +values are: dashboard, volumes, devices, applications |
3004 | +.TP |
3005 | +\fB\-a\fR, \fB\-\-alert\fR |
3006 | +Start Ubuntu One alerting the user to its presence. |
3007 | +.TP |
3008 | +\fB\-\-minimized\fR |
3009 | +Start Ubuntu One only in the notification area, with |
3010 | +no visible window. Implies \fB\-\-with\-icon\fR |
3011 | +.TP |
3012 | +\fB\-\-with\-icon\fR |
3013 | +Start Ubuntu One with an icon in the notification |
3014 | +area. |
3015 | |
3016 | === modified file 'po/POTFILES.in' |
3017 | --- po/POTFILES.in 2011-09-16 14:37:20 +0000 |
3018 | +++ po/POTFILES.in 2012-03-06 15:41:39 +0000 |
3019 | @@ -1,9 +1,1 @@ |
3020 | ubuntuone/controlpanel/gui/__init__.py |
3021 | -[type: gettext/glade] data/gtk/dashboard.ui |
3022 | -[type: gettext/glade] data/gtk/device.ui |
3023 | -[type: gettext/glade] data/gtk/devices.ui |
3024 | -[type: gettext/glade] data/gtk/install.ui |
3025 | -[type: gettext/glade] data/gtk/management.ui |
3026 | -[type: gettext/glade] data/gtk/overview.ui |
3027 | -[type: gettext/glade] data/gtk/services.ui |
3028 | -[type: gettext/glade] data/gtk/volumes.ui |
3029 | |
3030 | === modified file 'run-tests' |
3031 | --- run-tests 2012-02-06 20:49:41 +0000 |
3032 | +++ run-tests 2012-03-06 15:41:39 +0000 |
3033 | @@ -16,8 +16,7 @@ |
3034 | # You should have received a copy of the GNU General Public License along |
3035 | # with this program. If not, see <http://www.gnu.org/licenses/>. |
3036 | |
3037 | -QT_TESTS_PATH=ubuntuone/controlpanel/gui/qt/tests |
3038 | -GTK_TESTS_PATH=ubuntuone/controlpanel/gui/gtk/tests |
3039 | +QT_TESTS_PATH="ubuntuone/controlpanel/gui/qt/tests, ubuntuone/controlpanel/gui/qt/main/tests" |
3040 | DBUS_TESTS_PATH=ubuntuone/controlpanel/dbustests |
3041 | WINDOWS_TESTS=test_windows.py |
3042 | |
3043 | @@ -39,7 +38,6 @@ |
3044 | echo "Please install the 'pep8' package." |
3045 | fi |
3046 | } |
3047 | -unset GTK_MODULES |
3048 | |
3049 | XVFB_CMDLINE="" |
3050 | XVFB=$(which xvfb-run) |
3051 | @@ -48,17 +46,14 @@ |
3052 | fi |
3053 | |
3054 | echo "*** Running test suite for ""$MODULE"" ***" |
3055 | -u1trial --reactor=gi -p "$DBUS_TESTS_PATH, $QT_TESTS_PATH, $GTK_TESTS_PATH" -i "$WINDOWS_TESTS" "$MODULE" |
3056 | +u1trial --reactor=gi -p "$DBUS_TESTS_PATH, $QT_TESTS_PATH" -i "$WINDOWS_TESTS" "$MODULE" |
3057 | |
3058 | echo "*** Running DBus test suite ***" |
3059 | u1trial --reactor=glib "$DBUS_TESTS_PATH" |
3060 | |
3061 | -echo "*** Running GTK test suite ***" |
3062 | -$XVFB_CMDLINE u1trial --reactor=glib "$GTK_TESTS_PATH" |
3063 | - |
3064 | echo "*** Running QT test suite for ""$MODULE"" ***" |
3065 | ./setup.py build |
3066 | -$XVFB_CMDLINE u1trial -p "$GTK_TESTS_PATH" -i "$WINDOWS_TESTS" --reactor=qt4 --gui "$MODULE" |
3067 | +$XVFB_CMDLINE u1trial -i "$WINDOWS_TESTS" --reactor=qt4 --gui "$MODULE" |
3068 | rm -rf _trial_temp |
3069 | rm -rf build |
3070 | |
3071 | |
3072 | === modified file 'run-tests.bat' |
3073 | --- run-tests.bat 2012-01-31 16:55:33 +0000 |
3074 | +++ run-tests.bat 2012-03-06 15:41:39 +0000 |
3075 | @@ -18,7 +18,7 @@ |
3076 | |
3077 | SET MODULE="ubuntuone" |
3078 | SET PYTHONEXEPATH="C:\Python27" |
3079 | -SET IGNORE_PATHS="ubuntuone\controlpanel\gui\gtk, ubuntuone\controlpanel\dbustests" |
3080 | +SET IGNORE_PATHS="ubuntuone\controlpanel\dbustests" |
3081 | SET IGNORE_MODULES="test_linux.py, test_libsoup.py" |
3082 | |
3083 | :: throw the first parameter away if is /skip-lint, |
3084 | |
3085 | === modified file 'setup.py' |
3086 | --- setup.py 2012-02-22 12:31:22 +0000 |
3087 | +++ setup.py 2012-03-06 15:41:39 +0000 |
3088 | @@ -39,12 +39,11 @@ |
3089 | |
3090 | POT_FILE = 'po/ubuntuone-control-panel.pot' |
3091 | SERVICE_FILE = 'com.ubuntuone.controlpanel.service' |
3092 | -GUI_SERVICE_FILE = 'com.ubuntuone.controlpanel.gui.service' |
3093 | MESSAGE_ENTRY = 'ubuntuone-control-panel' |
3094 | CONSTANTS = 'ubuntuone/controlpanel/constants.py' |
3095 | |
3096 | CLEANFILES = [ |
3097 | - SERVICE_FILE, GUI_SERVICE_FILE, MESSAGE_ENTRY, CONSTANTS, POT_FILE, |
3098 | + SERVICE_FILE, MESSAGE_ENTRY, CONSTANTS, POT_FILE, |
3099 | 'MANIFEST'] |
3100 | QT_UI_DIR = os.path.join('ubuntuone', 'controlpanel', 'gui', 'qt', 'ui') |
3101 | |
3102 | @@ -52,7 +51,7 @@ |
3103 | def replace_prefix(prefix): |
3104 | """Replace every '@prefix@' with prefix within 'filename' content.""" |
3105 | # replace .service file, DATA_DIR constant |
3106 | - for filename in (SERVICE_FILE, GUI_SERVICE_FILE, MESSAGE_ENTRY, CONSTANTS): |
3107 | + for filename in (SERVICE_FILE, MESSAGE_ENTRY, CONSTANTS): |
3108 | with open(filename + '.in') as in_file: |
3109 | content = in_file.read() |
3110 | with open(filename, 'w') as out_file: |
3111 | @@ -160,7 +159,6 @@ |
3112 | |
3113 | def run(self): |
3114 | """Execute the command.""" |
3115 | - self._wrapuic() |
3116 | basepath = os.path.join('data', 'qt') |
3117 | # TODO: build the resource files so that we can include them |
3118 | #self.build_rc(os.path.join(basepath, 'icons_rc.py'), |
3119 | @@ -175,40 +173,6 @@ |
3120 | |
3121 | build_extra.build_extra.run(self) |
3122 | |
3123 | - # pylint: disable=E1002 |
3124 | - _wrappeduic = False |
3125 | - |
3126 | - @classmethod |
3127 | - def _wrapuic(cls): |
3128 | - """Wrap uic to use gettext's _() in place of tr()""" |
3129 | - if cls._wrappeduic: |
3130 | - return |
3131 | - |
3132 | - from PyQt4.uic.Compiler import compiler, qtproxies, indenter |
3133 | - |
3134 | - # pylint: disable=C0103 |
3135 | - class _UICompiler(compiler.UICompiler): |
3136 | - """Speciallized compiler for qt .ui files.""" |
3137 | - def createToplevelWidget(self, classname, widgetname): |
3138 | - o = indenter.getIndenter() |
3139 | - o.level = 0 |
3140 | - o.write('from gettext import gettext as _') |
3141 | - return super(_UICompiler, self).createToplevelWidget(classname, |
3142 | - widgetname) |
3143 | - compiler.UICompiler = _UICompiler |
3144 | - |
3145 | - class _i18n_string(qtproxies.i18n_string): |
3146 | - """Provide a translated text.""" |
3147 | - |
3148 | - def __str__(self): |
3149 | - return "_('%s')" % self.string.encode('string-escape') |
3150 | - |
3151 | - qtproxies.i18n_string = _i18n_string |
3152 | - |
3153 | - cls._wrappeduic = True |
3154 | - # pylint: enable=C0103 |
3155 | - # pylint: enable=E1002 |
3156 | - |
3157 | |
3158 | class ControlPanelClean(DistUtilsExtra.auto.clean_build_tree): |
3159 | """Class to clean up after the build.""" |
3160 | @@ -241,7 +205,6 @@ |
3161 | 'ubuntuone', |
3162 | 'ubuntuone.controlpanel', |
3163 | 'ubuntuone.controlpanel.gui', |
3164 | - 'ubuntuone.controlpanel.gui.gtk', |
3165 | 'ubuntuone.controlpanel.gui.qt', |
3166 | 'ubuntuone.controlpanel.gui.qt.main', |
3167 | 'ubuntuone.controlpanel.gui.qt.ui', |
3168 | @@ -253,7 +216,7 @@ |
3169 | data_files=[ |
3170 | ('lib/ubuntuone-control-panel', |
3171 | ['bin/ubuntuone-control-panel-backend']), |
3172 | - ('share/dbus-1/services/', [SERVICE_FILE, GUI_SERVICE_FILE]), |
3173 | + ('share/dbus-1/services/', [SERVICE_FILE]), |
3174 | ('share/indicators/messages/applications/', [MESSAGE_ENTRY]), |
3175 | ('share/apport/package-hooks/', |
3176 | ['data/source_ubuntuone-control-panel.py']), |
3177 | |
3178 | === modified file 'ubuntuone/controlpanel/backend.py' |
3179 | --- ubuntuone/controlpanel/backend.py 2012-02-06 15:23:27 +0000 |
3180 | +++ ubuntuone/controlpanel/backend.py 2012-03-06 15:41:39 +0000 |
3181 | @@ -343,10 +343,23 @@ |
3182 | |
3183 | @log_call(logger.debug, with_args=False) |
3184 | @inlineCallbacks |
3185 | - def login(self, email, password): |
3186 | - """Login using 'email' and 'password'.""" |
3187 | - result = yield self.login_client.login_email_password( |
3188 | - email=email, password=password) |
3189 | + def login(self, email=None, password=None): |
3190 | + """Login using 'email' and 'password' if not None, else prompt user.""" |
3191 | + result = None |
3192 | + if email is not None and password is not None: |
3193 | + result = yield self.login_client.login_email_password( |
3194 | + email=email, password=password) |
3195 | + else: |
3196 | + result = yield self.login_client.login() |
3197 | + # cache credentils |
3198 | + self._credentials = result |
3199 | + returnValue(result) |
3200 | + |
3201 | + @log_call(logger.debug) |
3202 | + @inlineCallbacks |
3203 | + def register(self): |
3204 | + """Register a new user.""" |
3205 | + result = yield self.login_client.register() |
3206 | # cache credentils |
3207 | self._credentials = result |
3208 | returnValue(result) |
3209 | |
3210 | === removed file 'ubuntuone/controlpanel/dbustests/test_gui_service.py' |
3211 | --- ubuntuone/controlpanel/dbustests/test_gui_service.py 2011-11-21 13:37:07 +0000 |
3212 | +++ ubuntuone/controlpanel/dbustests/test_gui_service.py 1970-01-01 00:00:00 +0000 |
3213 | @@ -1,104 +0,0 @@ |
3214 | -# -*- coding: utf-8 -*- |
3215 | - |
3216 | -# Authors: Alejandro J. Cura <alecu@canonical.com> |
3217 | -# Natalia B. Bidart <nataliabidart@canonical.com> |
3218 | -# Eric Casteleijn <eric.casteleijn@canonical.com> |
3219 | -# |
3220 | -# Copyright 2011 Canonical Ltd. |
3221 | -# |
3222 | -# This program is free software: you can redistribute it and/or modify it |
3223 | -# under the terms of the GNU General Public License version 3, as published |
3224 | -# by the Free Software Foundation. |
3225 | -# |
3226 | -# This program is distributed in the hope that it will be useful, but |
3227 | -# WITHOUT ANY WARRANTY; without even the implied warranties of |
3228 | -# MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR |
3229 | -# PURPOSE. See the GNU General Public License for more details. |
3230 | -# |
3231 | -# You should have received a copy of the GNU General Public License along |
3232 | -# with this program. If not, see <http://www.gnu.org/licenses/>. |
3233 | - |
3234 | -"""Tests for the control panel backend DBus service.""" |
3235 | - |
3236 | -import dbus |
3237 | -import mocker |
3238 | - |
3239 | -from dbus.mainloop.glib import DBusGMainLoop |
3240 | -from twisted.internet import defer |
3241 | - |
3242 | -from ubuntuone.controlpanel.gui.gtk import gui |
3243 | -from ubuntuone.devtools.testcases.dbus import DBusTestCase |
3244 | -from twisted.trial.unittest import TestCase |
3245 | - |
3246 | - |
3247 | -class MockWindow(object): |
3248 | - """A mock backend.""" |
3249 | - |
3250 | - exception = None |
3251 | - |
3252 | - def __init__(self, switch_to=None, alert=False): |
3253 | - self.called = [] |
3254 | - |
3255 | - def draw_attention(self): |
3256 | - """Draw attention to the control panel.""" |
3257 | - self.called.append('draw_attention') |
3258 | - |
3259 | - def switch_to(self, panel): |
3260 | - """Switch to named panel.""" |
3261 | - self.called.append(('switch_to', panel)) |
3262 | - |
3263 | - |
3264 | -class DBusServiceMockTestCase(TestCase): |
3265 | - """Tests for the main function.""" |
3266 | - |
3267 | - @defer.inlineCallbacks |
3268 | - def setUp(self): |
3269 | - yield super(DBusServiceMockTestCase, self).setUp() |
3270 | - self.mocker = mocker.Mocker() |
3271 | - |
3272 | - @defer.inlineCallbacks |
3273 | - def tearDown(self): |
3274 | - yield super(DBusServiceMockTestCase, self).tearDown() |
3275 | - self.mocker.restore() |
3276 | - self.mocker.verify() |
3277 | - |
3278 | - def test_dbus_service_main(self): |
3279 | - """The main method starts the loop and hooks up to DBus.""" |
3280 | - self.patch(gui, 'ControlPanelWindow', MockWindow) |
3281 | - dbus_gmain_loop = self.mocker.replace( |
3282 | - "dbus.mainloop.glib.DBusGMainLoop") |
3283 | - register_service = self.mocker.replace( |
3284 | - "ubuntuone.controlpanel.gui.gtk.gui.register_service") |
3285 | - publish_service = self.mocker.replace( |
3286 | - "ubuntuone.controlpanel.gui.gtk.gui.publish_service") |
3287 | - main = self.mocker.replace("gtk.main") |
3288 | - dbus_gmain_loop(set_as_default=True) |
3289 | - loop = self.mocker.mock() |
3290 | - self.mocker.result(loop) |
3291 | - register_service(mocker.ANY) |
3292 | - self.mocker.result(True) |
3293 | - publish_service(switch_to='', alert=False) |
3294 | - main() |
3295 | - self.mocker.replay() |
3296 | - gui.main() |
3297 | - |
3298 | - |
3299 | -class DBusServiceTestCase(DBusTestCase): |
3300 | - """Test for the DBus service.""" |
3301 | - |
3302 | - def _set_called(self, *args, **kwargs): |
3303 | - """Keep track of function calls, useful for monkeypatching.""" |
3304 | - self._called = (args, kwargs) |
3305 | - |
3306 | - @defer.inlineCallbacks |
3307 | - def setUp(self): |
3308 | - """Initialize each test run.""" |
3309 | - yield super(DBusServiceTestCase, self).setUp() |
3310 | - DBusGMainLoop(set_as_default=True) |
3311 | - self._called = False |
3312 | - |
3313 | - def test_register_service(self): |
3314 | - """The DBus service is successfully registered.""" |
3315 | - bus = dbus.SessionBus() |
3316 | - ret = gui.register_service(bus) |
3317 | - self.assertTrue(ret) |
3318 | |
3319 | === modified file 'ubuntuone/controlpanel/gui/__init__.py' |
3320 | --- ubuntuone/controlpanel/gui/__init__.py 2012-02-17 16:03:00 +0000 |
3321 | +++ ubuntuone/controlpanel/gui/__init__.py 2012-03-06 15:41:39 +0000 |
3322 | @@ -1,5 +1,5 @@ |
3323 | # -*- coding: utf-8 -*- |
3324 | - |
3325 | +# |
3326 | # Copyright 2011-2012 Canonical Ltd. |
3327 | # |
3328 | # This program is free software: you can redistribute it and/or modify it |
3329 | @@ -18,10 +18,11 @@ |
3330 | |
3331 | import gettext |
3332 | |
3333 | +from ubuntuone.controlpanel import TRANSLATION_DOMAIN |
3334 | from ubuntuone.controlpanel.backend import UBUNTUONE_LINK |
3335 | |
3336 | |
3337 | -_ = gettext.gettext |
3338 | +gettext.install(TRANSLATION_DOMAIN, unicode=True) |
3339 | |
3340 | |
3341 | ERROR_COLOR = u'red' |
3342 | @@ -72,13 +73,17 @@ |
3343 | RESET_PASSWORD_LINK = EDIT_PROFILE_LINK + u'+forgot_password' |
3344 | TWITTER_LINK = u'http://twitter.com/ubuntuone/' |
3345 | |
3346 | +# Undefined variable '_', pylint: disable=E0602 |
3347 | +# Translatable strings |
3348 | + |
3349 | +ACCOUNT_LABEL = _('Your services') |
3350 | ALWAYS_SUBSCRIBED = _('Always in sync') |
3351 | CONNECT_BUTTON_LABEL = _('Connect to Ubuntu One') |
3352 | CONTACTS = _('Thunderbird plug-in') |
3353 | CREDENTIALS_ERROR = _('There was a problem while retrieving the credentials.') |
3354 | DASHBOARD_BUTTON_TOOLTIP = _('View your personal details and service ' |
3355 | 'summary') |
3356 | -DASHBOARD_TITLE = _('Welcome to Ubuntu One!') |
3357 | +DASHBOARD_TITLE = WELCOME_LABEL = _('Welcome to Ubuntu One!') |
3358 | DASHBOARD_VALUE_ERROR = _('The information could not be retrieved. ' |
3359 | 'Maybe your internet connection is down?') |
3360 | DESKTOPCOUCH_PKG = 'desktopcouch-ubuntuone' |
3361 | @@ -90,9 +95,13 @@ |
3362 | DEVICE_REMOVAL_ERROR = _('The device could not be removed.') |
3363 | DEVICES_BUTTON_TOOLTIP = _('Manage devices registered with your personal ' |
3364 | 'cloud') |
3365 | +DEVICES_LOCAL_LABEL = _('This device') |
3366 | +DEVICES_MANAGE_LABEL = _('Go to the web page to manage your other devices') |
3367 | +DEVICES_REMOTE_LABEL = _('Other devices') |
3368 | DEVICES_TITLE = _('The devices connected with your personal cloud are listed ' |
3369 | 'below.') |
3370 | -EXPLORE = _('Explore') |
3371 | +EDIT_ACCOUNT_LABEL = _('Edit your services online') |
3372 | +EDIT_PROFILE_LABEL = _('Edit personal details online') |
3373 | FAILED_INSTALL = _('<i>%(package_name)s</i> could not be installed') |
3374 | FOLDER_ADD_BUTTON_TEXT = _('Sync another folder with your cloud') |
3375 | FOLDER_INVALID_PATH = _('The chosen directory "%(folder_path)s" is not valid. ' |
3376 | @@ -102,12 +111,18 @@ |
3377 | 'cloud folder.') |
3378 | FOLDER_OWNED_BY = _('My personal folders') |
3379 | FOLDER_SHARED_BY = _('Shared by %(other_user_display_name)s') |
3380 | +FOLDERS_BUTTON_ADD_FOLDER = _('Add a folder from this computer') |
3381 | +FOLDERS_BUTTON_TOOLTIP = VOLUMES_BUTTON_TOOLTIP = _('Manage your cloud ' |
3382 | + 'folders') |
3383 | +FOLDERS_COLUMN_EXPLORE = _('Explore') |
3384 | +FOLDERS_COLUMN_NAME = _('Name') |
3385 | +FOLDERS_COLUMN_SYNC_LOCALLY = _('Sync Locally?') |
3386 | FOLDERS_CONFIRM_MERGE = _('The contents of your cloud folder will be merged ' |
3387 | 'with your local folder "%(folder_path)s" when ' |
3388 | 'subscribing.\nDo you want to subscribe to this ' |
3389 | 'cloud folder?') |
3390 | -FOLDERS_BUTTON_TOOLTIP = VOLUMES_BUTTON_TOOLTIP = _('Manage your cloud ' |
3391 | - 'folders') |
3392 | +FOLDERS_MANAGE_LABEL = _('Go to the web for public and private sharing ' |
3393 | + 'options') |
3394 | FOLDERS_TITLE = _('Select which folders from your cloud you want to sync with ' |
3395 | 'this computer') |
3396 | FILE_SYNC_CONNECT = _('Connect') |
3397 | @@ -136,18 +151,26 @@ |
3398 | GENERAL_ERROR_TITLE = _('Ubuntu One experienced an error') |
3399 | GENERAL_ERROR_MSG = _('Sorry, an error has occurred and Ubuntu One ' |
3400 | 'needs to close.') |
3401 | +GET_HELP_ONLINE = _('Get help online') |
3402 | +GET_MORE_STORAGE = _('Get more storage') |
3403 | GREETING = _('Hi %(user_display_name)s') |
3404 | +INSTALL = _('Install') |
3405 | INSTALL_PACKAGE = _('You need to install the package <i>%(package_name)s' |
3406 | '</i> in order to enable more sync services.') |
3407 | INSTALL_PLUGIN = _('Install the %(plugin_name)s for the sync service: ' |
3408 | '%(service_name)s') |
3409 | INSTALLING = _('Installation of <i>%(package_name)s</i> in progress') |
3410 | LOADING = _('Loading...') |
3411 | +LOADING_OVERLAY = _('Getting information, please wait...') |
3412 | +MAIN_ACCOUNT_TAB = _('Account information') |
3413 | +MAIN_DEVICES_TAB = _('Devices') |
3414 | +MAIN_FOLDERS_TAB = _('Folders') |
3415 | +MAIN_PREFERENCES_TAB = _('Settings') |
3416 | MAIN_WINDOW_TITLE = _('%(app_name)s Control Panel') |
3417 | +MUSIC_DISPLAY_NAME = _('Purchased Music') |
3418 | +MUSIC_REAL_PATH = '.ubuntuone/Purchased from Ubuntu One' |
3419 | MY_FOLDERS = _('My folders') |
3420 | NAME_NOT_SET = _('[unknown user name]') |
3421 | -MUSIC_DISPLAY_NAME = _('Purchased Music') |
3422 | -MUSIC_REAL_PATH = '.ubuntuone/Purchased from Ubuntu One' |
3423 | NETWORK_OFFLINE = _('An internet connection is required to join or sign ' |
3424 | 'in to %(app_name)s.') |
3425 | NO_DEVICES = _('No devices to show.') |
3426 | @@ -155,18 +178,42 @@ |
3427 | NO_PAIRING_RECORD = _('There is no Ubuntu One pairing record.') |
3428 | PERCENTAGE_LABEL = _('%(percentage)s used') |
3429 | PLEASE_WAIT = _('Please wait') |
3430 | +PROFILE_LABEL = _('Personal details') |
3431 | QUOTA_LABEL = _('Using %(used)s of %(total)s (%(percentage).0f%%)') |
3432 | -USAGE_LABEL = _('%(used)s of %(total)s') |
3433 | +REMOVE_BUTTON = _('Remove') |
3434 | +RESTORE_LABEL = _('Restore') |
3435 | +SELECT_FOLDERS = _('Select sync folders') |
3436 | SERVICES_BUTTON_TOOLTIP = _('Manage the sync services') |
3437 | SERVICES_TITLE = _('Enable the sync services for this computer.') |
3438 | +SETTINGS_ALLOW_NOTIFICATIONS = _('Allow all notifications to this device') |
3439 | +SETTINGS_AUTO_CONNECT = _('Connect automatically when computer starts') |
3440 | +SETTINGS_BANDWIDTH = _('Bandwidth Settings') |
3441 | +SETTINGS_BANDWIDTH_ZERO_WARNING = _('Please note that your files will not ' |
3442 | + 'sync if you set bandwidth to 0') |
3443 | +SETTINGS_BUTTON_APPLY = _('Apply these settings') |
3444 | +SETTINGS_BUTTON_DEFAULT = _('Default settings') |
3445 | SETTINGS_CHANGE_ERROR = _('The settings could not be changed,\n' |
3446 | 'previous values were restored.') |
3447 | +SETTINGS_FILE_SYNC = _('File Sync Settings') |
3448 | +SETTINGS_KILOBITS_PER_SECOND = _('Kilobits per second') |
3449 | +SETTINGS_LIMIT_DOWNLOAD = _('Limit download speed to') |
3450 | +SETTINGS_LIMIT_UPLOAD = _('Limit upload speed to') |
3451 | +SETTINGS_SYNC_ALL_FOLDERS = _('Automatically sync all new cloud folders ' |
3452 | + 'to this computer') |
3453 | +SETTINGS_SYNC_ALL_SHARES = _('Automatically sync all folders shared with me ' |
3454 | + 'to this computer') |
3455 | SHARES_BUTTON_TOOLTIP = _('Manage the shares offered to others') |
3456 | SHARES_TITLE = _('Manage permissions for shares made to other users.') |
3457 | +SIGN_IN = _('Sign in') |
3458 | SUCCESS_INSTALL = _('<i>%(package_name)s</i> was successfully installed') |
3459 | -SYNC_LOCALLY = _('Sync locally?') |
3460 | +SYNC_STREAM_SHARE = _('Sync, stream, share') |
3461 | +TALK_TO_US = _('Talk to us') |
3462 | VALUE_ERROR = _('Value could not be retrieved.') |
3463 | UNKNOWN_ERROR = _('Unknown error') |
3464 | +USAGE_LABEL = _('%(used)s of %(total)s') |
3465 | +QUIT_LABEL = _('Quit Ubuntu One') |
3466 | + |
3467 | +# pylint: enable=E0602 |
3468 | |
3469 | |
3470 | def humanize(int_bytes): |
3471 | |
3472 | === removed directory 'ubuntuone/controlpanel/gui/gtk' |
3473 | === removed file 'ubuntuone/controlpanel/gui/gtk/__init__.py' |
3474 | --- ubuntuone/controlpanel/gui/gtk/__init__.py 2011-05-24 14:20:18 +0000 |
3475 | +++ ubuntuone/controlpanel/gui/gtk/__init__.py 1970-01-01 00:00:00 +0000 |
3476 | @@ -1,28 +0,0 @@ |
3477 | -# -*- coding: utf-8 -*- |
3478 | - |
3479 | -# Authors: Natalia B Bidart <natalia.bidart@canonical.com> |
3480 | -# |
3481 | -# Copyright 2010 Canonical Ltd. |
3482 | -# |
3483 | -# This program is free software: you can redistribute it and/or modify it |
3484 | -# under the terms of the GNU General Public License version 3, as published |
3485 | -# by the Free Software Foundation. |
3486 | -# |
3487 | -# This program is distributed in the hope that it will be useful, but |
3488 | -# WITHOUT ANY WARRANTY; without even the implied warranties of |
3489 | -# MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR |
3490 | -# PURPOSE. See the GNU General Public License for more details. |
3491 | -# |
3492 | -# You should have received a copy of the GNU General Public License along |
3493 | -# with this program. If not, see <http://www.gnu.org/licenses/>. |
3494 | - |
3495 | -"""The GTK graphical interface for the control panel for Ubuntu One.""" |
3496 | - |
3497 | -DBUS_BUS_NAME = 'com.ubuntuone.controlpanel.gui' |
3498 | -DBUS_PATH = '/gui' |
3499 | -DBUS_IFACE_GUI = 'com.ubuntuone.controlpanel.gui' |
3500 | - |
3501 | -# Unused import main |
3502 | -# pylint: disable=W0611 |
3503 | - |
3504 | -from ubuntuone.controlpanel.gui.gtk.gui import main |
3505 | |
3506 | === removed file 'ubuntuone/controlpanel/gui/gtk/gui.py' |
3507 | --- ubuntuone/controlpanel/gui/gtk/gui.py 2012-02-06 21:02:54 +0000 |
3508 | +++ ubuntuone/controlpanel/gui/gtk/gui.py 1970-01-01 00:00:00 +0000 |
3509 | @@ -1,1667 +0,0 @@ |
3510 | -# -*- coding: utf-8 -*- |
3511 | - |
3512 | -# Authors: Natalia B Bidart <natalia.bidart@canonical.com> |
3513 | -# Eric Casteleijn <eric.casteleijn@canonical.com> |
3514 | -# |
3515 | -# Copyright 2010 Canonical Ltd. |
3516 | -# |
3517 | -# This program is free software: you can redistribute it and/or modify it |
3518 | -# under the terms of the GNU General Public License version 3, as published |
3519 | -# by the Free Software Foundation. |
3520 | -# |
3521 | -# This program is distributed in the hope that it will be useful, but |
3522 | -# WITHOUT ANY WARRANTY; without even the implied warranties of |
3523 | -# MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR |
3524 | -# PURPOSE. See the GNU General Public License for more details. |
3525 | -# |
3526 | -# You should have received a copy of the GNU General Public License along |
3527 | -# with this program. If not, see <http://www.gnu.org/licenses/>. |
3528 | - |
3529 | -"""The user interface for the control panel for Ubuntu One.""" |
3530 | - |
3531 | -from __future__ import division |
3532 | - |
3533 | -import os |
3534 | - |
3535 | -from functools import wraps |
3536 | - |
3537 | -import dbus |
3538 | -import gtk |
3539 | -import gobject |
3540 | - |
3541 | -from dbus.mainloop.glib import DBusGMainLoop |
3542 | -from ubuntu_sso import networkstate |
3543 | -# pylint: disable=E0611,F0401 |
3544 | -from ubuntuone.platform.credentials import ( |
3545 | - APP_NAME as U1_APP_NAME, |
3546 | - CredentialsManagementTool, |
3547 | -) |
3548 | -# pylint: enable=E0611,F0401 |
3549 | - |
3550 | -# Wildcard import ubuntuone.controlpanel.gui |
3551 | -# pylint: disable=W0401, W0614 |
3552 | -from ubuntuone.controlpanel.gui import * |
3553 | -# pylint: enable=W0401, W0614 |
3554 | -from ubuntuone.controlpanel.gui.gtk import ( |
3555 | - DBUS_IFACE_GUI, DBUS_BUS_NAME as DBUS_BUS_NAME_GUI, |
3556 | - DBUS_PATH as DBUS_PATH_GUI, package_manager) |
3557 | -from ubuntuone.controlpanel.gui.gtk.widgets import LabelLoading, PanelTitle |
3558 | -# Use ubiquity package when ready (LP: #673665) |
3559 | -from ubuntuone.controlpanel.gui.gtk.widgets import GreyableBin |
3560 | - |
3561 | -from ubuntuone.controlpanel import (DBUS_BUS_NAME, DBUS_PREFERENCES_PATH, |
3562 | - DBUS_PREFERENCES_IFACE, TRANSLATION_DOMAIN, backend) |
3563 | -from ubuntuone.controlpanel.backend import (DEVICE_TYPE_PHONE, |
3564 | - DEVICE_TYPE_COMPUTER) |
3565 | -from ubuntuone.controlpanel.dbus_service import bool_str |
3566 | -from ubuntuone.controlpanel.logger import setup_logging, log_call |
3567 | -from ubuntuone.controlpanel.utils import (get_data_file, |
3568 | - ERROR_TYPE, ERROR_MESSAGE) |
3569 | - |
3570 | - |
3571 | -try: |
3572 | - from gi.repository import Unity # pylint: disable=E0611 |
3573 | - USE_LIBUNITY = True |
3574 | - U1_DOTDESKTOP = "ubuntuone-installer.desktop" |
3575 | -except ImportError: |
3576 | - USE_LIBUNITY = False |
3577 | - |
3578 | -logger = setup_logging('gtk.gui') |
3579 | - |
3580 | - |
3581 | -WARNING_MARKUP = '<span foreground="%s"><b>%%s</b></span>' % ERROR_COLOR |
3582 | - |
3583 | -CP_WMCLASS_NAME = 'ubuntuone-control-panel-gtk' |
3584 | -CP_WMCLASS_CLASS = 'ubuntuone-installer' |
3585 | - |
3586 | - |
3587 | -def error_handler(*args, **kwargs): |
3588 | - """Log errors when calling D-Bus methods in a async way.""" |
3589 | - logger.error('Error handler received: %r, %r', args, kwargs) |
3590 | - |
3591 | - |
3592 | -def register_service(bus): |
3593 | - """Try to register DBus service for making sure we run only one instance. |
3594 | - |
3595 | - Return True if succesfully registered, False if already running. |
3596 | - """ |
3597 | - name = bus.request_name(DBUS_BUS_NAME_GUI, |
3598 | - dbus.bus.NAME_FLAG_DO_NOT_QUEUE) |
3599 | - return name != dbus.bus.REQUEST_NAME_REPLY_EXISTS |
3600 | - |
3601 | - |
3602 | -def publish_service(window=None, switch_to='', alert=False): |
3603 | - """Publish the service on DBus.""" |
3604 | - if window is None: |
3605 | - window = ControlPanelWindow(switch_to=switch_to, alert=alert) |
3606 | - return ControlPanelService(window) |
3607 | - |
3608 | - |
3609 | -def main(switch_to='', alert=False): |
3610 | - """Hook the DBus listeners and start the main loop.""" |
3611 | - DBusGMainLoop(set_as_default=True) |
3612 | - bus = dbus.SessionBus() |
3613 | - if register_service(bus): |
3614 | - publish_service(switch_to=switch_to, alert=alert) |
3615 | - else: |
3616 | - obj = bus.get_object(DBUS_BUS_NAME_GUI, DBUS_PATH_GUI) |
3617 | - service = dbus.Interface(obj, dbus_interface=DBUS_IFACE_GUI) |
3618 | - |
3619 | - def gui_error_handler(*args, **kwargs): |
3620 | - """Log errors when calling D-Bus methods in a async way.""" |
3621 | - logger.error('Error handler received: %r, %r', args, kwargs) |
3622 | - gtk.main_quit() |
3623 | - |
3624 | - def gui_reply_handler(*args, **kwargs): |
3625 | - """Exit when done.""" |
3626 | - gtk.main_quit() |
3627 | - |
3628 | - service.switch_to_alert( |
3629 | - switch_to, alert, reply_handler=gui_reply_handler, |
3630 | - error_handler=gui_error_handler) |
3631 | - |
3632 | - gtk.main() |
3633 | - |
3634 | - |
3635 | -def on_size_allocate(widget, allocation, label): |
3636 | - """Resize labels according to who 'widget' is being resized.""" |
3637 | - label.set_size_request(allocation.width - 2, -1) |
3638 | - |
3639 | - |
3640 | -@log_call(logger.debug) |
3641 | -def uri_hook(button, uri, *args, **kwargs): |
3642 | - """Open an URI or do nothing if URI is not an URL.""" |
3643 | - if uri.startswith('http') or uri.startswith(FILE_URI_PREFIX): |
3644 | - gtk.show_uri(None, uri, gtk.gdk.CURRENT_TIME) |
3645 | - |
3646 | - |
3647 | -class ControlPanelMixin(object): |
3648 | - """A basic mixin class to provide common functionality to widgets.""" |
3649 | - |
3650 | - def __init__(self, filename=None, backend_instance=None): |
3651 | - if backend_instance is not None: |
3652 | - self.backend = backend_instance |
3653 | - else: |
3654 | - bus = dbus.SessionBus() |
3655 | - try: |
3656 | - obj = bus.get_object(DBUS_BUS_NAME, |
3657 | - DBUS_PREFERENCES_PATH, |
3658 | - follow_name_owner_changes=True) |
3659 | - iface = DBUS_PREFERENCES_IFACE |
3660 | - self.backend = dbus.Interface(obj, dbus_interface=iface) |
3661 | - except dbus.exceptions.DBusException: |
3662 | - logger.exception('Can not connect to DBus at %r', |
3663 | - (DBUS_BUS_NAME, DBUS_PREFERENCES_PATH)) |
3664 | - raise |
3665 | - |
3666 | - if filename is not None: |
3667 | - builder = gtk.Builder() |
3668 | - builder.set_translation_domain(TRANSLATION_DOMAIN) |
3669 | - builder.add_from_file(get_data_file(os.path.join('gtk', filename))) |
3670 | - builder.connect_signals(self) |
3671 | - |
3672 | - # untested directly |
3673 | - for obj in builder.get_objects(): |
3674 | - name = getattr(obj, 'name', None) |
3675 | - if name is None and isinstance(obj, gtk.Buildable): |
3676 | - # work around bug lp:507739 |
3677 | - name = gtk.Buildable.get_name(obj) |
3678 | - if name is None: |
3679 | - logger.warning("%s has no name (??)", obj) |
3680 | - else: |
3681 | - setattr(self, name, obj) |
3682 | - |
3683 | - logger.debug('%s: started.', self.__class__.__name__) |
3684 | - |
3685 | - def _set_warning(self, message, label): |
3686 | - """Set 'message' as warning in 'label'.""" |
3687 | - label.set_markup(WARNING_MARKUP % message) |
3688 | - label.show() |
3689 | - |
3690 | - def destroy(self): |
3691 | - """Cleanup.""" |
3692 | - |
3693 | - |
3694 | -class UbuntuOneBin(gtk.VBox): |
3695 | - """A Ubuntu One bin.""" |
3696 | - |
3697 | - TITLE = '' |
3698 | - |
3699 | - def __init__(self, title=None): |
3700 | - gtk.VBox.__init__(self) |
3701 | - self._is_processing = False |
3702 | - |
3703 | - if title is None: |
3704 | - title = self.TITLE |
3705 | - |
3706 | - title = '<span font_size="large">%s</span>' % title |
3707 | - self.title = PanelTitle(markup=title) |
3708 | - self.pack_start(self.title, expand=False) |
3709 | - |
3710 | - self.message = LabelLoading(LOADING) |
3711 | - self.pack_start(self.message, expand=False) |
3712 | - |
3713 | - self.connect('size-allocate', on_size_allocate, self.title) |
3714 | - self.show_all() |
3715 | - |
3716 | - def _get_is_processing(self): |
3717 | - """Is this panel processing a request?""" |
3718 | - return self._is_processing |
3719 | - |
3720 | - def _set_is_processing(self, new_value): |
3721 | - """Set if this panel is processing a request.""" |
3722 | - if new_value: |
3723 | - self.message.start() |
3724 | - self.set_sensitive(False) |
3725 | - else: |
3726 | - self.message.stop() |
3727 | - self.set_sensitive(True) |
3728 | - |
3729 | - self._is_processing = new_value |
3730 | - |
3731 | - is_processing = property(fget=_get_is_processing, fset=_set_is_processing) |
3732 | - |
3733 | - @log_call(logger.debug) |
3734 | - def on_success(self, message=''): |
3735 | - """Use this callback to stop the Loading and show 'message'.""" |
3736 | - self.message.stop() |
3737 | - self.message.set_markup(message) |
3738 | - |
3739 | - @log_call(logger.error) |
3740 | - def on_error(self, message=None, error_dict=None): |
3741 | - """Use this callback to stop the Loading and set a warning message.""" |
3742 | - if message is None and error_dict is None: |
3743 | - message = VALUE_ERROR |
3744 | - elif message is None and error_dict is not None: |
3745 | - error_type = error_dict.get(ERROR_TYPE, UNKNOWN_ERROR) |
3746 | - error_msg = error_dict.get(ERROR_MESSAGE) |
3747 | - if error_msg: |
3748 | - message = "%s (%s: %s)" % (VALUE_ERROR, error_type, error_msg) |
3749 | - else: |
3750 | - message = "%s (%s)" % (VALUE_ERROR, error_type) |
3751 | - |
3752 | - assert message is not None |
3753 | - |
3754 | - self.message.stop() |
3755 | - self.message.set_markup(WARNING_MARKUP % message) |
3756 | - |
3757 | - |
3758 | -class OverviewPanel(GreyableBin, ControlPanelMixin): |
3759 | - """The overview panel. Introduces Ubuntu One to the not logged user.""" |
3760 | - |
3761 | - __gsignals__ = { |
3762 | - 'credentials-found': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE, |
3763 | - (gobject.TYPE_BOOLEAN,)), |
3764 | - } |
3765 | - |
3766 | - def __init__(self, main_window): |
3767 | - GreyableBin.__init__(self) |
3768 | - creds_backend = CredentialsManagementTool() |
3769 | - ControlPanelMixin.__init__(self, filename='overview.ui', |
3770 | - backend_instance=creds_backend) |
3771 | - self.add(self.itself) |
3772 | - self.banner.set_from_file(get_data_file(OVERVIEW_BANNER)) |
3773 | - self.files_icon.set_from_file(get_data_file(FILES_ICON)) |
3774 | - self.music_stream_icon.set_from_file(get_data_file(MUSIC_STREAM_ICON)) |
3775 | - self.contacts_icon.set_from_file(get_data_file(CONTACTS_ICON)) |
3776 | - self.notes_icon.set_from_file(get_data_file(NOTES_ICON)) |
3777 | - |
3778 | - self.warning_label.set_text('') |
3779 | - self.warning_label.set_property('xalign', 0.5) |
3780 | - |
3781 | - self.connect_button.set_uri(CONNECT_BUTTON_LABEL) |
3782 | - |
3783 | - self.main_window = main_window |
3784 | - self._credentials_are_new = False |
3785 | - self.show() |
3786 | - |
3787 | - kw = dict(result_cb=self.on_network_state_changed) |
3788 | - self.network_manager_state = networkstate.NetworkManagerState(**kw) |
3789 | - self.network_manager_state.find_online_state() |
3790 | - |
3791 | - def _set_warning(self, message, label=None): |
3792 | - """Set 'message' as global warning.""" |
3793 | - ControlPanelMixin._set_warning(self, message, |
3794 | - label=self.warning_label) |
3795 | - |
3796 | - def _window_xid(self): |
3797 | - """Return settings for credentials backend.""" |
3798 | - if self.main_window.window is not None: |
3799 | - settings = {'window_id': str(self.main_window.window.xid)} |
3800 | - else: |
3801 | - settings = {} |
3802 | - return settings |
3803 | - |
3804 | - def set_property(self, prop_name, new_value): |
3805 | - """Override 'set_property' to disable buttons if prop is 'greyed'.""" |
3806 | - if prop_name == 'greyed': |
3807 | - self.set_sensitive(not new_value) |
3808 | - GreyableBin.set_property(self, prop_name, new_value) |
3809 | - |
3810 | - def set_sensitive(self, value): |
3811 | - """Set the sensitiveness as per 'value'.""" |
3812 | - self.join_now_button.set_sensitive(value) |
3813 | - self.connect_button.set_sensitive(value) |
3814 | - |
3815 | - def get_sensitive(self): |
3816 | - """Return the sensitiveness.""" |
3817 | - result = self.join_now_button.get_sensitive() and \ |
3818 | - self.connect_button.get_sensitive() |
3819 | - return result |
3820 | - |
3821 | - def on_join_now_button_clicked(self, *a, **kw): |
3822 | - """User wants to join now.""" |
3823 | - d = self.backend.register(**self._window_xid()) |
3824 | - d.addCallback(self.on_credentials_result) |
3825 | - d.addErrback(self.on_credentials_error) |
3826 | - self.set_property('greyed', True) |
3827 | - self.warning_label.set_text('') |
3828 | - |
3829 | - def on_connect_button_clicked(self, *a, **kw): |
3830 | - """User wants to connect now.""" |
3831 | - d = self.backend.login(**self._window_xid()) |
3832 | - d.addCallback(self.on_credentials_result) |
3833 | - d.addErrback(self.on_credentials_error) |
3834 | - self.set_property('greyed', True) |
3835 | - self.warning_label.set_text('') |
3836 | - |
3837 | - def on_learn_more_button_clicked(self, *a, **kw): |
3838 | - """User wants to learn more.""" |
3839 | - uri_hook(self.learn_more_button, LEARN_MORE_LINK) |
3840 | - |
3841 | - def on_credentials_result(self, result): |
3842 | - """Process the credentials response. |
3843 | - |
3844 | - If 'result' is a non empty dict, they were found. |
3845 | - If 'result' is an empty dict, they were not found. |
3846 | - If 'result' is None, the user cancelled the process. |
3847 | - |
3848 | - """ |
3849 | - if result is None: |
3850 | - self.on_authorization_denied() |
3851 | - elif result == {}: |
3852 | - self.on_credentials_not_found() |
3853 | - else: |
3854 | - self.on_credentials_found(result) |
3855 | - |
3856 | - @log_call(logger.info, with_args=False) |
3857 | - def on_credentials_found(self, credentials): |
3858 | - """Credentials backend notifies of credentials found.""" |
3859 | - self.set_property('greyed', False) |
3860 | - self.emit('credentials-found', self._credentials_are_new) |
3861 | - |
3862 | - @log_call(logger.info) |
3863 | - def on_credentials_not_found(self): |
3864 | - """Creds backend notifies of credentials not found.""" |
3865 | - self._credentials_are_new = True |
3866 | - self.set_property('greyed', False) |
3867 | - |
3868 | - @log_call(logger.error) |
3869 | - def on_credentials_error(self, error_dict): |
3870 | - """Creds backend notifies of an error when fetching credentials.""" |
3871 | - self.set_property('greyed', False) |
3872 | - self._set_warning(CREDENTIALS_ERROR) |
3873 | - |
3874 | - @log_call(logger.info) |
3875 | - def on_authorization_denied(self): |
3876 | - """Creds backend notifies that user refused auth for 'app_name'.""" |
3877 | - self.set_property('greyed', False) |
3878 | - |
3879 | - @log_call(logger.info) |
3880 | - def on_network_state_changed(self, state): |
3881 | - """Network state is reported.""" |
3882 | - msg = '' |
3883 | - if state is networkstate.OFFLINE: |
3884 | - msg = NETWORK_OFFLINE % {'app_name': U1_APP_NAME} |
3885 | - self.set_sensitive(False) |
3886 | - self._set_warning(msg) |
3887 | - else: |
3888 | - self.set_sensitive(True) |
3889 | - self.warning_label.set_text(msg) |
3890 | - d = self.backend.find_credentials() |
3891 | - d.addCallback(self.on_credentials_result) |
3892 | - d.addErrback(self.on_credentials_error) |
3893 | - |
3894 | - |
3895 | -class DashboardPanel(UbuntuOneBin, ControlPanelMixin): |
3896 | - """The dashboard panel. The user can manage the subscription.""" |
3897 | - |
3898 | - TITLE = DASHBOARD_TITLE |
3899 | - VALUE_ERROR = DASHBOARD_VALUE_ERROR |
3900 | - |
3901 | - def __init__(self, main_window=None): |
3902 | - UbuntuOneBin.__init__(self) |
3903 | - ControlPanelMixin.__init__(self, filename='dashboard.ui') |
3904 | - self.add(self.itself) |
3905 | - self.show() |
3906 | - |
3907 | - self.is_processing = True |
3908 | - |
3909 | - self.backend.connect_to_signal('AccountInfoReady', |
3910 | - self.on_account_info_ready) |
3911 | - self.backend.connect_to_signal('AccountInfoError', |
3912 | - self.on_account_info_error) |
3913 | - self.account.hide() |
3914 | - |
3915 | - @log_call(logger.debug) |
3916 | - def on_account_info_ready(self, info): |
3917 | - """Backend notifies of account info.""" |
3918 | - self.on_success() |
3919 | - |
3920 | - for i in (u'name', u'type', u'email'): |
3921 | - label = getattr(self, '%s_label' % i) |
3922 | - label.set_markup('%s' % (info[i])) |
3923 | - self.account.show() |
3924 | - |
3925 | - self.is_processing = False |
3926 | - |
3927 | - @log_call(logger.error) |
3928 | - def on_account_info_error(self, error_dict=None): |
3929 | - """Backend notifies of an error when fetching account info.""" |
3930 | - self.on_error(message=self.VALUE_ERROR) |
3931 | - self.is_processing = False |
3932 | - |
3933 | - |
3934 | -class VolumesPanel(UbuntuOneBin, ControlPanelMixin): |
3935 | - """The volumes panel.""" |
3936 | - |
3937 | - TITLE = FOLDERS_TITLE |
3938 | - MAX_COLS = 8 |
3939 | - FREE_SPACE = '<span foreground="grey">%s</span>' % FREE_SPACE_TEXT |
3940 | - NO_FREE_SPACE = '<span foreground="red"><b>%s</b></span>' % FREE_SPACE_TEXT |
3941 | - ROW_HEADER = '<span font_size="large"><b>%s</b></span> %s' |
3942 | - ROOT = '%s - <span foreground="%s" font_size="small">%s</span>' |
3943 | - |
3944 | - def __init__(self, main_window=None): |
3945 | - UbuntuOneBin.__init__(self) |
3946 | - ControlPanelMixin.__init__(self, filename='volumes.ui') |
3947 | - self.add(self.itself) |
3948 | - self.show_all() |
3949 | - |
3950 | - kw = dict(parent=main_window, |
3951 | - flags=gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT, |
3952 | - type=gtk.MESSAGE_WARNING, |
3953 | - buttons=gtk.BUTTONS_YES_NO) |
3954 | - self.confirm_dialog = gtk.MessageDialog(**kw) |
3955 | - |
3956 | - # name, subscribed, icon name, show toggle, sensitive, icon size, |
3957 | - # id, path |
3958 | - self._empty_row = ('', False, '', False, False, gtk.ICON_SIZE_MENU, |
3959 | - None, None) |
3960 | - |
3961 | - self.backend.connect_to_signal('VolumesInfoReady', |
3962 | - self.on_volumes_info_ready) |
3963 | - self.backend.connect_to_signal('VolumesInfoError', |
3964 | - self.on_volumes_info_error) |
3965 | - self.backend.connect_to_signal('VolumeSettingsChanged', |
3966 | - self.on_volume_settings_changed) |
3967 | - self.backend.connect_to_signal('VolumeSettingsChangeError', |
3968 | - self.on_volume_settings_change_error) |
3969 | - |
3970 | - def _process_name(self, name): |
3971 | - """Tweak 'name' with a translatable music folder name.""" |
3972 | - if name == MUSIC_REAL_PATH: |
3973 | - result = MUSIC_DISPLAY_NAME |
3974 | - else: |
3975 | - result = name |
3976 | - return result |
3977 | - |
3978 | - def on_volumes_info_ready(self, info): |
3979 | - """Backend notifies of volumes info.""" |
3980 | - |
3981 | - self.volumes_store.clear() |
3982 | - if not info: |
3983 | - self.on_success(NO_FOLDERS) |
3984 | - return |
3985 | - else: |
3986 | - self.on_success() |
3987 | - |
3988 | - for name, free_bytes, volumes in info: |
3989 | - if backend.ControlBackend.NAME_NOT_SET in name: |
3990 | - name = NAME_NOT_SET |
3991 | - |
3992 | - if name: |
3993 | - name = name + "'s" |
3994 | - # we already added user folders, let's add an empty row |
3995 | - treeiter = self.volumes_store.append(None, self._empty_row) |
3996 | - else: |
3997 | - name = MY_FOLDERS |
3998 | - |
3999 | - scroll_to_cell = False |
4000 | - if free_bytes == backend.ControlBackend.FREE_BYTES_NOT_AVAILABLE: |
4001 | - free_bytes = '' |
4002 | - else: |
4003 | - free_bytes = int(free_bytes) |
4004 | - if free_bytes < SHARES_MIN_SIZE_FULL: |
4005 | - free_bytes_str = self.NO_FREE_SPACE |
4006 | - scroll_to_cell = True |
4007 | - else: |
4008 | - free_bytes_str = self.FREE_SPACE |
4009 | - free_bytes_args = {'free_space': humanize(free_bytes)} |
4010 | - free_bytes = free_bytes_str % free_bytes_args |
4011 | - |
4012 | - row = (self.ROW_HEADER % (name, free_bytes), |
4013 | - True, CONTACT_ICON_NAME, False, False, |
4014 | - gtk.ICON_SIZE_LARGE_TOOLBAR, None, None) |
4015 | - treeiter = self.volumes_store.append(None, row) |
4016 | - |
4017 | - if scroll_to_cell: |
4018 | - path = self.volumes_store.get_string_from_iter(treeiter) |
4019 | - self.volumes_view.scroll_to_cell(path) |
4020 | - |
4021 | - for volume in volumes: |
4022 | - sensitive = True |
4023 | - name = self._process_name(volume[u'display_name']) |
4024 | - icon_name = FOLDER_ICON_NAME |
4025 | - |
4026 | - is_root = volume[u'type'] == backend.ControlBackend.ROOT_TYPE |
4027 | - is_share = volume[u'type'] == backend.ControlBackend.SHARE_TYPE |
4028 | - |
4029 | - if is_root: |
4030 | - sensitive = False |
4031 | - name = self.ROOT % (name, ORANGE, ALWAYS_SUBSCRIBED) |
4032 | - elif is_share: |
4033 | - icon_name = SHARE_ICON_NAME |
4034 | - elif name == MUSIC_DISPLAY_NAME: |
4035 | - icon_name = MUSIC_ICON_NAME |
4036 | - |
4037 | - if volume[u'path'] is None: |
4038 | - logger.warning('on_volumes_info_ready: about to store a ' |
4039 | - 'volume with None path: %r', volume) |
4040 | - |
4041 | - row = (name, bool(volume[u'subscribed']), icon_name, True, |
4042 | - sensitive, gtk.ICON_SIZE_MENU, volume['volume_id'], |
4043 | - volume[u'path']) |
4044 | - |
4045 | - if is_root: # root should go first! |
4046 | - self.volumes_store.prepend(treeiter, row) |
4047 | - else: |
4048 | - self.volumes_store.append(treeiter, row) |
4049 | - |
4050 | - self.volumes_view.expand_all() |
4051 | - self.volumes_view.show_all() |
4052 | - |
4053 | - self.is_processing = False |
4054 | - |
4055 | - @log_call(logger.error) |
4056 | - def on_volumes_info_error(self, error_dict=None): |
4057 | - """Backend notifies of an error when fetching volumes info.""" |
4058 | - self.on_error(error_dict=error_dict) |
4059 | - |
4060 | - @log_call(logger.info) |
4061 | - def on_volume_settings_changed(self, volume_id): |
4062 | - """The settings for 'volume_id' were changed.""" |
4063 | - self.is_processing = False |
4064 | - |
4065 | - @log_call(logger.error) |
4066 | - def on_volume_settings_change_error(self, volume_id, error_dict=None): |
4067 | - """The settings for 'volume_id' were not changed.""" |
4068 | - self.load() |
4069 | - |
4070 | - def on_subscribed_toggled(self, widget, path, *args, **kwargs): |
4071 | - """The user toggled 'widget'.""" |
4072 | - treeiter = self.volumes_store.get_iter(path) |
4073 | - volume_id = self.volumes_store.get_value(treeiter, 6) |
4074 | - volume_path = self.volumes_store.get_value(treeiter, 7) |
4075 | - subscribed = self.volumes_store.get_value(treeiter, 1) |
4076 | - |
4077 | - response = gtk.RESPONSE_YES |
4078 | - if not subscribed and os.path.exists(volume_path): |
4079 | - self.confirm_dialog.set_markup(FOLDERS_CONFIRM_MERGE % |
4080 | - {'folder_path': volume_path}) |
4081 | - response = self.confirm_dialog.run() |
4082 | - self.confirm_dialog.hide() |
4083 | - |
4084 | - if response == gtk.RESPONSE_YES: |
4085 | - subscribed = not subscribed |
4086 | - self.volumes_store.set_value(treeiter, 1, subscribed) |
4087 | - self.backend.change_volume_settings(volume_id, |
4088 | - {'subscribed': bool_str(subscribed)}, |
4089 | - reply_handler=NO_OP, error_handler=error_handler) |
4090 | - |
4091 | - self.is_processing = True |
4092 | - |
4093 | - def on_volumes_view_row_activated(self, widget, path, *args, **kwargs): |
4094 | - """The user double clicked on a row.""" |
4095 | - treeiter = self.volumes_store.get_iter(path) |
4096 | - volume_path = self.volumes_store.get_value(treeiter, 7) |
4097 | - if volume_path is None: |
4098 | - logger.warning('on_volumes_view_row_activated: volume_path for ' |
4099 | - 'tree_path %r is None', path) |
4100 | - elif not os.path.exists(volume_path): |
4101 | - logger.warning('on_volumes_view_row_activated: path %r ' |
4102 | - 'does not exist', volume_path) |
4103 | - else: |
4104 | - uri_hook(None, FILE_URI_PREFIX + volume_path) |
4105 | - |
4106 | - def load(self): |
4107 | - """Load the volume list.""" |
4108 | - self.backend.volumes_info(reply_handler=NO_OP, |
4109 | - error_handler=error_handler) |
4110 | - self.is_processing = True |
4111 | - |
4112 | - |
4113 | -class SharesPanel(UbuntuOneBin, ControlPanelMixin): |
4114 | - """The shares panel - NOT IMPLEMENTED YET.""" |
4115 | - |
4116 | - TITLE = SHARES_TITLE |
4117 | - |
4118 | - def __init__(self, main_window=None): |
4119 | - UbuntuOneBin.__init__(self) |
4120 | - ControlPanelMixin.__init__(self) |
4121 | - self.show_all() |
4122 | - self.on_success('Not implemented yet.') |
4123 | - |
4124 | - |
4125 | -class Device(gtk.EventBox, ControlPanelMixin): |
4126 | - """The device widget.""" |
4127 | - |
4128 | - def __init__(self, confirm_remove_dialog=None): |
4129 | - gtk.EventBox.__init__(self) |
4130 | - ControlPanelMixin.__init__(self, filename='device.ui') |
4131 | - |
4132 | - self.confirm_dialog = confirm_remove_dialog |
4133 | - self._updating = False |
4134 | - self._last_settings = {} |
4135 | - self.id = None |
4136 | - self.is_local = False |
4137 | - self.configurable = False |
4138 | - |
4139 | - self.update(device_id=None, device_name='', |
4140 | - is_local=False, configurable=False, limit_bandwidth=False, |
4141 | - max_upload_speed=0, max_download_speed=0, |
4142 | - show_all_notifications=True) |
4143 | - |
4144 | - self.add(self.itself) |
4145 | - self.show() |
4146 | - |
4147 | - self.backend.connect_to_signal('DeviceSettingsChanged', |
4148 | - self.on_device_settings_changed) |
4149 | - self.backend.connect_to_signal('DeviceSettingsChangeError', |
4150 | - self.on_device_settings_change_error) |
4151 | - self.backend.connect_to_signal('DeviceRemoved', |
4152 | - self.on_device_removed) |
4153 | - self.backend.connect_to_signal('DeviceRemovalError', |
4154 | - self.on_device_removal_error) |
4155 | - |
4156 | - def _change_device_settings(self, *args): |
4157 | - """Update backend settings for this device.""" |
4158 | - if self._updating: |
4159 | - return |
4160 | - |
4161 | - # Not disabling the GUI to avoid annyong twitchings |
4162 | - #self.set_sensitive(False) |
4163 | - self.warning_label.set_text('') |
4164 | - self.backend.change_device_settings(self.id, self.__dict__, |
4165 | - reply_handler=NO_OP, error_handler=error_handler) |
4166 | - |
4167 | - def _block_signals(f): |
4168 | - """Execute 'f' while having the _updating flag set.""" |
4169 | - |
4170 | - # pylint: disable=E0213,W0212,E1102 |
4171 | - |
4172 | - @wraps(f) |
4173 | - def inner(self, *args, **kwargs): |
4174 | - """Execute 'f' while having the _updating flag set.""" |
4175 | - old = self._updating |
4176 | - self._updating = True |
4177 | - |
4178 | - result = f(self, *args, **kwargs) |
4179 | - |
4180 | - self._updating = old |
4181 | - return result |
4182 | - |
4183 | - return inner |
4184 | - |
4185 | - on_show_all_notifications_toggled = _change_device_settings |
4186 | - on_max_upload_speed_value_changed = _change_device_settings |
4187 | - on_max_download_speed_value_changed = _change_device_settings |
4188 | - |
4189 | - def on_limit_bandwidth_toggled(self, *args, **kwargs): |
4190 | - """The limit bandwidth checkbox was toggled.""" |
4191 | - self.throttling_limits.set_sensitive(self.limit_bandwidth.get_active()) |
4192 | - self._change_device_settings() |
4193 | - |
4194 | - def on_remove_clicked(self, widget): |
4195 | - """Remove button was clicked or activated.""" |
4196 | - response = gtk.RESPONSE_YES |
4197 | - if self.confirm_dialog is not None: |
4198 | - response = self.confirm_dialog.run() |
4199 | - self.confirm_dialog.hide() |
4200 | - |
4201 | - if response == gtk.RESPONSE_YES: |
4202 | - self.backend.remove_device(self.id, |
4203 | - reply_handler=NO_OP, error_handler=error_handler) |
4204 | - self.set_sensitive(False) |
4205 | - |
4206 | - @_block_signals |
4207 | - def update(self, **kwargs): |
4208 | - """Update according to named parameters. |
4209 | - |
4210 | - Possible settings are: |
4211 | - * device_id (string, not shown to the user) |
4212 | - * device_name (string) |
4213 | - * type (either DEVICE_TYPE_PHONE or DEVICE_TYPE_COMPUTER) |
4214 | - * is_local (True/False) |
4215 | - * configurable (True/False) |
4216 | - * if configurable, the following can be set: |
4217 | - * show_all_notifications (True/False) |
4218 | - * limit_bandwidth (True/False) |
4219 | - * max_upload_speed (bytes) |
4220 | - * max_download_speed (bytes) |
4221 | - |
4222 | - """ |
4223 | - if 'device_id' in kwargs: |
4224 | - self.id = kwargs['device_id'] |
4225 | - |
4226 | - if 'device_name' in kwargs: |
4227 | - name = kwargs['device_name'].replace(DEVICE_REMOVABLE_PREFIX, '') |
4228 | - name = '<span font_size="large"><b>%s</b></span>' % name |
4229 | - self.device_name.set_markup(name) |
4230 | - |
4231 | - if 'device_type' in kwargs: |
4232 | - dtype = kwargs['device_type'] |
4233 | - if dtype in (DEVICE_TYPE_COMPUTER, DEVICE_TYPE_PHONE): |
4234 | - self.device_type.set_from_icon_name(dtype.lower(), |
4235 | - gtk.ICON_SIZE_LARGE_TOOLBAR) |
4236 | - |
4237 | - if 'is_local' in kwargs: |
4238 | - self.is_local = bool(kwargs['is_local']) |
4239 | - |
4240 | - if 'configurable' in kwargs: |
4241 | - self.configurable = bool(kwargs['configurable']) |
4242 | - self.config_settings.set_visible(self.configurable) |
4243 | - |
4244 | - if 'show_all_notifications' in kwargs: |
4245 | - value = bool(kwargs['show_all_notifications']) |
4246 | - self.show_all_notifications.set_active(value) |
4247 | - |
4248 | - if 'limit_bandwidth' in kwargs: |
4249 | - enabled = bool(kwargs['limit_bandwidth']) |
4250 | - self.limit_bandwidth.set_active(enabled) |
4251 | - self.throttling_limits.set_sensitive(enabled) |
4252 | - |
4253 | - for speed in ('max_upload_speed', 'max_download_speed'): |
4254 | - if speed in kwargs: |
4255 | - value = int(kwargs[speed]) // KILOBYTES |
4256 | - getattr(self, speed).set_value(value) |
4257 | - |
4258 | - self._last_settings = self.__dict__ |
4259 | - |
4260 | - @property |
4261 | - def __dict__(self): |
4262 | - result = { |
4263 | - 'device_id': self.id, |
4264 | - 'device_name': self.device_name.get_text(), |
4265 | - 'device_type': self.device_type.get_icon_name()[0].capitalize(), |
4266 | - 'is_local': bool_str(self.is_local), |
4267 | - 'configurable': bool_str(self.configurable), |
4268 | - 'show_all_notifications': \ |
4269 | - bool_str(self.show_all_notifications.get_active()), |
4270 | - 'limit_bandwidth': bool_str(self.limit_bandwidth.get_active()), |
4271 | - 'max_upload_speed': \ |
4272 | - str(self.max_upload_speed.get_value_as_int() * KILOBYTES), |
4273 | - 'max_download_speed': \ |
4274 | - str(self.max_download_speed.get_value_as_int() * KILOBYTES), |
4275 | - } |
4276 | - return result |
4277 | - |
4278 | - @log_call(logger.info, with_args=False) |
4279 | - def on_device_settings_changed(self, device_id): |
4280 | - """The change of this device settings succeded.""" |
4281 | - if device_id != self.id: |
4282 | - return |
4283 | - self.set_sensitive(True) |
4284 | - self.warning_label.set_text('') |
4285 | - self._last_settings = self.__dict__ |
4286 | - |
4287 | - @log_call(logger.error) |
4288 | - def on_device_settings_change_error(self, device_id, error_dict=None): |
4289 | - """The change of this device settings failed.""" |
4290 | - if device_id != self.id: |
4291 | - return |
4292 | - self.update(**self._last_settings) |
4293 | - self._set_warning(DEVICE_CHANGE_ERROR, self.warning_label) |
4294 | - self.set_sensitive(True) |
4295 | - |
4296 | - # is safe to log the device_id since it was already removed |
4297 | - @log_call(logger.warning) |
4298 | - def on_device_removed(self, device_id): |
4299 | - """The removal of this device succeded.""" |
4300 | - if device_id != self.id: |
4301 | - return |
4302 | - self.hide() |
4303 | - |
4304 | - @log_call(logger.error) |
4305 | - def on_device_removal_error(self, device_id, error_dict=None): |
4306 | - """The removal of this device failed.""" |
4307 | - if device_id != self.id: |
4308 | - return |
4309 | - self._set_warning(DEVICE_REMOVAL_ERROR, self.warning_label) |
4310 | - self.set_sensitive(True) |
4311 | - |
4312 | - |
4313 | -class DevicesPanel(UbuntuOneBin, ControlPanelMixin): |
4314 | - """The devices panel.""" |
4315 | - |
4316 | - __gsignals__ = { |
4317 | - 'local-device-removed': (gobject.SIGNAL_RUN_FIRST, |
4318 | - gobject.TYPE_NONE, ()), |
4319 | - } |
4320 | - |
4321 | - TITLE = DEVICES_TITLE |
4322 | - |
4323 | - def __init__(self, main_window=None): |
4324 | - UbuntuOneBin.__init__(self) |
4325 | - ControlPanelMixin.__init__(self, filename='devices.ui') |
4326 | - self.add(self.itself) |
4327 | - self.show() |
4328 | - |
4329 | - self._devices = {} |
4330 | - kw = dict(parent=main_window, |
4331 | - flags=gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT, |
4332 | - type=gtk.MESSAGE_WARNING, |
4333 | - buttons=gtk.BUTTONS_YES_NO, |
4334 | - message_format=DEVICE_CONFIRM_REMOVE) |
4335 | - self.confirm_remove_dialog = gtk.MessageDialog(**kw) |
4336 | - |
4337 | - self.backend.connect_to_signal('DevicesInfoReady', |
4338 | - self.on_devices_info_ready) |
4339 | - self.backend.connect_to_signal('DevicesInfoError', |
4340 | - self.on_devices_info_error) |
4341 | - self.backend.connect_to_signal('DeviceRemoved', |
4342 | - self.on_device_removed) |
4343 | - |
4344 | - @log_call(logger.info, with_args=False) |
4345 | - def on_devices_info_ready(self, info): |
4346 | - """Backend notifies of devices info.""" |
4347 | - for child in self.devices.get_children(): |
4348 | - self.devices.remove(child) |
4349 | - |
4350 | - if not info: |
4351 | - self.on_success(NO_DEVICES) |
4352 | - else: |
4353 | - self.on_success() |
4354 | - |
4355 | - # Class 'style' has no 'bg' member |
4356 | - # pylint: disable=E1101 |
4357 | - odd_row_color = self.message.style.bg[gtk.STATE_NORMAL] |
4358 | - for i, device_info in enumerate(info): |
4359 | - device = Device(confirm_remove_dialog=self.confirm_remove_dialog) |
4360 | - device_info['device_name'] = device_info.pop('name', '') |
4361 | - device_info['device_type'] = device_info.pop('type', |
4362 | - DEVICE_TYPE_COMPUTER) |
4363 | - device.update(**device_info) |
4364 | - |
4365 | - if i % 2 == 1: |
4366 | - device.modify_bg(gtk.STATE_NORMAL, odd_row_color) |
4367 | - |
4368 | - self.devices.pack_start(device) |
4369 | - self._devices[device.id] = device |
4370 | - |
4371 | - self.is_processing = False |
4372 | - |
4373 | - @log_call(logger.error) |
4374 | - def on_devices_info_error(self, error_dict=None): |
4375 | - """Backend notifies of an error when fetching volumes info.""" |
4376 | - self.on_error(error_dict=error_dict) |
4377 | - self.is_processing = False |
4378 | - |
4379 | - @log_call(logger.warning) |
4380 | - def on_device_removed(self, device_id): |
4381 | - """The removal of a device succeded.""" |
4382 | - if device_id in self._devices: |
4383 | - child = self._devices.pop(device_id) |
4384 | - self.devices.remove(child) |
4385 | - |
4386 | - if child.is_local: |
4387 | - self.emit('local-device-removed') |
4388 | - |
4389 | - def load(self): |
4390 | - """Load the device list.""" |
4391 | - self.backend.devices_info(reply_handler=NO_OP, |
4392 | - error_handler=error_handler) |
4393 | - self.is_processing = True |
4394 | - |
4395 | - |
4396 | -class InstallPackage(gtk.VBox, ControlPanelMixin): |
4397 | - """A widget to process the install of a package.""" |
4398 | - |
4399 | - __gsignals__ = { |
4400 | - 'finished': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE, ()), |
4401 | - } |
4402 | - |
4403 | - def __init__(self, package_name, message=None): |
4404 | - gtk.VBox.__init__(self) |
4405 | - ControlPanelMixin.__init__(self, filename='install.ui') |
4406 | - self.add(self.itself) |
4407 | - |
4408 | - self.package_name = package_name |
4409 | - self.package_manager = package_manager.PackageManager() |
4410 | - self.args = {'package_name': self.package_name} |
4411 | - self.transaction = None |
4412 | - |
4413 | - self.progress_bar = None |
4414 | - |
4415 | - self.message = message |
4416 | - if self.message is None: |
4417 | - self.message = INSTALL_PACKAGE % self.args |
4418 | - self.reset() |
4419 | - |
4420 | - self.show() |
4421 | - |
4422 | - def reset(self): |
4423 | - """Reset this interface.""" |
4424 | - children = self.itself.get_children() |
4425 | - if self.progress_bar in children: |
4426 | - self.itself.remove(self.progress_bar) |
4427 | - if self.install_button_box not in children: |
4428 | - self.itself.pack_start(self.install_button_box) |
4429 | - self.install_label.set_markup(self.message) |
4430 | - |
4431 | - @package_manager.inline_callbacks |
4432 | - def on_install_button_clicked(self, button): |
4433 | - """The install button was clicked.""" |
4434 | - try: |
4435 | - # create the install transaction |
4436 | - self.transaction = yield self.package_manager.install( |
4437 | - self.package_name) |
4438 | - |
4439 | - logger.debug('on_install_button_clicked: transaction is %r', |
4440 | - self.transaction) |
4441 | - success = package_manager.aptdaemon.enums.EXIT_SUCCESS |
4442 | - if self.transaction == success: |
4443 | - self.on_install_finished(None, self.transaction) |
4444 | - return |
4445 | - |
4446 | - # create the progress bar and pack it to the box |
4447 | - self.progress_bar = package_manager.PackageManagerProgressBar( |
4448 | - self.transaction) |
4449 | - self.progress_bar.show() |
4450 | - |
4451 | - self.itself.remove(self.install_button_box) |
4452 | - self.itself.pack_start(self.progress_bar) |
4453 | - |
4454 | - self.transaction.connect('finished', self.on_install_finished) |
4455 | - self.install_label.set_markup(INSTALLING % self.args) |
4456 | - yield self.transaction.run() |
4457 | - except package_manager.aptdaemon.errors.NotAuthorizedError: |
4458 | - self.reset() |
4459 | - except: # pylint: disable=W0702 |
4460 | - logger.exception('on_install_button_clicked') |
4461 | - self._set_warning(FAILED_INSTALL % self.args, |
4462 | - self.install_label) |
4463 | - if self.progress_bar is not None: |
4464 | - self.progress_bar.hide() |
4465 | - |
4466 | - @log_call(logger.info) |
4467 | - def on_install_finished(self, transaction, exit_code): |
4468 | - """The installation finished.""" |
4469 | - if self.progress_bar is not None: |
4470 | - self.progress_bar.set_sensitive(False) |
4471 | - |
4472 | - logger.info('on_install_finished: installation of %r was %r', |
4473 | - self.package_name, exit_code) |
4474 | - if exit_code != package_manager.aptdaemon.enums.EXIT_SUCCESS: |
4475 | - if hasattr(transaction, 'error'): |
4476 | - logger.error('transaction failed: %r', transaction.error) |
4477 | - self._set_warning(FAILED_INSTALL % self.args, |
4478 | - self.install_label) |
4479 | - else: |
4480 | - self.install_label.set_markup(SUCCESS_INSTALL % self.args) |
4481 | - self.emit('finished') |
4482 | - |
4483 | - |
4484 | -class Service(gtk.VBox, ControlPanelMixin): |
4485 | - """A service.""" |
4486 | - |
4487 | - def __init__(self, service_id, name, |
4488 | - container=None, check_button=None, action_button=None, |
4489 | - *args, **kwargs): |
4490 | - gtk.VBox.__init__(self) |
4491 | - ControlPanelMixin.__init__(self) |
4492 | - self.id = service_id |
4493 | - self.container = container |
4494 | - self.check_button = check_button |
4495 | - self.action_button = action_button |
4496 | - |
4497 | - self.warning_label = gtk.Label() |
4498 | - self.pack_start(self.warning_label, expand=False) |
4499 | - |
4500 | - self.button = gtk.CheckButton(label=name) |
4501 | - self.pack_start(self.button, expand=False) |
4502 | - |
4503 | - self.show_all() |
4504 | - |
4505 | - |
4506 | -class FileSyncService(Service): |
4507 | - """The file sync service.""" |
4508 | - |
4509 | - def __init__(self, container, check_button, action_button): |
4510 | - Service.__init__(self, service_id='file-sync', |
4511 | - name=FILE_SYNC_SERVICE_NAME, |
4512 | - container=container, |
4513 | - check_button=check_button, |
4514 | - action_button=action_button) |
4515 | - |
4516 | - self.container.set_sensitive(False) |
4517 | - |
4518 | - self.backend.connect_to_signal('FileSyncStatusChanged', |
4519 | - self.on_file_sync_status_changed) |
4520 | - self.backend.connect_to_signal('FilesEnabled', self.on_files_enabled) |
4521 | - self.backend.connect_to_signal('FilesDisabled', self.on_files_disabled) |
4522 | - |
4523 | - @log_call(logger.debug) |
4524 | - def on_file_sync_status_changed(self, status): |
4525 | - """File Sync status changed.""" |
4526 | - enabled = status != backend.FILE_SYNC_DISABLED |
4527 | - logger.info('FileSyncService: on_file_sync_status_changed: ' |
4528 | - 'status %r, enabled? %r', status, enabled) |
4529 | - self.check_button.set_active(enabled) |
4530 | - # if service is disabled, disable the action_button |
4531 | - self.action_button.set_sensitive(enabled) |
4532 | - |
4533 | - if not self.container.is_sensitive(): |
4534 | - # first time we're getting this event |
4535 | - self.check_button.connect('toggled', self.on_button_toggled) |
4536 | - self.container.set_sensitive(True) |
4537 | - |
4538 | - def on_files_enabled(self): |
4539 | - """Files service was enabled.""" |
4540 | - self.on_file_sync_status_changed('enabled!') |
4541 | - |
4542 | - def on_files_disabled(self): |
4543 | - """Files service was disabled.""" |
4544 | - self.on_file_sync_status_changed(backend.FILE_SYNC_DISABLED) |
4545 | - |
4546 | - @log_call(logger.debug) |
4547 | - def on_button_toggled(self, button): |
4548 | - """Button was toggled, exclude/replicate the service properly.""" |
4549 | - logger.info('File Sync enabled? %r', self.check_button.get_active()) |
4550 | - if self.check_button.get_active(): |
4551 | - self.backend.enable_files(reply_handler=NO_OP, |
4552 | - error_handler=error_handler) |
4553 | - else: |
4554 | - self.backend.disable_files(reply_handler=NO_OP, |
4555 | - error_handler=error_handler) |
4556 | - |
4557 | - def load(self): |
4558 | - """Load the information.""" |
4559 | - self.backend.file_sync_status(reply_handler=NO_OP, |
4560 | - error_handler=error_handler) |
4561 | - |
4562 | - |
4563 | -class DesktopcouchService(Service): |
4564 | - """A desktopcouch service.""" |
4565 | - |
4566 | - def __init__(self, service_id, name, enabled, |
4567 | - container, check_button, |
4568 | - dependency=None, dependency_name=None): |
4569 | - Service.__init__(self, service_id, name, |
4570 | - container, check_button, action_button=None) |
4571 | - |
4572 | - self.backend.connect_to_signal('ReplicationSettingsChanged', |
4573 | - self.on_replication_settings_changed) |
4574 | - self.backend.connect_to_signal('ReplicationSettingsChangeError', |
4575 | - self.on_replication_settings_change_error) |
4576 | - |
4577 | - self.check_button.set_active(enabled) |
4578 | - |
4579 | - self.dependency = None |
4580 | - if dependency is not None: |
4581 | - if dependency_name is None: |
4582 | - dependency_name = dependency |
4583 | - args = {'plugin_name': dependency_name, 'service_name': service_id} |
4584 | - message = INSTALL_PLUGIN % args |
4585 | - self.dependency = InstallPackage(dependency, message) |
4586 | - self.dependency.connect('finished', self.on_depedency_finished) |
4587 | - |
4588 | - self.container.pack_end(self.dependency, expand=False) |
4589 | - self.check_button.set_sensitive(False) |
4590 | - |
4591 | - self.check_button.connect('toggled', self.on_button_toggled) |
4592 | - |
4593 | - def on_depedency_finished(self, widget): |
4594 | - """The dependency was installed.""" |
4595 | - self.check_button.set_sensitive(True) |
4596 | - self.container.remove(self.dependency) |
4597 | - self.dependency = None |
4598 | - |
4599 | - @log_call(logger.debug) |
4600 | - def on_button_toggled(self, button): |
4601 | - """Button was toggled, exclude/replicate the service properly.""" |
4602 | - logger.info('Starting replication for %r? %r', |
4603 | - self.id, self.check_button.get_active()) |
4604 | - |
4605 | - args = {'enabled': bool_str(self.check_button.get_active())} |
4606 | - self.backend.change_replication_settings(self.id, args, |
4607 | - reply_handler=NO_OP, error_handler=error_handler) |
4608 | - |
4609 | - @log_call(logger.info) |
4610 | - def on_replication_settings_changed(self, replication_id): |
4611 | - """The change of settings for this replication succeded.""" |
4612 | - if replication_id != self.id: |
4613 | - return |
4614 | - self.warning_label.set_text('') |
4615 | - |
4616 | - @log_call(logger.error) |
4617 | - def on_replication_settings_change_error(self, replication_id, |
4618 | - error_dict=None): |
4619 | - """The change of settings for this replication failed.""" |
4620 | - if replication_id != self.id: |
4621 | - return |
4622 | - self.check_button.set_active(not self.check_button.get_active()) |
4623 | - self._set_warning(SETTINGS_CHANGE_ERROR, self.warning_label) |
4624 | - |
4625 | - |
4626 | -class ServicesPanel(UbuntuOneBin, ControlPanelMixin): |
4627 | - """The services panel.""" |
4628 | - |
4629 | - TITLE = SERVICES_TITLE |
4630 | - |
4631 | - def __init__(self, main_window=None): |
4632 | - UbuntuOneBin.__init__(self) |
4633 | - ControlPanelMixin.__init__(self, filename='services.ui') |
4634 | - self.add(self.itself) |
4635 | - self.files_icon.set_from_file(get_data_file(SERVICES_FILES_ICON)) |
4636 | - self.files_example.set_from_file(get_data_file(SERVICES_FILES_EXAMPLE)) |
4637 | - self.contacts_icon.set_from_file(get_data_file(SERVICES_CONTACTS_ICON)) |
4638 | - |
4639 | - self.plugin_names = {'contacts': CONTACTS} |
4640 | - |
4641 | - self.package_manager = package_manager.PackageManager() |
4642 | - self.install_box = None |
4643 | - |
4644 | - self._replications_ready = False # hack to solve LP: #750309 |
4645 | - self.backend.connect_to_signal('ReplicationsInfoReady', |
4646 | - self.on_replications_info_ready) |
4647 | - self.backend.connect_to_signal('ReplicationsInfoError', |
4648 | - self.on_replications_info_error) |
4649 | - |
4650 | - self.file_sync_service = FileSyncService(container=self.files, |
4651 | - check_button=self.file_sync_check, |
4652 | - action_button=self.file_sync_button) |
4653 | - |
4654 | - self.show() |
4655 | - |
4656 | - @property |
4657 | - def has_desktopcouch(self): |
4658 | - """Is desktopcouch installed?""" |
4659 | - return self.package_manager.is_installed(DESKTOPCOUCH_PKG) |
4660 | - |
4661 | - def on_file_sync_button_clicked(self, *args, **kwargs): |
4662 | - """The "Show me my U1 folder" button was clicked. |
4663 | - |
4664 | - XXX: this should be part of the FileSyncService widget. |
4665 | - XXX: the Ubuntu One folder should be the user's root. |
4666 | - |
4667 | - """ |
4668 | - uri_hook(None, FILE_URI_PREFIX + os.path.expanduser('~/Ubuntu One')) |
4669 | - |
4670 | - def on_contacts_button_clicked(self, *args, **kwargs): |
4671 | - """The "Take me to the Ubuntu One website" button was clicked. |
4672 | - |
4673 | - XXX: this should be part of the DesktopcouchService widget. |
4674 | - |
4675 | - """ |
4676 | - uri_hook(None, CONTACTS) |
4677 | - |
4678 | - @log_call(logger.debug) |
4679 | - def load(self): |
4680 | - """Load info.""" |
4681 | - self.file_sync_service.load() |
4682 | - self.replications.hide() |
4683 | - if self.install_box is not None: |
4684 | - self.itself.remove(self.install_box) |
4685 | - self.install_box = None |
4686 | - |
4687 | - logger.info('load: has_desktopcouch? %r', self.has_desktopcouch) |
4688 | - if not self.has_desktopcouch: |
4689 | - self.message.set_text('') |
4690 | - |
4691 | - self.install_box = InstallPackage(DESKTOPCOUCH_PKG) |
4692 | - self.install_box.connect('finished', self.load_replications) |
4693 | - self.itself.pack_end(self.install_box, expand=False) |
4694 | - self.itself.reorder_child(self.install_box, 0) |
4695 | - else: |
4696 | - self.load_replications() |
4697 | - |
4698 | - self.message.stop() |
4699 | - |
4700 | - @log_call(logger.debug) |
4701 | - def load_replications(self, *args): |
4702 | - """Load replications info.""" |
4703 | - self._replications_ready = False # hack to solve LP: #750309 |
4704 | - # ask replications to the backend |
4705 | - self.message.start() |
4706 | - self.backend.replications_info(reply_handler=NO_OP, |
4707 | - error_handler=error_handler) |
4708 | - |
4709 | - @log_call(logger.debug) |
4710 | - def on_replications_info_ready(self, info): |
4711 | - """The replication info is ready.""" |
4712 | - self.on_success() |
4713 | - |
4714 | - self.replications.show() |
4715 | - |
4716 | - if self.install_box is not None: |
4717 | - self.itself.remove(self.install_box) |
4718 | - self.install_box = None |
4719 | - |
4720 | - for item in info: |
4721 | - pkg = item['dependency'] |
4722 | - if not pkg or self.package_manager.is_installed(pkg): |
4723 | - pkg = None |
4724 | - |
4725 | - sid = item['replication_id'] |
4726 | - container = getattr(self, sid, None) |
4727 | - check_button = getattr(self, '%s_check' % sid, None) |
4728 | - name = self.plugin_names.get(sid, None) |
4729 | - child = DesktopcouchService(service_id=sid, name=item['name'], |
4730 | - enabled=bool(item['enabled']), container=container, |
4731 | - check_button=check_button, |
4732 | - dependency=pkg, dependency_name=name) |
4733 | - setattr(self, '%s_service' % sid, child) |
4734 | - self._replications_ready = True # hack to solve LP: #750309 |
4735 | - |
4736 | - @log_call(logger.error) |
4737 | - def on_replications_info_error(self, error_dict=None): |
4738 | - """The replication info can not be retrieved.""" |
4739 | - if error_dict is not None and \ |
4740 | - error_dict.get('error_type', None) == 'NoPairingRecord': |
4741 | - self.on_error(NO_PAIRING_RECORD) |
4742 | - else: |
4743 | - self.on_error(error_dict=error_dict) |
4744 | - |
4745 | - def refresh(self): |
4746 | - """If replication list has been loaded, hide and show them.""" |
4747 | - if self._replications_ready: # hack to solve LP: #750309 |
4748 | - self.replications.hide() |
4749 | - self.replications.show() |
4750 | - |
4751 | - |
4752 | -class FileSyncStatus(gtk.HBox, ControlPanelMixin): |
4753 | - """A file sync status widget.""" |
4754 | - |
4755 | - def __init__(self): |
4756 | - gtk.HBox.__init__(self) |
4757 | - ControlPanelMixin.__init__(self) |
4758 | - |
4759 | - self.label = LabelLoading(LOADING) |
4760 | - self.pack_start(self.label, expand=True) |
4761 | - |
4762 | - self.button = gtk.LinkButton(uri='') |
4763 | - self.button.connect('clicked', self._on_button_clicked) |
4764 | - self.pack_start(self.button, expand=False) |
4765 | - |
4766 | - self.show_all() |
4767 | - |
4768 | - self.backend.connect_to_signal('FileSyncStatusDisabled', |
4769 | - self.on_file_sync_status_disabled) |
4770 | - self.backend.connect_to_signal('FileSyncStatusStarting', |
4771 | - self.on_file_sync_status_starting) |
4772 | - self.backend.connect_to_signal('FileSyncStatusStopped', |
4773 | - self.on_file_sync_status_stopped) |
4774 | - self.backend.connect_to_signal('FileSyncStatusDisconnected', |
4775 | - self.on_file_sync_status_disconnected) |
4776 | - self.backend.connect_to_signal('FileSyncStatusSyncing', |
4777 | - self.on_file_sync_status_syncing) |
4778 | - self.backend.connect_to_signal('FileSyncStatusIdle', |
4779 | - self.on_file_sync_status_idle) |
4780 | - self.backend.connect_to_signal('FileSyncStatusError', |
4781 | - self.on_file_sync_status_error) |
4782 | - self.backend.connect_to_signal('FilesStartError', |
4783 | - self.on_files_start_error) |
4784 | - self.backend.connect_to_signal('FilesEnabled', |
4785 | - self.on_file_sync_status_starting) |
4786 | - self.backend.connect_to_signal('FilesDisabled', |
4787 | - self.on_file_sync_status_disabled) |
4788 | - |
4789 | - def _update_status(self, msg, action, callback, |
4790 | - icon=None, color=None, tooltip=None): |
4791 | - """Update the status info.""" |
4792 | - if icon is not None: |
4793 | - foreground = '' if color is None else 'foreground="%s"' % color |
4794 | - msg = '<span %s>%s</span> %s' % (foreground, icon, msg) |
4795 | - self.label.set_markup(msg) |
4796 | - self.label.stop() |
4797 | - |
4798 | - self.button.set_label(action) |
4799 | - self.button.set_uri(action) |
4800 | - self.button.set_sensitive(True) |
4801 | - self.button.set_data('callback', callback) |
4802 | - if tooltip is not None: |
4803 | - self.button.set_tooltip_text(tooltip) |
4804 | - |
4805 | - def _on_button_clicked(self, button): |
4806 | - """Button was clicked, act accordingly the label.""" |
4807 | - button.set_visited(False) |
4808 | - button.set_sensitive(False) |
4809 | - button.get_data('callback')(button) |
4810 | - |
4811 | - @log_call(logger.info) |
4812 | - def on_file_sync_status_disabled(self, msg=None): |
4813 | - """Backend notifies of file sync status being disabled.""" |
4814 | - self._update_status(FILE_SYNC_DISABLED, |
4815 | - FILE_SYNC_ENABLE, self.on_enable_clicked, |
4816 | - ERROR_ICON, ERROR_COLOR, FILE_SYNC_ENABLE_TOOLTIP) |
4817 | - |
4818 | - @log_call(logger.info) |
4819 | - def on_file_sync_status_starting(self, msg=None): |
4820 | - """Backend notifies of file sync status being starting.""" |
4821 | - self._update_status(FILE_SYNC_STARTING, |
4822 | - FILE_SYNC_STOP, self.on_stop_clicked, |
4823 | - SYNCING_ICON, ORANGE, FILE_SYNC_STOP_TOOLTIP) |
4824 | - |
4825 | - @log_call(logger.info) |
4826 | - def on_file_sync_status_stopped(self, msg=None): |
4827 | - """Backend notifies of file sync being stopped.""" |
4828 | - self._update_status(FILE_SYNC_STOPPED, |
4829 | - FILE_SYNC_START, self.on_start_clicked, |
4830 | - ERROR_ICON, ERROR_COLOR, FILE_SYNC_START_TOOLTIP) |
4831 | - |
4832 | - @log_call(logger.info) |
4833 | - def on_file_sync_status_disconnected(self, msg=None): |
4834 | - """Backend notifies of file sync status being ready.""" |
4835 | - self._update_status(FILE_SYNC_DISCONNECTED, |
4836 | - FILE_SYNC_CONNECT, self.on_connect_clicked, |
4837 | - ERROR_ICON, ERROR_COLOR, |
4838 | - FILE_SYNC_CONNECT_TOOLTIP,) |
4839 | - |
4840 | - @log_call(logger.info) |
4841 | - def on_file_sync_status_syncing(self, msg=None): |
4842 | - """Backend notifies of file sync status being syncing.""" |
4843 | - self._update_status(FILE_SYNC_SYNCING, |
4844 | - FILE_SYNC_DISCONNECT, self.on_disconnect_clicked, |
4845 | - SYNCING_ICON, ORANGE, FILE_SYNC_DISCONNECT_TOOLTIP) |
4846 | - |
4847 | - @log_call(logger.info) |
4848 | - def on_file_sync_status_idle(self, msg=None): |
4849 | - """Backend notifies of file sync status being idle.""" |
4850 | - self._update_status(FILE_SYNC_IDLE, |
4851 | - FILE_SYNC_DISCONNECT, self.on_disconnect_clicked, |
4852 | - IDLE_ICON, SUCCESS_COLOR, |
4853 | - FILE_SYNC_DISCONNECT_TOOLTIP) |
4854 | - |
4855 | - @log_call(logger.error) |
4856 | - def on_file_sync_status_error(self, error_dict=None): |
4857 | - """Backend notifies of an error when fetching file sync status.""" |
4858 | - msg = FILE_SYNC_ERROR |
4859 | - reason = error_dict.get('error_msg', '') if error_dict else '' |
4860 | - if reason: |
4861 | - msg += ' (' + reason + ')' |
4862 | - self._update_status(WARNING_MARKUP % msg, |
4863 | - FILE_SYNC_RESTART, self.on_restart_clicked, |
4864 | - tooltip=FILE_SYNC_RESTART_TOOLTIP) |
4865 | - |
4866 | - @log_call(logger.error) |
4867 | - def on_files_start_error(self, error_dict=None): |
4868 | - """Backend notifies of an error when starting the files service.""" |
4869 | - # service is probably disabled, ask for status to backend |
4870 | - self.backend.file_sync_status(reply_handler=NO_OP, |
4871 | - error_handler=error_handler) |
4872 | - |
4873 | - def on_connect_clicked(self, button=None): |
4874 | - """User requested connection.""" |
4875 | - self.backend.connect_files(reply_handler=NO_OP, |
4876 | - error_handler=error_handler) |
4877 | - |
4878 | - def on_disconnect_clicked(self, button=None): |
4879 | - """User requested disconnection.""" |
4880 | - self.backend.disconnect_files(reply_handler=NO_OP, |
4881 | - error_handler=error_handler) |
4882 | - |
4883 | - def on_enable_clicked(self, button=None): |
4884 | - """User requested enable the service.""" |
4885 | - self.backend.enable_files(reply_handler=NO_OP, |
4886 | - error_handler=error_handler) |
4887 | - |
4888 | - def on_restart_clicked(self, button=None): |
4889 | - """User requested restart the service.""" |
4890 | - self.backend.restart_files(reply_handler=NO_OP, |
4891 | - error_handler=error_handler) |
4892 | - |
4893 | - def on_start_clicked(self, button=None): |
4894 | - """User requested start the service.""" |
4895 | - self.backend.start_files(reply_handler=NO_OP, |
4896 | - error_handler=error_handler) |
4897 | - |
4898 | - def on_stop_clicked(self, button=None): |
4899 | - """User requested stop the service.""" |
4900 | - self.backend.stop_files(reply_handler=NO_OP, |
4901 | - error_handler=error_handler) |
4902 | - |
4903 | - def load(self): |
4904 | - """Load the information.""" |
4905 | - self.backend.file_sync_status(reply_handler=NO_OP, |
4906 | - error_handler=error_handler) |
4907 | - |
4908 | - |
4909 | -class ManagementPanel(gtk.VBox, ControlPanelMixin): |
4910 | - """The management panel. |
4911 | - |
4912 | - The user can manage dashboard, volumes, devices and services. |
4913 | - |
4914 | - """ |
4915 | - |
4916 | - __gsignals__ = { |
4917 | - 'local-device-removed': (gobject.SIGNAL_RUN_FIRST, |
4918 | - gobject.TYPE_NONE, ()), |
4919 | - 'unauthorized': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE, ()), |
4920 | - } |
4921 | - |
4922 | - DASHBOARD_BUTTON_NAME = 'ModeLeft' |
4923 | - SERVICES_BUTTON_NAME = 'ModeRight' |
4924 | - |
4925 | - def __init__(self, main_window=None): |
4926 | - gtk.VBox.__init__(self) |
4927 | - ControlPanelMixin.__init__(self, filename='management.ui') |
4928 | - self.add(self.itself) |
4929 | - self.facebook_logo.set_from_file(get_data_file(FACEBOOK_LOGO)) |
4930 | - self.twitter_logo.set_from_file(get_data_file(TWITTER_LOGO)) |
4931 | - self.show() |
4932 | - |
4933 | - self.backend.connect_to_signal('AccountInfoReady', |
4934 | - self.on_account_info_ready) |
4935 | - self.backend.connect_to_signal('AccountInfoError', |
4936 | - self.on_account_info_error) |
4937 | - self.backend.connect_to_signal('UnauthorizedError', |
4938 | - self.on_unauthorized_error) |
4939 | - |
4940 | - self.quota_progressbar.set_sensitive(False) |
4941 | - |
4942 | - self.quota_label = LabelLoading(LOADING) |
4943 | - self.quota_box.pack_start(self.quota_label, expand=False) |
4944 | - self.quota_box.reorder_child(self.quota_label, 0) |
4945 | - |
4946 | - self.status_label = FileSyncStatus() |
4947 | - self.status_box.pack_end(self.status_label, expand=True) |
4948 | - |
4949 | - self.dashboard = DashboardPanel(main_window=main_window) |
4950 | - self.volumes = VolumesPanel(main_window=main_window) |
4951 | - self.shares = SharesPanel(main_window=main_window) |
4952 | - self.devices = DevicesPanel(main_window=main_window) |
4953 | - self.services = ServicesPanel(main_window=main_window) |
4954 | - |
4955 | - cb = lambda button, page_num: self.notebook.set_current_page(page_num) |
4956 | - self.tabs = (u'dashboard', u'volumes', u'shares', |
4957 | - u'devices', u'services') |
4958 | - for page_num, tab in enumerate(self.tabs): |
4959 | - setattr(self, ('%s_page' % tab).upper(), page_num) |
4960 | - button = getattr(self, '%s_button' % tab) |
4961 | - button.connect('clicked', cb, page_num) |
4962 | - self.notebook.insert_page(getattr(self, tab), position=page_num) |
4963 | - |
4964 | - self.dashboard_button.set_name(self.DASHBOARD_BUTTON_NAME) |
4965 | - self.dashboard_button.set_tooltip_text(DASHBOARD_BUTTON_TOOLTIP) |
4966 | - |
4967 | - self.volumes_button.set_tooltip_text(FOLDERS_BUTTON_TOOLTIP) |
4968 | - self.volumes_button.connect('clicked', lambda b: self.volumes.load()) |
4969 | - |
4970 | - self.shares_button.set_tooltip_text(SHARES_BUTTON_TOOLTIP) |
4971 | - |
4972 | - self.devices_button.set_tooltip_text(DEVICES_BUTTON_TOOLTIP) |
4973 | - self.devices_button.connect('clicked', lambda b: self.devices.load()) |
4974 | - self.devices.connect('local-device-removed', |
4975 | - lambda widget: self.emit('local-device-removed')) |
4976 | - |
4977 | - self.services_button.set_name(self.SERVICES_BUTTON_NAME) |
4978 | - self.services_button.set_tooltip_text(SERVICES_BUTTON_TOOLTIP) |
4979 | - self.services_button.connect('clicked', |
4980 | - lambda b: self.services.refresh()) |
4981 | - |
4982 | - self.enable_volumes = lambda: self.volumes_button.set_sensitive(True) |
4983 | - self.disable_volumes = lambda: self.volumes_button.set_sensitive(False) |
4984 | - self.backend.connect_to_signal('FilesEnabled', self.enable_volumes) |
4985 | - self.backend.connect_to_signal('FilesDisabled', self.disable_volumes) |
4986 | - |
4987 | - def _update_quota(self, msg, data=None): |
4988 | - """Update the quota info.""" |
4989 | - fraction = 0.0 |
4990 | - if data is not None: |
4991 | - fraction = data.get('percentage', 0.0) / 100 |
4992 | - if fraction > 0 and fraction < 0.05: |
4993 | - fraction = 0.05 |
4994 | - else: |
4995 | - fraction = round(fraction, 2) |
4996 | - |
4997 | - logger.debug('ManagementPanel: updating quota to %r.', fraction) |
4998 | - if fraction >= QUOTA_THRESHOLD: |
4999 | - self.quota_label.set_markup(WARNING_MARKUP % msg) |
5000 | - else: |
+1