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
=== modified file 'shell/dash/Dash.qml'
--- shell/dash/Dash.qml 2012-03-30 13:33:57 +0000
+++ shell/dash/Dash.qml 2012-04-02 12:25:21 +0000
@@ -292,10 +292,16 @@
292 return u2d.tr("Search")292 return u2d.tr("Search")
293 }293 }
294294
295 onSearchQueryChanged: if (dash.currentPage != undefined) dash.currentPage.model.searchQuery = searchQuery
296 onActivateFirstResult: if (dash.currentPage != undefined) dash.currentPage.activateFirstResult()295 onActivateFirstResult: if (dash.currentPage != undefined) dash.currentPage.activateFirstResult()
297 }296 }
298297
298 Binding {
299 /* not using 'when' clause since target needs these check anyway, otherwise it gives warnings if dash.currentPage is undefined */
300 target: dash.currentPage != undefined ? dash.currentPage.model : null
301 property: "searchQuery"
302 value: search_entry.searchQuery
303 }
304
299 FilterPane {305 FilterPane {
300 id: filterPane306 id: filterPane
301307
302308
=== modified file 'tests/manual-tests/dash.txt'
--- tests/manual-tests/dash.txt 2012-03-30 14:10:19 +0000
+++ tests/manual-tests/dash.txt 2012-04-02 12:25:21 +0000
@@ -98,4 +98,18 @@
98 # * Verify dash is showing maximized98 # * Verify dash is showing maximized
99 # * Verify that pressing dash maximize button has no effect (dash stays in maximized mode).99 # * Verify that pressing dash maximize button has no effect (dash stays in maximized mode).
100100
101----101-----
102
103 # Test case objectives:
104 # * Check that search query is applied to lenses on lens change
105 # Pre-conditions
106 # * None
107 # Test steps
108 # * Open dash
109 # * Enter a search query
110 # * Switch between lenses and verify that search query is applied to all lenses.
111 # * Enter the same search query manually on every lens page - the results should be more less the same as in previous step.
112 # * Close dash
113 # * Open dash and verify that all results are displayed in 'Home' lens, and no search query is applied.
114
115-----

Subscribers

People subscribed via source and target branches