Merge lp:~stolowski/unity-2d/search-on-lens-change into lp:unity-2d

Proposed by Paweł Stołowski
Status: Merged
Approved by: Albert Astals Cid
Approved revision: 1026
Merged at revision: 1028
Proposed branch: lp:~stolowski/unity-2d/search-on-lens-change
Merge into: lp:unity-2d
Diff against target: 45 lines (+22/-2)
2 files modified
shell/dash/Dash.qml (+7/-1)
tests/manual-tests/dash.txt (+15/-1)
To merge this branch: bzr merge lp:~stolowski/unity-2d/search-on-lens-change
Reviewer Review Type Date Requested Status
Albert Astals Cid (community) Approve
Michał Sawicz Pending
Review via email: mp+100388@code.launchpad.net

Commit message

[dash] Apply search query on lens switching. Re-opening dash resets search results.

Bind searchQuery property of current lens model to search entry value.

Description of the change

[dash] Apply search query on lens switching. Re-opening dash resets search results.
Set searchQuery property of lens model on onDashActiveLensChanged signal from shellManager.

To post a comment you must log in.
Revision history for this message
Albert Astals Cid (aacid) wrote :

Looks good and test works :-)

review: Approve
Revision history for this message
Unity Merger (unity-merger) wrote :

No commit message specified.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'shell/dash/Dash.qml'
2--- shell/dash/Dash.qml 2012-03-30 13:33:57 +0000
3+++ shell/dash/Dash.qml 2012-04-02 12:25:21 +0000
4@@ -292,10 +292,16 @@
5 return u2d.tr("Search")
6 }
7
8- onSearchQueryChanged: if (dash.currentPage != undefined) dash.currentPage.model.searchQuery = searchQuery
9 onActivateFirstResult: if (dash.currentPage != undefined) dash.currentPage.activateFirstResult()
10 }
11
12+ Binding {
13+ /* not using 'when' clause since target needs these check anyway, otherwise it gives warnings if dash.currentPage is undefined */
14+ target: dash.currentPage != undefined ? dash.currentPage.model : null
15+ property: "searchQuery"
16+ value: search_entry.searchQuery
17+ }
18+
19 FilterPane {
20 id: filterPane
21
22
23=== modified file 'tests/manual-tests/dash.txt'
24--- tests/manual-tests/dash.txt 2012-03-30 14:10:19 +0000
25+++ tests/manual-tests/dash.txt 2012-04-02 12:25:21 +0000
26@@ -98,4 +98,18 @@
27 # * Verify dash is showing maximized
28 # * Verify that pressing dash maximize button has no effect (dash stays in maximized mode).
29
30-----
31+-----
32+
33+ # Test case objectives:
34+ # * Check that search query is applied to lenses on lens change
35+ # Pre-conditions
36+ # * None
37+ # Test steps
38+ # * Open dash
39+ # * Enter a search query
40+ # * Switch between lenses and verify that search query is applied to all lenses.
41+ # * Enter the same search query manually on every lens page - the results should be more less the same as in previous step.
42+ # * Close dash
43+ # * Open dash and verify that all results are displayed in 'Home' lens, and no search query is applied.
44+
45+-----

Subscribers

People subscribed via source and target branches