Merge lp:~mhr3/unity-scope-click/update-nonclicks into lp:unity-scope-click

Proposed by Michal Hruby
Status: Merged
Approved by: dobey
Approved revision: 80
Merged at revision: 78
Proposed branch: lp:~mhr3/unity-scope-click/update-nonclicks
Merge into: lp:unity-scope-click
Diff against target: 53 lines (+8/-9)
2 files modified
src/click-scope.vala (+8/-2)
src/non-click-scope.vala (+0/-7)
To merge this branch: bzr merge lp:~mhr3/unity-scope-click/update-nonclicks
Reviewer Review Type Date Requested Status
dobey (community) Approve
PS Jenkins bot continuous-integration Approve
Review via email: mp+190989@code.launchpad.net

Commit message

Update definition of non-click apps, so we don't waste time trying to find them.

Description of the change

Update definition of non-click apps, so we don't waste time trying to find them.

Also ignores Home search in the click scope, since unity overrides results for that category anyway.

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

+ if (search_type != Unity.SearchType.DEFAULT) return;

Please put the return on a new line with proper indentation.

review: Needs Fixing
80. By Michal Hruby

Return on new line

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
dobey (dobey) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/click-scope.vala'
2--- src/click-scope.vala 2013-10-10 17:37:35 +0000
3+++ src/click-scope.vala 2013-10-14 16:14:41 +0000
4@@ -423,7 +423,13 @@
5 return Unity.PreferencesManager.get_default().remote_content_search != Unity.PreferencesManager.RemoteContent.NONE;
6 }
7
8- async void find_apps (string search_query) {
9+ async void find_apps (string search_query, Unity.SearchType search_type)
10+ {
11+ // we don't provide any results for Home searches for now
12+ if (search_type != Unity.SearchType.DEFAULT) {
13+ return;
14+ }
15+
16 yield find_installed_apps (search_query);
17 if (can_search_internet()) {
18 yield find_available_apps (search_query);
19@@ -440,7 +446,7 @@
20
21 public override void run_async (Unity.ScopeSearchBaseCallback async_callback)
22 {
23- find_apps.begin (search_context.search_query, (obj, res) => {
24+ find_apps.begin (search_context.search_query, search_context.search_type, (obj, res) => {
25 find_apps.end (res);
26 async_callback(this);
27 debug ("run_async: finished.");
28
29=== modified file 'src/non-click-scope.vala'
30--- src/non-click-scope.vala 2013-10-07 16:27:16 +0000
31+++ src/non-click-scope.vala 2013-10-14 16:14:41 +0000
32@@ -22,7 +22,6 @@
33 const string[] NON_CLICK_DESKTOPS =
34 {
35 "address-book-app.desktop",
36- "calendar-app.desktop",
37 "camera-app.desktop",
38 "click-update-manager.desktop",
39 "dialer-app.desktop",
40@@ -31,14 +30,8 @@
41 "mediaplayer-app.desktop",
42 "messaging-app.desktop",
43 "music-app.desktop",
44- "notes-app.desktop",
45- "rssreader-app.desktop",
46- "ubuntu-calculator-app.desktop",
47- "ubuntu-clock-app.desktop",
48 "ubuntu-filemanager-app.desktop",
49 "ubuntu-system-settings.desktop",
50- "ubuntu-terminal-app.desktop",
51- "ubuntu-weather-app.desktop",
52 "webbrowser-app.desktop"
53 };
54

Subscribers

People subscribed via source and target branches

to all changes: