Merge lp:~nataliabidart/ubuntuone-control-panel/misc-tweaks into lp:ubuntuone-control-panel

Proposed by Natalia Bidart
Status: Merged
Approved by: Natalia Bidart
Approved revision: 90
Merged at revision: 89
Proposed branch: lp:~nataliabidart/ubuntuone-control-panel/misc-tweaks
Merge into: lp:ubuntuone-control-panel
Diff against target: 163 lines (+40/-33)
5 files modified
data/device.ui (+2/-2)
data/services.ui (+21/-21)
ubuntuone/controlpanel/backend.py (+5/-1)
ubuntuone/controlpanel/tests/__init__.py (+11/-8)
ubuntuone/controlpanel/tests/test_backend.py (+1/-1)
To merge this branch: bzr merge lp:~nataliabidart/ubuntuone-control-panel/misc-tweaks
Reviewer Review Type Date Requested Status
Martin Albisetti (community) Approve
Roberto Alsina (community) Approve
Review via email: mp+51948@code.launchpad.net

Commit message

- Local device is listed first in the devices info result (LP: #727996).
- 'Show activity notifications' in devices config section.
- 'Limit file sync bandwidth usage' in devices config section.
- 'File sync' service should be listed on top og any other service in Services tab (all reported in LP: #727998).

Description of the change

Screenshot of changes are:

* local device is first and string changes: http://ubuntuone.com/p/fou/
* file sync service is first: http://ubuntuone.com/p/fov/

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

+1

review: Approve
90. By Natalia Bidart

Merged trunk in.

Revision history for this message
Martin Albisetti (beuno) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'data/device.ui'
--- data/device.ui 2011-02-28 23:24:53 +0000
+++ data/device.ui 2011-03-02 20:27:11 +0000
@@ -74,7 +74,7 @@
74 <property name="can_focus">False</property>74 <property name="can_focus">False</property>
75 <child>75 <child>
76 <object class="GtkCheckButton" id="show_all_notifications">76 <object class="GtkCheckButton" id="show_all_notifications">
77 <property name="label" translatable="yes">Show notifications</property>77 <property name="label" translatable="yes">Show activity notifications</property>
78 <property name="visible">True</property>78 <property name="visible">True</property>
79 <property name="can_focus">True</property>79 <property name="can_focus">True</property>
80 <property name="receives_default">False</property>80 <property name="receives_default">False</property>
@@ -94,7 +94,7 @@
94 <property name="can_focus">False</property>94 <property name="can_focus">False</property>
95 <child>95 <child>
96 <object class="GtkCheckButton" id="limit_bandwidth">96 <object class="GtkCheckButton" id="limit_bandwidth">
97 <property name="label" translatable="yes">Limit bandwidth usage</property>97 <property name="label" translatable="yes">Limit file sync bandwidth usage</property>
98 <property name="visible">True</property>98 <property name="visible">True</property>
99 <property name="can_focus">True</property>99 <property name="can_focus">True</property>
100 <property name="receives_default">False</property>100 <property name="receives_default">False</property>
101101
=== modified file 'data/services.ui'
--- data/services.ui 2011-03-02 19:30:37 +0000
+++ data/services.ui 2011-03-02 20:27:11 +0000
@@ -24,6 +24,27 @@
24 <property name="visible">True</property>24 <property name="visible">True</property>
25 <property name="can_focus">False</property>25 <property name="can_focus">False</property>
26 <child>26 <child>
27 <object class="GtkAlignment" id="alignment2">
28 <property name="visible">True</property>
29 <property name="can_focus">False</property>
30 <child>
31 <object class="GtkVBox" id="files">
32 <property name="visible">True</property>
33 <property name="can_focus">False</property>
34 <property name="spacing">5</property>
35 <child>
36 <placeholder/>
37 </child>
38 </object>
39 </child>
40 </object>
41 <packing>
42 <property name="expand">False</property>
43 <property name="fill">True</property>
44 <property name="position">0</property>
45 </packing>
46 </child>
47 <child>
27 <object class="GtkAlignment" id="alignment1">48 <object class="GtkAlignment" id="alignment1">
28 <property name="visible">True</property>49 <property name="visible">True</property>
29 <property name="can_focus">False</property>50 <property name="can_focus">False</property>
@@ -41,27 +62,6 @@
41 <packing>62 <packing>
42 <property name="expand">False</property>63 <property name="expand">False</property>
43 <property name="fill">True</property>64 <property name="fill">True</property>
44 <property name="position">0</property>
45 </packing>
46 </child>
47 <child>
48 <object class="GtkAlignment" id="alignment2">
49 <property name="visible">True</property>
50 <property name="can_focus">False</property>
51 <child>
52 <object class="GtkVBox" id="files">
53 <property name="visible">True</property>
54 <property name="can_focus">False</property>
55 <property name="spacing">5</property>
56 <child>
57 <placeholder/>
58 </child>
59 </object>
60 </child>
61 </object>
62 <packing>
63 <property name="expand">False</property>
64 <property name="fill">True</property>
65 <property name="position">1</property>65 <property name="position">1</property>
66 </packing>66 </packing>
67 </child>67 </child>
6868
=== modified file 'ubuntuone/controlpanel/backend.py'
--- ubuntuone/controlpanel/backend.py 2011-02-27 15:45:21 +0000
+++ ubuntuone/controlpanel/backend.py 2011-03-02 20:27:11 +0000
@@ -195,7 +195,6 @@
195 devices = yield self.wc.call_api(DEVICES_API)195 devices = yield self.wc.call_api(DEVICES_API)
196 for d in devices:196 for d in devices:
197 di = {}197 di = {}
198 result.append(di)
199 di["type"] = d["kind"]198 di["type"] = d["kind"]
200 di["name"] = d["description"]199 di["name"] = d["description"]
201 di["configurable"] = ''200 di["configurable"] = ''
@@ -225,6 +224,11 @@
225 # di["available_services"] = ""224 # di["available_services"] = ""
226 # di["enabled_services"] = ""225 # di["enabled_services"] = ""
227226
227 if is_local: # prepend the local device!
228 result.insert(0, di)
229 else:
230 result.append(di)
231
228 returnValue(result)232 returnValue(result)
229233
230 def type_n_id(self, device_id):234 def type_n_id(self, device_id):
231235
=== modified file 'ubuntuone/controlpanel/tests/__init__.py'
--- ubuntuone/controlpanel/tests/__init__.py 2011-02-16 18:44:08 +0000
+++ ubuntuone/controlpanel/tests/__init__.py 2011-03-02 20:27:11 +0000
@@ -88,6 +88,8 @@
88 "email": "andrewpz@protocultura.net",88 "email": "andrewpz@protocultura.net",
89}89}
9090
91
92# note that local computer is not first, do not change!
91SAMPLE_DEVICES_JSON = """93SAMPLE_DEVICES_JSON = """
92[94[
93 {95 {
@@ -108,15 +110,9 @@
108]110]
109"""111"""
110112
113# note that local computer should be first, do not change!
111EXPECTED_DEVICES_INFO = [114EXPECTED_DEVICES_INFO = [
112 {115 {
113 "device_id": "ComputerABCDEF01234token",
114 "name": "Ubuntu One @ darkstar",
115 "type": "Computer",
116 "is_local": '',
117 "configurable": '',
118 },
119 {
120 'is_local': 'True',116 'is_local': 'True',
121 'configurable': 'True',117 'configurable': 'True',
122 'device_id': 'ComputerABCDEF01234-localtoken',118 'device_id': 'ComputerABCDEF01234-localtoken',
@@ -125,7 +121,14 @@
125 'max_download_speed': '-1',121 'max_download_speed': '-1',
126 'max_upload_speed': '-1',122 'max_upload_speed': '-1',
127 'name': 'Ubuntu One @ localhost',123 'name': 'Ubuntu One @ localhost',
128 'type': 'Computer'124 'type': 'Computer',
125 },
126 {
127 "device_id": "ComputerABCDEF01234token",
128 "name": "Ubuntu One @ darkstar",
129 "type": "Computer",
130 "is_local": '',
131 "configurable": '',
129 },132 },
130 {133 {
131 "device_id": "Phone1000",134 "device_id": "Phone1000",
132135
=== modified file 'ubuntuone/controlpanel/tests/test_backend.py'
--- ubuntuone/controlpanel/tests/test_backend.py 2011-02-16 18:44:08 +0000
+++ ubuntuone/controlpanel/tests/test_backend.py 2011-03-02 20:27:11 +0000
@@ -274,7 +274,7 @@
274 result = yield self.be.device_is_local(self.local_token)274 result = yield self.be.device_is_local(self.local_token)
275 self.assertTrue(result)275 self.assertTrue(result)
276276
277 did = EXPECTED_DEVICES_INFO[0]['device_id']277 did = EXPECTED_DEVICES_INFO[-1]['device_id']
278 result = yield self.be.device_is_local(did)278 result = yield self.be.device_is_local(did)
279 self.assertFalse(result)279 self.assertFalse(result)
280280

Subscribers

People subscribed via source and target branches