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
=== modified file 'src/daemon.vala'
--- src/daemon.vala 2011-08-25 10:41:46 +0000
+++ src/daemon.vala 2011-09-07 15:02:36 +0000
@@ -603,6 +603,7 @@
603 603
604 foreach (var pkginfo in results.results)604 foreach (var pkginfo in results.results)
605 {605 {
606 string external_uri;
606 if (pkginfo.desktop_file == null)607 if (pkginfo.desktop_file == null)
607 continue;608 continue;
608 609
@@ -615,6 +616,7 @@
615 string uri = @"application://$(desktop_id)";616 string uri = @"application://$(desktop_id)";
616 if (uri in installed_uris || uri in available_uris)617 if (uri in installed_uris || uri in available_uris)
617 continue;618 continue;
619 external_uri = uri;
618 620
619 /* Extract basic metadata and register de-dupe keys */621 /* Extract basic metadata and register de-dupe keys */
620 string display_name;622 string display_name;
@@ -658,14 +660,19 @@
658 uri = @"unity-install://$(pkginfo.package_name)/$(pkginfo.application_name)";660 uri = @"unity-install://$(pkginfo.package_name)/$(pkginfo.application_name)";
659 available_uris.add (uri); 661 available_uris.add (uri);
660 }662 }
663 else
664 {
665 external_uri = "file://" +((DesktopAppInfo)
666app).get_filename();
667 }
661 668
662 Icon icon = find_pkg_icon (pkginfo);669 Icon icon = find_pkg_icon (pkginfo);
663 670
664 model.append (uri, icon.to_string (),671 model.append (uri, icon.to_string (),
665 category,"application/x-desktop",672 category,"application/x-desktop",
666 display_name != null ? display_name : "",673 display_name != null ? display_name : "",
667 comment != null ? comment : "", uri);674 comment != null ? comment : "", external_uri);
668 675
669 /* Stop if we added the number of items requested */676 /* Stop if we added the number of items requested */
670 n_added++;677 n_added++;
671 if (max_add > 0 && n_added >= max_add)678 if (max_add > 0 && n_added >= max_add)

Subscribers

People subscribed via source and target branches