Merge lp:~3v1n0/unity-lens-files/show-folder-select into lp:unity-lens-files

Proposed by Marco Trevisan (Treviño)
Status: Merged
Approved by: Paweł Stołowski
Approved revision: 248
Merged at revision: 247
Proposed branch: lp:~3v1n0/unity-lens-files/show-folder-select
Merge into: lp:unity-lens-files
Diff against target: 22 lines (+5/-4)
1 file modified
src/daemon.vala (+5/-4)
To merge this branch: bzr merge lp:~3v1n0/unity-lens-files/show-folder-select
Reviewer Review Type Date Requested Status
Paweł Stołowski (community) Approve
PS Jenkins bot continuous-integration Pending
Review via email: mp+148462@code.launchpad.net

Commit message

Daemon: select target file when Showing in their folder.

Description of the change

Launch the filemanager with the target file as parameter when showing it in its folder, so that the filemanager will select it.

To post a comment you must log in.
Revision history for this message
Paweł Stołowski (stolowski) wrote :

5 var path = GLib.Path.get_dirname (uri);

Could you please remove this line, it's not needed anymore.

Apart from that it looks good and works as advertised, thanks!

review: Needs Fixing
248. By Marco Trevisan (Treviño)

Damon: The path variable is not needed anymore

Cleaning up...

Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

Ops... Sorry, thanks for pointing out.

Fixed! ;)

Revision history for this message
Paweł Stołowski (stolowski) wrote :

Great!

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-11-08 16:50:59 +0000
3+++ src/daemon.vala 2013-02-20 13:21:24 +0000
4@@ -1138,13 +1138,14 @@
5
6 public Unity.ActivationResponse on_preview_open_folder (string uri)
7 {
8- var path = GLib.Path.get_dirname (uri);
9+ var file_manager = AppInfo.get_default_for_type("inode/directory", true);
10+ var uris = new GLib.List<string> ();
11+ uris.append (uri);
12+
13 try
14 {
15- if (GLib.AppInfo.launch_default_for_uri (path, null))
16- {
17+ if (file_manager.launch_uris (uris, null))
18 return new Unity.ActivationResponse(Unity.HandledType.HIDE_DASH);
19- }
20 }
21 catch (GLib.Error e)
22 {

Subscribers

People subscribed via source and target branches