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
=== modified file 'src/click-scope.vala'
--- src/click-scope.vala 2013-10-10 17:37:35 +0000
+++ src/click-scope.vala 2013-10-14 16:14:41 +0000
@@ -423,7 +423,13 @@
423 return Unity.PreferencesManager.get_default().remote_content_search != Unity.PreferencesManager.RemoteContent.NONE;423 return Unity.PreferencesManager.get_default().remote_content_search != Unity.PreferencesManager.RemoteContent.NONE;
424 }424 }
425425
426 async void find_apps (string search_query) {426 async void find_apps (string search_query, Unity.SearchType search_type)
427 {
428 // we don't provide any results for Home searches for now
429 if (search_type != Unity.SearchType.DEFAULT) {
430 return;
431 }
432
427 yield find_installed_apps (search_query);433 yield find_installed_apps (search_query);
428 if (can_search_internet()) {434 if (can_search_internet()) {
429 yield find_available_apps (search_query);435 yield find_available_apps (search_query);
@@ -440,7 +446,7 @@
440446
441 public override void run_async (Unity.ScopeSearchBaseCallback async_callback)447 public override void run_async (Unity.ScopeSearchBaseCallback async_callback)
442 {448 {
443 find_apps.begin (search_context.search_query, (obj, res) => {449 find_apps.begin (search_context.search_query, search_context.search_type, (obj, res) => {
444 find_apps.end (res);450 find_apps.end (res);
445 async_callback(this);451 async_callback(this);
446 debug ("run_async: finished.");452 debug ("run_async: finished.");
447453
=== modified file 'src/non-click-scope.vala'
--- src/non-click-scope.vala 2013-10-07 16:27:16 +0000
+++ src/non-click-scope.vala 2013-10-14 16:14:41 +0000
@@ -22,7 +22,6 @@
22 const string[] NON_CLICK_DESKTOPS =22 const string[] NON_CLICK_DESKTOPS =
23 {23 {
24 "address-book-app.desktop",24 "address-book-app.desktop",
25 "calendar-app.desktop",
26 "camera-app.desktop",25 "camera-app.desktop",
27 "click-update-manager.desktop",26 "click-update-manager.desktop",
28 "dialer-app.desktop",27 "dialer-app.desktop",
@@ -31,14 +30,8 @@
31 "mediaplayer-app.desktop",30 "mediaplayer-app.desktop",
32 "messaging-app.desktop",31 "messaging-app.desktop",
33 "music-app.desktop",32 "music-app.desktop",
34 "notes-app.desktop",
35 "rssreader-app.desktop",
36 "ubuntu-calculator-app.desktop",
37 "ubuntu-clock-app.desktop",
38 "ubuntu-filemanager-app.desktop",33 "ubuntu-filemanager-app.desktop",
39 "ubuntu-system-settings.desktop",34 "ubuntu-system-settings.desktop",
40 "ubuntu-terminal-app.desktop",
41 "ubuntu-weather-app.desktop",
42 "webbrowser-app.desktop"35 "webbrowser-app.desktop"
43 };36 };
4437

Subscribers

People subscribed via source and target branches

to all changes: