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
1=== modified file 'data/device.ui'
2--- data/device.ui 2011-02-28 23:24:53 +0000
3+++ data/device.ui 2011-03-02 20:27:11 +0000
4@@ -74,7 +74,7 @@
5 <property name="can_focus">False</property>
6 <child>
7 <object class="GtkCheckButton" id="show_all_notifications">
8- <property name="label" translatable="yes">Show notifications</property>
9+ <property name="label" translatable="yes">Show activity notifications</property>
10 <property name="visible">True</property>
11 <property name="can_focus">True</property>
12 <property name="receives_default">False</property>
13@@ -94,7 +94,7 @@
14 <property name="can_focus">False</property>
15 <child>
16 <object class="GtkCheckButton" id="limit_bandwidth">
17- <property name="label" translatable="yes">Limit bandwidth usage</property>
18+ <property name="label" translatable="yes">Limit file sync bandwidth usage</property>
19 <property name="visible">True</property>
20 <property name="can_focus">True</property>
21 <property name="receives_default">False</property>
22
23=== modified file 'data/services.ui'
24--- data/services.ui 2011-03-02 19:30:37 +0000
25+++ data/services.ui 2011-03-02 20:27:11 +0000
26@@ -24,6 +24,27 @@
27 <property name="visible">True</property>
28 <property name="can_focus">False</property>
29 <child>
30+ <object class="GtkAlignment" id="alignment2">
31+ <property name="visible">True</property>
32+ <property name="can_focus">False</property>
33+ <child>
34+ <object class="GtkVBox" id="files">
35+ <property name="visible">True</property>
36+ <property name="can_focus">False</property>
37+ <property name="spacing">5</property>
38+ <child>
39+ <placeholder/>
40+ </child>
41+ </object>
42+ </child>
43+ </object>
44+ <packing>
45+ <property name="expand">False</property>
46+ <property name="fill">True</property>
47+ <property name="position">0</property>
48+ </packing>
49+ </child>
50+ <child>
51 <object class="GtkAlignment" id="alignment1">
52 <property name="visible">True</property>
53 <property name="can_focus">False</property>
54@@ -41,27 +62,6 @@
55 <packing>
56 <property name="expand">False</property>
57 <property name="fill">True</property>
58- <property name="position">0</property>
59- </packing>
60- </child>
61- <child>
62- <object class="GtkAlignment" id="alignment2">
63- <property name="visible">True</property>
64- <property name="can_focus">False</property>
65- <child>
66- <object class="GtkVBox" id="files">
67- <property name="visible">True</property>
68- <property name="can_focus">False</property>
69- <property name="spacing">5</property>
70- <child>
71- <placeholder/>
72- </child>
73- </object>
74- </child>
75- </object>
76- <packing>
77- <property name="expand">False</property>
78- <property name="fill">True</property>
79 <property name="position">1</property>
80 </packing>
81 </child>
82
83=== modified file 'ubuntuone/controlpanel/backend.py'
84--- ubuntuone/controlpanel/backend.py 2011-02-27 15:45:21 +0000
85+++ ubuntuone/controlpanel/backend.py 2011-03-02 20:27:11 +0000
86@@ -195,7 +195,6 @@
87 devices = yield self.wc.call_api(DEVICES_API)
88 for d in devices:
89 di = {}
90- result.append(di)
91 di["type"] = d["kind"]
92 di["name"] = d["description"]
93 di["configurable"] = ''
94@@ -225,6 +224,11 @@
95 # di["available_services"] = ""
96 # di["enabled_services"] = ""
97
98+ if is_local: # prepend the local device!
99+ result.insert(0, di)
100+ else:
101+ result.append(di)
102+
103 returnValue(result)
104
105 def type_n_id(self, device_id):
106
107=== modified file 'ubuntuone/controlpanel/tests/__init__.py'
108--- ubuntuone/controlpanel/tests/__init__.py 2011-02-16 18:44:08 +0000
109+++ ubuntuone/controlpanel/tests/__init__.py 2011-03-02 20:27:11 +0000
110@@ -88,6 +88,8 @@
111 "email": "andrewpz@protocultura.net",
112 }
113
114+
115+# note that local computer is not first, do not change!
116 SAMPLE_DEVICES_JSON = """
117 [
118 {
119@@ -108,15 +110,9 @@
120 ]
121 """
122
123+# note that local computer should be first, do not change!
124 EXPECTED_DEVICES_INFO = [
125 {
126- "device_id": "ComputerABCDEF01234token",
127- "name": "Ubuntu One @ darkstar",
128- "type": "Computer",
129- "is_local": '',
130- "configurable": '',
131- },
132- {
133 'is_local': 'True',
134 'configurable': 'True',
135 'device_id': 'ComputerABCDEF01234-localtoken',
136@@ -125,7 +121,14 @@
137 'max_download_speed': '-1',
138 'max_upload_speed': '-1',
139 'name': 'Ubuntu One @ localhost',
140- 'type': 'Computer'
141+ 'type': 'Computer',
142+ },
143+ {
144+ "device_id": "ComputerABCDEF01234token",
145+ "name": "Ubuntu One @ darkstar",
146+ "type": "Computer",
147+ "is_local": '',
148+ "configurable": '',
149 },
150 {
151 "device_id": "Phone1000",
152
153=== modified file 'ubuntuone/controlpanel/tests/test_backend.py'
154--- ubuntuone/controlpanel/tests/test_backend.py 2011-02-16 18:44:08 +0000
155+++ ubuntuone/controlpanel/tests/test_backend.py 2011-03-02 20:27:11 +0000
156@@ -274,7 +274,7 @@
157 result = yield self.be.device_is_local(self.local_token)
158 self.assertTrue(result)
159
160- did = EXPECTED_DEVICES_INFO[0]['device_id']
161+ did = EXPECTED_DEVICES_INFO[-1]['device_id']
162 result = yield self.be.device_is_local(did)
163 self.assertFalse(result)
164

Subscribers

People subscribed via source and target branches