Merge lp:~robertcarr/unity-lens-applications/external-uris into lp:unity-lens-applications

Proposed by Robert Carr
Status: Merged
Approved by: Alex Launi
Approved revision: no longer in the source branch.
Merged at revision: 223
Proposed branch: lp:~robertcarr/unity-lens-applications/external-uris
Merge into: lp:unity-lens-applications
Diff against target: 41 lines (+9/-2)
1 file modified
src/daemon.vala (+9/-2)
To merge this branch: bzr merge lp:~robertcarr/unity-lens-applications/external-uris
Reviewer Review Type Date Requested Status
Alex Launi (community) Approve
Review via email: mp+74449@code.launchpad.net

Description of the change

Set an external URI in the model for installed applications containing the URI for the desktop file, fixes https://bugs.launchpad.net/unity/+bug/756614

To post a comment you must log in.
Revision history for this message
Alex Launi (alexlauni) wrote :

+1

review: Approve
223. By Robert Carr

Merge lp:~robertcarr/unity-lens/applications/external-uris

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/daemon.vala'
2--- src/daemon.vala 2011-08-25 10:41:46 +0000
3+++ src/daemon.vala 2011-09-07 15:02:36 +0000
4@@ -603,6 +603,7 @@
5
6 foreach (var pkginfo in results.results)
7 {
8+ string external_uri;
9 if (pkginfo.desktop_file == null)
10 continue;
11
12@@ -615,6 +616,7 @@
13 string uri = @"application://$(desktop_id)";
14 if (uri in installed_uris || uri in available_uris)
15 continue;
16+ external_uri = uri;
17
18 /* Extract basic metadata and register de-dupe keys */
19 string display_name;
20@@ -658,14 +660,19 @@
21 uri = @"unity-install://$(pkginfo.package_name)/$(pkginfo.application_name)";
22 available_uris.add (uri);
23 }
24+ else
25+ {
26+ external_uri = "file://" +((DesktopAppInfo)
27+app).get_filename();
28+ }
29
30 Icon icon = find_pkg_icon (pkginfo);
31
32 model.append (uri, icon.to_string (),
33 category,"application/x-desktop",
34 display_name != null ? display_name : "",
35- comment != null ? comment : "", uri);
36-
37+ comment != null ? comment : "", external_uri);
38+
39 /* Stop if we added the number of items requested */
40 n_added++;
41 if (max_add > 0 && n_added >= max_add)

Subscribers

People subscribed via source and target branches