Merge lp:~tiagosh/unity-2d/fix-activatefirstresult into lp:unity-2d

Proposed by Tiago Salem Herrmann
Status: Work in progress
Proposed branch: lp:~tiagosh/unity-2d/fix-activatefirstresult
Merge into: lp:unity-2d
Diff against target: 29 lines (+7/-1)
2 files modified
shell/dash/Home.qml (+3/-1)
shell/dash/LensView.qml (+4/-0)
To merge this branch: bzr merge lp:~tiagosh/unity-2d/fix-activatefirstresult
Reviewer Review Type Date Requested Status
unity-2d-team Pending
Review via email: mp+92996@code.launchpad.net

Description of the change

[dash] applications are not launched when searching for a string on the home lens and then pressing return key.

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

We discussed this over IRC, and we agreed that Tiago investigate more into his comment:

/* for an unknown reason the firstCategoryModel isn't updated properly
   only for the HomeLens if any search is performed */

Unmerged revisions

917. By Tiago Salem Herrmann

update firstCategoryModel properly. For some reason when any search is performed
on the Home Lens, firstCategoryModel isn't updated and launching the app/doc by pressing
return fails.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'shell/dash/Home.qml'
2--- shell/dash/Home.qml 2012-02-01 23:52:38 +0000
3+++ shell/dash/Home.qml 2012-02-14 14:42:19 +0000
4@@ -25,7 +25,9 @@
5 /* model.searchQuery is copied over to all lenses globalSearchQuery property */
6 onSearchQueryChanged: {
7 for (var i = 0; i < dash.lenses.rowCount(); i++) {
8- dash.lenses.get(i).globalSearchQuery = searchQuery
9+ if (dash.lenses.get(i).id != "home.lens") {
10+ dash.lenses.get(i).globalSearchQuery = searchQuery
11+ }
12 }
13 }
14 }
15
16=== modified file 'shell/dash/LensView.qml'
17--- shell/dash/LensView.qml 2012-02-10 20:25:00 +0000
18+++ shell/dash/LensView.qml 2012-02-14 14:42:19 +0000
19@@ -27,6 +27,10 @@
20 property variant model
21
22 function activateFirstResult() {
23+ /* for an unknown reason the firstCategoryModel isn't updated properly
24+ only for the HomeLens if any search is performed */
25+ firstCategoryModel.model = lensView.model.results
26+
27 /* Going through the list of categories and selecting the first one
28 that has results for the search. A SortFilterProxyModel
29 ('firstCategoryModel') is used to filter the search results per category.

Subscribers

People subscribed via source and target branches