Created attachment 813885
0001-Bug-417952-Open-Containing-Folder-doesn-t-highlight-.patch

Hi, this patch uses the File Manager DBus Interface[1] to launch file
manager and select a file. When this DBus interface is not present, then
the current code is used, so to not break backward compatibility.

The DBus call to check if the file manager interface is present is only
called once, I used a static variable for that.

--

A quick note about how I got to this patch, I firstly cooked up a patch
that used gio api to find out the handler application of the
"inode/directory" mime type, so that returned me the current file
manager application, and then I would just call it with the full uri of
the downloaded file, but then I realize how painful linux diversity can
be.. some file managers when passed a full uri would try to 'run' the
file (as was thunar in xfce or konqueror in kde) while others would do
the expected behaviour (open folder and select file) only when a
specific flag was passed on the command line, so this was a file manager
hell but..

fortunately, the DBus file manager interface[1] is the perfect solution
to this, defining a common and concrete interface to open and reveal a
file in the default file manager, although currently is only implemented
by nautilus, it was agreed on FreeDesktop list by kde and xfce too, so
when they happen to implement it they will get this nice "open and
reveal" behaviour from firefox but in the meantime they will get the
current code which just opens the folder.

[1] http://www.freedesktop.org/wiki/Specifications/file-manager-
interface/

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/599846

Title:
  firefox right click open containing folder should highlight file

To manage notifications about this bug go to:
https://bugs.launchpad.net/firefox/+bug/599846/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to