Merge lp:~anthonywong/ubuntu/trusty/unity-china-music-scope/lp1370353 into lp:ubuntu/trusty/unity-china-music-scope

Proposed by Anthony Wong
Status: Merged
Approved by: Didier Roche-Tolomelli
Approved revision: 7
Merge reported by: Sebastien Bacher
Merged at revision: not available
Proposed branch: lp:~anthonywong/ubuntu/trusty/unity-china-music-scope/lp1370353
Merge into: lp:ubuntu/trusty/unity-china-music-scope
Diff against target: 84 lines (+65/-0)
3 files modified
debian/changelog (+6/-0)
debian/patches/0001-honour-privacy.diff (+58/-0)
debian/patches/series (+1/-0)
To merge this branch: bzr merge lp:~anthonywong/ubuntu/trusty/unity-china-music-scope/lp1370353
Reviewer Review Type Date Requested Status
Didier Roche-Tolomelli Approve
Review via email: mp+245933@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Didier Roche-Tolomelli (didrocks) wrote :

The backport looks good to me and the bug follow the SRU process, good work!
Waiting in trusty SRU queue now.

review: Approve
Revision history for this message
Sebastien Bacher (seb128) wrote :

setting as merged since it has been uploaded (so it gets out of the sponsoring queue)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== removed file '.pc/applied-patches'
=== modified file 'debian/changelog'
--- debian/changelog 2014-02-22 00:42:17 +0000
+++ debian/changelog 2015-01-09 09:30:06 +0000
@@ -1,3 +1,9 @@
1unity-china-music-scope (1.0.5-0ubuntu2) trusty-proposed; urgency=medium
2
3 * Honour online search privacy setting. (LP: #1370353)
4
5 -- Anthony Wong <anthony.wong@ubuntu.com> Fri, 09 Jan 2015 17:09:43 +0800
6
1unity-china-music-scope (1.0.5-0ubuntu1) trusty; urgency=low7unity-china-music-scope (1.0.5-0ubuntu1) trusty; urgency=low
28
3 * New upstream release (LP: #1282933)9 * New upstream release (LP: #1282933)
410
=== added directory 'debian/patches'
=== added file 'debian/patches/0001-honour-privacy.diff'
--- debian/patches/0001-honour-privacy.diff 1970-01-01 00:00:00 +0000
+++ debian/patches/0001-honour-privacy.diff 2015-01-09 09:30:06 +0000
@@ -0,0 +1,58 @@
1Description: Do not return search result when online search is disabled
2Author: Anthony Wong <anthony.wong@ubuntu.com>
3Origin: upstream
4Bug: https://bugs.launchpad.net/ubuntukylin/+bug/1370353
5Applied-Upstream: 1.0.7
6---
7This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
8--- a/src/musicbaidu-daemon.vala
9+++ b/src/musicbaidu-daemon.vala
10@@ -51,15 +51,16 @@
11 {
12 private MusicBaiduCollection collection;
13 private Unity.MusicPreview? music_preview;
14+/*add by sj*/
15+ private PreferencesManager preferences = PreferencesManager.get_default ();
16
17 public MusicBaiduScopeProxy ()
18 {
19 base ();
20
21-
22 scope = new Unity.DeprecatedScope ("/com/canonical/unity/scope/musicbaidu", "musicbaidu.scope");
23
24- scope.search_in_global = true;
25+ scope.search_in_global = false;
26 scope.search_hint = _("Search Music Collection");
27 scope.visible = true;
28
29@@ -70,6 +71,10 @@
30 base.initialize ();
31
32 collection = new MusicBaiduCollection ();
33+/*add by sj*/
34+ preferences.notify["remote-content-search"].connect((obj, pspec) => { scope.queue_search_changed(SearchType.DEFAULT); });
35+
36+
37
38 try
39 {
40@@ -180,6 +185,18 @@
41 if (is_search_empty (search))
42 return;
43
44+/*add by sj*/
45+ /**
46+ * only perform the request if the user has not disabled
47+ * online/commercial suggestions. That will hide the category as well.
48+ */
49+ if (preferences.remote_content_search != Unity.PreferencesManager.RemoteContent.ALL)
50+ {
51+ search.results_model.clear ();
52+ return;
53+ }
54+
55+
56 try
57 {
58 debug ("model has %u rows before search", search.results_model.get_n_rows ());
059
=== added file 'debian/patches/series'
--- debian/patches/series 1970-01-01 00:00:00 +0000
+++ debian/patches/series 2015-01-09 09:30:06 +0000
@@ -0,0 +1,1 @@
10001-honour-privacy.diff

Subscribers

People subscribed via source and target branches

to all changes: