GNOME Bugzilla – Bug 547479
Currently selected file on DBUS
Last modified: 2009-02-20 00:02:57 UTC
Presently there is no means for another application to know what file or folder is currently selected in a Nautilus window. This takes away a lot of great features launcher applications (such as GNOME Do) and such could potentially do. It seems like putting the currently selected file in the active/most recently active Nautilus window on DBUS would allow a lot of applications to extend their functionality in a way which would encourage use of Nautilus.
I agree that better D-Bus interaction is very desirable. However, you can achieve selection change notification with classical X programming. You may want to listen to the "owner-change" signal of the GtkClipboard created with gtk_clipboard_get (GDK_SELECTION_CLIPBOARD), and fetch the selection data with the "text/uri-list" atom. You can then check that Nautilus owns the clipboard by verifying that the WM_CLASS of the clipboard owner is "nautilus".
Thanks for the bug report. This particular bug has already been reported into our bug tracking system, but please feel free to report any further bugs you find. *** This bug has been marked as a duplicate of 498506 ***