Merge lp:~didrocks/unity-lens-applications/conditionnally-show-more-suggestions into lp:unity-lens-applications

Proposed by Didier Roche-Tolomelli
Status: Rejected
Rejected by: Didier Roche-Tolomelli
Proposed branch: lp:~didrocks/unity-lens-applications/conditionnally-show-more-suggestions
Merge into: lp:unity-lens-applications
Diff against target: 64 lines (+21/-3)
3 files modified
configure.ac (+1/-1)
src/daemon.vala (+6/-2)
tests/software-center-suggestions.txt (+14/-0)
To merge this branch: bzr merge lp:~didrocks/unity-lens-applications/conditionnally-show-more-suggestions
Reviewer Review Type Date Requested Status
Unity Team Pending
Review via email: mp+126407@code.launchpad.net

Description of the change

Add conditionnal more suggestions show/hide based on the global online/commercial
key (LP: #1054746)

Manual test included.

To post a comment you must log in.
Revision history for this message
Didier Roche-Tolomelli (didrocks) wrote :

Rejecting myself the merge request. Design descoped the app lens

Unmerged revisions

308. By Didier Roche-Tolomelli

add manual test

307. By Didier Roche-Tolomelli

dep on latest libunity

306. By Didier Roche-Tolomelli

add conditionally showing the suggestions (LP: #1054746).

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'configure.ac'
2--- configure.ac 2012-09-19 11:33:38 +0000
3+++ configure.ac 2012-09-26 08:24:20 +0000
4@@ -65,7 +65,7 @@
5 gee-1.0
6 dee-1.0 >= 0.5.16
7 zeitgeist-1.0 >= 0.3.8
8- unity >= 6.5.1
9+ unity >= 6.7
10 libgnome-menu)
11
12 AC_SUBST(LENS_DAEMON_CFLAGS)
13
14=== modified file 'src/daemon.vala'
15--- src/daemon.vala 2012-09-25 10:24:12 +0000
16+++ src/daemon.vala 2012-09-26 08:24:20 +0000
17@@ -122,6 +122,8 @@
18
19 private PurchaseInfoHelper purchase_info = null;
20
21+ private PreferencesManager preferences = PreferencesManager.get_default ();
22+
23 construct
24 {
25 populate_type_queries ();
26@@ -183,7 +185,8 @@
27 // TRANSLATORS: Please make sure this string is short enough to fit
28 // into the filter button
29 local_apps_option = scope.sources.add_option ("local", _("Local Apps"));
30- if (display_available_apps)
31+ if (display_available_apps &&
32+ (preferences.remote_content_search == Unity.PreferencesManager.RemoteContent.ALL))
33 {
34 // TRANSLATORS: Please make sure this string is short enough to fit
35 // into the filter button
36@@ -569,7 +572,8 @@
37 purchase_info = new PurchaseInfoHelper ();
38
39 /* If we don't have a search we display 6 random apps */
40- if (usc_apps_active () && display_available_apps && pkgsearcher != null)
41+ if (usc_apps_active () && display_available_apps && pkgsearcher != null &&
42+ (preferences.remote_content_search == Unity.PreferencesManager.RemoteContent.ALL))
43 {
44 if (has_search)
45 {
46
47=== added file 'tests/software-center-suggestions.txt'
48--- tests/software-center-suggestions.txt 1970-01-01 00:00:00 +0000
49+++ tests/software-center-suggestions.txt 2012-09-26 08:24:20 +0000
50@@ -0,0 +1,14 @@
51+'Disable' Software Center suggestions
52+----------------------------------------------------
53+Disabling the commercial/online suggestions should not show available apps.
54+
55+Setup:
56+
57+Actions:
58+1. Disable the online/commercial search in gnome-control-center or directly in gsettings
59+(com.canonical.Unity.Lenses "remote-content-search" to none)
60+2. Perfom a search in the application lens
61+
62+Expected Results:
63+No "More suggestions" category should appear.
64+

Subscribers

People subscribed via source and target branches