Merge lp:~stolowski/unity-lens-applications/binary-name-as-comment into lp:unity-lens-applications

Proposed by Paweł Stołowski
Status: Merged
Approved by: Michal Hruby
Approved revision: 294
Merged at revision: 294
Proposed branch: lp:~stolowski/unity-lens-applications/binary-name-as-comment
Merge into: lp:unity-lens-applications
Diff against target: 35 lines (+10/-2)
1 file modified
src/daemon.vala (+10/-2)
To merge this branch: bzr merge lp:~stolowski/unity-lens-applications/binary-name-as-comment
Reviewer Review Type Date Requested Status
Michal Hruby (community) Approve
Review via email: mp+122081@code.launchpad.net

Commit message

Provide application binary name via comment. Needed by home lens.

Description of the change

Provide application binary name via comment.

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

Simple and clean. +1

review: Approve

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 2012-08-21 13:39:01 +0000
3+++ src/daemon.vala 2012-08-30 14:58:28 +0000
4@@ -879,6 +879,14 @@
5 });
6 }
7
8+ /**
9+ * Sanitize executable name -- make it suitable for Home Lens.
10+ */
11+ private static string sanitize_binary_name (string name)
12+ {
13+ return GLib.Path.get_basename (name);
14+ }
15+
16 private void add_pkg_search_result (Unity.Package.SearchResult results,
17 Set<string> installed_uris,
18 Set<string> available_uris,
19@@ -918,7 +926,7 @@
20 case Category.APPLICATIONS:
21 installed_uris.add (uri);
22 display_name = app.get_display_name ();
23- comment = app.get_description ();
24+ comment = sanitize_binary_name (app.get_executable ());
25 break;
26 case Category.AVAILABLE:
27 available_uris.add (uri);
28@@ -1433,7 +1441,7 @@
29
30 results.append (app_uri, app.get_icon().to_string(), category_id,
31 "application/x-desktop", app.get_display_name (),
32- app.get_description (), full_uri);
33+ sanitize_binary_name (app.get_executable ()), full_uri);
34 }
35 }
36

Subscribers

People subscribed via source and target branches