Merge lp:~stolowski/unity-lens-shopping/preview-on-lmb into lp:unity-lens-shopping

Proposed by Paweł Stołowski
Status: Merged
Approved by: Michal Hruby
Approved revision: 40
Merged at revision: 40
Proposed branch: lp:~stolowski/unity-lens-shopping/preview-on-lmb
Merge into: lp:unity-lens-shopping
Diff against target: 31 lines (+9/-1)
2 files modified
src/scope.vala (+8/-0)
tests/manual-tests/shopping-lens-tests.txt (+1/-1)
To merge this branch: bzr merge lp:~stolowski/unity-lens-shopping/preview-on-lmb
Reviewer Review Type Date Requested Status
Michal Hruby (community) Approve
PS Jenkins bot continuous-integration Pending
Review via email: mp+150981@code.launchpad.net

Commit message

Respond with preview on activation requests (left-mouse-button).

Description of the change

Respond with preview on activation requests (left-mouse-button).

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

+1

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/scope.vala'
2--- src/scope.vala 2012-10-17 14:47:27 +0000
3+++ src/scope.vala 2013-02-28 10:10:28 +0000
4@@ -64,6 +64,14 @@
5 update_search_async.begin (search, search_type, cancellable);
6 });
7
8+ activate_uri.connect ((uri) => {
9+ var prv = generate_preview_for_uri (uri);
10+ if (prv != null)
11+ return new Unity.ActivationResponse.with_preview (prv);
12+ warning ("Failed to generate preview for %s", uri);
13+ return new Unity.ActivationResponse(Unity.HandledType.NOT_HANDLED);
14+ });
15+
16 preview_uri.connect ((uri) => {
17 // FIXME: async?!
18 return generate_preview_for_uri (uri);
19
20=== modified file 'tests/manual-tests/shopping-lens-tests.txt'
21--- tests/manual-tests/shopping-lens-tests.txt 2012-10-11 09:17:45 +0000
22+++ tests/manual-tests/shopping-lens-tests.txt 2013-02-28 10:10:28 +0000
23@@ -37,7 +37,7 @@
24 Internet connectivity.
25
26 Actions:
27-Right click a shopping results item in the dash home lens.
28+Right click a shopping results item in the dash home lens. Repeat with left-click.
29
30 Expected Results:
31 Preview of selected item is displayed. The preview should contain item name as a title, an image, item description and

Subscribers

People subscribed via source and target branches