Merge lp:~stolowski/unity-lens-applications/no-preview-for-commands into lp:unity-lens-applications

Proposed by Paweł Stołowski
Status: Merged
Approved by: Michal Hruby
Approved revision: 341
Merged at revision: 341
Proposed branch: lp:~stolowski/unity-lens-applications/no-preview-for-commands
Merge into: lp:unity-lens-applications
Diff against target: 62 lines (+8/-6)
2 files modified
src/daemon.vala (+2/-2)
src/runner.vala (+6/-4)
To merge this branch: bzr merge lp:~stolowski/unity-lens-applications/no-preview-for-commands
Reviewer Review Type Date Requested Status
Michal Hruby (community) Approve
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+168874@code.launchpad.net

Commit message

Changed unity-runner:// prefix to x-unity-no-preview: (no // is intended) to disable previews for commands

Description of the change

Changed unity-runner:// prefix to x-unity-no-preview: (no // is intended) to disable previews for commands. Requires corresponding change in Unity.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Michal Hruby (mhr3) wrote :

Looks fine. +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 2013-05-16 11:37:05 +0000
3+++ src/daemon.vala 2013-06-12 08:29:28 +0000
4@@ -1695,10 +1695,10 @@
5 return new Unity.ActivationResponse (Unity.HandledType.NOT_HANDLED);
6 }
7 }
8- else if (uri.has_prefix ("unity-runner://"))
9+ else if (uri.has_prefix (UNITY_RUNNER_PREFIX))
10 {
11 string orig;
12- orig = uri.offset (15);
13+ orig = uri.offset (UNITY_RUNNER_PREFIX.length);
14 if (orig.has_prefix("\\\\"))
15 orig = orig.replace ("\\\\","smb://");
16 if (uri_regex != null && uri_regex.match (orig)) {
17
18=== modified file 'src/runner.vala'
19--- src/runner.vala 2013-05-16 11:37:05 +0000
20+++ src/runner.vala 2013-06-12 08:29:28 +0000
21@@ -23,6 +23,8 @@
22
23 namespace Unity.ApplicationsLens {
24
25+ public static const string UNITY_RUNNER_PREFIX = "x-unity-no-preview:";
26+
27 private class AboutEntry {
28 public string name;
29 public string exec;
30@@ -255,7 +257,7 @@
31 icon = ContentType.get_icon (mimetype);
32 foreach (var dir in dirs_match)
33 {
34- uri = @"unity-runner://$(dir)";
35+ uri = UNITY_RUNNER_PREFIX + dir;
36 add_result (model, uri, icon.to_string (),
37 category_id, mimetype, dir);
38 }
39@@ -264,7 +266,7 @@
40 foreach (var final_exec in executables_match)
41 {
42 // TODO: try to match to a desktop file for the icon
43- uri = @"unity-runner://$(final_exec)";
44+ uri = UNITY_RUNNER_PREFIX + final_exec;
45 display_name = get_icon_uri_and_mimetype (final_exec, out icon, out uri, out mimetype);
46 add_result (model, uri, icon.to_string (),
47 category_id, mimetype, display_name);
48@@ -375,12 +377,12 @@
49 entry = about_entries[exec_string];
50 if (entry != null)
51 {
52- uri = @"unity-runner://$(entry.exec)";
53+ uri = UNITY_RUNNER_PREFIX + entry.exec;
54 icon = entry.icon;
55 return entry.name;
56 }
57
58- uri = @"unity-runner://$(exec_string)";
59+ uri = UNITY_RUNNER_PREFIX + exec_string;
60
61
62 // if it's a folder, show… a folder icone! + right exec

Subscribers

People subscribed via source and target branches