Merge lp:~nataliabidart/ubuntuone-control-panel/stable-3-0-update-2.99.90 into lp:ubuntuone-control-panel/stable-3-0

Proposed by Natalia Bidart
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
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 AlreadyInstalledError in windows (LP: #942655).
  - 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-control-panel-qt
    (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-control-panel-qt script moving all logic into
    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).

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

+1

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== removed file 'bin/ubuntuone-control-panel-gtk'
--- bin/ubuntuone-control-panel-gtk 2012-01-18 14:09:16 +0000
+++ bin/ubuntuone-control-panel-gtk 1970-01-01 00:00:00 +0000
@@ -1,54 +0,0 @@
1#!/usr/bin/python
2# -*- coding: utf-8 -*-
3
4# Authors: Natalia B Bidart <natalia.bidart@canonical.com>
5# Eric Casteleijn <eric.casteleijn@canonical.com>
6#
7# Copyright 2010 Canonical Ltd.
8#
9# This program is free software: you can redistribute it and/or modify it
10# under the terms of the GNU General Public License version 3, as published
11# by the Free Software Foundation.
12#
13# This program is distributed in the hope that it will be useful, but
14# WITHOUT ANY WARRANTY; without even the implied warranties of
15# MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
16# PURPOSE. See the GNU General Public License for more details.
17#
18# You should have received a copy of the GNU General Public License along
19# with this program. If not, see <http://www.gnu.org/licenses/>.
20"""Execute the graphical interface for the Ubuntu One control panel."""
21
22# Invalid name "ubuntuone-control-panel-gtk", pylint: disable=C0103
23
24import gettext
25import sys
26
27from optparse import OptionParser
28
29from ubuntuone.controlpanel import TRANSLATION_DOMAIN
30
31gettext.textdomain(TRANSLATION_DOMAIN)
32# import the GUI after the translation domain has been set
33from ubuntuone.controlpanel.gui.gtk import main
34
35
36def parser_options():
37 """Parse command line parameters."""
38 usage = "Usage: %prog [option]"
39 result = OptionParser(usage=usage)
40 result.add_option("", "--switch-to", dest="switch_to", type="string",
41 metavar="PANEL_NAME", default="",
42 help="Start Ubuntu One in the "
43 "PANEL_NAME tab. Possible values are: "
44 "dashboard, volumes, devices, applications")
45 result.add_option("-a", "--alert", dest="alert", action="store_true",
46 default=False, help="Start Ubuntu One "
47 "alerting the user to its presence.")
48 return result
49
50
51if __name__ == "__main__":
52 parser = parser_options()
53 (options, args) = parser.parse_args(sys.argv)
54 main(switch_to=options.switch_to, alert=options.alert)
550
=== modified file 'bin/ubuntuone-control-panel-qt'
--- bin/ubuntuone-control-panel-qt 2012-01-18 14:09:16 +0000
+++ bin/ubuntuone-control-panel-qt 2012-03-06 15:41:39 +0000
@@ -1,8 +1,5 @@
1#!/usr/bin/python1#!/usr/bin/python
2# -*- coding: utf-8 -*-2# -*- coding: utf-8 -*-
3
4# Authors: Natalia B Bidart <natalia.bidart@canonical.com>
5# Eric Casteleijn <eric.casteleijn@canonical.com>
6#3#
7# Copyright 2010 Canonical Ltd.4# Copyright 2010 Canonical Ltd.
8#5#
@@ -17,47 +14,21 @@
17#14#
18# You should have received a copy of the GNU General Public License along15# You should have received a copy of the GNU General Public License along
19# with this program. If not, see <http://www.gnu.org/licenses/>.16# with this program. If not, see <http://www.gnu.org/licenses/>.
17
20"""Execute the graphical interface for the Ubuntu One control panel."""18"""Execute the graphical interface for the Ubuntu One control panel."""
2119
22# Invalid name "ubuntuone-control-panel-qt", pylint: disable=C010320# Invalid name "ubuntuone-control-panel-qt", pylint: disable=C0103
2321
24import gettext22import signal
25import sys23import sys
2624
27from optparse import OptionParser25if sys.platform == 'win32':
2826 import qt4reactor
29from ubuntuone.controlpanel import TRANSLATION_DOMAIN27 qt4reactor.install()
3028
31gettext.textdomain(TRANSLATION_DOMAIN)
32# import the GUI after the translation domain has been set
33from ubuntuone.controlpanel.gui.qt import main29from ubuntuone.controlpanel.gui.qt import main
3430
3531
36def parser_options():
37 """Parse command line parameters."""
38 usage = "Usage: %prog [option]"
39 result = OptionParser(usage=usage)
40 result.add_option("", "--switch-to", dest="switch_to", type="string",
41 metavar="PANEL_NAME", default="",
42 help="Start Ubuntu One in the "
43 "PANEL_NAME tab. Possible values are: "
44 "dashboard, volumes, devices, applications")
45 result.add_option("-a", "--alert", dest="alert", action="store_true",
46 default=False, help="Start Ubuntu One "
47 "alerting the user to its presence.")
48 result.add_option("--minimized", dest="minimized", action="store_true",
49 default=False, help="Start Ubuntu One "
50 "only in the notification area, with no visible window. "
51 "Implies --with-icon")
52 result.add_option("--with-icon", dest="with_icon", action="store_true",
53 default=False, help="Start Ubuntu One "
54 "with an icon in the notification area.")
55 return result
56
57
58if __name__ == "__main__":32if __name__ == "__main__":
59 parser = parser_options()33 signal.signal(signal.SIGINT, signal.SIG_DFL)
60 (options, args) = parser.parse_args(sys.argv)34 main.main(sys.argv)
61 main.main(switch_to=options.switch_to,
62 alert=options.alert, minimized=options.minimized,
63 with_icon=options.with_icon)
6435
=== removed file 'com.ubuntuone.controlpanel.gui.service.in'
--- com.ubuntuone.controlpanel.gui.service.in 2011-03-22 13:04:38 +0000
+++ com.ubuntuone.controlpanel.gui.service.in 1970-01-01 00:00:00 +0000
@@ -1,3 +0,0 @@
1[D-BUS Service]
2Name=com.ubuntuone.controlpanel.gui
3Exec=@prefix@/bin/ubuntuone-control-panel-gtk
40
=== added file 'data/banner.png'
5Binary files data/banner.png 1970-01-01 00:00:00 +0000 and data/banner.png 2012-03-06 15:41:39 +0000 differ1Binary files data/banner.png 1970-01-01 00:00:00 +0000 and data/banner.png 2012-03-06 15:41:39 +0000 differ
=== removed directory 'data/gtk'
=== removed file 'data/gtk/dashboard.ui'
--- data/gtk/dashboard.ui 2011-07-11 11:19:09 +0000
+++ data/gtk/dashboard.ui 1970-01-01 00:00:00 +0000
@@ -1,198 +0,0 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<interface>
3 <requires lib="gtk+" version="2.22"/>
4 <!-- interface-naming-policy project-wide -->
5 <object class="GtkAlignment" id="itself">
6 <property name="visible">True</property>
7 <property name="can_focus">False</property>
8 <property name="yalign">0</property>
9 <property name="yscale">0</property>
10 <child>
11 <object class="GtkHBox" id="account">
12 <property name="visible">True</property>
13 <property name="can_focus">False</property>
14 <property name="border_width">12</property>
15 <property name="spacing">12</property>
16 <child>
17 <object class="GtkFrame" id="frame2">
18 <property name="visible">True</property>
19 <property name="can_focus">False</property>
20 <property name="label_xalign">0</property>
21 <property name="shadow_type">out</property>
22 <child>
23 <object class="GtkAlignment" id="alignment2">
24 <property name="visible">True</property>
25 <property name="can_focus">False</property>
26 <property name="top_padding">12</property>
27 <property name="bottom_padding">12</property>
28 <property name="left_padding">12</property>
29 <property name="right_padding">12</property>
30 <child>
31 <object class="GtkVBox" id="vbox5">
32 <property name="visible">True</property>
33 <property name="can_focus">False</property>
34 <property name="spacing">12</property>
35 <child>
36 <object class="GtkLabel" id="name_label">
37 <property name="visible">True</property>
38 <property name="can_focus">False</property>
39 <property name="xalign">0</property>
40 <property name="label">tester name</property>
41 <property name="use_markup">True</property>
42 </object>
43 <packing>
44 <property name="expand">False</property>
45 <property name="fill">True</property>
46 <property name="position">0</property>
47 </packing>
48 </child>
49 <child>
50 <object class="GtkLabel" id="email_label">
51 <property name="visible">True</property>
52 <property name="can_focus">False</property>
53 <property name="xalign">0</property>
54 <property name="label">a@example.com</property>
55 </object>
56 <packing>
57 <property name="expand">False</property>
58 <property name="fill">True</property>
59 <property name="position">1</property>
60 </packing>
61 </child>
62 <child>
63 <object class="GtkHButtonBox" id="hbuttonbox1">
64 <property name="visible">True</property>
65 <property name="can_focus">False</property>
66 <child>
67 <object class="GtkLinkButton" id="linkbutton3">
68 <property name="label" translatable="yes">Edit account details</property>
69 <property name="visible">True</property>
70 <property name="can_focus">True</property>
71 <property name="receives_default">True</property>
72 <property name="use_action_appearance">False</property>
73 <property name="relief">half</property>
74 <property name="uri">http://login.ubuntu.com</property>
75 </object>
76 <packing>
77 <property name="expand">False</property>
78 <property name="fill">False</property>
79 <property name="pack_type">end</property>
80 <property name="position">0</property>
81 </packing>
82 </child>
83 </object>
84 <packing>
85 <property name="expand">False</property>
86 <property name="fill">True</property>
87 <property name="pack_type">end</property>
88 <property name="position">2</property>
89 </packing>
90 </child>
91 </object>
92 </child>
93 </object>
94 </child>
95 <child type="label">
96 <object class="GtkLabel" id="label1">
97 <property name="visible">True</property>
98 <property name="can_focus">False</property>
99 <property name="label" translatable="yes">&lt;b&gt;Personal details&lt;/b&gt;</property>
100 <property name="use_markup">True</property>
101 </object>
102 </child>
103 </object>
104 <packing>
105 <property name="expand">True</property>
106 <property name="fill">True</property>
107 <property name="position">0</property>
108 </packing>
109 </child>
110 <child>
111 <object class="GtkFrame" id="frame1">
112 <property name="visible">True</property>
113 <property name="can_focus">False</property>
114 <property name="label_xalign">0</property>
115 <property name="shadow_type">out</property>
116 <child>
117 <object class="GtkAlignment" id="alignment3">
118 <property name="visible">True</property>
119 <property name="can_focus">False</property>
120 <property name="top_padding">12</property>
121 <property name="bottom_padding">12</property>
122 <property name="left_padding">12</property>
123 <property name="right_padding">12</property>
124 <child>
125 <object class="GtkVBox" id="vbox4">
126 <property name="visible">True</property>
127 <property name="can_focus">False</property>
128 <property name="spacing">12</property>
129 <child>
130 <object class="GtkLabel" id="type_label">
131 <property name="visible">True</property>
132 <property name="can_focus">False</property>
133 <property name="xalign">0</property>
134 <property name="label">Ubuntu One Basic (2 GB)
13522GB of awesomeness
136Total storage 22GB
137You also have a mobile plan!
138This is great!</property>
139 </object>
140 <packing>
141 <property name="expand">False</property>
142 <property name="fill">True</property>
143 <property name="position">0</property>
144 </packing>
145 </child>
146 <child>
147 <object class="GtkHButtonBox" id="hbuttonbox2">
148 <property name="visible">True</property>
149 <property name="can_focus">False</property>
150 <child>
151 <object class="GtkLinkButton" id="linkbutton1">
152 <property name="label" translatable="yes">Buy storage and plans</property>
153 <property name="visible">True</property>
154 <property name="can_focus">True</property>
155 <property name="receives_default">True</property>
156 <property name="use_action_appearance">False</property>
157 <property name="relief">half</property>
158 <property name="uri">https://one.ubuntu.com/plans/</property>
159 </object>
160 <packing>
161 <property name="expand">False</property>
162 <property name="fill">False</property>
163 <property name="pack_type">end</property>
164 <property name="position">0</property>
165 </packing>
166 </child>
167 </object>
168 <packing>
169 <property name="expand">False</property>
170 <property name="fill">True</property>
171 <property name="pack_type">end</property>
172 <property name="position">1</property>
173 </packing>
174 </child>
175 </object>
176 </child>
177 </object>
178 </child>
179 <child type="label">
180 <object class="GtkLabel" id="label3">
181 <property name="visible">True</property>
182 <property name="can_focus">False</property>
183 <property name="label" translatable="yes">&lt;b&gt;Your services&lt;/b&gt;</property>
184 <property name="use_markup">True</property>
185 </object>
186 </child>
187 </object>
188 <packing>
189 <property name="expand">True</property>
190 <property name="fill">True</property>
191 <property name="pack_type">end</property>
192 <property name="position">1</property>
193 </packing>
194 </child>
195 </object>
196 </child>
197 </object>
198</interface>
1990
=== removed file 'data/gtk/device.ui'
--- data/gtk/device.ui 2011-07-11 11:19:09 +0000
+++ data/gtk/device.ui 1970-01-01 00:00:00 +0000
@@ -1,279 +0,0 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<interface>
3 <requires lib="gtk+" version="2.22"/>
4 <!-- interface-naming-policy project-wide -->
5 <object class="GtkAdjustment" id="adjustment1">
6 <property name="upper">10000</property>
7 <property name="step_increment">1</property>
8 </object>
9 <object class="GtkAdjustment" id="adjustment2">
10 <property name="upper">10000</property>
11 <property name="step_increment">1</property>
12 </object>
13 <object class="GtkVBox" id="itself">
14 <property name="visible">True</property>
15 <property name="can_focus">False</property>
16 <property name="border_width">10</property>
17 <property name="spacing">5</property>
18 <child>
19 <object class="GtkHBox" id="hbox1">
20 <property name="visible">True</property>
21 <property name="can_focus">False</property>
22 <property name="spacing">10</property>
23 <child>
24 <object class="GtkVBox" id="vbox1">
25 <property name="visible">True</property>
26 <property name="can_focus">False</property>
27 <property name="spacing">5</property>
28 <child>
29 <object class="GtkHBox" id="hbox2">
30 <property name="visible">True</property>
31 <property name="can_focus">False</property>
32 <child>
33 <object class="GtkImage" id="device_type">
34 <property name="visible">True</property>
35 <property name="can_focus">False</property>
36 <property name="icon_name">computer</property>
37 </object>
38 <packing>
39 <property name="expand">False</property>
40 <property name="fill">True</property>
41 <property name="position">0</property>
42 </packing>
43 </child>
44 <child>
45 <object class="GtkLabel" id="device_name">
46 <property name="visible">True</property>
47 <property name="can_focus">False</property>
48 <property name="xalign">0</property>
49 <property name="xpad">5</property>
50 <property name="label">My Laptop</property>
51 <property name="wrap">True</property>
52 </object>
53 <packing>
54 <property name="expand">True</property>
55 <property name="fill">True</property>
56 <property name="position">1</property>
57 </packing>
58 </child>
59 </object>
60 <packing>
61 <property name="expand">True</property>
62 <property name="fill">True</property>
63 <property name="position">0</property>
64 </packing>
65 </child>
66 <child>
67 <object class="GtkAlignment" id="alignment1">
68 <property name="visible">True</property>
69 <property name="can_focus">False</property>
70 <property name="left_padding">25</property>
71 <child>
72 <object class="GtkVBox" id="config_settings">
73 <property name="visible">True</property>
74 <property name="can_focus">False</property>
75 <child>
76 <object class="GtkCheckButton" id="show_all_notifications">
77 <property name="label" translatable="yes">Show activity notifications</property>
78 <property name="visible">True</property>
79 <property name="can_focus">True</property>
80 <property name="receives_default">False</property>
81 <property name="use_action_appearance">False</property>
82 <property name="draw_indicator">True</property>
83 <signal name="toggled" handler="on_show_all_notifications_toggled" swapped="no"/>
84 </object>
85 <packing>
86 <property name="expand">True</property>
87 <property name="fill">True</property>
88 <property name="position">0</property>
89 </packing>
90 </child>
91 <child>
92 <object class="GtkVBox" id="throttling">
93 <property name="visible">True</property>
94 <property name="can_focus">False</property>
95 <child>
96 <object class="GtkCheckButton" id="limit_bandwidth">
97 <property name="label" translatable="yes">Limit file sync bandwidth usage</property>
98 <property name="visible">True</property>
99 <property name="can_focus">True</property>
100 <property name="receives_default">False</property>
101 <property name="use_action_appearance">False</property>
102 <property name="draw_indicator">True</property>
103 <signal name="toggled" handler="on_limit_bandwidth_toggled" swapped="no"/>
104 </object>
105 <packing>
106 <property name="expand">True</property>
107 <property name="fill">True</property>
108 <property name="position">0</property>
109 </packing>
110 </child>
111 <child>
112 <object class="GtkTable" id="throttling_limits">
113 <property name="visible">True</property>
114 <property name="can_focus">False</property>
115 <property name="n_rows">2</property>
116 <property name="n_columns">3</property>
117 <property name="column_spacing">3</property>
118 <property name="row_spacing">3</property>
119 <child>
120 <object class="GtkLabel" id="max_upload_speed_label">
121 <property name="visible">True</property>
122 <property name="can_focus">False</property>
123 <property name="xalign">0</property>
124 <property name="xpad">22</property>
125 <property name="label" translatable="yes">Max upload speed:</property>
126 <property name="track_visited_links">False</property>
127 </object>
128 </child>
129 <child>
130 <object class="GtkLabel" id="max_download_speed_label">
131 <property name="visible">True</property>
132 <property name="can_focus">False</property>
133 <property name="xalign">0</property>
134 <property name="xpad">22</property>
135 <property name="label" translatable="yes">Max download speed:</property>
136 </object>
137 <packing>
138 <property name="top_attach">1</property>
139 <property name="bottom_attach">2</property>
140 </packing>
141 </child>
142 <child>
143 <object class="GtkSpinButton" id="max_upload_speed">
144 <property name="visible">True</property>
145 <property name="can_focus">True</property>
146 <property name="invisible_char">•</property>
147 <property name="activates_default">True</property>
148 <property name="invisible_char_set">True</property>
149 <property name="adjustment">adjustment1</property>
150 <signal name="value-changed" handler="on_max_upload_speed_value_changed" swapped="no"/>
151 </object>
152 <packing>
153 <property name="left_attach">1</property>
154 <property name="right_attach">2</property>
155 <property name="x_options">GTK_FILL</property>
156 <property name="y_options">GTK_FILL</property>
157 </packing>
158 </child>
159 <child>
160 <object class="GtkSpinButton" id="max_download_speed">
161 <property name="visible">True</property>
162 <property name="can_focus">True</property>
163 <property name="invisible_char">•</property>
164 <property name="activates_default">True</property>
165 <property name="invisible_char_set">True</property>
166 <property name="adjustment">adjustment2</property>
167 <signal name="value-changed" handler="on_max_download_speed_value_changed" swapped="no"/>
168 </object>
169 <packing>
170 <property name="left_attach">1</property>
171 <property name="right_attach">2</property>
172 <property name="top_attach">1</property>
173 <property name="bottom_attach">2</property>
174 </packing>
175 </child>
176 <child>
177 <object class="GtkLabel" id="label1">
178 <property name="visible">True</property>
179 <property name="can_focus">False</property>
180 <property name="label" translatable="yes">KiB/s</property>
181 </object>
182 <packing>
183 <property name="left_attach">2</property>
184 <property name="right_attach">3</property>
185 </packing>
186 </child>
187 <child>
188 <object class="GtkLabel" id="label2">
189 <property name="visible">True</property>
190 <property name="can_focus">False</property>
191 <property name="label" translatable="yes">KiB/s</property>
192 </object>
193 <packing>
194 <property name="left_attach">2</property>
195 <property name="right_attach">3</property>
196 <property name="top_attach">1</property>
197 <property name="bottom_attach">2</property>
198 </packing>
199 </child>
200 </object>
201 <packing>
202 <property name="expand">True</property>
203 <property name="fill">True</property>
204 <property name="position">1</property>
205 </packing>
206 </child>
207 </object>
208 <packing>
209 <property name="expand">True</property>
210 <property name="fill">True</property>
211 <property name="position">1</property>
212 </packing>
213 </child>
214 </object>
215 </child>
216 </object>
217 <packing>
218 <property name="expand">False</property>
219 <property name="fill">True</property>
220 <property name="position">1</property>
221 </packing>
222 </child>
223 </object>
224 <packing>
225 <property name="expand">False</property>
226 <property name="fill">True</property>
227 <property name="position">0</property>
228 </packing>
229 </child>
230 <child>
231 <object class="GtkVButtonBox" id="vbuttonbox1">
232 <property name="visible">True</property>
233 <property name="can_focus">False</property>
234 <property name="layout_style">start</property>
235 <child>
236 <object class="GtkButton" id="remove">
237 <property name="label">gtk-remove</property>
238 <property name="visible">True</property>
239 <property name="can_focus">True</property>
240 <property name="receives_default">True</property>
241 <property name="use_action_appearance">False</property>
242 <property name="use_stock">True</property>
243 <signal name="activate" handler="on_remove_clicked" swapped="no"/>
244 <signal name="clicked" handler="on_remove_clicked" swapped="no"/>
245 </object>
246 <packing>
247 <property name="expand">False</property>
248 <property name="fill">False</property>
249 <property name="position">0</property>
250 </packing>
251 </child>
252 </object>
253 <packing>
254 <property name="expand">False</property>
255 <property name="fill">True</property>
256 <property name="pack_type">end</property>
257 <property name="position">1</property>
258 </packing>
259 </child>
260 </object>
261 <packing>
262 <property name="expand">False</property>
263 <property name="fill">True</property>
264 <property name="position">0</property>
265 </packing>
266 </child>
267 <child>
268 <object class="GtkLabel" id="warning_label">
269 <property name="visible">True</property>
270 <property name="can_focus">False</property>
271 </object>
272 <packing>
273 <property name="expand">True</property>
274 <property name="fill">True</property>
275 <property name="position">1</property>
276 </packing>
277 </child>
278 </object>
279</interface>
2800
=== removed file 'data/gtk/devices.ui'
--- data/gtk/devices.ui 2011-07-11 11:19:09 +0000
+++ data/gtk/devices.ui 1970-01-01 00:00:00 +0000
@@ -1,44 +0,0 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<interface>
3 <requires lib="gtk+" version="2.22"/>
4 <!-- interface-naming-policy project-wide -->
5 <object class="GtkVBox" id="itself">
6 <property name="visible">True</property>
7 <property name="can_focus">False</property>
8 <child>
9 <object class="GtkScrolledWindow" id="scrolledwindow1">
10 <property name="visible">True</property>
11 <property name="can_focus">True</property>
12 <property name="hscrollbar_policy">automatic</property>
13 <property name="vscrollbar_policy">automatic</property>
14 <child>
15 <object class="GtkViewport" id="viewport1">
16 <property name="visible">True</property>
17 <property name="can_focus">False</property>
18 <property name="resize_mode">queue</property>
19 <child>
20 <object class="GtkAlignment" id="alignment1">
21 <property name="visible">True</property>
22 <property name="can_focus">False</property>
23 <child>
24 <object class="GtkVBox" id="devices">
25 <property name="visible">True</property>
26 <property name="can_focus">False</property>
27 <child>
28 <placeholder/>
29 </child>
30 </object>
31 </child>
32 </object>
33 </child>
34 </object>
35 </child>
36 </object>
37 <packing>
38 <property name="expand">True</property>
39 <property name="fill">True</property>
40 <property name="position">0</property>
41 </packing>
42 </child>
43 </object>
44</interface>
450
=== removed file 'data/gtk/install.ui'
--- data/gtk/install.ui 2011-07-11 11:19:09 +0000
+++ data/gtk/install.ui 1970-01-01 00:00:00 +0000
@@ -1,57 +0,0 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<interface>
3 <requires lib="gtk+" version="2.22"/>
4 <!-- interface-naming-policy project-wide -->
5 <object class="GtkImage" id="image1">
6 <property name="visible">True</property>
7 <property name="can_focus">False</property>
8 <property name="stock">gtk-ok</property>
9 </object>
10 <object class="GtkVBox" id="itself">
11 <property name="visible">True</property>
12 <property name="can_focus">False</property>
13 <property name="border_width">10</property>
14 <property name="spacing">10</property>
15 <child>
16 <object class="GtkLabel" id="install_label">
17 <property name="visible">True</property>
18 <property name="can_focus">False</property>
19 <property name="label">label</property>
20 <property name="wrap">True</property>
21 </object>
22 <packing>
23 <property name="expand">True</property>
24 <property name="fill">True</property>
25 <property name="position">0</property>
26 </packing>
27 </child>
28 <child>
29 <object class="GtkHButtonBox" id="install_button_box">
30 <property name="visible">True</property>
31 <property name="can_focus">False</property>
32 <child>
33 <object class="GtkButton" id="install_button">
34 <property name="label" translatable="yes">_Install now</property>
35 <property name="visible">True</property>
36 <property name="can_focus">True</property>
37 <property name="receives_default">True</property>
38 <property name="use_action_appearance">False</property>
39 <property name="image">image1</property>
40 <property name="use_underline">True</property>
41 <signal name="clicked" handler="on_install_button_clicked" swapped="no"/>
42 </object>
43 <packing>
44 <property name="expand">False</property>
45 <property name="fill">False</property>
46 <property name="position">0</property>
47 </packing>
48 </child>
49 </object>
50 <packing>
51 <property name="expand">False</property>
52 <property name="fill">True</property>
53 <property name="position">1</property>
54 </packing>
55 </child>
56 </object>
57</interface>
580
=== removed file 'data/gtk/management.ui'
--- data/gtk/management.ui 2011-07-11 11:19:09 +0000
+++ data/gtk/management.ui 1970-01-01 00:00:00 +0000
@@ -1,334 +0,0 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<interface>
3 <requires lib="gtk+" version="2.22"/>
4 <!-- interface-naming-policy project-wide -->
5 <object class="GtkVBox" id="itself">
6 <property name="visible">True</property>
7 <property name="can_focus">False</property>
8 <child>
9 <object class="GtkEventBox" id="header">
10 <property name="visible">True</property>
11 <property name="can_focus">False</property>
12 <child>
13 <object class="GtkVBox" id="vbox2">
14 <property name="visible">True</property>
15 <property name="can_focus">False</property>
16 <child>
17 <object class="GtkHBox" id="status_box">
18 <property name="visible">True</property>
19 <property name="can_focus">False</property>
20 <property name="border_width">10</property>
21 <property name="spacing">10</property>
22 <child>
23 <object class="GtkVBox" id="quota_box">
24 <property name="visible">True</property>
25 <property name="can_focus">False</property>
26 <property name="spacing">5</property>
27 <child>
28 <object class="GtkProgressBar" id="quota_progressbar">
29 <property name="visible">True</property>
30 <property name="can_focus">False</property>
31 </object>
32 <packing>
33 <property name="expand">True</property>
34 <property name="fill">True</property>
35 <property name="position">0</property>
36 </packing>
37 </child>
38 </object>
39 <packing>
40 <property name="expand">False</property>
41 <property name="fill">True</property>
42 <property name="position">0</property>
43 </packing>
44 </child>
45 </object>
46 <packing>
47 <property name="expand">False</property>
48 <property name="fill">True</property>
49 <property name="position">0</property>
50 </packing>
51 </child>
52 <child>
53 <object class="GtkHBox" id="hbox2">
54 <property name="visible">True</property>
55 <property name="can_focus">False</property>
56 <child>
57 <object class="GtkHSeparator" id="hseparator1">
58 <property name="visible">True</property>
59 <property name="can_focus">False</property>
60 </object>
61 <packing>
62 <property name="expand">True</property>
63 <property name="fill">True</property>
64 <property name="position">0</property>
65 </packing>
66 </child>
67 <child>
68 <object class="GtkHButtonBox" id="hbuttonbox1">
69 <property name="visible">True</property>
70 <property name="can_focus">False</property>
71 <property name="layout_style">center</property>
72 <child>
73 <object class="GtkRadioButton" id="dashboard_button">
74 <property name="label" translatable="yes">Account</property>
75 <property name="visible">True</property>
76 <property name="can_focus">True</property>
77 <property name="receives_default">False</property>
78 <property name="use_action_appearance">False</property>
79 <property name="active">True</property>
80 <property name="draw_indicator">False</property>
81 </object>
82 <packing>
83 <property name="expand">False</property>
84 <property name="fill">False</property>
85 <property name="position">0</property>
86 </packing>
87 </child>
88 <child>
89 <object class="GtkRadioButton" id="volumes_button">
90 <property name="label" translatable="yes">Cloud Folders</property>
91 <property name="visible">True</property>
92 <property name="can_focus">True</property>
93 <property name="receives_default">False</property>
94 <property name="use_action_appearance">False</property>
95 <property name="draw_indicator">False</property>
96 <property name="group">dashboard_button</property>
97 </object>
98 <packing>
99 <property name="expand">False</property>
100 <property name="fill">False</property>
101 <property name="position">1</property>
102 </packing>
103 </child>
104 <child>
105 <object class="GtkRadioButton" id="shares_button">
106 <property name="label" translatable="yes">Shares</property>
107 <property name="can_focus">True</property>
108 <property name="receives_default">False</property>
109 <property name="use_action_appearance">False</property>
110 <property name="draw_indicator">False</property>
111 <property name="group">dashboard_button</property>
112 </object>
113 <packing>
114 <property name="expand">False</property>
115 <property name="fill">False</property>
116 <property name="position">2</property>
117 </packing>
118 </child>
119 <child>
120 <object class="GtkRadioButton" id="devices_button">
121 <property name="label" translatable="yes">Devices</property>
122 <property name="visible">True</property>
123 <property name="can_focus">True</property>
124 <property name="receives_default">False</property>
125 <property name="use_action_appearance">False</property>
126 <property name="draw_indicator">False</property>
127 <property name="group">dashboard_button</property>
128 </object>
129 <packing>
130 <property name="expand">False</property>
131 <property name="fill">False</property>
132 <property name="position">3</property>
133 </packing>
134 </child>
135 <child>
136 <object class="GtkRadioButton" id="services_button">
137 <property name="label" translatable="yes">Services</property>
138 <property name="visible">True</property>
139 <property name="can_focus">True</property>
140 <property name="receives_default">False</property>
141 <property name="use_action_appearance">False</property>
142 <property name="draw_indicator">False</property>
143 <property name="group">dashboard_button</property>
144 </object>
145 <packing>
146 <property name="expand">False</property>
147 <property name="fill">False</property>
148 <property name="position">4</property>
149 </packing>
150 </child>
151 </object>
152 <packing>
153 <property name="expand">False</property>
154 <property name="fill">True</property>
155 <property name="position">1</property>
156 </packing>
157 </child>
158 <child>
159 <object class="GtkHSeparator" id="hseparator2">
160 <property name="visible">True</property>
161 <property name="can_focus">False</property>
162 </object>
163 <packing>
164 <property name="expand">True</property>
165 <property name="fill">True</property>
166 <property name="position">2</property>
167 </packing>
168 </child>
169 </object>
170 <packing>
171 <property name="expand">False</property>
172 <property name="fill">True</property>
173 <property name="position">1</property>
174 </packing>
175 </child>
176 </object>
177 </child>
178 </object>
179 <packing>
180 <property name="expand">False</property>
181 <property name="fill">True</property>
182 <property name="position">0</property>
183 </packing>
184 </child>
185 <child>
186 <object class="GtkNotebook" id="notebook">
187 <property name="visible">True</property>
188 <property name="can_focus">False</property>
189 <property name="show_tabs">False</property>
190 <property name="show_border">False</property>
191 <property name="homogeneous">True</property>
192 </object>
193 <packing>
194 <property name="expand">True</property>
195 <property name="fill">True</property>
196 <property name="position">1</property>
197 </packing>
198 </child>
199 <child>
200 <object class="GtkHBox" id="hbox1">
201 <property name="visible">True</property>
202 <property name="can_focus">False</property>
203 <property name="border_width">12</property>
204 <child>
205 <object class="GtkAlignment" id="alignment3">
206 <property name="visible">True</property>
207 <property name="can_focus">False</property>
208 <property name="yalign">1</property>
209 <property name="yscale">0</property>
210 <child>
211 <object class="GtkHButtonBox" id="hbuttonbox3">
212 <property name="visible">True</property>
213 <property name="can_focus">False</property>
214 <property name="spacing">5</property>
215 <property name="layout_style">start</property>
216 <child>
217 <object class="GtkLinkButton" id="linkbutton2">
218 <property name="label" translatable="yes">Official Support</property>
219 <property name="visible">True</property>
220 <property name="can_focus">True</property>
221 <property name="receives_default">True</property>
222 <property name="use_action_appearance">False</property>
223 <property name="relief">half</property>
224 <property name="uri">https://one.ubuntu.com/support/</property>
225 </object>
226 <packing>
227 <property name="expand">False</property>
228 <property name="fill">False</property>
229 <property name="position">0</property>
230 </packing>
231 </child>
232 <child>
233 <object class="GtkLinkButton" id="linkbutton4">
234 <property name="label" translatable="yes">Community Support</property>
235 <property name="visible">True</property>
236 <property name="can_focus">True</property>
237 <property name="receives_default">True</property>
238 <property name="use_action_appearance">False</property>
239 <property name="relief">half</property>
240 <property name="uri">http://askubuntu.com/questions/tagged/ubuntu-one</property>
241 </object>
242 <packing>
243 <property name="expand">False</property>
244 <property name="fill">False</property>
245 <property name="position">1</property>
246 </packing>
247 </child>
248 </object>
249 </child>
250 </object>
251 <packing>
252 <property name="expand">False</property>
253 <property name="fill">True</property>
254 <property name="position">0</property>
255 </packing>
256 </child>
257 <child>
258 <object class="GtkHBox" id="hbox3">
259 <property name="visible">True</property>
260 <property name="can_focus">False</property>
261 <child>
262 <object class="GtkLabel" id="label4">
263 <property name="visible">True</property>
264 <property name="can_focus">False</property>
265 <property name="label" translatable="yes">Talk to us on:</property>
266 </object>
267 <packing>
268 <property name="expand">True</property>
269 <property name="fill">True</property>
270 <property name="position">0</property>
271 </packing>
272 </child>
273 <child>
274 <object class="GtkLinkButton" id="linkbutton5">
275 <property name="visible">True</property>
276 <property name="can_focus">True</property>
277 <property name="receives_default">True</property>
278 <property name="use_action_appearance">False</property>
279 <property name="relief">none</property>
280 <property name="uri">http://twitter.com/ubuntuone</property>
281 <child>
282 <object class="GtkImage" id="twitter_logo">
283 <property name="visible">True</property>
284 <property name="can_focus">False</property>
285 <property name="tooltip_text" translatable="yes">http://twitter.com/ubuntuone</property>
286 </object>
287 </child>
288 </object>
289 <packing>
290 <property name="expand">False</property>
291 <property name="fill">False</property>
292 <property name="position">1</property>
293 </packing>
294 </child>
295 <child>
296 <object class="GtkLinkButton" id="linkbutton6">
297 <property name="visible">True</property>
298 <property name="can_focus">True</property>
299 <property name="receives_default">True</property>
300 <property name="use_action_appearance">False</property>
301 <property name="relief">none</property>
302 <property name="uri">http://www.facebook.com/ubuntuone</property>
303 <child>
304 <object class="GtkImage" id="facebook_logo">
305 <property name="visible">True</property>
306 <property name="can_focus">False</property>
307 <property name="tooltip_text" translatable="yes">http://www.facebook.com/ubuntuone</property>
308 </object>
309 </child>
310 </object>
311 <packing>
312 <property name="expand">True</property>
313 <property name="fill">True</property>
314 <property name="position">2</property>
315 </packing>
316 </child>
317 </object>
318 <packing>
319 <property name="expand">False</property>
320 <property name="fill">True</property>
321 <property name="pack_type">end</property>
322 <property name="position">1</property>
323 </packing>
324 </child>
325 </object>
326 <packing>
327 <property name="expand">False</property>
328 <property name="fill">True</property>
329 <property name="pack_type">end</property>
330 <property name="position">1</property>
331 </packing>
332 </child>
333 </object>
334</interface>
3350
=== removed file 'data/gtk/overview.ui'
--- data/gtk/overview.ui 2011-09-14 19:08:52 +0000
+++ data/gtk/overview.ui 1970-01-01 00:00:00 +0000
@@ -1,308 +0,0 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<interface>
3 <requires lib="gtk+" version="2.22"/>
4 <!-- interface-naming-policy project-wide -->
5 <object class="GtkVBox" id="itself">
6 <property name="visible">True</property>
7 <property name="can_focus">False</property>
8 <child>
9 <object class="GtkEventBox" id="eventbox1">
10 <property name="visible">True</property>
11 <property name="can_focus">False</property>
12 <child>
13 <object class="GtkImage" id="banner">
14 <property name="visible">True</property>
15 <property name="can_focus">False</property>
16 <property name="xpad">12</property>
17 <property name="ypad">12</property>
18 </object>
19 </child>
20 </object>
21 <packing>
22 <property name="expand">True</property>
23 <property name="fill">True</property>
24 <property name="position">0</property>
25 </packing>
26 </child>
27 <child>
28 <object class="GtkLabel" id="label7">
29 <property name="visible">True</property>
30 <property name="can_focus">False</property>
31 <property name="label" translatable="yes">&lt;span font="24" foreground="#4d4d4d"&gt;The Power of Your Personal Cloud&lt;/span&gt;</property>
32 <property name="use_markup">True</property>
33 </object>
34 <packing>
35 <property name="expand">True</property>
36 <property name="fill">True</property>
37 <property name="position">1</property>
38 </packing>
39 </child>
40 <child>
41 <object class="GtkHBox" id="hbox1">
42 <property name="visible">True</property>
43 <property name="can_focus">False</property>
44 <property name="border_width">12</property>
45 <child>
46 <object class="GtkTable" id="table1">
47 <property name="visible">True</property>
48 <property name="can_focus">False</property>
49 <property name="n_rows">4</property>
50 <property name="n_columns">2</property>
51 <property name="column_spacing">10</property>
52 <child>
53 <object class="GtkImage" id="files_icon">
54 <property name="visible">True</property>
55 <property name="can_focus">False</property>
56 </object>
57 <packing>
58 <property name="x_options">GTK_FILL</property>
59 <property name="y_options">GTK_FILL</property>
60 </packing>
61 </child>
62 <child>
63 <object class="GtkImage" id="music_stream_icon">
64 <property name="visible">True</property>
65 <property name="can_focus">False</property>
66 </object>
67 <packing>
68 <property name="top_attach">1</property>
69 <property name="bottom_attach">2</property>
70 <property name="x_options">GTK_FILL</property>
71 <property name="y_options">GTK_FILL</property>
72 </packing>
73 </child>
74 <child>
75 <object class="GtkImage" id="contacts_icon">
76 <property name="visible">True</property>
77 <property name="can_focus">False</property>
78 </object>
79 <packing>
80 <property name="top_attach">2</property>
81 <property name="bottom_attach">3</property>
82 <property name="x_options">GTK_FILL</property>
83 <property name="y_options">GTK_FILL</property>
84 </packing>
85 </child>
86 <child>
87 <object class="GtkImage" id="notes_icon">
88 <property name="visible">True</property>
89 <property name="can_focus">False</property>
90 </object>
91 <packing>
92 <property name="top_attach">3</property>
93 <property name="bottom_attach">4</property>
94 <property name="x_options">GTK_FILL</property>
95 <property name="y_options">GTK_FILL</property>
96 </packing>
97 </child>
98 <child>
99 <object class="GtkLabel" id="label3">
100 <property name="visible">True</property>
101 <property name="can_focus">False</property>
102 <property name="xalign">0</property>
103 <property name="label" translatable="yes">Files Anywhere
104&lt;span foreground="#909090"&gt;Back up and access your files from Ubuntu, Windows, Web or Mobile&lt;/span&gt;</property>
105 <property name="use_markup">True</property>
106 <property name="wrap">True</property>
107 </object>
108 <packing>
109 <property name="left_attach">1</property>
110 <property name="right_attach">2</property>
111 </packing>
112 </child>
113 <child>
114 <object class="GtkLabel" id="label4">
115 <property name="visible">True</property>
116 <property name="can_focus">False</property>
117 <property name="xalign">0</property>
118 <property name="label" translatable="yes">Keep Connected
119&lt;span foreground="#909090"&gt;Unify your contacts across Desktop, Mobile and Web&lt;/span&gt;</property>
120 <property name="use_markup">True</property>
121 <property name="wrap">True</property>
122 </object>
123 <packing>
124 <property name="left_attach">1</property>
125 <property name="right_attach">2</property>
126 <property name="top_attach">2</property>
127 <property name="bottom_attach">3</property>
128 </packing>
129 </child>
130 <child>
131 <object class="GtkLabel" id="label5">
132 <property name="visible">True</property>
133 <property name="can_focus">False</property>
134 <property name="xalign">0</property>
135 <property name="label" translatable="yes">Rock Out
136&lt;span foreground="#909090"&gt;Your entire collection follows you around with music streaming to Android and iPhone&lt;/span&gt;</property>
137 <property name="use_markup">True</property>
138 <property name="wrap">True</property>
139 </object>
140 <packing>
141 <property name="left_attach">1</property>
142 <property name="right_attach">2</property>
143 <property name="top_attach">1</property>
144 <property name="bottom_attach">2</property>
145 </packing>
146 </child>
147 <child>
148 <object class="GtkLabel" id="label6">
149 <property name="visible">True</property>
150 <property name="can_focus">False</property>
151 <property name="xalign">0</property>
152 <property name="label" translatable="yes">Stay Productive
153&lt;span foreground="#909090"&gt;Keep your Tomboy notes synced&lt;/span&gt;</property>
154 <property name="use_markup">True</property>
155 <property name="wrap">True</property>
156 </object>
157 <packing>
158 <property name="left_attach">1</property>
159 <property name="right_attach">2</property>
160 <property name="top_attach">3</property>
161 <property name="bottom_attach">4</property>
162 </packing>
163 </child>
164 </object>
165 <packing>
166 <property name="expand">True</property>
167 <property name="fill">True</property>
168 <property name="position">0</property>
169 </packing>
170 </child>
171 <child>
172 <object class="GtkVBox" id="vbox2">
173 <property name="visible">True</property>
174 <property name="can_focus">False</property>
175 <child>
176 <object class="GtkLabel" id="warning_label">
177 <property name="visible">True</property>
178 <property name="can_focus">False</property>
179 <property name="label">A warning label that can be long. Possible really long, let's see how it behaves.</property>
180 <property name="wrap">True</property>
181 </object>
182 <packing>
183 <property name="expand">False</property>
184 <property name="fill">True</property>
185 <property name="position">0</property>
186 </packing>
187 </child>
188 <child>
189 <object class="GtkAlignment" id="alignment2">
190 <property name="visible">True</property>
191 <property name="can_focus">False</property>
192 <property name="xscale">0</property>
193 <property name="yscale">0</property>
194 <child>
195 <object class="GtkVBox" id="vbox3">
196 <property name="visible">True</property>
197 <property name="can_focus">False</property>
198 <property name="spacing">10</property>
199 <child>
200 <object class="GtkButton" id="learn_more_button">
201 <property name="visible">True</property>
202 <property name="can_focus">True</property>
203 <property name="receives_default">True</property>
204 <property name="use_action_appearance">False</property>
205 <signal name="clicked" handler="on_learn_more_button_clicked" swapped="no"/>
206 <child>
207 <object class="GtkVBox" id="vbox5">
208 <property name="visible">True</property>
209 <property name="can_focus">False</property>
210 <child>
211 <object class="GtkImage" id="image5">
212 <property name="visible">True</property>
213 <property name="can_focus">False</property>
214 <property name="pixel_size">55</property>
215 <property name="icon_name">ubuntuone</property>
216 </object>
217 <packing>
218 <property name="expand">True</property>
219 <property name="fill">True</property>
220 <property name="position">0</property>
221 </packing>
222 </child>
223 <child>
224 <object class="GtkLabel" id="label8">
225 <property name="visible">True</property>
226 <property name="can_focus">False</property>
227 <property name="label" translatable="yes">&lt;span foreground="#909090"&gt;Learn More&lt;/span&gt;</property>
228 <property name="use_markup">True</property>
229 </object>
230 <packing>
231 <property name="expand">True</property>
232 <property name="fill">True</property>
233 <property name="position">1</property>
234 </packing>
235 </child>
236 </object>
237 </child>
238 </object>
239 <packing>
240 <property name="expand">True</property>
241 <property name="fill">True</property>
242 <property name="position">0</property>
243 </packing>
244 </child>
245 <child>
246 <object class="GtkButton" id="join_now_button">
247 <property name="visible">True</property>
248 <property name="can_focus">True</property>
249 <property name="can_default">True</property>
250 <property name="receives_default">True</property>
251 <property name="use_action_appearance">False</property>
252 <signal name="clicked" handler="on_join_now_button_clicked" swapped="no"/>
253 <child>
254 <object class="GtkLabel" id="label1">
255 <property name="visible">True</property>
256 <property name="can_focus">False</property>
257 <property name="label" translatable="yes">&lt;span font_size="xx-large" foreground="#4d4d4d"&gt;Join now&lt;/span&gt;</property>
258 <property name="use_markup">True</property>
259 </object>
260 </child>
261 </object>
262 <packing>
263 <property name="expand">False</property>
264 <property name="fill">True</property>
265 <property name="position">1</property>
266 </packing>
267 </child>
268 <child>
269 <object class="GtkLinkButton" id="connect_button">
270 <property name="label" translatable="yes">I already have an account!</property>
271 <property name="visible">True</property>
272 <property name="can_focus">True</property>
273 <property name="receives_default">True</property>
274 <property name="use_action_appearance">False</property>
275 <property name="relief">none</property>
276 <signal name="clicked" handler="on_connect_button_clicked" swapped="no"/>
277 </object>
278 <packing>
279 <property name="expand">False</property>
280 <property name="fill">False</property>
281 <property name="position">2</property>
282 </packing>
283 </child>
284 </object>
285 </child>
286 </object>
287 <packing>
288 <property name="expand">True</property>
289 <property name="fill">True</property>
290 <property name="position">1</property>
291 </packing>
292 </child>
293 </object>
294 <packing>
295 <property name="expand">True</property>
296 <property name="fill">True</property>
297 <property name="position">1</property>
298 </packing>
299 </child>
300 </object>
301 <packing>
302 <property name="expand">True</property>
303 <property name="fill">True</property>
304 <property name="position">2</property>
305 </packing>
306 </child>
307 </object>
308</interface>
3090
=== removed file 'data/gtk/services.ui'
--- data/gtk/services.ui 2011-09-14 19:08:52 +0000
+++ data/gtk/services.ui 1970-01-01 00:00:00 +0000
@@ -1,317 +0,0 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<interface>
3 <requires lib="gtk+" version="2.22"/>
4 <!-- interface-naming-policy project-wide -->
5 <object class="GtkVBox" id="itself">
6 <property name="visible">True</property>
7 <property name="can_focus">False</property>
8 <child>
9 <object class="GtkScrolledWindow" id="scrolledwindow1">
10 <property name="visible">True</property>
11 <property name="can_focus">True</property>
12 <property name="hscrollbar_policy">automatic</property>
13 <property name="vscrollbar_policy">automatic</property>
14 <child>
15 <object class="GtkViewport" id="viewport1">
16 <property name="visible">True</property>
17 <property name="can_focus">False</property>
18 <property name="resize_mode">queue</property>
19 <property name="shadow_type">none</property>
20 <child>
21 <object class="GtkAlignment" id="alignment1">
22 <property name="visible">True</property>
23 <property name="can_focus">False</property>
24 <property name="left_padding">5</property>
25 <property name="right_padding">5</property>
26 <child>
27 <object class="GtkVBox" id="vbox1">
28 <property name="visible">True</property>
29 <property name="can_focus">False</property>
30 <property name="spacing">5</property>
31 <child>
32 <object class="GtkFrame" id="files">
33 <property name="visible">True</property>
34 <property name="can_focus">False</property>
35 <property name="label_xalign">0</property>
36 <property name="shadow_type">out</property>
37 <child>
38 <object class="GtkAlignment" id="alignment2">
39 <property name="visible">True</property>
40 <property name="can_focus">False</property>
41 <child>
42 <object class="GtkHBox" id="hbox2">
43 <property name="visible">True</property>
44 <property name="can_focus">False</property>
45 <property name="border_width">5</property>
46 <child>
47 <object class="GtkTable" id="table1">
48 <property name="visible">True</property>
49 <property name="can_focus">False</property>
50 <property name="n_rows">3</property>
51 <property name="n_columns">3</property>
52 <property name="column_spacing">5</property>
53 <property name="row_spacing">5</property>
54 <child>
55 <object class="GtkCheckButton" id="file_sync_check">
56 <property name="visible">True</property>
57 <property name="can_focus">True</property>
58 <property name="receives_default">False</property>
59 <property name="use_action_appearance">False</property>
60 <property name="draw_indicator">True</property>
61 </object>
62 <packing>
63 <property name="x_options"></property>
64 <property name="y_options"></property>
65 </packing>
66 </child>
67 <child>
68 <object class="GtkImage" id="files_icon">
69 <property name="visible">True</property>
70 <property name="can_focus">False</property>
71 </object>
72 <packing>
73 <property name="left_attach">1</property>
74 <property name="right_attach">2</property>
75 <property name="x_options"></property>
76 <property name="y_options"></property>
77 </packing>
78 </child>
79 <child>
80 <object class="GtkLabel" id="label1">
81 <property name="visible">True</property>
82 <property name="can_focus">False</property>
83 <property name="xalign">0</property>
84 <property name="label" translatable="yes">Enable File Sync</property>
85 </object>
86 <packing>
87 <property name="left_attach">2</property>
88 <property name="right_attach">3</property>
89 </packing>
90 </child>
91 <child>
92 <object class="GtkLabel" id="label2">
93 <property name="visible">True</property>
94 <property name="can_focus">False</property>
95 <property name="xalign">0</property>
96 <property name="yalign">0</property>
97 <property name="label" translatable="yes">&lt;span font_size="small"&gt;Enable and then choose which folders you want to access from the Web or any device you connected to Ubuntu One
98
99Simply drag and drop any file or folder to your Ubuntu One folder on this computer&lt;/span&gt;</property>
100 <property name="use_markup">True</property>
101 <property name="wrap">True</property>
102 <property name="width_chars">35</property>
103 </object>
104 <packing>
105 <property name="left_attach">2</property>
106 <property name="right_attach">3</property>
107 <property name="top_attach">1</property>
108 <property name="bottom_attach">2</property>
109 </packing>
110 </child>
111 <child>
112 <object class="GtkHButtonBox" id="hbuttonbox1">
113 <property name="visible">True</property>
114 <property name="can_focus">False</property>
115 <child>
116 <object class="GtkButton" id="file_sync_button">
117 <property name="label" translatable="yes">_Show me my Ubuntu One folder</property>
118 <property name="visible">True</property>
119 <property name="can_focus">True</property>
120 <property name="receives_default">True</property>
121 <property name="use_action_appearance">False</property>
122 <property name="use_underline">True</property>
123 <signal name="clicked" handler="on_file_sync_button_clicked" swapped="no"/>
124 </object>
125 <packing>
126 <property name="expand">False</property>
127 <property name="fill">False</property>
128 <property name="position">0</property>
129 </packing>
130 </child>
131 </object>
132 <packing>
133 <property name="left_attach">2</property>
134 <property name="right_attach">3</property>
135 <property name="top_attach">2</property>
136 <property name="bottom_attach">3</property>
137 </packing>
138 </child>
139 <child>
140 <placeholder/>
141 </child>
142 <child>
143 <placeholder/>
144 </child>
145 <child>
146 <placeholder/>
147 </child>
148 <child>
149 <placeholder/>
150 </child>
151 </object>
152 <packing>
153 <property name="expand">False</property>
154 <property name="fill">True</property>
155 <property name="position">0</property>
156 </packing>
157 </child>
158 <child>
159 <object class="GtkImage" id="files_example">
160 <property name="visible">True</property>
161 <property name="can_focus">False</property>
162 </object>
163 <packing>
164 <property name="expand">False</property>
165 <property name="fill">True</property>
166 <property name="pack_type">end</property>
167 <property name="position">1</property>
168 </packing>
169 </child>
170 </object>
171 </child>
172 </object>
173 </child>
174 <child type="label_item">
175 <placeholder/>
176 </child>
177 </object>
178 <packing>
179 <property name="expand">False</property>
180 <property name="fill">True</property>
181 <property name="position">0</property>
182 </packing>
183 </child>
184 <child>
185 <object class="GtkFrame" id="replications">
186 <property name="visible">True</property>
187 <property name="can_focus">False</property>
188 <property name="label_xalign">0</property>
189 <property name="shadow_type">out</property>
190 <child>
191 <object class="GtkAlignment" id="alignment3">
192 <property name="visible">True</property>
193 <property name="can_focus">False</property>
194 <property name="top_padding">6</property>
195 <child>
196 <object class="GtkHBox" id="hbox3">
197 <property name="visible">True</property>
198 <property name="can_focus">False</property>
199 <property name="border_width">5</property>
200 <child>
201 <object class="GtkVBox" id="contacts">
202 <property name="visible">True</property>
203 <property name="can_focus">False</property>
204 <child>
205 <object class="GtkTable" id="contacts_sync">
206 <property name="visible">True</property>
207 <property name="can_focus">False</property>
208 <property name="n_rows">2</property>
209 <property name="n_columns">3</property>
210 <property name="column_spacing">5</property>
211 <property name="row_spacing">5</property>
212 <child>
213 <object class="GtkCheckButton" id="contacts_check">
214 <property name="visible">True</property>
215 <property name="can_focus">True</property>
216 <property name="receives_default">False</property>
217 <property name="use_action_appearance">False</property>
218 <property name="draw_indicator">True</property>
219 </object>
220 <packing>
221 <property name="x_options"></property>
222 <property name="y_options"></property>
223 </packing>
224 </child>
225 <child>
226 <object class="GtkImage" id="contacts_icon">
227 <property name="visible">True</property>
228 <property name="can_focus">False</property>
229 </object>
230 <packing>
231 <property name="left_attach">1</property>
232 <property name="right_attach">2</property>
233 <property name="x_options"></property>
234 <property name="y_options"></property>
235 </packing>
236 </child>
237 <child>
238 <object class="GtkLabel" id="label4">
239 <property name="visible">True</property>
240 <property name="can_focus">False</property>
241 <property name="xalign">0</property>
242 <property name="label" translatable="yes">Enable Contacts Sync</property>
243 </object>
244 <packing>
245 <property name="left_attach">2</property>
246 <property name="right_attach">3</property>
247 </packing>
248 </child>
249 <child>
250 <object class="GtkLabel" id="label5">
251 <property name="visible">True</property>
252 <property name="can_focus">True</property>
253 <property name="xalign">0</property>
254 <property name="yalign">0</property>
255 <property name="label" translatable="yes">&lt;span font_size="small"&gt;Once enabled, visit the &lt;a href="https://one.ubuntu.com"&gt;Ubuntu One website&lt;/a&gt; to manage your contacts, including Gmail and Facebook import&lt;/span&gt;</property>
256 <property name="use_markup">True</property>
257 <property name="wrap">True</property>
258 </object>
259 <packing>
260 <property name="left_attach">2</property>
261 <property name="right_attach">3</property>
262 <property name="top_attach">1</property>
263 <property name="bottom_attach">2</property>
264 </packing>
265 </child>
266 <child>
267 <placeholder/>
268 </child>
269 <child>
270 <placeholder/>
271 </child>
272 </object>
273 <packing>
274 <property name="expand">False</property>
275 <property name="fill">True</property>
276 <property name="position">0</property>
277 </packing>
278 </child>
279 </object>
280 <packing>
281 <property name="expand">True</property>
282 <property name="fill">True</property>
283 <property name="position">0</property>
284 </packing>
285 </child>
286 <child>
287 <placeholder/>
288 </child>
289 </object>
290 </child>
291 </object>
292 </child>
293 <child type="label_item">
294 <placeholder/>
295 </child>
296 </object>
297 <packing>
298 <property name="expand">False</property>
299 <property name="fill">True</property>
300 <property name="position">1</property>
301 </packing>
302 </child>
303 </object>
304 </child>
305 </object>
306 </child>
307 </object>
308 </child>
309 </object>
310 <packing>
311 <property name="expand">True</property>
312 <property name="fill">True</property>
313 <property name="position">0</property>
314 </packing>
315 </child>
316 </object>
317</interface>
3180
=== removed file 'data/gtk/volumes.ui'
--- data/gtk/volumes.ui 2011-07-11 11:19:09 +0000
+++ data/gtk/volumes.ui 1970-01-01 00:00:00 +0000
@@ -1,98 +0,0 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<interface>
3 <requires lib="gtk+" version="2.22"/>
4 <!-- interface-naming-policy project-wide -->
5 <object class="GtkAlignment" id="itself">
6 <property name="visible">True</property>
7 <property name="can_focus">False</property>
8 <child>
9 <object class="GtkScrolledWindow" id="scrolledwindow1">
10 <property name="visible">True</property>
11 <property name="can_focus">True</property>
12 <property name="hscrollbar_policy">automatic</property>
13 <property name="vscrollbar_policy">automatic</property>
14 <property name="shadow_type">in</property>
15 <child>
16 <object class="GtkTreeView" id="volumes_view">
17 <property name="visible">True</property>
18 <property name="can_focus">True</property>
19 <property name="model">volumes_store</property>
20 <property name="rules_hint">True</property>
21 <property name="tooltip_column">0</property>
22 <signal name="row-activated" handler="on_volumes_view_row_activated" swapped="no"/>
23 <child>
24 <object class="GtkTreeViewColumn" id="treeviewcolumn2">
25 <property name="resizable">True</property>
26 <property name="sizing">autosize</property>
27 <property name="expand">True</property>
28 <child>
29 <object class="GtkCellRendererPixbuf" id="cellrendererpixbuf1"/>
30 <attributes>
31 <attribute name="sensitive">1</attribute>
32 <attribute name="icon-name">2</attribute>
33 <attribute name="stock-size">5</attribute>
34 </attributes>
35 </child>
36 <child>
37 <object class="GtkCellRendererText" id="text_renderer">
38 <property name="ellipsize">end</property>
39 <property name="width_chars">80</property>
40 </object>
41 <attributes>
42 <attribute name="markup">0</attribute>
43 <attribute name="text">0</attribute>
44 </attributes>
45 </child>
46 </object>
47 </child>
48 <child>
49 <object class="GtkTreeViewColumn" id="treeviewcolumn3">
50 <property name="sizing">autosize</property>
51 <property name="title" translatable="yes">Sync locally?</property>
52 <child>
53 <object class="GtkCellRendererToggle" id="cellrenderertoggle1">
54 <property name="indicator_size">15</property>
55 <signal name="toggled" handler="on_subscribed_toggled" swapped="no"/>
56 </object>
57 <attributes>
58 <attribute name="sensitive">4</attribute>
59 <attribute name="visible">3</attribute>
60 <attribute name="active">1</attribute>
61 </attributes>
62 </child>
63 <child>
64 <object class="GtkCellRendererText" id="cellrenderertext1">
65 <property name="visible">False</property>
66 </object>
67 <attributes>
68 <attribute name="text">6</attribute>
69 </attributes>
70 </child>
71 </object>
72 </child>
73 </object>
74 </child>
75 </object>
76 </child>
77 </object>
78 <object class="GtkTreeStore" id="volumes_store">
79 <columns>
80 <!-- column-name description -->
81 <column type="gchararray"/>
82 <!-- column-name subscribed -->
83 <column type="gboolean"/>
84 <!-- column-name icon-name -->
85 <column type="gchararray"/>
86 <!-- column-name subscribed-visible -->
87 <column type="gboolean"/>
88 <!-- column-name subscribed-sensitive -->
89 <column type="gboolean"/>
90 <!-- column-name icon-size -->
91 <column type="gint"/>
92 <!-- column-name identifier -->
93 <column type="gchararray"/>
94 <!-- column-name path -->
95 <column type="gchararray"/>
96 </columns>
97 </object>
98</interface>
990
=== renamed file 'data/u1icon.png' => 'data/icon.png'
=== added file 'data/logo.png'
100Binary files data/logo.png 1970-01-01 00:00:00 +0000 and data/logo.png 2012-03-06 15:41:39 +0000 differ1Binary files data/logo.png 1970-01-01 00:00:00 +0000 and data/logo.png 2012-03-06 15:41:39 +0000 differ
=== added file 'data/progress_arrow_grey.png'
101Binary 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 differ2Binary 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
=== added file 'data/progress_arrow_orange.png'
102Binary 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 differ3Binary 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
=== added file 'data/progress_finish_grey.png'
103Binary 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 differ4Binary 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
=== added file 'data/progress_finish_orange.png'
104Binary 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 differ5Binary 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
=== added file 'data/progress_tick.png'
105Binary files data/progress_tick.png 1970-01-01 00:00:00 +0000 and data/progress_tick.png 2012-03-06 15:41:39 +0000 differ6Binary 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
=== modified file 'data/qt/account.ui'
--- data/qt/account.ui 2011-09-06 13:43:25 +0000
+++ data/qt/account.ui 2012-03-06 15:41:39 +0000
@@ -11,7 +11,7 @@
11 </rect>11 </rect>
12 </property>12 </property>
13 <property name="windowTitle">13 <property name="windowTitle">
14 <string>Form</string>14 <string notr="true">Form</string>
15 </property>15 </property>
16 <layout class="QVBoxLayout" name="verticalLayout">16 <layout class="QVBoxLayout" name="verticalLayout">
17 <property name="margin">17 <property name="margin">
@@ -25,14 +25,17 @@
25 <item row="0" column="2">25 <item row="0" column="2">
26 <widget class="GoToWebButton" name="edit_profile_button">26 <widget class="GoToWebButton" name="edit_profile_button">
27 <property name="text">27 <property name="text">
28 <string>Edit personal details online</string>28 <string notr="true">Edit personal details online</string>
29 </property>
30 <property name="default">
31 <bool>true</bool>
29 </property>32 </property>
30 </widget>33 </widget>
31 </item>34 </item>
32 <item row="2" column="0">35 <item row="2" column="0">
33 <widget class="QGroupBox" name="services">36 <widget class="QGroupBox" name="services">
34 <property name="title">37 <property name="title">
35 <string>Your services</string>38 <string notr="true">Your services</string>
36 </property>39 </property>
37 <layout class="QVBoxLayout" name="verticalLayout_3">40 <layout class="QVBoxLayout" name="verticalLayout_3">
38 <property name="leftMargin">41 <property name="leftMargin">
@@ -67,7 +70,7 @@
67 <item row="0" column="0">70 <item row="0" column="0">
68 <widget class="QGroupBox" name="profile_info">71 <widget class="QGroupBox" name="profile_info">
69 <property name="title">72 <property name="title">
70 <string>Personal details</string>73 <string notr="true">Personal details</string>
71 </property>74 </property>
72 <layout class="QVBoxLayout" name="verticalLayout_4">75 <layout class="QVBoxLayout" name="verticalLayout_4">
73 <property name="leftMargin">76 <property name="leftMargin">
@@ -109,7 +112,10 @@
109 <item row="2" column="2">112 <item row="2" column="2">
110 <widget class="GoToWebButton" name="edit_services_button">113 <widget class="GoToWebButton" name="edit_services_button">
111 <property name="text">114 <property name="text">
112 <string>Edit your services online</string>115 <string notr="true">Edit your services online</string>
116 </property>
117 <property name="default">
118 <bool>true</bool>
113 </property>119 </property>
114 </widget>120 </widget>
115 </item>121 </item>
116122
=== modified file 'data/qt/controlpanel.ui'
--- data/qt/controlpanel.ui 2011-09-09 17:16:20 +0000
+++ data/qt/controlpanel.ui 2012-03-06 15:41:39 +0000
@@ -160,7 +160,10 @@
160 <item>160 <item>
161 <widget class="GoToWebButton" name="get_more_space_button">161 <widget class="GoToWebButton" name="get_more_space_button">
162 <property name="text">162 <property name="text">
163 <string>Get more storage</string>163 <string notr="true">Get more storage</string>
164 </property>
165 <property name="default">
166 <bool>true</bool>
164 </property>167 </property>
165 </widget>168 </widget>
166 </item>169 </item>
@@ -235,22 +238,22 @@
235 </property>238 </property>
236 <widget class="FoldersPanel" name="folders_tab">239 <widget class="FoldersPanel" name="folders_tab">
237 <attribute name="title">240 <attribute name="title">
238 <string>Folders</string>241 <string notr="true">Folders</string>
239 </attribute>242 </attribute>
240 </widget>243 </widget>
241 <widget class="DevicesPanel" name="devices_tab">244 <widget class="DevicesPanel" name="devices_tab">
242 <attribute name="title">245 <attribute name="title">
243 <string>Devices</string>246 <string notr="true">Devices</string>
244 </attribute>247 </attribute>
245 </widget>248 </widget>
246 <widget class="PreferencesPanel" name="preferences_tab">249 <widget class="PreferencesPanel" name="preferences_tab">
247 <attribute name="title">250 <attribute name="title">
248 <string>Settings</string>251 <string notr="true">Settings</string>
249 </attribute>252 </attribute>
250 </widget>253 </widget>
251 <widget class="AccountPanel" name="account_tab">254 <widget class="AccountPanel" name="account_tab">
252 <attribute name="title">255 <attribute name="title">
253 <string>Account information</string>256 <string notr="true">Account information</string>
254 </attribute>257 </attribute>
255 </widget>258 </widget>
256 </widget>259 </widget>
@@ -260,7 +263,7 @@
260 </layout>263 </layout>
261 </widget>264 </widget>
262 <widget class="QWidget" name="empty"/>265 <widget class="QWidget" name="empty"/>
263 <widget class="SignInPanel" name="signin"/>266 <widget class="UbuntuOneWizard" name="wizard"/>
264 </widget>267 </widget>
265 </item>268 </item>
266 <item>269 <item>
@@ -287,7 +290,7 @@
287 <item>290 <item>
288 <widget class="GoToWebButton" name="help_button">291 <widget class="GoToWebButton" name="help_button">
289 <property name="text">292 <property name="text">
290 <string>Get help online</string>293 <string notr="true">Get help online</string>
291 </property>294 </property>
292 </widget>295 </widget>
293 </item>296 </item>
@@ -312,7 +315,7 @@
312 </font>315 </font>
313 </property>316 </property>
314 <property name="text">317 <property name="text">
315 <string>Talk to us</string>318 <string notr="true">Talk to us</string>
316 </property>319 </property>
317 </widget>320 </widget>
318 </item>321 </item>
@@ -404,9 +407,9 @@
404 <container>1</container>407 <container>1</container>
405 </customwidget>408 </customwidget>
406 <customwidget>409 <customwidget>
407 <class>SignInPanel</class>410 <class>UbuntuOneWizard</class>
408 <extends>QWidget</extends>411 <extends>QWizard</extends>
409 <header>ubuntuone.controlpanel.gui.qt.signin</header>412 <header>ubuntuone.controlpanel.gui.qt.wizard</header>
410 <container>1</container>413 <container>1</container>
411 </customwidget>414 </customwidget>
412 </customwidgets>415 </customwidgets>
413416
=== modified file 'data/qt/device.ui'
--- data/qt/device.ui 2011-08-23 16:03:31 +0000
+++ data/qt/device.ui 2012-03-06 15:41:39 +0000
@@ -24,7 +24,7 @@
24 <item>24 <item>
25 <widget class="QLabel" name="device_name_label">25 <widget class="QLabel" name="device_name_label">
26 <property name="text">26 <property name="text">
27 <string>Local device</string>27 <string notr="true">Local device</string>
28 </property>28 </property>
29 </widget>29 </widget>
30 </item>30 </item>
@@ -44,7 +44,7 @@
44 <item>44 <item>
45 <widget class="QPushButton" name="remove_device_button">45 <widget class="QPushButton" name="remove_device_button">
46 <property name="text">46 <property name="text">
47 <string>Remove</string>47 <string notr="true">Remove</string>
48 </property>48 </property>
49 <property name="secondary" stdset="0">49 <property name="secondary" stdset="0">
50 <bool>true</bool>50 <bool>true</bool>
5151
=== modified file 'data/qt/device_remote.ui'
--- data/qt/device_remote.ui 2011-11-28 15:06:18 +0000
+++ data/qt/device_remote.ui 2012-03-06 15:41:39 +0000
@@ -24,7 +24,7 @@
24 <item>24 <item>
25 <widget class="QLabel" name="device_name_label">25 <widget class="QLabel" name="device_name_label">
26 <property name="text">26 <property name="text">
27 <string>Local device</string>27 <string notr="true">Non local device</string>
28 </property>28 </property>
29 </widget>29 </widget>
30 </item>30 </item>
3131
=== modified file 'data/qt/devices.ui'
--- data/qt/devices.ui 2011-08-05 18:07:09 +0000
+++ data/qt/devices.ui 2012-03-06 15:41:39 +0000
@@ -23,7 +23,7 @@
23 <item>23 <item>
24 <widget class="QGroupBox" name="local_device">24 <widget class="QGroupBox" name="local_device">
25 <property name="title">25 <property name="title">
26 <string>This device</string>26 <string notr="true">This device</string>
27 </property>27 </property>
28 <layout class="QVBoxLayout" name="verticalLayout">28 <layout class="QVBoxLayout" name="verticalLayout">
29 <property name="margin">29 <property name="margin">
@@ -36,9 +36,9 @@
36 </widget>36 </widget>
37 </item>37 </item>
38 <item>38 <item>
39 <widget class="QGroupBox" name="oher_devices">39 <widget class="QGroupBox" name="other_devices">
40 <property name="title">40 <property name="title">
41 <string>Other devices</string>41 <string notr="true">Other devices</string>
42 </property>42 </property>
43 <layout class="QVBoxLayout" name="verticalLayout_2">43 <layout class="QVBoxLayout" name="verticalLayout_2">
44 <property name="margin">44 <property name="margin">
@@ -90,7 +90,10 @@
90 <item>90 <item>
91 <widget class="GoToWebButton" name="manage_devices_button">91 <widget class="GoToWebButton" name="manage_devices_button">
92 <property name="text">92 <property name="text">
93 <string>Go to the web page to manage your other devices</string>93 <string notr="true">Go to the web page to manage your other devices</string>
94 </property>
95 <property name="default">
96 <bool>true</bool>
94 </property>97 </property>
95 </widget>98 </widget>
96 </item>99 </item>
97100
=== modified file 'data/qt/folders.ui'
--- data/qt/folders.ui 2011-08-23 16:03:31 +0000
+++ data/qt/folders.ui 2012-03-06 15:41:39 +0000
@@ -41,7 +41,7 @@
41 </sizepolicy>41 </sizepolicy>
42 </property>42 </property>
43 <property name="text">43 <property name="text">
44 <string>Go to the web for public and private sharing options</string>44 <string notr="true">Go to the web for public and private sharing options</string>
45 </property>45 </property>
46 </widget>46 </widget>
47 </item>47 </item>
@@ -101,17 +101,17 @@
101 </attribute>101 </attribute>
102 <column>102 <column>
103 <property name="text">103 <property name="text">
104 <string>Name</string>104 <string notr="true">Name</string>
105 </property>105 </property>
106 </column>106 </column>
107 <column>107 <column>
108 <property name="text">108 <property name="text">
109 <string>Sync Locally?</string>109 <string notr="true">Sync Locally?</string>
110 </property>110 </property>
111 </column>111 </column>
112 <column>112 <column>
113 <property name="text">113 <property name="text">
114 <string>Explore</string>114 <string notr="true">Explore</string>
115 </property>115 </property>
116 </column>116 </column>
117 </widget>117 </widget>
@@ -153,7 +153,10 @@
153 </sizepolicy>153 </sizepolicy>
154 </property>154 </property>
155 <property name="text">155 <property name="text">
156 <string>Add a folder from this computer</string>156 <string notr="true">Add a folder from this computer</string>
157 </property>
158 <property name="default">
159 <bool>true</bool>
157 </property>160 </property>
158 </widget>161 </widget>
159 </item>162 </item>
160163
=== modified file 'data/qt/images.qrc'
--- data/qt/images.qrc 2012-01-30 18:49:50 +0000
+++ data/qt/images.qrc 2012-03-06 15:41:39 +0000
@@ -1,20 +1,25 @@
1<RCC>1<RCC>
2 <qresource prefix="/">2 <qresource prefix="/">
3 <file>../u1icon.png</file>3 <file>../banner.png</file>
4 <file>../computer.png</file>
4 <file>../external_icon_orange.png</file>5 <file>../external_icon_orange.png</file>
6 <file>../external_icon_white.png</file>
7 <file>../icon.png</file>
8 <file>../folder.png</file>
9 <file>../logo.png</file>
10 <file>../phone.png</file>
11 <file>../progress_arrow_grey.png</file>
12 <file>../progress_arrow_orange.png</file>
13 <file>../progress_finish_grey.png</file>
14 <file>../progress_finish_orange.png</file>
15 <file>../progress_tick.png</file>
16 <file>../sync_status_alert.png</file>
5 <file>../sync_status_disconnected.png</file>17 <file>../sync_status_disconnected.png</file>
6 <file>../sync_status_alert.png</file>18 <file>../sync_status_loading.png</file>
7 <file>../sync_status_sync_done.png</file>19 <file>../sync_status_sync_done.png</file>
8 <file>../sync_status_syncing.png</file>20 <file>../sync_status_syncing.png</file>
9 <file>../sync_status_loading.png</file>21 <file>../twitter.png</file>
10 <file>../folder.png</file>22 <file>../facebook.png</file>
11 <file>../computer.png</file>
12 <file>../phone.png</file>
13 <file>../twitter.png</file>
14 <file>../twitter.png</file>
15 <file>../facebook.png</file>
16 <file>../facebook.png</file>
17 <file>../external_icon_white.png</file>
18 <file>../Ubuntu-R.ttf</file>23 <file>../Ubuntu-R.ttf</file>
19 <file>../Ubuntu-B.ttf</file>24 <file>../Ubuntu-B.ttf</file>
20 <file>ubuntuone.qss</file>25 <file>ubuntuone.qss</file>
2126
=== modified file 'data/qt/loadingoverlay.ui'
--- data/qt/loadingoverlay.ui 2011-08-05 15:19:12 +0000
+++ data/qt/loadingoverlay.ui 2012-03-06 15:41:39 +0000
@@ -10,9 +10,6 @@
10 <height>230</height>10 <height>230</height>
11 </rect>11 </rect>
12 </property>12 </property>
13 <property name="windowTitle">
14 <string>Frame</string>
15 </property>
16 <layout class="QVBoxLayout" name="verticalLayout">13 <layout class="QVBoxLayout" name="verticalLayout">
17 <property name="topMargin">14 <property name="topMargin">
18 <number>30</number>15 <number>30</number>
@@ -61,7 +58,7 @@
61 </font>58 </font>
62 </property>59 </property>
63 <property name="text">60 <property name="text">
64 <string>Getting information, please wait...</string>61 <string notr="true">Getting information, please wait...</string>
65 </property>62 </property>
66 </widget>63 </widget>
67 </item>64 </item>
6865
=== modified file 'data/qt/mainwindow.ui'
--- data/qt/mainwindow.ui 2011-08-18 22:01:02 +0000
+++ data/qt/mainwindow.ui 2012-03-06 15:41:39 +0000
@@ -23,11 +23,11 @@
23 </size>23 </size>
24 </property>24 </property>
25 <property name="windowTitle">25 <property name="windowTitle">
26 <string>Ubuntu One</string>26 <string notr="true">Ubuntu One</string>
27 </property>27 </property>
28 <property name="windowIcon">28 <property name="windowIcon">
29 <iconset resource="images.qrc">29 <iconset resource="images.qrc">
30 <normaloff>:/u1icon.png</normaloff>:/u1icon.png</iconset>30 <normaloff>:/icon.png</normaloff>:/icon.png</iconset>
31 </property>31 </property>
32 <widget class="QWidget" name="centralwidget">32 <widget class="QWidget" name="centralwidget">
33 <property name="sizePolicy">33 <property name="sizePolicy">
3434
=== modified file 'data/qt/preferences.ui'
--- data/qt/preferences.ui 2011-09-08 22:22:46 +0000
+++ data/qt/preferences.ui 2012-03-06 15:41:39 +0000
@@ -23,7 +23,7 @@
23 <item>23 <item>
24 <widget class="QGroupBox" name="bandwidth_settings">24 <widget class="QGroupBox" name="bandwidth_settings">
25 <property name="title">25 <property name="title">
26 <string>Bandwidth Settings</string>26 <string notr="true">Bandwidth Settings</string>
27 </property>27 </property>
28 <layout class="QGridLayout" name="gridLayout">28 <layout class="QGridLayout" name="gridLayout">
29 <property name="margin">29 <property name="margin">
@@ -32,7 +32,7 @@
32 <item row="0" column="0">32 <item row="0" column="0">
33 <widget class="QCheckBox" name="limit_uploads_checkbox">33 <widget class="QCheckBox" name="limit_uploads_checkbox">
34 <property name="text">34 <property name="text">
35 <string>Limit upload speed to</string>35 <string notr="true">Limit upload speed to</string>
36 </property>36 </property>
37 </widget>37 </widget>
38 </item>38 </item>
@@ -49,14 +49,14 @@
49 <item row="0" column="2">49 <item row="0" column="2">
50 <widget class="QLabel" name="kbps_label_1">50 <widget class="QLabel" name="kbps_label_1">
51 <property name="text">51 <property name="text">
52 <string>Kilobits per second</string>52 <string notr="true">Kilobits per second</string>
53 </property>53 </property>
54 </widget>54 </widget>
55 </item>55 </item>
56 <item row="2" column="0">56 <item row="2" column="0">
57 <widget class="QCheckBox" name="limit_downloads_checkbox">57 <widget class="QCheckBox" name="limit_downloads_checkbox">
58 <property name="text">58 <property name="text">
59 <string>Limit download speed to</string>59 <string notr="true">Limit download speed to</string>
60 </property>60 </property>
61 </widget>61 </widget>
62 </item>62 </item>
@@ -73,7 +73,7 @@
73 <item row="2" column="2">73 <item row="2" column="2">
74 <widget class="QLabel" name="kbps_label_2">74 <widget class="QLabel" name="kbps_label_2">
75 <property name="text">75 <property name="text">
76 <string>Kilobits per second</string>76 <string notr="true">Kilobits per second</string>
77 </property>77 </property>
78 </widget>78 </widget>
79 </item>79 </item>
@@ -93,7 +93,7 @@
93 <item row="4" column="0" colspan="3">93 <item row="4" column="0" colspan="3">
94 <widget class="QLabel" name="label_2">94 <widget class="QLabel" name="label_2">
95 <property name="text">95 <property name="text">
96 <string>Please note that your files will not sync if you set bandwidth to 0</string>96 <string notr="true">Please note that your files will not sync if you set bandwidth to 0</string>
97 </property>97 </property>
98 <property name="scaledContents">98 <property name="scaledContents">
99 <bool>false</bool>99 <bool>false</bool>
@@ -122,7 +122,7 @@
122 <item>122 <item>
123 <widget class="QGroupBox" name="file_sync_settings">123 <widget class="QGroupBox" name="file_sync_settings">
124 <property name="title">124 <property name="title">
125 <string>File Sync Settings</string>125 <string notr="true">File Sync Settings</string>
126 </property>126 </property>
127 <layout class="QVBoxLayout" name="verticalLayout_1">127 <layout class="QVBoxLayout" name="verticalLayout_1">
128 <property name="margin">128 <property name="margin">
@@ -131,28 +131,28 @@
131 <item>131 <item>
132 <widget class="QCheckBox" name="autoconnect_checkbox">132 <widget class="QCheckBox" name="autoconnect_checkbox">
133 <property name="text">133 <property name="text">
134 <string>Connect automatically when computer starts</string>134 <string notr="true">Connect automatically when computer starts</string>
135 </property>135 </property>
136 </widget>136 </widget>
137 </item>137 </item>
138 <item>138 <item>
139 <widget class="QCheckBox" name="udf_autosubscribe_checkbox">139 <widget class="QCheckBox" name="udf_autosubscribe_checkbox">
140 <property name="text">140 <property name="text">
141 <string>Automatically sync all new cloud folders to this computer</string>141 <string notr="true">Automatically sync all new cloud folders to this computer</string>
142 </property>142 </property>
143 </widget>143 </widget>
144 </item>144 </item>
145 <item>145 <item>
146 <widget class="QCheckBox" name="share_autosubscribe_checkbox">146 <widget class="QCheckBox" name="share_autosubscribe_checkbox">
147 <property name="text">147 <property name="text">
148 <string>Automatically sync all folders shared with me to this computer</string>148 <string notr="true">Automatically sync all folders shared with me to this computer</string>
149 </property>149 </property>
150 </widget>150 </widget>
151 </item>151 </item>
152 <item>152 <item>
153 <widget class="QCheckBox" name="show_all_notifications_checkbox">153 <widget class="QCheckBox" name="show_all_notifications_checkbox">
154 <property name="text">154 <property name="text">
155 <string>Allow all notifications to this device</string>155 <string notr="true">Allow all notifications to this device</string>
156 </property>156 </property>
157 </widget>157 </widget>
158 </item>158 </item>
@@ -191,22 +191,25 @@
191 </spacer>191 </spacer>
192 </item>192 </item>
193 <item>193 <item>
194 <widget class="QPushButton" name="apply_changes_button">
195 <property name="text">
196 <string>Apply these settings</string>
197 </property>
198 </widget>
199 </item>
200 <item>
201 <widget class="QPushButton" name="restore_defaults_button">194 <widget class="QPushButton" name="restore_defaults_button">
202 <property name="text">195 <property name="text">
203 <string>Default settings</string>196 <string notr="true">Default settings</string>
204 </property>197 </property>
205 <property name="secondary" stdset="0">198 <property name="secondary" stdset="0">
206 <bool>true</bool>199 <bool>true</bool>
207 </property>200 </property>
208 </widget>201 </widget>
209 </item>202 </item>
203 <item>
204 <widget class="QPushButton" name="apply_changes_button">
205 <property name="text">
206 <string notr="true">Apply these settings</string>
207 </property>
208 <property name="default">
209 <bool>true</bool>
210 </property>
211 </widget>
212 </item>
210 </layout>213 </layout>
211 </item>214 </item>
212 </layout>215 </layout>
213216
=== added file 'data/qt/side_widget.ui'
--- data/qt/side_widget.ui 1970-01-01 00:00:00 +0000
+++ data/qt/side_widget.ui 2012-03-06 15:41:39 +0000
@@ -0,0 +1,214 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<ui version="4.0">
3 <class>SideWidget</class>
4 <widget class="QFrame" name="SideWidget">
5 <property name="geometry">
6 <rect>
7 <x>0</x>
8 <y>0</y>
9 <width>170</width>
10 <height>466</height>
11 </rect>
12 </property>
13 <property name="sizePolicy">
14 <sizepolicy hsizetype="Minimum" vsizetype="Preferred">
15 <horstretch>0</horstretch>
16 <verstretch>0</verstretch>
17 </sizepolicy>
18 </property>
19 <property name="minimumSize">
20 <size>
21 <width>170</width>
22 <height>466</height>
23 </size>
24 </property>
25 <layout class="QVBoxLayout" name="verticalLayout">
26 <property name="spacing">
27 <number>40</number>
28 </property>
29 <property name="margin">
30 <number>0</number>
31 </property>
32 <item>
33 <widget class="QLabel" name="ubuntu_one_logo_label">
34 <property name="sizePolicy">
35 <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
36 <horstretch>0</horstretch>
37 <verstretch>0</verstretch>
38 </sizepolicy>
39 </property>
40 <property name="pixmap">
41 <pixmap resource="images.qrc">:/logo.png</pixmap>
42 </property>
43 </widget>
44 </item>
45 <item>
46 <widget class="QFrame" name="states_frame">
47 <property name="sizePolicy">
48 <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
49 <horstretch>0</horstretch>
50 <verstretch>0</verstretch>
51 </sizepolicy>
52 </property>
53 <layout class="QVBoxLayout" name="verticalLayout_2">
54 <property name="spacing">
55 <number>20</number>
56 </property>
57 <property name="margin">
58 <number>0</number>
59 </property>
60 <item>
61 <layout class="QHBoxLayout" name="horizontalLayout">
62 <property name="spacing">
63 <number>7</number>
64 </property>
65 <item>
66 <widget class="QLabel" name="install_icon">
67 <property name="sizePolicy">
68 <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
69 <horstretch>0</horstretch>
70 <verstretch>0</verstretch>
71 </sizepolicy>
72 </property>
73 <property name="pixmap">
74 <pixmap resource="images.qrc">:/progress_arrow_grey.png</pixmap>
75 </property>
76 </widget>
77 </item>
78 <item>
79 <widget class="QLabel" name="install_label">
80 <property name="enabled">
81 <bool>true</bool>
82 </property>
83 <property name="text">
84 <string notr="true">Install</string>
85 </property>
86 </widget>
87 </item>
88 </layout>
89 </item>
90 <item>
91 <layout class="QHBoxLayout" name="horizontalLayout_2">
92 <property name="spacing">
93 <number>7</number>
94 </property>
95 <property name="sizeConstraint">
96 <enum>QLayout::SetDefaultConstraint</enum>
97 </property>
98 <item>
99 <widget class="QLabel" name="signin_icon">
100 <property name="sizePolicy">
101 <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
102 <horstretch>0</horstretch>
103 <verstretch>0</verstretch>
104 </sizepolicy>
105 </property>
106 <property name="text">
107 <string/>
108 </property>
109 <property name="pixmap">
110 <pixmap resource="images.qrc">:/progress_arrow_grey.png</pixmap>
111 </property>
112 </widget>
113 </item>
114 <item>
115 <widget class="QLabel" name="signin_label">
116 <property name="enabled">
117 <bool>true</bool>
118 </property>
119 <property name="text">
120 <string notr="true">Sign In</string>
121 </property>
122 </widget>
123 </item>
124 </layout>
125 </item>
126 <item>
127 <layout class="QHBoxLayout" name="horizontalLayout_4">
128 <property name="spacing">
129 <number>7</number>
130 </property>
131 <item>
132 <widget class="QLabel" name="folders_icon">
133 <property name="sizePolicy">
134 <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
135 <horstretch>0</horstretch>
136 <verstretch>0</verstretch>
137 </sizepolicy>
138 </property>
139 <property name="text">
140 <string/>
141 </property>
142 <property name="pixmap">
143 <pixmap resource="images.qrc">:/progress_arrow_grey.png</pixmap>
144 </property>
145 </widget>
146 </item>
147 <item>
148 <widget class="QLabel" name="folders_label">
149 <property name="enabled">
150 <bool>true</bool>
151 </property>
152 <property name="text">
153 <string notr="true">Select sync folders</string>
154 </property>
155 </widget>
156 </item>
157 </layout>
158 </item>
159 <item>
160 <layout class="QHBoxLayout" name="horizontalLayout_5">
161 <property name="spacing">
162 <number>7</number>
163 </property>
164 <item>
165 <widget class="QLabel" name="sync_icon">
166 <property name="sizePolicy">
167 <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
168 <horstretch>0</horstretch>
169 <verstretch>0</verstretch>
170 </sizepolicy>
171 </property>
172 <property name="text">
173 <string/>
174 </property>
175 <property name="pixmap">
176 <pixmap resource="images.qrc">:/progress_finish_grey.png</pixmap>
177 </property>
178 </widget>
179 </item>
180 <item>
181 <widget class="QLabel" name="sync_label">
182 <property name="enabled">
183 <bool>true</bool>
184 </property>
185 <property name="text">
186 <string notr="true">Sync, stream, share!</string>
187 </property>
188 </widget>
189 </item>
190 </layout>
191 </item>
192 </layout>
193 </widget>
194 </item>
195 <item>
196 <spacer name="verticalSpacer">
197 <property name="orientation">
198 <enum>Qt::Vertical</enum>
199 </property>
200 <property name="sizeHint" stdset="0">
201 <size>
202 <width>20</width>
203 <height>40</height>
204 </size>
205 </property>
206 </spacer>
207 </item>
208 </layout>
209 </widget>
210 <resources>
211 <include location="images.qrc"/>
212 </resources>
213 <connections/>
214</ui>
0215
=== modified file 'data/qt/signin.ui'
--- data/qt/signin.ui 2011-12-19 21:10:06 +0000
+++ data/qt/signin.ui 2012-03-06 15:41:39 +0000
@@ -6,155 +6,133 @@
6 <rect>6 <rect>
7 <x>0</x>7 <x>0</x>
8 <y>0</y>8 <y>0</y>
9 <width>344</width>9 <width>370</width>
10 <height>312</height>10 <height>447</height>
11 </rect>11 </rect>
12 </property>12 </property>
13 <property name="windowTitle">13 <layout class="QVBoxLayout" name="verticalLayout_2">
14 <string>Form</string>
15 </property>
16 <layout class="QHBoxLayout" name="horizontalLayout_3">
17 <property name="margin">14 <property name="margin">
18 <number>0</number>15 <number>0</number>
19 </property>16 </property>
20 <item>17 <item>
21 <widget class="QFrame" name="signin">18 <widget class="QFrame" name="signin">
22 <layout class="QVBoxLayout" name="sign_in">19 <layout class="QVBoxLayout" name="sign_in">
23 <property name="spacing">
24 <number>15</number>
25 </property>
26 <property name="margin">20 <property name="margin">
27 <number>3</number>21 <number>0</number>
28 </property>22 </property>
29 <item>23 <item>
30 <widget class="QLabel" name="sign_in_label">24 <widget class="QFrame" name="frame">
31 <property name="text">25 <layout class="QHBoxLayout" name="horizontalLayout_3">
32 <string>Sign in to Ubuntu One</string>26 <property name="leftMargin">
33 </property>27 <number>0</number>
34 </widget>28 </property>
35 </item>29 <property name="topMargin">
36 <item>30 <number>22</number>
37 <widget class="QLabel" name="description_label">31 </property>
38 <property name="text">32 <property name="rightMargin">
39 <string>Sign in with your existing Ubuntu One username and password.</string>33 <number>0</number>
40 </property>34 </property>
41 </widget>35 <property name="bottomMargin">
36 <number>0</number>
37 </property>
38 <item>
39 <widget class="QLabel" name="banner">
40 <property name="text">
41 <string/>
42 </property>
43 <property name="textFormat">
44 <enum>Qt::PlainText</enum>
45 </property>
46 <property name="pixmap">
47 <pixmap resource="images.qrc">:/banner.png</pixmap>
48 </property>
49 <property name="alignment">
50 <set>Qt::AlignCenter</set>
51 </property>
52 <property name="wordWrap">
53 <bool>true</bool>
54 </property>
55 </widget>
56 </item>
57 </layout>
58 </widget>
59 </item>
60 <item>
61 <spacer name="verticalSpacer_2">
62 <property name="orientation">
63 <enum>Qt::Vertical</enum>
64 </property>
65 <property name="sizeHint" stdset="0">
66 <size>
67 <width>20</width>
68 <height>40</height>
69 </size>
70 </property>
71 </spacer>
72 </item>
73 <item>
74 <widget class="QLabel" name="welcome_label">
75 <property name="font">
76 <font>
77 <pointsize>11</pointsize>
78 <weight>50</weight>
79 <bold>false</bold>
80 </font>
81 </property>
82 <property name="text">
83 <string notr="true">Welcome to Ubuntu One</string>
84 </property>
85 <property name="alignment">
86 <set>Qt::AlignCenter|Qt::AlignHCenter|Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
87 </property>
88 </widget>
89 </item>
90 <item>
91 <spacer name="verticalSpacer">
92 <property name="orientation">
93 <enum>Qt::Vertical</enum>
94 </property>
95 <property name="sizeHint" stdset="0">
96 <size>
97 <width>20</width>
98 <height>40</height>
99 </size>
100 </property>
101 </spacer>
42 </item>102 </item>
43 <item>103 <item>
44 <layout class="QHBoxLayout" name="horizontalLayout">104 <layout class="QHBoxLayout" name="horizontalLayout">
45 <item>105 <item>
46 <layout class="QVBoxLayout" name="verticalLayout_2">106 <spacer name="horizontalSpacer">
47 <property name="spacing">107 <property name="orientation">
48 <number>15</number>108 <enum>Qt::Horizontal</enum>
49 </property>109 </property>
50 <item>110 <property name="sizeHint" stdset="0">
51 <layout class="QVBoxLayout" name="verticalLayout_4">111 <size>
52 <property name="spacing">112 <width>40</width>
53 <number>0</number>113 <height>20</height>
54 </property>114 </size>
55 <item>115 </property>
56 <widget class="QLabel" name="email_label">116 </spacer>
57 <property name="text">117 </item>
58 <string>Email address</string>118 <item>
59 </property>119 <layout class="QVBoxLayout" name="verticalLayout">
60 </widget>120 <item>
61 </item>121 <widget class="QPushButton" name="login_button">
62 <item>122 <property name="text">
63 <widget class="QLineEdit" name="email_entry">123 <string notr="true">Existing account</string>
64 <property name="text">124 </property>
65 <string/>125 <property name="default">
66 </property>126 <bool>true</bool>
67 </widget>127 </property>
68 </item>128 </widget>
69 </layout>129 </item>
70 </item>130 <item>
71 <item>131 <widget class="QPushButton" name="register_button">
72 <layout class="QVBoxLayout" name="verticalLayout_3">132 <property name="text">
73 <property name="spacing">133 <string notr="true">Setup new account</string>
74 <number>0</number>134 </property>
75 </property>135 </widget>
76 <item>
77 <widget class="QLabel" name="password_label">
78 <property name="text">
79 <string>Password</string>
80 </property>
81 </widget>
82 </item>
83 <item>
84 <widget class="QLineEdit" name="password_entry">
85 <property name="echoMode">
86 <enum>QLineEdit::Password</enum>
87 </property>
88 </widget>
89 </item>
90 </layout>
91 </item>
92 <item>
93 <layout class="QHBoxLayout" name="horizontalLayout_2">
94 <item>
95 <widget class="QPushButton" name="signin_button">
96 <property name="text">
97 <string>Sign in</string>
98 </property>
99 <property name="default">
100 <bool>true</bool>
101 </property>
102 </widget>
103 </item>
104 <item>
105 <widget class="QPushButton" name="cancel_button">
106 <property name="text">
107 <string>Cancel</string>
108 </property>
109 <property name="secondary" stdset="0">
110 <bool>true</bool>
111 </property>
112 </widget>
113 </item>
114 <item>
115 <spacer name="horizontalSpacer">
116 <property name="orientation">
117 <enum>Qt::Horizontal</enum>
118 </property>
119 <property name="sizeHint" stdset="0">
120 <size>
121 <width>40</width>
122 <height>20</height>
123 </size>
124 </property>
125 </spacer>
126 </item>
127 </layout>
128 </item>
129 <item>
130 <layout class="QHBoxLayout" name="horizontalLayout_4">
131 <item>
132 <widget class="GoToWebButton" name="forgot_password_button">
133 <property name="sizePolicy">
134 <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
135 <horstretch>0</horstretch>
136 <verstretch>0</verstretch>
137 </sizepolicy>
138 </property>
139 <property name="text">
140 <string>Forgot your password?</string>
141 </property>
142 </widget>
143 </item>
144 <item>
145 <spacer name="horizontalSpacer_3">
146 <property name="orientation">
147 <enum>Qt::Horizontal</enum>
148 </property>
149 <property name="sizeHint" stdset="0">
150 <size>
151 <width>40</width>
152 <height>20</height>
153 </size>
154 </property>
155 </spacer>
156 </item>
157 </layout>
158 </item>136 </item>
159 </layout>137 </layout>
160 </item>138 </item>
@@ -173,31 +151,13 @@
173 </item>151 </item>
174 </layout>152 </layout>
175 </item>153 </item>
176 <item>
177 <spacer name="verticalSpacer">
178 <property name="orientation">
179 <enum>Qt::Vertical</enum>
180 </property>
181 <property name="sizeHint" stdset="0">
182 <size>
183 <width>20</width>
184 <height>40</height>
185 </size>
186 </property>
187 </spacer>
188 </item>
189 </layout>154 </layout>
190 </widget>155 </widget>
191 </item>156 </item>
192 </layout>157 </layout>
193 </widget>158 </widget>
194 <customwidgets>159 <resources>
195 <customwidget>160 <include location="images.qrc"/>
196 <class>GoToWebButton</class>161 </resources>
197 <extends>QPushButton</extends>
198 <header>ubuntuone.controlpanel.gui.qt.gotoweb</header>
199 </customwidget>
200 </customwidgets>
201 <resources/>
202 <connections/>162 <connections/>
203</ui>163</ui>
204164
=== modified file 'data/qt/ubuntuone.qss'
--- data/qt/ubuntuone.qss 2011-11-23 17:22:33 +0000
+++ data/qt/ubuntuone.qss 2012-03-06 15:41:39 +0000
@@ -12,9 +12,9 @@
12 border: none;12 border: none;
13}13}
1414
15QFrame#signin,15UbuntuOneWizard,
16QFrame#frame_header {16QFrame#frame_header {
17 background: #ffffff;17 background: white;
18 border-radius: 5px;18 border-radius: 5px;
19 border-style: solid;19 border-style: solid;
20 border-color: #939389;20 border-color: #939389;
@@ -59,6 +59,15 @@
59 font-size: 24px;59 font-size: 24px;
60}60}
6161
62SideWidget {
63 background-color: white;
64 border-style: dotted;
65 border-color: #939389;
66 border-right-width: 1px;
67 color: white;
68 min-height: 100px;
69}
70
62QPushButton {71QPushButton {
63 border-radius: 5px;72 border-radius: 5px;
64 border-style: solid;73 border-style: solid;
@@ -68,55 +77,57 @@
68 border-width: 1px;77 border-width: 1px;
69}78}
7079
71QPushButton[enabled="true"] {80QPushButton:disabled {
81 background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
82 stop: 0 #eaeaea, stop: 1.0 #cacaca);
83 color: #595959;
84 border-color: #939389;
85}
86
87QPushButton:enabled {
88 background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
89 stop: 0 #ffffff,stop: 1.0 #e6e6e6);
90 color: #333333;
91 border-color: #999999;
92}
93
94QPushButton:enabled:focus,
95QPushButton:enabled:hover {
96 background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
97 stop: 0 #ffffff,stop: 1.0 #ededed);
98 color: #333333;
99 border-color: #999999;
100}
101
102QPushButton:enabled:pressed {
103 background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
104 stop: 0 #d9d9d9,stop: 1.0 #fefefe);
105 color: #333333;
106 border-color: #999999;
107}
108
109QPushButton:default:enabled {
72 background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,110 background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
73 stop: 0 #fe9e84,stop: 1.0 #dd4814);111 stop: 0 #fe9e84,stop: 1.0 #dd4814);
74 color: white;112 color: white;
75 border-color: #999999;113 border-color: #999999;
76}114}
77115
78QPushButton:hover[enabled="true"] {116QPushButton:default:enabled:focus,
117QPushButton:default:enabled:hover {
79 background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,118 background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
80 stop: 0 #ffb19c,stop: 1.0 #dd4814);119 stop: 0 #ffb19c,stop: 1.0 #dd4814);
81 color: white;120 color: white;
82 border-color: #999999;121 border-color: #999999;
83}122}
84123
85QPushButton:pressed[enabled="true"] {124QPushButton:default:enabled:pressed {
86 background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,125 background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
87 stop: 0 #b93f14,stop: 1.0 #dd4814);126 stop: 0 #b93f14,stop: 1.0 #dd4814);
88 color: white;127 color: white;
89 border-color: #999999;128 border-color: #999999;
90}129}
91130
92QPushButton[secondary="true"] {
93 background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
94 stop: 0 #ffffff,stop: 1.0 #e6e6e6);
95 color: #333333;
96 border-color: #999999;
97}
98
99QPushButton:hover[secondary="true"] {
100 background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
101 stop: 0 #ffffff,stop: 1.0 #ededed);
102 color: #333333;
103 border-color: #999999;
104}
105
106QPushButton:pressed[secondary="true"] {
107 background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
108 stop: 0 #d9d9d9,stop: 1.0 #fefefe);
109 color: #333333;
110 border-color: #999999;
111}
112
113QPushButton[enabled="false"] {
114 background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
115 stop: 0 #eaeaea, stop: 1.0 #cacaca);
116 color: #595959;
117 border-color: #939389;
118}
119
120QPushButton#help_button {131QPushButton#help_button {
121 background: transparent;132 background: transparent;
122 border: none;133 border: none;
@@ -278,6 +289,10 @@
278 color: #df2d1f;289 color: #df2d1f;
279}290}
280291
292QLabel#welcome_label {
293 font-size: 20px;
294}
295
281QAbstractItemView {296QAbstractItemView {
282 border-style: solid;297 border-style: solid;
283 border-color: #898989;298 border-color: #898989;
284299
=== removed file 'docs/ubuntuone-control-panel-gtk.1'
--- docs/ubuntuone-control-panel-gtk.1 2011-09-07 13:50:37 +0000
+++ docs/ubuntuone-control-panel-gtk.1 1970-01-01 00:00:00 +0000
@@ -1,15 +0,0 @@
1.TH UBUNTUONE-CONTROL-PANEL-GTK 1
2
3.SH NAME
4ubuntuone-control-panel-gtk \- A GTK UI for managing an Ubuntu One account
5
6.SH SYNOPSYS
7.B ubutuone-control-panel-gtk
8
9.SH DESCRIPTION
10This manual page briefly documents the
11.BR ubuntuone-control-panel-gtk
12process, which provides a desktop application to manage an Ubuntu One account.
13
14.SH AUTHOR
15This manual page was written by Natalia Bidart <natalia.bidart@canonical.com>
160
=== added file 'docs/ubuntuone-control-panel-qt.1'
--- docs/ubuntuone-control-panel-qt.1 1970-01-01 00:00:00 +0000
+++ docs/ubuntuone-control-panel-qt.1 2012-03-06 15:41:39 +0000
@@ -0,0 +1,27 @@
1.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.40.4.
2.TH UBUNTUONE-CONTROL-PANEL-QT "1" "March 2012" "ubuntuone-control-panel-qt" "User Commands"
3.SH NAME
4ubuntuone-control-panel-qt \- control panel for Ubuntu One
5.SH DESCRIPTION
6usage: ubuntuone\-control\-panel\-qt [\-h] [\-\-switch\-to PANEL_NAME] [\-a]
7.IP
8[\-\-minimized] [\-\-with\-icon]
9.SS "optional arguments:"
10.TP
11\fB\-h\fR, \fB\-\-help\fR
12show this help message and exit
13.TP
14\fB\-\-switch\-to\fR PANEL_NAME
15Start Ubuntu One in the PANEL_NAME tab. Possible
16values are: dashboard, volumes, devices, applications
17.TP
18\fB\-a\fR, \fB\-\-alert\fR
19Start Ubuntu One alerting the user to its presence.
20.TP
21\fB\-\-minimized\fR
22Start Ubuntu One only in the notification area, with
23no visible window. Implies \fB\-\-with\-icon\fR
24.TP
25\fB\-\-with\-icon\fR
26Start Ubuntu One with an icon in the notification
27area.
028
=== modified file 'po/POTFILES.in'
--- po/POTFILES.in 2011-09-16 14:37:20 +0000
+++ po/POTFILES.in 2012-03-06 15:41:39 +0000
@@ -1,9 +1,1 @@
1ubuntuone/controlpanel/gui/__init__.py1ubuntuone/controlpanel/gui/__init__.py
2[type: gettext/glade] data/gtk/dashboard.ui
3[type: gettext/glade] data/gtk/device.ui
4[type: gettext/glade] data/gtk/devices.ui
5[type: gettext/glade] data/gtk/install.ui
6[type: gettext/glade] data/gtk/management.ui
7[type: gettext/glade] data/gtk/overview.ui
8[type: gettext/glade] data/gtk/services.ui
9[type: gettext/glade] data/gtk/volumes.ui
102
=== modified file 'run-tests'
--- run-tests 2012-02-06 20:49:41 +0000
+++ run-tests 2012-03-06 15:41:39 +0000
@@ -16,8 +16,7 @@
16# You should have received a copy of the GNU General Public License along16# You should have received a copy of the GNU General Public License along
17# with this program. If not, see <http://www.gnu.org/licenses/>.17# with this program. If not, see <http://www.gnu.org/licenses/>.
1818
19QT_TESTS_PATH=ubuntuone/controlpanel/gui/qt/tests19QT_TESTS_PATH="ubuntuone/controlpanel/gui/qt/tests, ubuntuone/controlpanel/gui/qt/main/tests"
20GTK_TESTS_PATH=ubuntuone/controlpanel/gui/gtk/tests
21DBUS_TESTS_PATH=ubuntuone/controlpanel/dbustests20DBUS_TESTS_PATH=ubuntuone/controlpanel/dbustests
22WINDOWS_TESTS=test_windows.py21WINDOWS_TESTS=test_windows.py
2322
@@ -39,7 +38,6 @@
39 echo "Please install the 'pep8' package."38 echo "Please install the 'pep8' package."
40 fi39 fi
41}40}
42unset GTK_MODULES
4341
44XVFB_CMDLINE=""42XVFB_CMDLINE=""
45XVFB=$(which xvfb-run)43XVFB=$(which xvfb-run)
@@ -48,17 +46,14 @@
48fi46fi
4947
50echo "*** Running test suite for ""$MODULE"" ***"48echo "*** Running test suite for ""$MODULE"" ***"
51u1trial --reactor=gi -p "$DBUS_TESTS_PATH, $QT_TESTS_PATH, $GTK_TESTS_PATH" -i "$WINDOWS_TESTS" "$MODULE"49u1trial --reactor=gi -p "$DBUS_TESTS_PATH, $QT_TESTS_PATH" -i "$WINDOWS_TESTS" "$MODULE"
5250
53echo "*** Running DBus test suite ***"51echo "*** Running DBus test suite ***"
54u1trial --reactor=glib "$DBUS_TESTS_PATH"52u1trial --reactor=glib "$DBUS_TESTS_PATH"
5553
56echo "*** Running GTK test suite ***"
57$XVFB_CMDLINE u1trial --reactor=glib "$GTK_TESTS_PATH"
58
59echo "*** Running QT test suite for ""$MODULE"" ***"54echo "*** Running QT test suite for ""$MODULE"" ***"
60./setup.py build55./setup.py build
61$XVFB_CMDLINE u1trial -p "$GTK_TESTS_PATH" -i "$WINDOWS_TESTS" --reactor=qt4 --gui "$MODULE"56$XVFB_CMDLINE u1trial -i "$WINDOWS_TESTS" --reactor=qt4 --gui "$MODULE"
62rm -rf _trial_temp57rm -rf _trial_temp
63rm -rf build58rm -rf build
6459
6560
=== modified file 'run-tests.bat'
--- run-tests.bat 2012-01-31 16:55:33 +0000
+++ run-tests.bat 2012-03-06 15:41:39 +0000
@@ -18,7 +18,7 @@
1818
19SET MODULE="ubuntuone"19SET MODULE="ubuntuone"
20SET PYTHONEXEPATH="C:\Python27"20SET PYTHONEXEPATH="C:\Python27"
21SET IGNORE_PATHS="ubuntuone\controlpanel\gui\gtk, ubuntuone\controlpanel\dbustests"21SET IGNORE_PATHS="ubuntuone\controlpanel\dbustests"
22SET IGNORE_MODULES="test_linux.py, test_libsoup.py"22SET IGNORE_MODULES="test_linux.py, test_libsoup.py"
2323
24:: throw the first parameter away if is /skip-lint,24:: throw the first parameter away if is /skip-lint,
2525
=== modified file 'setup.py'
--- setup.py 2012-02-22 12:31:22 +0000
+++ setup.py 2012-03-06 15:41:39 +0000
@@ -39,12 +39,11 @@
3939
40POT_FILE = 'po/ubuntuone-control-panel.pot'40POT_FILE = 'po/ubuntuone-control-panel.pot'
41SERVICE_FILE = 'com.ubuntuone.controlpanel.service'41SERVICE_FILE = 'com.ubuntuone.controlpanel.service'
42GUI_SERVICE_FILE = 'com.ubuntuone.controlpanel.gui.service'
43MESSAGE_ENTRY = 'ubuntuone-control-panel'42MESSAGE_ENTRY = 'ubuntuone-control-panel'
44CONSTANTS = 'ubuntuone/controlpanel/constants.py'43CONSTANTS = 'ubuntuone/controlpanel/constants.py'
4544
46CLEANFILES = [45CLEANFILES = [
47 SERVICE_FILE, GUI_SERVICE_FILE, MESSAGE_ENTRY, CONSTANTS, POT_FILE,46 SERVICE_FILE, MESSAGE_ENTRY, CONSTANTS, POT_FILE,
48 'MANIFEST']47 'MANIFEST']
49QT_UI_DIR = os.path.join('ubuntuone', 'controlpanel', 'gui', 'qt', 'ui')48QT_UI_DIR = os.path.join('ubuntuone', 'controlpanel', 'gui', 'qt', 'ui')
5049
@@ -52,7 +51,7 @@
52def replace_prefix(prefix):51def replace_prefix(prefix):
53 """Replace every '@prefix@' with prefix within 'filename' content."""52 """Replace every '@prefix@' with prefix within 'filename' content."""
54 # replace .service file, DATA_DIR constant53 # replace .service file, DATA_DIR constant
55 for filename in (SERVICE_FILE, GUI_SERVICE_FILE, MESSAGE_ENTRY, CONSTANTS):54 for filename in (SERVICE_FILE, MESSAGE_ENTRY, CONSTANTS):
56 with open(filename + '.in') as in_file:55 with open(filename + '.in') as in_file:
57 content = in_file.read()56 content = in_file.read()
58 with open(filename, 'w') as out_file:57 with open(filename, 'w') as out_file:
@@ -160,7 +159,6 @@
160159
161 def run(self):160 def run(self):
162 """Execute the command."""161 """Execute the command."""
163 self._wrapuic()
164 basepath = os.path.join('data', 'qt')162 basepath = os.path.join('data', 'qt')
165 # TODO: build the resource files so that we can include them163 # TODO: build the resource files so that we can include them
166 #self.build_rc(os.path.join(basepath, 'icons_rc.py'),164 #self.build_rc(os.path.join(basepath, 'icons_rc.py'),
@@ -175,40 +173,6 @@
175173
176 build_extra.build_extra.run(self)174 build_extra.build_extra.run(self)
177175
178 # pylint: disable=E1002
179 _wrappeduic = False
180
181 @classmethod
182 def _wrapuic(cls):
183 """Wrap uic to use gettext's _() in place of tr()"""
184 if cls._wrappeduic:
185 return
186
187 from PyQt4.uic.Compiler import compiler, qtproxies, indenter
188
189 # pylint: disable=C0103
190 class _UICompiler(compiler.UICompiler):
191 """Speciallized compiler for qt .ui files."""
192 def createToplevelWidget(self, classname, widgetname):
193 o = indenter.getIndenter()
194 o.level = 0
195 o.write('from gettext import gettext as _')
196 return super(_UICompiler, self).createToplevelWidget(classname,
197 widgetname)
198 compiler.UICompiler = _UICompiler
199
200 class _i18n_string(qtproxies.i18n_string):
201 """Provide a translated text."""
202
203 def __str__(self):
204 return "_('%s')" % self.string.encode('string-escape')
205
206 qtproxies.i18n_string = _i18n_string
207
208 cls._wrappeduic = True
209 # pylint: enable=C0103
210 # pylint: enable=E1002
211
212176
213class ControlPanelClean(DistUtilsExtra.auto.clean_build_tree):177class ControlPanelClean(DistUtilsExtra.auto.clean_build_tree):
214 """Class to clean up after the build."""178 """Class to clean up after the build."""
@@ -241,7 +205,6 @@
241 'ubuntuone',205 'ubuntuone',
242 'ubuntuone.controlpanel',206 'ubuntuone.controlpanel',
243 'ubuntuone.controlpanel.gui',207 'ubuntuone.controlpanel.gui',
244 'ubuntuone.controlpanel.gui.gtk',
245 'ubuntuone.controlpanel.gui.qt',208 'ubuntuone.controlpanel.gui.qt',
246 'ubuntuone.controlpanel.gui.qt.main',209 'ubuntuone.controlpanel.gui.qt.main',
247 'ubuntuone.controlpanel.gui.qt.ui',210 'ubuntuone.controlpanel.gui.qt.ui',
@@ -253,7 +216,7 @@
253 data_files=[216 data_files=[
254 ('lib/ubuntuone-control-panel',217 ('lib/ubuntuone-control-panel',
255 ['bin/ubuntuone-control-panel-backend']),218 ['bin/ubuntuone-control-panel-backend']),
256 ('share/dbus-1/services/', [SERVICE_FILE, GUI_SERVICE_FILE]),219 ('share/dbus-1/services/', [SERVICE_FILE]),
257 ('share/indicators/messages/applications/', [MESSAGE_ENTRY]),220 ('share/indicators/messages/applications/', [MESSAGE_ENTRY]),
258 ('share/apport/package-hooks/',221 ('share/apport/package-hooks/',
259 ['data/source_ubuntuone-control-panel.py']),222 ['data/source_ubuntuone-control-panel.py']),
260223
=== modified file 'ubuntuone/controlpanel/backend.py'
--- ubuntuone/controlpanel/backend.py 2012-02-06 15:23:27 +0000
+++ ubuntuone/controlpanel/backend.py 2012-03-06 15:41:39 +0000
@@ -343,10 +343,23 @@
343343
344 @log_call(logger.debug, with_args=False)344 @log_call(logger.debug, with_args=False)
345 @inlineCallbacks345 @inlineCallbacks
346 def login(self, email, password):346 def login(self, email=None, password=None):
347 """Login using 'email' and 'password'."""347 """Login using 'email' and 'password' if not None, else prompt user."""
348 result = yield self.login_client.login_email_password(348 result = None
349 email=email, password=password)349 if email is not None and password is not None:
350 result = yield self.login_client.login_email_password(
351 email=email, password=password)
352 else:
353 result = yield self.login_client.login()
354 # cache credentils
355 self._credentials = result
356 returnValue(result)
357
358 @log_call(logger.debug)
359 @inlineCallbacks
360 def register(self):
361 """Register a new user."""
362 result = yield self.login_client.register()
350 # cache credentils363 # cache credentils
351 self._credentials = result364 self._credentials = result
352 returnValue(result)365 returnValue(result)
353366
=== removed file 'ubuntuone/controlpanel/dbustests/test_gui_service.py'
--- ubuntuone/controlpanel/dbustests/test_gui_service.py 2011-11-21 13:37:07 +0000
+++ ubuntuone/controlpanel/dbustests/test_gui_service.py 1970-01-01 00:00:00 +0000
@@ -1,104 +0,0 @@
1# -*- coding: utf-8 -*-
2
3# Authors: Alejandro J. Cura <alecu@canonical.com>
4# Natalia B. Bidart <nataliabidart@canonical.com>
5# Eric Casteleijn <eric.casteleijn@canonical.com>
6#
7# Copyright 2011 Canonical Ltd.
8#
9# This program is free software: you can redistribute it and/or modify it
10# under the terms of the GNU General Public License version 3, as published
11# by the Free Software Foundation.
12#
13# This program is distributed in the hope that it will be useful, but
14# WITHOUT ANY WARRANTY; without even the implied warranties of
15# MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
16# PURPOSE. See the GNU General Public License for more details.
17#
18# You should have received a copy of the GNU General Public License along
19# with this program. If not, see <http://www.gnu.org/licenses/>.
20
21"""Tests for the control panel backend DBus service."""
22
23import dbus
24import mocker
25
26from dbus.mainloop.glib import DBusGMainLoop
27from twisted.internet import defer
28
29from ubuntuone.controlpanel.gui.gtk import gui
30from ubuntuone.devtools.testcases.dbus import DBusTestCase
31from twisted.trial.unittest import TestCase
32
33
34class MockWindow(object):
35 """A mock backend."""
36
37 exception = None
38
39 def __init__(self, switch_to=None, alert=False):
40 self.called = []
41
42 def draw_attention(self):
43 """Draw attention to the control panel."""
44 self.called.append('draw_attention')
45
46 def switch_to(self, panel):
47 """Switch to named panel."""
48 self.called.append(('switch_to', panel))
49
50
51class DBusServiceMockTestCase(TestCase):
52 """Tests for the main function."""
53
54 @defer.inlineCallbacks
55 def setUp(self):
56 yield super(DBusServiceMockTestCase, self).setUp()
57 self.mocker = mocker.Mocker()
58
59 @defer.inlineCallbacks
60 def tearDown(self):
61 yield super(DBusServiceMockTestCase, self).tearDown()
62 self.mocker.restore()
63 self.mocker.verify()
64
65 def test_dbus_service_main(self):
66 """The main method starts the loop and hooks up to DBus."""
67 self.patch(gui, 'ControlPanelWindow', MockWindow)
68 dbus_gmain_loop = self.mocker.replace(
69 "dbus.mainloop.glib.DBusGMainLoop")
70 register_service = self.mocker.replace(
71 "ubuntuone.controlpanel.gui.gtk.gui.register_service")
72 publish_service = self.mocker.replace(
73 "ubuntuone.controlpanel.gui.gtk.gui.publish_service")
74 main = self.mocker.replace("gtk.main")
75 dbus_gmain_loop(set_as_default=True)
76 loop = self.mocker.mock()
77 self.mocker.result(loop)
78 register_service(mocker.ANY)
79 self.mocker.result(True)
80 publish_service(switch_to='', alert=False)
81 main()
82 self.mocker.replay()
83 gui.main()
84
85
86class DBusServiceTestCase(DBusTestCase):
87 """Test for the DBus service."""
88
89 def _set_called(self, *args, **kwargs):
90 """Keep track of function calls, useful for monkeypatching."""
91 self._called = (args, kwargs)
92
93 @defer.inlineCallbacks
94 def setUp(self):
95 """Initialize each test run."""
96 yield super(DBusServiceTestCase, self).setUp()
97 DBusGMainLoop(set_as_default=True)
98 self._called = False
99
100 def test_register_service(self):
101 """The DBus service is successfully registered."""
102 bus = dbus.SessionBus()
103 ret = gui.register_service(bus)
104 self.assertTrue(ret)
1050
=== modified file 'ubuntuone/controlpanel/gui/__init__.py'
--- ubuntuone/controlpanel/gui/__init__.py 2012-02-17 16:03:00 +0000
+++ ubuntuone/controlpanel/gui/__init__.py 2012-03-06 15:41:39 +0000
@@ -1,5 +1,5 @@
1# -*- coding: utf-8 -*-1# -*- coding: utf-8 -*-
22#
3# Copyright 2011-2012 Canonical Ltd.3# Copyright 2011-2012 Canonical Ltd.
4#4#
5# This program is free software: you can redistribute it and/or modify it5# This program is free software: you can redistribute it and/or modify it
@@ -18,10 +18,11 @@
1818
19import gettext19import gettext
2020
21from ubuntuone.controlpanel import TRANSLATION_DOMAIN
21from ubuntuone.controlpanel.backend import UBUNTUONE_LINK22from ubuntuone.controlpanel.backend import UBUNTUONE_LINK
2223
2324
24_ = gettext.gettext25gettext.install(TRANSLATION_DOMAIN, unicode=True)
2526
2627
27ERROR_COLOR = u'red'28ERROR_COLOR = u'red'
@@ -72,13 +73,17 @@
72RESET_PASSWORD_LINK = EDIT_PROFILE_LINK + u'+forgot_password'73RESET_PASSWORD_LINK = EDIT_PROFILE_LINK + u'+forgot_password'
73TWITTER_LINK = u'http://twitter.com/ubuntuone/'74TWITTER_LINK = u'http://twitter.com/ubuntuone/'
7475
76# Undefined variable '_', pylint: disable=E0602
77# Translatable strings
78
79ACCOUNT_LABEL = _('Your services')
75ALWAYS_SUBSCRIBED = _('Always in sync')80ALWAYS_SUBSCRIBED = _('Always in sync')
76CONNECT_BUTTON_LABEL = _('Connect to Ubuntu One')81CONNECT_BUTTON_LABEL = _('Connect to Ubuntu One')
77CONTACTS = _('Thunderbird plug-in')82CONTACTS = _('Thunderbird plug-in')
78CREDENTIALS_ERROR = _('There was a problem while retrieving the credentials.')83CREDENTIALS_ERROR = _('There was a problem while retrieving the credentials.')
79DASHBOARD_BUTTON_TOOLTIP = _('View your personal details and service '84DASHBOARD_BUTTON_TOOLTIP = _('View your personal details and service '
80 'summary')85 'summary')
81DASHBOARD_TITLE = _('Welcome to Ubuntu One!')86DASHBOARD_TITLE = WELCOME_LABEL = _('Welcome to Ubuntu One!')
82DASHBOARD_VALUE_ERROR = _('The information could not be retrieved. '87DASHBOARD_VALUE_ERROR = _('The information could not be retrieved. '
83 'Maybe your internet connection is down?')88 'Maybe your internet connection is down?')
84DESKTOPCOUCH_PKG = 'desktopcouch-ubuntuone'89DESKTOPCOUCH_PKG = 'desktopcouch-ubuntuone'
@@ -90,9 +95,13 @@
90DEVICE_REMOVAL_ERROR = _('The device could not be removed.')95DEVICE_REMOVAL_ERROR = _('The device could not be removed.')
91DEVICES_BUTTON_TOOLTIP = _('Manage devices registered with your personal '96DEVICES_BUTTON_TOOLTIP = _('Manage devices registered with your personal '
92 'cloud')97 'cloud')
98DEVICES_LOCAL_LABEL = _('This device')
99DEVICES_MANAGE_LABEL = _('Go to the web page to manage your other devices')
100DEVICES_REMOTE_LABEL = _('Other devices')
93DEVICES_TITLE = _('The devices connected with your personal cloud are listed '101DEVICES_TITLE = _('The devices connected with your personal cloud are listed '
94 'below.')102 'below.')
95EXPLORE = _('Explore')103EDIT_ACCOUNT_LABEL = _('Edit your services online')
104EDIT_PROFILE_LABEL = _('Edit personal details online')
96FAILED_INSTALL = _('<i>%(package_name)s</i> could not be installed')105FAILED_INSTALL = _('<i>%(package_name)s</i> could not be installed')
97FOLDER_ADD_BUTTON_TEXT = _('Sync another folder with your cloud')106FOLDER_ADD_BUTTON_TEXT = _('Sync another folder with your cloud')
98FOLDER_INVALID_PATH = _('The chosen directory "%(folder_path)s" is not valid. '107FOLDER_INVALID_PATH = _('The chosen directory "%(folder_path)s" is not valid. '
@@ -102,12 +111,18 @@
102 'cloud folder.')111 'cloud folder.')
103FOLDER_OWNED_BY = _('My personal folders')112FOLDER_OWNED_BY = _('My personal folders')
104FOLDER_SHARED_BY = _('Shared by %(other_user_display_name)s')113FOLDER_SHARED_BY = _('Shared by %(other_user_display_name)s')
114FOLDERS_BUTTON_ADD_FOLDER = _('Add a folder from this computer')
115FOLDERS_BUTTON_TOOLTIP = VOLUMES_BUTTON_TOOLTIP = _('Manage your cloud '
116 'folders')
117FOLDERS_COLUMN_EXPLORE = _('Explore')
118FOLDERS_COLUMN_NAME = _('Name')
119FOLDERS_COLUMN_SYNC_LOCALLY = _('Sync Locally?')
105FOLDERS_CONFIRM_MERGE = _('The contents of your cloud folder will be merged '120FOLDERS_CONFIRM_MERGE = _('The contents of your cloud folder will be merged '
106 'with your local folder "%(folder_path)s" when '121 'with your local folder "%(folder_path)s" when '
107 'subscribing.\nDo you want to subscribe to this '122 'subscribing.\nDo you want to subscribe to this '
108 'cloud folder?')123 'cloud folder?')
109FOLDERS_BUTTON_TOOLTIP = VOLUMES_BUTTON_TOOLTIP = _('Manage your cloud '124FOLDERS_MANAGE_LABEL = _('Go to the web for public and private sharing '
110 'folders')125 'options')
111FOLDERS_TITLE = _('Select which folders from your cloud you want to sync with '126FOLDERS_TITLE = _('Select which folders from your cloud you want to sync with '
112 'this computer')127 'this computer')
113FILE_SYNC_CONNECT = _('Connect')128FILE_SYNC_CONNECT = _('Connect')
@@ -136,18 +151,26 @@
136GENERAL_ERROR_TITLE = _('Ubuntu One experienced an error')151GENERAL_ERROR_TITLE = _('Ubuntu One experienced an error')
137GENERAL_ERROR_MSG = _('Sorry, an error has occurred and Ubuntu One '152GENERAL_ERROR_MSG = _('Sorry, an error has occurred and Ubuntu One '
138 'needs to close.')153 'needs to close.')
154GET_HELP_ONLINE = _('Get help online')
155GET_MORE_STORAGE = _('Get more storage')
139GREETING = _('Hi %(user_display_name)s')156GREETING = _('Hi %(user_display_name)s')
157INSTALL = _('Install')
140INSTALL_PACKAGE = _('You need to install the package <i>%(package_name)s'158INSTALL_PACKAGE = _('You need to install the package <i>%(package_name)s'
141 '</i> in order to enable more sync services.')159 '</i> in order to enable more sync services.')
142INSTALL_PLUGIN = _('Install the %(plugin_name)s for the sync service: '160INSTALL_PLUGIN = _('Install the %(plugin_name)s for the sync service: '
143 '%(service_name)s')161 '%(service_name)s')
144INSTALLING = _('Installation of <i>%(package_name)s</i> in progress')162INSTALLING = _('Installation of <i>%(package_name)s</i> in progress')
145LOADING = _('Loading...')163LOADING = _('Loading...')
164LOADING_OVERLAY = _('Getting information, please wait...')
165MAIN_ACCOUNT_TAB = _('Account information')
166MAIN_DEVICES_TAB = _('Devices')
167MAIN_FOLDERS_TAB = _('Folders')
168MAIN_PREFERENCES_TAB = _('Settings')
146MAIN_WINDOW_TITLE = _('%(app_name)s Control Panel')169MAIN_WINDOW_TITLE = _('%(app_name)s Control Panel')
170MUSIC_DISPLAY_NAME = _('Purchased Music')
171MUSIC_REAL_PATH = '.ubuntuone/Purchased from Ubuntu One'
147MY_FOLDERS = _('My folders')172MY_FOLDERS = _('My folders')
148NAME_NOT_SET = _('[unknown user name]')173NAME_NOT_SET = _('[unknown user name]')
149MUSIC_DISPLAY_NAME = _('Purchased Music')
150MUSIC_REAL_PATH = '.ubuntuone/Purchased from Ubuntu One'
151NETWORK_OFFLINE = _('An internet connection is required to join or sign '174NETWORK_OFFLINE = _('An internet connection is required to join or sign '
152 'in to %(app_name)s.')175 'in to %(app_name)s.')
153NO_DEVICES = _('No devices to show.')176NO_DEVICES = _('No devices to show.')
@@ -155,18 +178,42 @@
155NO_PAIRING_RECORD = _('There is no Ubuntu One pairing record.')178NO_PAIRING_RECORD = _('There is no Ubuntu One pairing record.')
156PERCENTAGE_LABEL = _('%(percentage)s used')179PERCENTAGE_LABEL = _('%(percentage)s used')
157PLEASE_WAIT = _('Please wait')180PLEASE_WAIT = _('Please wait')
181PROFILE_LABEL = _('Personal details')
158QUOTA_LABEL = _('Using %(used)s of %(total)s (%(percentage).0f%%)')182QUOTA_LABEL = _('Using %(used)s of %(total)s (%(percentage).0f%%)')
159USAGE_LABEL = _('%(used)s of %(total)s')183REMOVE_BUTTON = _('Remove')
184RESTORE_LABEL = _('Restore')
185SELECT_FOLDERS = _('Select sync folders')
160SERVICES_BUTTON_TOOLTIP = _('Manage the sync services')186SERVICES_BUTTON_TOOLTIP = _('Manage the sync services')
161SERVICES_TITLE = _('Enable the sync services for this computer.')187SERVICES_TITLE = _('Enable the sync services for this computer.')
188SETTINGS_ALLOW_NOTIFICATIONS = _('Allow all notifications to this device')
189SETTINGS_AUTO_CONNECT = _('Connect automatically when computer starts')
190SETTINGS_BANDWIDTH = _('Bandwidth Settings')
191SETTINGS_BANDWIDTH_ZERO_WARNING = _('Please note that your files will not '
192 'sync if you set bandwidth to 0')
193SETTINGS_BUTTON_APPLY = _('Apply these settings')
194SETTINGS_BUTTON_DEFAULT = _('Default settings')
162SETTINGS_CHANGE_ERROR = _('The settings could not be changed,\n'195SETTINGS_CHANGE_ERROR = _('The settings could not be changed,\n'
163 'previous values were restored.')196 'previous values were restored.')
197SETTINGS_FILE_SYNC = _('File Sync Settings')
198SETTINGS_KILOBITS_PER_SECOND = _('Kilobits per second')
199SETTINGS_LIMIT_DOWNLOAD = _('Limit download speed to')
200SETTINGS_LIMIT_UPLOAD = _('Limit upload speed to')
201SETTINGS_SYNC_ALL_FOLDERS = _('Automatically sync all new cloud folders '
202 'to this computer')
203SETTINGS_SYNC_ALL_SHARES = _('Automatically sync all folders shared with me '
204 'to this computer')
164SHARES_BUTTON_TOOLTIP = _('Manage the shares offered to others')205SHARES_BUTTON_TOOLTIP = _('Manage the shares offered to others')
165SHARES_TITLE = _('Manage permissions for shares made to other users.')206SHARES_TITLE = _('Manage permissions for shares made to other users.')
207SIGN_IN = _('Sign in')
166SUCCESS_INSTALL = _('<i>%(package_name)s</i> was successfully installed')208SUCCESS_INSTALL = _('<i>%(package_name)s</i> was successfully installed')
167SYNC_LOCALLY = _('Sync locally?')209SYNC_STREAM_SHARE = _('Sync, stream, share')
210TALK_TO_US = _('Talk to us')
168VALUE_ERROR = _('Value could not be retrieved.')211VALUE_ERROR = _('Value could not be retrieved.')
169UNKNOWN_ERROR = _('Unknown error')212UNKNOWN_ERROR = _('Unknown error')
213USAGE_LABEL = _('%(used)s of %(total)s')
214QUIT_LABEL = _('Quit Ubuntu One')
215
216# pylint: enable=E0602
170217
171218
172def humanize(int_bytes):219def humanize(int_bytes):
173220
=== removed directory 'ubuntuone/controlpanel/gui/gtk'
=== removed file 'ubuntuone/controlpanel/gui/gtk/__init__.py'
--- ubuntuone/controlpanel/gui/gtk/__init__.py 2011-05-24 14:20:18 +0000
+++ ubuntuone/controlpanel/gui/gtk/__init__.py 1970-01-01 00:00:00 +0000
@@ -1,28 +0,0 @@
1# -*- coding: utf-8 -*-
2
3# Authors: Natalia B Bidart <natalia.bidart@canonical.com>
4#
5# Copyright 2010 Canonical Ltd.
6#
7# This program is free software: you can redistribute it and/or modify it
8# under the terms of the GNU General Public License version 3, as published
9# by the Free Software Foundation.
10#
11# This program is distributed in the hope that it will be useful, but
12# WITHOUT ANY WARRANTY; without even the implied warranties of
13# MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
14# PURPOSE. See the GNU General Public License for more details.
15#
16# You should have received a copy of the GNU General Public License along
17# with this program. If not, see <http://www.gnu.org/licenses/>.
18
19"""The GTK graphical interface for the control panel for Ubuntu One."""
20
21DBUS_BUS_NAME = 'com.ubuntuone.controlpanel.gui'
22DBUS_PATH = '/gui'
23DBUS_IFACE_GUI = 'com.ubuntuone.controlpanel.gui'
24
25# Unused import main
26# pylint: disable=W0611
27
28from ubuntuone.controlpanel.gui.gtk.gui import main
290
=== removed file 'ubuntuone/controlpanel/gui/gtk/gui.py'
--- ubuntuone/controlpanel/gui/gtk/gui.py 2012-02-06 21:02:54 +0000
+++ ubuntuone/controlpanel/gui/gtk/gui.py 1970-01-01 00:00:00 +0000
@@ -1,1667 +0,0 @@
1# -*- coding: utf-8 -*-
2
3# Authors: Natalia B Bidart <natalia.bidart@canonical.com>
4# Eric Casteleijn <eric.casteleijn@canonical.com>
5#
6# Copyright 2010 Canonical Ltd.
7#
8# This program is free software: you can redistribute it and/or modify it
9# under the terms of the GNU General Public License version 3, as published
10# by the Free Software Foundation.
11#
12# This program is distributed in the hope that it will be useful, but
13# WITHOUT ANY WARRANTY; without even the implied warranties of
14# MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
15# PURPOSE. See the GNU General Public License for more details.
16#
17# You should have received a copy of the GNU General Public License along
18# with this program. If not, see <http://www.gnu.org/licenses/>.
19
20"""The user interface for the control panel for Ubuntu One."""
21
22from __future__ import division
23
24import os
25
26from functools import wraps
27
28import dbus
29import gtk
30import gobject
31
32from dbus.mainloop.glib import DBusGMainLoop
33from ubuntu_sso import networkstate
34# pylint: disable=E0611,F0401
35from ubuntuone.platform.credentials import (
36 APP_NAME as U1_APP_NAME,
37 CredentialsManagementTool,
38)
39# pylint: enable=E0611,F0401
40
41# Wildcard import ubuntuone.controlpanel.gui
42# pylint: disable=W0401, W0614
43from ubuntuone.controlpanel.gui import *
44# pylint: enable=W0401, W0614
45from ubuntuone.controlpanel.gui.gtk import (
46 DBUS_IFACE_GUI, DBUS_BUS_NAME as DBUS_BUS_NAME_GUI,
47 DBUS_PATH as DBUS_PATH_GUI, package_manager)
48from ubuntuone.controlpanel.gui.gtk.widgets import LabelLoading, PanelTitle
49# Use ubiquity package when ready (LP: #673665)
50from ubuntuone.controlpanel.gui.gtk.widgets import GreyableBin
51
52from ubuntuone.controlpanel import (DBUS_BUS_NAME, DBUS_PREFERENCES_PATH,
53 DBUS_PREFERENCES_IFACE, TRANSLATION_DOMAIN, backend)
54from ubuntuone.controlpanel.backend import (DEVICE_TYPE_PHONE,
55 DEVICE_TYPE_COMPUTER)
56from ubuntuone.controlpanel.dbus_service import bool_str
57from ubuntuone.controlpanel.logger import setup_logging, log_call
58from ubuntuone.controlpanel.utils import (get_data_file,
59 ERROR_TYPE, ERROR_MESSAGE)
60
61
62try:
63 from gi.repository import Unity # pylint: disable=E0611
64 USE_LIBUNITY = True
65 U1_DOTDESKTOP = "ubuntuone-installer.desktop"
66except ImportError:
67 USE_LIBUNITY = False
68
69logger = setup_logging('gtk.gui')
70
71
72WARNING_MARKUP = '<span foreground="%s"><b>%%s</b></span>' % ERROR_COLOR
73
74CP_WMCLASS_NAME = 'ubuntuone-control-panel-gtk'
75CP_WMCLASS_CLASS = 'ubuntuone-installer'
76
77
78def error_handler(*args, **kwargs):
79 """Log errors when calling D-Bus methods in a async way."""
80 logger.error('Error handler received: %r, %r', args, kwargs)
81
82
83def register_service(bus):
84 """Try to register DBus service for making sure we run only one instance.
85
86 Return True if succesfully registered, False if already running.
87 """
88 name = bus.request_name(DBUS_BUS_NAME_GUI,
89 dbus.bus.NAME_FLAG_DO_NOT_QUEUE)
90 return name != dbus.bus.REQUEST_NAME_REPLY_EXISTS
91
92
93def publish_service(window=None, switch_to='', alert=False):
94 """Publish the service on DBus."""
95 if window is None:
96 window = ControlPanelWindow(switch_to=switch_to, alert=alert)
97 return ControlPanelService(window)
98
99
100def main(switch_to='', alert=False):
101 """Hook the DBus listeners and start the main loop."""
102 DBusGMainLoop(set_as_default=True)
103 bus = dbus.SessionBus()
104 if register_service(bus):
105 publish_service(switch_to=switch_to, alert=alert)
106 else:
107 obj = bus.get_object(DBUS_BUS_NAME_GUI, DBUS_PATH_GUI)
108 service = dbus.Interface(obj, dbus_interface=DBUS_IFACE_GUI)
109
110 def gui_error_handler(*args, **kwargs):
111 """Log errors when calling D-Bus methods in a async way."""
112 logger.error('Error handler received: %r, %r', args, kwargs)
113 gtk.main_quit()
114
115 def gui_reply_handler(*args, **kwargs):
116 """Exit when done."""
117 gtk.main_quit()
118
119 service.switch_to_alert(
120 switch_to, alert, reply_handler=gui_reply_handler,
121 error_handler=gui_error_handler)
122
123 gtk.main()
124
125
126def on_size_allocate(widget, allocation, label):
127 """Resize labels according to who 'widget' is being resized."""
128 label.set_size_request(allocation.width - 2, -1)
129
130
131@log_call(logger.debug)
132def uri_hook(button, uri, *args, **kwargs):
133 """Open an URI or do nothing if URI is not an URL."""
134 if uri.startswith('http') or uri.startswith(FILE_URI_PREFIX):
135 gtk.show_uri(None, uri, gtk.gdk.CURRENT_TIME)
136
137
138class ControlPanelMixin(object):
139 """A basic mixin class to provide common functionality to widgets."""
140
141 def __init__(self, filename=None, backend_instance=None):
142 if backend_instance is not None:
143 self.backend = backend_instance
144 else:
145 bus = dbus.SessionBus()
146 try:
147 obj = bus.get_object(DBUS_BUS_NAME,
148 DBUS_PREFERENCES_PATH,
149 follow_name_owner_changes=True)
150 iface = DBUS_PREFERENCES_IFACE
151 self.backend = dbus.Interface(obj, dbus_interface=iface)
152 except dbus.exceptions.DBusException:
153 logger.exception('Can not connect to DBus at %r',
154 (DBUS_BUS_NAME, DBUS_PREFERENCES_PATH))
155 raise
156
157 if filename is not None:
158 builder = gtk.Builder()
159 builder.set_translation_domain(TRANSLATION_DOMAIN)
160 builder.add_from_file(get_data_file(os.path.join('gtk', filename)))
161 builder.connect_signals(self)
162
163 # untested directly
164 for obj in builder.get_objects():
165 name = getattr(obj, 'name', None)
166 if name is None and isinstance(obj, gtk.Buildable):
167 # work around bug lp:507739
168 name = gtk.Buildable.get_name(obj)
169 if name is None:
170 logger.warning("%s has no name (??)", obj)
171 else:
172 setattr(self, name, obj)
173
174 logger.debug('%s: started.', self.__class__.__name__)
175
176 def _set_warning(self, message, label):
177 """Set 'message' as warning in 'label'."""
178 label.set_markup(WARNING_MARKUP % message)
179 label.show()
180
181 def destroy(self):
182 """Cleanup."""
183
184
185class UbuntuOneBin(gtk.VBox):
186 """A Ubuntu One bin."""
187
188 TITLE = ''
189
190 def __init__(self, title=None):
191 gtk.VBox.__init__(self)
192 self._is_processing = False
193
194 if title is None:
195 title = self.TITLE
196
197 title = '<span font_size="large">%s</span>' % title
198 self.title = PanelTitle(markup=title)
199 self.pack_start(self.title, expand=False)
200
201 self.message = LabelLoading(LOADING)
202 self.pack_start(self.message, expand=False)
203
204 self.connect('size-allocate', on_size_allocate, self.title)
205 self.show_all()
206
207 def _get_is_processing(self):
208 """Is this panel processing a request?"""
209 return self._is_processing
210
211 def _set_is_processing(self, new_value):
212 """Set if this panel is processing a request."""
213 if new_value:
214 self.message.start()
215 self.set_sensitive(False)
216 else:
217 self.message.stop()
218 self.set_sensitive(True)
219
220 self._is_processing = new_value
221
222 is_processing = property(fget=_get_is_processing, fset=_set_is_processing)
223
224 @log_call(logger.debug)
225 def on_success(self, message=''):
226 """Use this callback to stop the Loading and show 'message'."""
227 self.message.stop()
228 self.message.set_markup(message)
229
230 @log_call(logger.error)
231 def on_error(self, message=None, error_dict=None):
232 """Use this callback to stop the Loading and set a warning message."""
233 if message is None and error_dict is None:
234 message = VALUE_ERROR
235 elif message is None and error_dict is not None:
236 error_type = error_dict.get(ERROR_TYPE, UNKNOWN_ERROR)
237 error_msg = error_dict.get(ERROR_MESSAGE)
238 if error_msg:
239 message = "%s (%s: %s)" % (VALUE_ERROR, error_type, error_msg)
240 else:
241 message = "%s (%s)" % (VALUE_ERROR, error_type)
242
243 assert message is not None
244
245 self.message.stop()
246 self.message.set_markup(WARNING_MARKUP % message)
247
248
249class OverviewPanel(GreyableBin, ControlPanelMixin):
250 """The overview panel. Introduces Ubuntu One to the not logged user."""
251
252 __gsignals__ = {
253 'credentials-found': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE,
254 (gobject.TYPE_BOOLEAN,)),
255 }
256
257 def __init__(self, main_window):
258 GreyableBin.__init__(self)
259 creds_backend = CredentialsManagementTool()
260 ControlPanelMixin.__init__(self, filename='overview.ui',
261 backend_instance=creds_backend)
262 self.add(self.itself)
263 self.banner.set_from_file(get_data_file(OVERVIEW_BANNER))
264 self.files_icon.set_from_file(get_data_file(FILES_ICON))
265 self.music_stream_icon.set_from_file(get_data_file(MUSIC_STREAM_ICON))
266 self.contacts_icon.set_from_file(get_data_file(CONTACTS_ICON))
267 self.notes_icon.set_from_file(get_data_file(NOTES_ICON))
268
269 self.warning_label.set_text('')
270 self.warning_label.set_property('xalign', 0.5)
271
272 self.connect_button.set_uri(CONNECT_BUTTON_LABEL)
273
274 self.main_window = main_window
275 self._credentials_are_new = False
276 self.show()
277
278 kw = dict(result_cb=self.on_network_state_changed)
279 self.network_manager_state = networkstate.NetworkManagerState(**kw)
280 self.network_manager_state.find_online_state()
281
282 def _set_warning(self, message, label=None):
283 """Set 'message' as global warning."""
284 ControlPanelMixin._set_warning(self, message,
285 label=self.warning_label)
286
287 def _window_xid(self):
288 """Return settings for credentials backend."""
289 if self.main_window.window is not None:
290 settings = {'window_id': str(self.main_window.window.xid)}
291 else:
292 settings = {}
293 return settings
294
295 def set_property(self, prop_name, new_value):
296 """Override 'set_property' to disable buttons if prop is 'greyed'."""
297 if prop_name == 'greyed':
298 self.set_sensitive(not new_value)
299 GreyableBin.set_property(self, prop_name, new_value)
300
301 def set_sensitive(self, value):
302 """Set the sensitiveness as per 'value'."""
303 self.join_now_button.set_sensitive(value)
304 self.connect_button.set_sensitive(value)
305
306 def get_sensitive(self):
307 """Return the sensitiveness."""
308 result = self.join_now_button.get_sensitive() and \
309 self.connect_button.get_sensitive()
310 return result
311
312 def on_join_now_button_clicked(self, *a, **kw):
313 """User wants to join now."""
314 d = self.backend.register(**self._window_xid())
315 d.addCallback(self.on_credentials_result)
316 d.addErrback(self.on_credentials_error)
317 self.set_property('greyed', True)
318 self.warning_label.set_text('')
319
320 def on_connect_button_clicked(self, *a, **kw):
321 """User wants to connect now."""
322 d = self.backend.login(**self._window_xid())
323 d.addCallback(self.on_credentials_result)
324 d.addErrback(self.on_credentials_error)
325 self.set_property('greyed', True)
326 self.warning_label.set_text('')
327
328 def on_learn_more_button_clicked(self, *a, **kw):
329 """User wants to learn more."""
330 uri_hook(self.learn_more_button, LEARN_MORE_LINK)
331
332 def on_credentials_result(self, result):
333 """Process the credentials response.
334
335 If 'result' is a non empty dict, they were found.
336 If 'result' is an empty dict, they were not found.
337 If 'result' is None, the user cancelled the process.
338
339 """
340 if result is None:
341 self.on_authorization_denied()
342 elif result == {}:
343 self.on_credentials_not_found()
344 else:
345 self.on_credentials_found(result)
346
347 @log_call(logger.info, with_args=False)
348 def on_credentials_found(self, credentials):
349 """Credentials backend notifies of credentials found."""
350 self.set_property('greyed', False)
351 self.emit('credentials-found', self._credentials_are_new)
352
353 @log_call(logger.info)
354 def on_credentials_not_found(self):
355 """Creds backend notifies of credentials not found."""
356 self._credentials_are_new = True
357 self.set_property('greyed', False)
358
359 @log_call(logger.error)
360 def on_credentials_error(self, error_dict):
361 """Creds backend notifies of an error when fetching credentials."""
362 self.set_property('greyed', False)
363 self._set_warning(CREDENTIALS_ERROR)
364
365 @log_call(logger.info)
366 def on_authorization_denied(self):
367 """Creds backend notifies that user refused auth for 'app_name'."""
368 self.set_property('greyed', False)
369
370 @log_call(logger.info)
371 def on_network_state_changed(self, state):
372 """Network state is reported."""
373 msg = ''
374 if state is networkstate.OFFLINE:
375 msg = NETWORK_OFFLINE % {'app_name': U1_APP_NAME}
376 self.set_sensitive(False)
377 self._set_warning(msg)
378 else:
379 self.set_sensitive(True)
380 self.warning_label.set_text(msg)
381 d = self.backend.find_credentials()
382 d.addCallback(self.on_credentials_result)
383 d.addErrback(self.on_credentials_error)
384
385
386class DashboardPanel(UbuntuOneBin, ControlPanelMixin):
387 """The dashboard panel. The user can manage the subscription."""
388
389 TITLE = DASHBOARD_TITLE
390 VALUE_ERROR = DASHBOARD_VALUE_ERROR
391
392 def __init__(self, main_window=None):
393 UbuntuOneBin.__init__(self)
394 ControlPanelMixin.__init__(self, filename='dashboard.ui')
395 self.add(self.itself)
396 self.show()
397
398 self.is_processing = True
399
400 self.backend.connect_to_signal('AccountInfoReady',
401 self.on_account_info_ready)
402 self.backend.connect_to_signal('AccountInfoError',
403 self.on_account_info_error)
404 self.account.hide()
405
406 @log_call(logger.debug)
407 def on_account_info_ready(self, info):
408 """Backend notifies of account info."""
409 self.on_success()
410
411 for i in (u'name', u'type', u'email'):
412 label = getattr(self, '%s_label' % i)
413 label.set_markup('%s' % (info[i]))
414 self.account.show()
415
416 self.is_processing = False
417
418 @log_call(logger.error)
419 def on_account_info_error(self, error_dict=None):
420 """Backend notifies of an error when fetching account info."""
421 self.on_error(message=self.VALUE_ERROR)
422 self.is_processing = False
423
424
425class VolumesPanel(UbuntuOneBin, ControlPanelMixin):
426 """The volumes panel."""
427
428 TITLE = FOLDERS_TITLE
429 MAX_COLS = 8
430 FREE_SPACE = '<span foreground="grey">%s</span>' % FREE_SPACE_TEXT
431 NO_FREE_SPACE = '<span foreground="red"><b>%s</b></span>' % FREE_SPACE_TEXT
432 ROW_HEADER = '<span font_size="large"><b>%s</b></span> %s'
433 ROOT = '%s - <span foreground="%s" font_size="small">%s</span>'
434
435 def __init__(self, main_window=None):
436 UbuntuOneBin.__init__(self)
437 ControlPanelMixin.__init__(self, filename='volumes.ui')
438 self.add(self.itself)
439 self.show_all()
440
441 kw = dict(parent=main_window,
442 flags=gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT,
443 type=gtk.MESSAGE_WARNING,
444 buttons=gtk.BUTTONS_YES_NO)
445 self.confirm_dialog = gtk.MessageDialog(**kw)
446
447 # name, subscribed, icon name, show toggle, sensitive, icon size,
448 # id, path
449 self._empty_row = ('', False, '', False, False, gtk.ICON_SIZE_MENU,
450 None, None)
451
452 self.backend.connect_to_signal('VolumesInfoReady',
453 self.on_volumes_info_ready)
454 self.backend.connect_to_signal('VolumesInfoError',
455 self.on_volumes_info_error)
456 self.backend.connect_to_signal('VolumeSettingsChanged',
457 self.on_volume_settings_changed)
458 self.backend.connect_to_signal('VolumeSettingsChangeError',
459 self.on_volume_settings_change_error)
460
461 def _process_name(self, name):
462 """Tweak 'name' with a translatable music folder name."""
463 if name == MUSIC_REAL_PATH:
464 result = MUSIC_DISPLAY_NAME
465 else:
466 result = name
467 return result
468
469 def on_volumes_info_ready(self, info):
470 """Backend notifies of volumes info."""
471
472 self.volumes_store.clear()
473 if not info:
474 self.on_success(NO_FOLDERS)
475 return
476 else:
477 self.on_success()
478
479 for name, free_bytes, volumes in info:
480 if backend.ControlBackend.NAME_NOT_SET in name:
481 name = NAME_NOT_SET
482
483 if name:
484 name = name + "'s"
485 # we already added user folders, let's add an empty row
486 treeiter = self.volumes_store.append(None, self._empty_row)
487 else:
488 name = MY_FOLDERS
489
490 scroll_to_cell = False
491 if free_bytes == backend.ControlBackend.FREE_BYTES_NOT_AVAILABLE:
492 free_bytes = ''
493 else:
494 free_bytes = int(free_bytes)
495 if free_bytes < SHARES_MIN_SIZE_FULL:
496 free_bytes_str = self.NO_FREE_SPACE
497 scroll_to_cell = True
498 else:
499 free_bytes_str = self.FREE_SPACE
500 free_bytes_args = {'free_space': humanize(free_bytes)}
501 free_bytes = free_bytes_str % free_bytes_args
502
503 row = (self.ROW_HEADER % (name, free_bytes),
504 True, CONTACT_ICON_NAME, False, False,
505 gtk.ICON_SIZE_LARGE_TOOLBAR, None, None)
506 treeiter = self.volumes_store.append(None, row)
507
508 if scroll_to_cell:
509 path = self.volumes_store.get_string_from_iter(treeiter)
510 self.volumes_view.scroll_to_cell(path)
511
512 for volume in volumes:
513 sensitive = True
514 name = self._process_name(volume[u'display_name'])
515 icon_name = FOLDER_ICON_NAME
516
517 is_root = volume[u'type'] == backend.ControlBackend.ROOT_TYPE
518 is_share = volume[u'type'] == backend.ControlBackend.SHARE_TYPE
519
520 if is_root:
521 sensitive = False
522 name = self.ROOT % (name, ORANGE, ALWAYS_SUBSCRIBED)
523 elif is_share:
524 icon_name = SHARE_ICON_NAME
525 elif name == MUSIC_DISPLAY_NAME:
526 icon_name = MUSIC_ICON_NAME
527
528 if volume[u'path'] is None:
529 logger.warning('on_volumes_info_ready: about to store a '
530 'volume with None path: %r', volume)
531
532 row = (name, bool(volume[u'subscribed']), icon_name, True,
533 sensitive, gtk.ICON_SIZE_MENU, volume['volume_id'],
534 volume[u'path'])
535
536 if is_root: # root should go first!
537 self.volumes_store.prepend(treeiter, row)
538 else:
539 self.volumes_store.append(treeiter, row)
540
541 self.volumes_view.expand_all()
542 self.volumes_view.show_all()
543
544 self.is_processing = False
545
546 @log_call(logger.error)
547 def on_volumes_info_error(self, error_dict=None):
548 """Backend notifies of an error when fetching volumes info."""
549 self.on_error(error_dict=error_dict)
550
551 @log_call(logger.info)
552 def on_volume_settings_changed(self, volume_id):
553 """The settings for 'volume_id' were changed."""
554 self.is_processing = False
555
556 @log_call(logger.error)
557 def on_volume_settings_change_error(self, volume_id, error_dict=None):
558 """The settings for 'volume_id' were not changed."""
559 self.load()
560
561 def on_subscribed_toggled(self, widget, path, *args, **kwargs):
562 """The user toggled 'widget'."""
563 treeiter = self.volumes_store.get_iter(path)
564 volume_id = self.volumes_store.get_value(treeiter, 6)
565 volume_path = self.volumes_store.get_value(treeiter, 7)
566 subscribed = self.volumes_store.get_value(treeiter, 1)
567
568 response = gtk.RESPONSE_YES
569 if not subscribed and os.path.exists(volume_path):
570 self.confirm_dialog.set_markup(FOLDERS_CONFIRM_MERGE %
571 {'folder_path': volume_path})
572 response = self.confirm_dialog.run()
573 self.confirm_dialog.hide()
574
575 if response == gtk.RESPONSE_YES:
576 subscribed = not subscribed
577 self.volumes_store.set_value(treeiter, 1, subscribed)
578 self.backend.change_volume_settings(volume_id,
579 {'subscribed': bool_str(subscribed)},
580 reply_handler=NO_OP, error_handler=error_handler)
581
582 self.is_processing = True
583
584 def on_volumes_view_row_activated(self, widget, path, *args, **kwargs):
585 """The user double clicked on a row."""
586 treeiter = self.volumes_store.get_iter(path)
587 volume_path = self.volumes_store.get_value(treeiter, 7)
588 if volume_path is None:
589 logger.warning('on_volumes_view_row_activated: volume_path for '
590 'tree_path %r is None', path)
591 elif not os.path.exists(volume_path):
592 logger.warning('on_volumes_view_row_activated: path %r '
593 'does not exist', volume_path)
594 else:
595 uri_hook(None, FILE_URI_PREFIX + volume_path)
596
597 def load(self):
598 """Load the volume list."""
599 self.backend.volumes_info(reply_handler=NO_OP,
600 error_handler=error_handler)
601 self.is_processing = True
602
603
604class SharesPanel(UbuntuOneBin, ControlPanelMixin):
605 """The shares panel - NOT IMPLEMENTED YET."""
606
607 TITLE = SHARES_TITLE
608
609 def __init__(self, main_window=None):
610 UbuntuOneBin.__init__(self)
611 ControlPanelMixin.__init__(self)
612 self.show_all()
613 self.on_success('Not implemented yet.')
614
615
616class Device(gtk.EventBox, ControlPanelMixin):
617 """The device widget."""
618
619 def __init__(self, confirm_remove_dialog=None):
620 gtk.EventBox.__init__(self)
621 ControlPanelMixin.__init__(self, filename='device.ui')
622
623 self.confirm_dialog = confirm_remove_dialog
624 self._updating = False
625 self._last_settings = {}
626 self.id = None
627 self.is_local = False
628 self.configurable = False
629
630 self.update(device_id=None, device_name='',
631 is_local=False, configurable=False, limit_bandwidth=False,
632 max_upload_speed=0, max_download_speed=0,
633 show_all_notifications=True)
634
635 self.add(self.itself)
636 self.show()
637
638 self.backend.connect_to_signal('DeviceSettingsChanged',
639 self.on_device_settings_changed)
640 self.backend.connect_to_signal('DeviceSettingsChangeError',
641 self.on_device_settings_change_error)
642 self.backend.connect_to_signal('DeviceRemoved',
643 self.on_device_removed)
644 self.backend.connect_to_signal('DeviceRemovalError',
645 self.on_device_removal_error)
646
647 def _change_device_settings(self, *args):
648 """Update backend settings for this device."""
649 if self._updating:
650 return
651
652 # Not disabling the GUI to avoid annyong twitchings
653 #self.set_sensitive(False)
654 self.warning_label.set_text('')
655 self.backend.change_device_settings(self.id, self.__dict__,
656 reply_handler=NO_OP, error_handler=error_handler)
657
658 def _block_signals(f):
659 """Execute 'f' while having the _updating flag set."""
660
661 # pylint: disable=E0213,W0212,E1102
662
663 @wraps(f)
664 def inner(self, *args, **kwargs):
665 """Execute 'f' while having the _updating flag set."""
666 old = self._updating
667 self._updating = True
668
669 result = f(self, *args, **kwargs)
670
671 self._updating = old
672 return result
673
674 return inner
675
676 on_show_all_notifications_toggled = _change_device_settings
677 on_max_upload_speed_value_changed = _change_device_settings
678 on_max_download_speed_value_changed = _change_device_settings
679
680 def on_limit_bandwidth_toggled(self, *args, **kwargs):
681 """The limit bandwidth checkbox was toggled."""
682 self.throttling_limits.set_sensitive(self.limit_bandwidth.get_active())
683 self._change_device_settings()
684
685 def on_remove_clicked(self, widget):
686 """Remove button was clicked or activated."""
687 response = gtk.RESPONSE_YES
688 if self.confirm_dialog is not None:
689 response = self.confirm_dialog.run()
690 self.confirm_dialog.hide()
691
692 if response == gtk.RESPONSE_YES:
693 self.backend.remove_device(self.id,
694 reply_handler=NO_OP, error_handler=error_handler)
695 self.set_sensitive(False)
696
697 @_block_signals
698 def update(self, **kwargs):
699 """Update according to named parameters.
700
701 Possible settings are:
702 * device_id (string, not shown to the user)
703 * device_name (string)
704 * type (either DEVICE_TYPE_PHONE or DEVICE_TYPE_COMPUTER)
705 * is_local (True/False)
706 * configurable (True/False)
707 * if configurable, the following can be set:
708 * show_all_notifications (True/False)
709 * limit_bandwidth (True/False)
710 * max_upload_speed (bytes)
711 * max_download_speed (bytes)
712
713 """
714 if 'device_id' in kwargs:
715 self.id = kwargs['device_id']
716
717 if 'device_name' in kwargs:
718 name = kwargs['device_name'].replace(DEVICE_REMOVABLE_PREFIX, '')
719 name = '<span font_size="large"><b>%s</b></span>' % name
720 self.device_name.set_markup(name)
721
722 if 'device_type' in kwargs:
723 dtype = kwargs['device_type']
724 if dtype in (DEVICE_TYPE_COMPUTER, DEVICE_TYPE_PHONE):
725 self.device_type.set_from_icon_name(dtype.lower(),
726 gtk.ICON_SIZE_LARGE_TOOLBAR)
727
728 if 'is_local' in kwargs:
729 self.is_local = bool(kwargs['is_local'])
730
731 if 'configurable' in kwargs:
732 self.configurable = bool(kwargs['configurable'])
733 self.config_settings.set_visible(self.configurable)
734
735 if 'show_all_notifications' in kwargs:
736 value = bool(kwargs['show_all_notifications'])
737 self.show_all_notifications.set_active(value)
738
739 if 'limit_bandwidth' in kwargs:
740 enabled = bool(kwargs['limit_bandwidth'])
741 self.limit_bandwidth.set_active(enabled)
742 self.throttling_limits.set_sensitive(enabled)
743
744 for speed in ('max_upload_speed', 'max_download_speed'):
745 if speed in kwargs:
746 value = int(kwargs[speed]) // KILOBYTES
747 getattr(self, speed).set_value(value)
748
749 self._last_settings = self.__dict__
750
751 @property
752 def __dict__(self):
753 result = {
754 'device_id': self.id,
755 'device_name': self.device_name.get_text(),
756 'device_type': self.device_type.get_icon_name()[0].capitalize(),
757 'is_local': bool_str(self.is_local),
758 'configurable': bool_str(self.configurable),
759 'show_all_notifications': \
760 bool_str(self.show_all_notifications.get_active()),
761 'limit_bandwidth': bool_str(self.limit_bandwidth.get_active()),
762 'max_upload_speed': \
763 str(self.max_upload_speed.get_value_as_int() * KILOBYTES),
764 'max_download_speed': \
765 str(self.max_download_speed.get_value_as_int() * KILOBYTES),
766 }
767 return result
768
769 @log_call(logger.info, with_args=False)
770 def on_device_settings_changed(self, device_id):
771 """The change of this device settings succeded."""
772 if device_id != self.id:
773 return
774 self.set_sensitive(True)
775 self.warning_label.set_text('')
776 self._last_settings = self.__dict__
777
778 @log_call(logger.error)
779 def on_device_settings_change_error(self, device_id, error_dict=None):
780 """The change of this device settings failed."""
781 if device_id != self.id:
782 return
783 self.update(**self._last_settings)
784 self._set_warning(DEVICE_CHANGE_ERROR, self.warning_label)
785 self.set_sensitive(True)
786
787 # is safe to log the device_id since it was already removed
788 @log_call(logger.warning)
789 def on_device_removed(self, device_id):
790 """The removal of this device succeded."""
791 if device_id != self.id:
792 return
793 self.hide()
794
795 @log_call(logger.error)
796 def on_device_removal_error(self, device_id, error_dict=None):
797 """The removal of this device failed."""
798 if device_id != self.id:
799 return
800 self._set_warning(DEVICE_REMOVAL_ERROR, self.warning_label)
801 self.set_sensitive(True)
802
803
804class DevicesPanel(UbuntuOneBin, ControlPanelMixin):
805 """The devices panel."""
806
807 __gsignals__ = {
808 'local-device-removed': (gobject.SIGNAL_RUN_FIRST,
809 gobject.TYPE_NONE, ()),
810 }
811
812 TITLE = DEVICES_TITLE
813
814 def __init__(self, main_window=None):
815 UbuntuOneBin.__init__(self)
816 ControlPanelMixin.__init__(self, filename='devices.ui')
817 self.add(self.itself)
818 self.show()
819
820 self._devices = {}
821 kw = dict(parent=main_window,
822 flags=gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT,
823 type=gtk.MESSAGE_WARNING,
824 buttons=gtk.BUTTONS_YES_NO,
825 message_format=DEVICE_CONFIRM_REMOVE)
826 self.confirm_remove_dialog = gtk.MessageDialog(**kw)
827
828 self.backend.connect_to_signal('DevicesInfoReady',
829 self.on_devices_info_ready)
830 self.backend.connect_to_signal('DevicesInfoError',
831 self.on_devices_info_error)
832 self.backend.connect_to_signal('DeviceRemoved',
833 self.on_device_removed)
834
835 @log_call(logger.info, with_args=False)
836 def on_devices_info_ready(self, info):
837 """Backend notifies of devices info."""
838 for child in self.devices.get_children():
839 self.devices.remove(child)
840
841 if not info:
842 self.on_success(NO_DEVICES)
843 else:
844 self.on_success()
845
846 # Class 'style' has no 'bg' member
847 # pylint: disable=E1101
848 odd_row_color = self.message.style.bg[gtk.STATE_NORMAL]
849 for i, device_info in enumerate(info):
850 device = Device(confirm_remove_dialog=self.confirm_remove_dialog)
851 device_info['device_name'] = device_info.pop('name', '')
852 device_info['device_type'] = device_info.pop('type',
853 DEVICE_TYPE_COMPUTER)
854 device.update(**device_info)
855
856 if i % 2 == 1:
857 device.modify_bg(gtk.STATE_NORMAL, odd_row_color)
858
859 self.devices.pack_start(device)
860 self._devices[device.id] = device
861
862 self.is_processing = False
863
864 @log_call(logger.error)
865 def on_devices_info_error(self, error_dict=None):
866 """Backend notifies of an error when fetching volumes info."""
867 self.on_error(error_dict=error_dict)
868 self.is_processing = False
869
870 @log_call(logger.warning)
871 def on_device_removed(self, device_id):
872 """The removal of a device succeded."""
873 if device_id in self._devices:
874 child = self._devices.pop(device_id)
875 self.devices.remove(child)
876
877 if child.is_local:
878 self.emit('local-device-removed')
879
880 def load(self):
881 """Load the device list."""
882 self.backend.devices_info(reply_handler=NO_OP,
883 error_handler=error_handler)
884 self.is_processing = True
885
886
887class InstallPackage(gtk.VBox, ControlPanelMixin):
888 """A widget to process the install of a package."""
889
890 __gsignals__ = {
891 'finished': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE, ()),
892 }
893
894 def __init__(self, package_name, message=None):
895 gtk.VBox.__init__(self)
896 ControlPanelMixin.__init__(self, filename='install.ui')
897 self.add(self.itself)
898
899 self.package_name = package_name
900 self.package_manager = package_manager.PackageManager()
901 self.args = {'package_name': self.package_name}
902 self.transaction = None
903
904 self.progress_bar = None
905
906 self.message = message
907 if self.message is None:
908 self.message = INSTALL_PACKAGE % self.args
909 self.reset()
910
911 self.show()
912
913 def reset(self):
914 """Reset this interface."""
915 children = self.itself.get_children()
916 if self.progress_bar in children:
917 self.itself.remove(self.progress_bar)
918 if self.install_button_box not in children:
919 self.itself.pack_start(self.install_button_box)
920 self.install_label.set_markup(self.message)
921
922 @package_manager.inline_callbacks
923 def on_install_button_clicked(self, button):
924 """The install button was clicked."""
925 try:
926 # create the install transaction
927 self.transaction = yield self.package_manager.install(
928 self.package_name)
929
930 logger.debug('on_install_button_clicked: transaction is %r',
931 self.transaction)
932 success = package_manager.aptdaemon.enums.EXIT_SUCCESS
933 if self.transaction == success:
934 self.on_install_finished(None, self.transaction)
935 return
936
937 # create the progress bar and pack it to the box
938 self.progress_bar = package_manager.PackageManagerProgressBar(
939 self.transaction)
940 self.progress_bar.show()
941
942 self.itself.remove(self.install_button_box)
943 self.itself.pack_start(self.progress_bar)
944
945 self.transaction.connect('finished', self.on_install_finished)
946 self.install_label.set_markup(INSTALLING % self.args)
947 yield self.transaction.run()
948 except package_manager.aptdaemon.errors.NotAuthorizedError:
949 self.reset()
950 except: # pylint: disable=W0702
951 logger.exception('on_install_button_clicked')
952 self._set_warning(FAILED_INSTALL % self.args,
953 self.install_label)
954 if self.progress_bar is not None:
955 self.progress_bar.hide()
956
957 @log_call(logger.info)
958 def on_install_finished(self, transaction, exit_code):
959 """The installation finished."""
960 if self.progress_bar is not None:
961 self.progress_bar.set_sensitive(False)
962
963 logger.info('on_install_finished: installation of %r was %r',
964 self.package_name, exit_code)
965 if exit_code != package_manager.aptdaemon.enums.EXIT_SUCCESS:
966 if hasattr(transaction, 'error'):
967 logger.error('transaction failed: %r', transaction.error)
968 self._set_warning(FAILED_INSTALL % self.args,
969 self.install_label)
970 else:
971 self.install_label.set_markup(SUCCESS_INSTALL % self.args)
972 self.emit('finished')
973
974
975class Service(gtk.VBox, ControlPanelMixin):
976 """A service."""
977
978 def __init__(self, service_id, name,
979 container=None, check_button=None, action_button=None,
980 *args, **kwargs):
981 gtk.VBox.__init__(self)
982 ControlPanelMixin.__init__(self)
983 self.id = service_id
984 self.container = container
985 self.check_button = check_button
986 self.action_button = action_button
987
988 self.warning_label = gtk.Label()
989 self.pack_start(self.warning_label, expand=False)
990
991 self.button = gtk.CheckButton(label=name)
992 self.pack_start(self.button, expand=False)
993
994 self.show_all()
995
996
997class FileSyncService(Service):
998 """The file sync service."""
999
1000 def __init__(self, container, check_button, action_button):
1001 Service.__init__(self, service_id='file-sync',
1002 name=FILE_SYNC_SERVICE_NAME,
1003 container=container,
1004 check_button=check_button,
1005 action_button=action_button)
1006
1007 self.container.set_sensitive(False)
1008
1009 self.backend.connect_to_signal('FileSyncStatusChanged',
1010 self.on_file_sync_status_changed)
1011 self.backend.connect_to_signal('FilesEnabled', self.on_files_enabled)
1012 self.backend.connect_to_signal('FilesDisabled', self.on_files_disabled)
1013
1014 @log_call(logger.debug)
1015 def on_file_sync_status_changed(self, status):
1016 """File Sync status changed."""
1017 enabled = status != backend.FILE_SYNC_DISABLED
1018 logger.info('FileSyncService: on_file_sync_status_changed: '
1019 'status %r, enabled? %r', status, enabled)
1020 self.check_button.set_active(enabled)
1021 # if service is disabled, disable the action_button
1022 self.action_button.set_sensitive(enabled)
1023
1024 if not self.container.is_sensitive():
1025 # first time we're getting this event
1026 self.check_button.connect('toggled', self.on_button_toggled)
1027 self.container.set_sensitive(True)
1028
1029 def on_files_enabled(self):
1030 """Files service was enabled."""
1031 self.on_file_sync_status_changed('enabled!')
1032
1033 def on_files_disabled(self):
1034 """Files service was disabled."""
1035 self.on_file_sync_status_changed(backend.FILE_SYNC_DISABLED)
1036
1037 @log_call(logger.debug)
1038 def on_button_toggled(self, button):
1039 """Button was toggled, exclude/replicate the service properly."""
1040 logger.info('File Sync enabled? %r', self.check_button.get_active())
1041 if self.check_button.get_active():
1042 self.backend.enable_files(reply_handler=NO_OP,
1043 error_handler=error_handler)
1044 else:
1045 self.backend.disable_files(reply_handler=NO_OP,
1046 error_handler=error_handler)
1047
1048 def load(self):
1049 """Load the information."""
1050 self.backend.file_sync_status(reply_handler=NO_OP,
1051 error_handler=error_handler)
1052
1053
1054class DesktopcouchService(Service):
1055 """A desktopcouch service."""
1056
1057 def __init__(self, service_id, name, enabled,
1058 container, check_button,
1059 dependency=None, dependency_name=None):
1060 Service.__init__(self, service_id, name,
1061 container, check_button, action_button=None)
1062
1063 self.backend.connect_to_signal('ReplicationSettingsChanged',
1064 self.on_replication_settings_changed)
1065 self.backend.connect_to_signal('ReplicationSettingsChangeError',
1066 self.on_replication_settings_change_error)
1067
1068 self.check_button.set_active(enabled)
1069
1070 self.dependency = None
1071 if dependency is not None:
1072 if dependency_name is None:
1073 dependency_name = dependency
1074 args = {'plugin_name': dependency_name, 'service_name': service_id}
1075 message = INSTALL_PLUGIN % args
1076 self.dependency = InstallPackage(dependency, message)
1077 self.dependency.connect('finished', self.on_depedency_finished)
1078
1079 self.container.pack_end(self.dependency, expand=False)
1080 self.check_button.set_sensitive(False)
1081
1082 self.check_button.connect('toggled', self.on_button_toggled)
1083
1084 def on_depedency_finished(self, widget):
1085 """The dependency was installed."""
1086 self.check_button.set_sensitive(True)
1087 self.container.remove(self.dependency)
1088 self.dependency = None
1089
1090 @log_call(logger.debug)
1091 def on_button_toggled(self, button):
1092 """Button was toggled, exclude/replicate the service properly."""
1093 logger.info('Starting replication for %r? %r',
1094 self.id, self.check_button.get_active())
1095
1096 args = {'enabled': bool_str(self.check_button.get_active())}
1097 self.backend.change_replication_settings(self.id, args,
1098 reply_handler=NO_OP, error_handler=error_handler)
1099
1100 @log_call(logger.info)
1101 def on_replication_settings_changed(self, replication_id):
1102 """The change of settings for this replication succeded."""
1103 if replication_id != self.id:
1104 return
1105 self.warning_label.set_text('')
1106
1107 @log_call(logger.error)
1108 def on_replication_settings_change_error(self, replication_id,
1109 error_dict=None):
1110 """The change of settings for this replication failed."""
1111 if replication_id != self.id:
1112 return
1113 self.check_button.set_active(not self.check_button.get_active())
1114 self._set_warning(SETTINGS_CHANGE_ERROR, self.warning_label)
1115
1116
1117class ServicesPanel(UbuntuOneBin, ControlPanelMixin):
1118 """The services panel."""
1119
1120 TITLE = SERVICES_TITLE
1121
1122 def __init__(self, main_window=None):
1123 UbuntuOneBin.__init__(self)
1124 ControlPanelMixin.__init__(self, filename='services.ui')
1125 self.add(self.itself)
1126 self.files_icon.set_from_file(get_data_file(SERVICES_FILES_ICON))
1127 self.files_example.set_from_file(get_data_file(SERVICES_FILES_EXAMPLE))
1128 self.contacts_icon.set_from_file(get_data_file(SERVICES_CONTACTS_ICON))
1129
1130 self.plugin_names = {'contacts': CONTACTS}
1131
1132 self.package_manager = package_manager.PackageManager()
1133 self.install_box = None
1134
1135 self._replications_ready = False # hack to solve LP: #750309
1136 self.backend.connect_to_signal('ReplicationsInfoReady',
1137 self.on_replications_info_ready)
1138 self.backend.connect_to_signal('ReplicationsInfoError',
1139 self.on_replications_info_error)
1140
1141 self.file_sync_service = FileSyncService(container=self.files,
1142 check_button=self.file_sync_check,
1143 action_button=self.file_sync_button)
1144
1145 self.show()
1146
1147 @property
1148 def has_desktopcouch(self):
1149 """Is desktopcouch installed?"""
1150 return self.package_manager.is_installed(DESKTOPCOUCH_PKG)
1151
1152 def on_file_sync_button_clicked(self, *args, **kwargs):
1153 """The "Show me my U1 folder" button was clicked.
1154
1155 XXX: this should be part of the FileSyncService widget.
1156 XXX: the Ubuntu One folder should be the user's root.
1157
1158 """
1159 uri_hook(None, FILE_URI_PREFIX + os.path.expanduser('~/Ubuntu One'))
1160
1161 def on_contacts_button_clicked(self, *args, **kwargs):
1162 """The "Take me to the Ubuntu One website" button was clicked.
1163
1164 XXX: this should be part of the DesktopcouchService widget.
1165
1166 """
1167 uri_hook(None, CONTACTS)
1168
1169 @log_call(logger.debug)
1170 def load(self):
1171 """Load info."""
1172 self.file_sync_service.load()
1173 self.replications.hide()
1174 if self.install_box is not None:
1175 self.itself.remove(self.install_box)
1176 self.install_box = None
1177
1178 logger.info('load: has_desktopcouch? %r', self.has_desktopcouch)
1179 if not self.has_desktopcouch:
1180 self.message.set_text('')
1181
1182 self.install_box = InstallPackage(DESKTOPCOUCH_PKG)
1183 self.install_box.connect('finished', self.load_replications)
1184 self.itself.pack_end(self.install_box, expand=False)
1185 self.itself.reorder_child(self.install_box, 0)
1186 else:
1187 self.load_replications()
1188
1189 self.message.stop()
1190
1191 @log_call(logger.debug)
1192 def load_replications(self, *args):
1193 """Load replications info."""
1194 self._replications_ready = False # hack to solve LP: #750309
1195 # ask replications to the backend
1196 self.message.start()
1197 self.backend.replications_info(reply_handler=NO_OP,
1198 error_handler=error_handler)
1199
1200 @log_call(logger.debug)
1201 def on_replications_info_ready(self, info):
1202 """The replication info is ready."""
1203 self.on_success()
1204
1205 self.replications.show()
1206
1207 if self.install_box is not None:
1208 self.itself.remove(self.install_box)
1209 self.install_box = None
1210
1211 for item in info:
1212 pkg = item['dependency']
1213 if not pkg or self.package_manager.is_installed(pkg):
1214 pkg = None
1215
1216 sid = item['replication_id']
1217 container = getattr(self, sid, None)
1218 check_button = getattr(self, '%s_check' % sid, None)
1219 name = self.plugin_names.get(sid, None)
1220 child = DesktopcouchService(service_id=sid, name=item['name'],
1221 enabled=bool(item['enabled']), container=container,
1222 check_button=check_button,
1223 dependency=pkg, dependency_name=name)
1224 setattr(self, '%s_service' % sid, child)
1225 self._replications_ready = True # hack to solve LP: #750309
1226
1227 @log_call(logger.error)
1228 def on_replications_info_error(self, error_dict=None):
1229 """The replication info can not be retrieved."""
1230 if error_dict is not None and \
1231 error_dict.get('error_type', None) == 'NoPairingRecord':
1232 self.on_error(NO_PAIRING_RECORD)
1233 else:
1234 self.on_error(error_dict=error_dict)
1235
1236 def refresh(self):
1237 """If replication list has been loaded, hide and show them."""
1238 if self._replications_ready: # hack to solve LP: #750309
1239 self.replications.hide()
1240 self.replications.show()
1241
1242
1243class FileSyncStatus(gtk.HBox, ControlPanelMixin):
1244 """A file sync status widget."""
1245
1246 def __init__(self):
1247 gtk.HBox.__init__(self)
1248 ControlPanelMixin.__init__(self)
1249
1250 self.label = LabelLoading(LOADING)
1251 self.pack_start(self.label, expand=True)
1252
1253 self.button = gtk.LinkButton(uri='')
1254 self.button.connect('clicked', self._on_button_clicked)
1255 self.pack_start(self.button, expand=False)
1256
1257 self.show_all()
1258
1259 self.backend.connect_to_signal('FileSyncStatusDisabled',
1260 self.on_file_sync_status_disabled)
1261 self.backend.connect_to_signal('FileSyncStatusStarting',
1262 self.on_file_sync_status_starting)
1263 self.backend.connect_to_signal('FileSyncStatusStopped',
1264 self.on_file_sync_status_stopped)
1265 self.backend.connect_to_signal('FileSyncStatusDisconnected',
1266 self.on_file_sync_status_disconnected)
1267 self.backend.connect_to_signal('FileSyncStatusSyncing',
1268 self.on_file_sync_status_syncing)
1269 self.backend.connect_to_signal('FileSyncStatusIdle',
1270 self.on_file_sync_status_idle)
1271 self.backend.connect_to_signal('FileSyncStatusError',
1272 self.on_file_sync_status_error)
1273 self.backend.connect_to_signal('FilesStartError',
1274 self.on_files_start_error)
1275 self.backend.connect_to_signal('FilesEnabled',
1276 self.on_file_sync_status_starting)
1277 self.backend.connect_to_signal('FilesDisabled',
1278 self.on_file_sync_status_disabled)
1279
1280 def _update_status(self, msg, action, callback,
1281 icon=None, color=None, tooltip=None):
1282 """Update the status info."""
1283 if icon is not None:
1284 foreground = '' if color is None else 'foreground="%s"' % color
1285 msg = '<span %s>%s</span> %s' % (foreground, icon, msg)
1286 self.label.set_markup(msg)
1287 self.label.stop()
1288
1289 self.button.set_label(action)
1290 self.button.set_uri(action)
1291 self.button.set_sensitive(True)
1292 self.button.set_data('callback', callback)
1293 if tooltip is not None:
1294 self.button.set_tooltip_text(tooltip)
1295
1296 def _on_button_clicked(self, button):
1297 """Button was clicked, act accordingly the label."""
1298 button.set_visited(False)
1299 button.set_sensitive(False)
1300 button.get_data('callback')(button)
1301
1302 @log_call(logger.info)
1303 def on_file_sync_status_disabled(self, msg=None):
1304 """Backend notifies of file sync status being disabled."""
1305 self._update_status(FILE_SYNC_DISABLED,
1306 FILE_SYNC_ENABLE, self.on_enable_clicked,
1307 ERROR_ICON, ERROR_COLOR, FILE_SYNC_ENABLE_TOOLTIP)
1308
1309 @log_call(logger.info)
1310 def on_file_sync_status_starting(self, msg=None):
1311 """Backend notifies of file sync status being starting."""
1312 self._update_status(FILE_SYNC_STARTING,
1313 FILE_SYNC_STOP, self.on_stop_clicked,
1314 SYNCING_ICON, ORANGE, FILE_SYNC_STOP_TOOLTIP)
1315
1316 @log_call(logger.info)
1317 def on_file_sync_status_stopped(self, msg=None):
1318 """Backend notifies of file sync being stopped."""
1319 self._update_status(FILE_SYNC_STOPPED,
1320 FILE_SYNC_START, self.on_start_clicked,
1321 ERROR_ICON, ERROR_COLOR, FILE_SYNC_START_TOOLTIP)
1322
1323 @log_call(logger.info)
1324 def on_file_sync_status_disconnected(self, msg=None):
1325 """Backend notifies of file sync status being ready."""
1326 self._update_status(FILE_SYNC_DISCONNECTED,
1327 FILE_SYNC_CONNECT, self.on_connect_clicked,
1328 ERROR_ICON, ERROR_COLOR,
1329 FILE_SYNC_CONNECT_TOOLTIP,)
1330
1331 @log_call(logger.info)
1332 def on_file_sync_status_syncing(self, msg=None):
1333 """Backend notifies of file sync status being syncing."""
1334 self._update_status(FILE_SYNC_SYNCING,
1335 FILE_SYNC_DISCONNECT, self.on_disconnect_clicked,
1336 SYNCING_ICON, ORANGE, FILE_SYNC_DISCONNECT_TOOLTIP)
1337
1338 @log_call(logger.info)
1339 def on_file_sync_status_idle(self, msg=None):
1340 """Backend notifies of file sync status being idle."""
1341 self._update_status(FILE_SYNC_IDLE,
1342 FILE_SYNC_DISCONNECT, self.on_disconnect_clicked,
1343 IDLE_ICON, SUCCESS_COLOR,
1344 FILE_SYNC_DISCONNECT_TOOLTIP)
1345
1346 @log_call(logger.error)
1347 def on_file_sync_status_error(self, error_dict=None):
1348 """Backend notifies of an error when fetching file sync status."""
1349 msg = FILE_SYNC_ERROR
1350 reason = error_dict.get('error_msg', '') if error_dict else ''
1351 if reason:
1352 msg += ' (' + reason + ')'
1353 self._update_status(WARNING_MARKUP % msg,
1354 FILE_SYNC_RESTART, self.on_restart_clicked,
1355 tooltip=FILE_SYNC_RESTART_TOOLTIP)
1356
1357 @log_call(logger.error)
1358 def on_files_start_error(self, error_dict=None):
1359 """Backend notifies of an error when starting the files service."""
1360 # service is probably disabled, ask for status to backend
1361 self.backend.file_sync_status(reply_handler=NO_OP,
1362 error_handler=error_handler)
1363
1364 def on_connect_clicked(self, button=None):
1365 """User requested connection."""
1366 self.backend.connect_files(reply_handler=NO_OP,
1367 error_handler=error_handler)
1368
1369 def on_disconnect_clicked(self, button=None):
1370 """User requested disconnection."""
1371 self.backend.disconnect_files(reply_handler=NO_OP,
1372 error_handler=error_handler)
1373
1374 def on_enable_clicked(self, button=None):
1375 """User requested enable the service."""
1376 self.backend.enable_files(reply_handler=NO_OP,
1377 error_handler=error_handler)
1378
1379 def on_restart_clicked(self, button=None):
1380 """User requested restart the service."""
1381 self.backend.restart_files(reply_handler=NO_OP,
1382 error_handler=error_handler)
1383
1384 def on_start_clicked(self, button=None):
1385 """User requested start the service."""
1386 self.backend.start_files(reply_handler=NO_OP,
1387 error_handler=error_handler)
1388
1389 def on_stop_clicked(self, button=None):
1390 """User requested stop the service."""
1391 self.backend.stop_files(reply_handler=NO_OP,
1392 error_handler=error_handler)
1393
1394 def load(self):
1395 """Load the information."""
1396 self.backend.file_sync_status(reply_handler=NO_OP,
1397 error_handler=error_handler)
1398
1399
1400class ManagementPanel(gtk.VBox, ControlPanelMixin):
1401 """The management panel.
1402
1403 The user can manage dashboard, volumes, devices and services.
1404
1405 """
1406
1407 __gsignals__ = {
1408 'local-device-removed': (gobject.SIGNAL_RUN_FIRST,
1409 gobject.TYPE_NONE, ()),
1410 'unauthorized': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE, ()),
1411 }
1412
1413 DASHBOARD_BUTTON_NAME = 'ModeLeft'
1414 SERVICES_BUTTON_NAME = 'ModeRight'
1415
1416 def __init__(self, main_window=None):
1417 gtk.VBox.__init__(self)
1418 ControlPanelMixin.__init__(self, filename='management.ui')
1419 self.add(self.itself)
1420 self.facebook_logo.set_from_file(get_data_file(FACEBOOK_LOGO))
1421 self.twitter_logo.set_from_file(get_data_file(TWITTER_LOGO))
1422 self.show()
1423
1424 self.backend.connect_to_signal('AccountInfoReady',
1425 self.on_account_info_ready)
1426 self.backend.connect_to_signal('AccountInfoError',
1427 self.on_account_info_error)
1428 self.backend.connect_to_signal('UnauthorizedError',
1429 self.on_unauthorized_error)
1430
1431 self.quota_progressbar.set_sensitive(False)
1432
1433 self.quota_label = LabelLoading(LOADING)
1434 self.quota_box.pack_start(self.quota_label, expand=False)
1435 self.quota_box.reorder_child(self.quota_label, 0)
1436
1437 self.status_label = FileSyncStatus()
1438 self.status_box.pack_end(self.status_label, expand=True)
1439
1440 self.dashboard = DashboardPanel(main_window=main_window)
1441 self.volumes = VolumesPanel(main_window=main_window)
1442 self.shares = SharesPanel(main_window=main_window)
1443 self.devices = DevicesPanel(main_window=main_window)
1444 self.services = ServicesPanel(main_window=main_window)
1445
1446 cb = lambda button, page_num: self.notebook.set_current_page(page_num)
1447 self.tabs = (u'dashboard', u'volumes', u'shares',
1448 u'devices', u'services')
1449 for page_num, tab in enumerate(self.tabs):
1450 setattr(self, ('%s_page' % tab).upper(), page_num)
1451 button = getattr(self, '%s_button' % tab)
1452 button.connect('clicked', cb, page_num)
1453 self.notebook.insert_page(getattr(self, tab), position=page_num)
1454
1455 self.dashboard_button.set_name(self.DASHBOARD_BUTTON_NAME)
1456 self.dashboard_button.set_tooltip_text(DASHBOARD_BUTTON_TOOLTIP)
1457
1458 self.volumes_button.set_tooltip_text(FOLDERS_BUTTON_TOOLTIP)
1459 self.volumes_button.connect('clicked', lambda b: self.volumes.load())
1460
1461 self.shares_button.set_tooltip_text(SHARES_BUTTON_TOOLTIP)
1462
1463 self.devices_button.set_tooltip_text(DEVICES_BUTTON_TOOLTIP)
1464 self.devices_button.connect('clicked', lambda b: self.devices.load())
1465 self.devices.connect('local-device-removed',
1466 lambda widget: self.emit('local-device-removed'))
1467
1468 self.services_button.set_name(self.SERVICES_BUTTON_NAME)
1469 self.services_button.set_tooltip_text(SERVICES_BUTTON_TOOLTIP)
1470 self.services_button.connect('clicked',
1471 lambda b: self.services.refresh())
1472
1473 self.enable_volumes = lambda: self.volumes_button.set_sensitive(True)
1474 self.disable_volumes = lambda: self.volumes_button.set_sensitive(False)
1475 self.backend.connect_to_signal('FilesEnabled', self.enable_volumes)
1476 self.backend.connect_to_signal('FilesDisabled', self.disable_volumes)
1477
1478 def _update_quota(self, msg, data=None):
1479 """Update the quota info."""
1480 fraction = 0.0
1481 if data is not None:
1482 fraction = data.get('percentage', 0.0) / 100
1483 if fraction > 0 and fraction < 0.05:
1484 fraction = 0.05
1485 else:
1486 fraction = round(fraction, 2)
1487
1488 logger.debug('ManagementPanel: updating quota to %r.', fraction)
1489 if fraction >= QUOTA_THRESHOLD:
1490 self.quota_label.set_markup(WARNING_MARKUP % msg)
1491 else:
The diff has been truncated for viewing.

Subscribers

People subscribed via source and target branches