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

Proposed by Paweł Stołowski
Status: Merged
Approved by: Nick Dedekind
Approved revision: 325
Merged at revision: 324
Proposed branch: lp:~stolowski/unity-lens-applications/preview-on-lmb
Merge into: lp:unity-lens-applications
Diff against target: 75 lines (+52/-5)
2 files modified
src/daemon.vala (+10/-5)
tests/manual/apps-lens-tests.txt (+42/-0)
To merge this branch: bzr merge lp:~stolowski/unity-lens-applications/preview-on-lmb
Reviewer Review Type Date Requested Status
Nick Dedekind (community) Approve
Michal Hruby (community) Approve
PS Jenkins bot continuous-integration Pending
Review via email: mp+150839@code.launchpad.net

Commit message

Show preview for installable/purchasable applications on activation (i.e. left-mouse-button in the Dash).

Description of the change

Show preview for installable/purchasable applications on activation (i.e. left-mouse-button in the Dash).
All activation requests for unity-install:// uris result in ActivationResponse.with_preview response.

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

Looks fine.

review: Approve
Revision history for this message
Nick Dedekind (nick-dedekind) wrote :

LGTM.
Passes Manual tests.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/daemon.vala'
--- src/daemon.vala 2012-11-30 09:12:34 +0000
+++ src/daemon.vala 2013-02-27 16:21:25 +0000
@@ -1315,11 +1315,16 @@
1315 string exec_or_dir = null;1315 string exec_or_dir = null;
1316 if (uri.has_prefix ("unity-install://"))1316 if (uri.has_prefix ("unity-install://"))
1317 {1317 {
1318 unowned string pkg = uri.offset (16); // strip off "unity-install://" prefix1318 var prv = preview (uri);
1319 debug ("Installing: %s", pkg);1319 if (prv != null)
1320 args = new string[2];1320 {
1321 args[0] = "software-center";1321 return new Unity.ActivationResponse.with_preview (prv);
1322 args[1] = pkg;1322 }
1323 else
1324 {
1325 warning ("Failed to generate preview for %s", uri);
1326 return new Unity.ActivationResponse(Unity.HandledType.NOT_HANDLED);
1327 }
1323 }1328 }
1324 else if (uri.has_prefix ("unity-runner://"))1329 else if (uri.has_prefix ("unity-runner://"))
1325 {1330 {
13261331
=== modified file 'tests/manual/apps-lens-tests.txt'
--- tests/manual/apps-lens-tests.txt 2012-11-30 09:12:34 +0000
+++ tests/manual/apps-lens-tests.txt 2013-02-27 16:21:25 +0000
@@ -56,3 +56,45 @@
56Expected Result:56Expected Result:
57'Recently used', 'Installed', 'More suggestions' categories are displayed.57'Recently used', 'Installed', 'More suggestions' categories are displayed.
58The new application is listed in the 'Installed' category (note: this may take a few seconds after installation finished).58The new application is listed in the 'Installed' category (note: this may take a few seconds after installation finished).
59
60Preview activation
61------------------
62LMB activates an application preview for installable/purchasable applications.
63
64Setup:
65Software-Center cache is updated (launch Software-Center at least once).
66
67Actions:
681. Left-click an application from 'More Suggestions' category of Applications Lens.
69
70Expected Result:
71Application preview is displayed in the Dash, with buttons to download/buy the application and visit developer's site (may not always
72be present if not available).
73
74Preview activation (RMB)
75------------------------
76RMB activates an application preview for all categories of applications (Installed/Recently Used/More Suggestions).
77
78Setup:
79Software-Center cache is updated (launch Software-Center at least once).
80
81Actions:
821. Right-click an application in any of the Applications Lens categories.
83
84Expected Result:
85Application preview is displayed in the Dash, with buttons to download/buy the application and visit developer's site (may not always
86be present if not available) for installable apps or Uninstall/Launch for installed apps (Uninstall may not be available for some
87important base packages).
88
89Starting applications
90---------------------
91LMB starts an application from Recently Used/Installed category.
92
93Setup:
94Software-Center cache is updated (launch Software-Center at least once).
95
96Actions:
971. Left-click an application from 'Installed' or 'Recently Used' category of Applications Lens.
98
99Expected Result:
100Application gets started and Dash hides.

Subscribers

People subscribed via source and target branches