GNOME Bugzilla – Bug 133393
Clicking on items in the treeview does not open the item in the right pane
Last modified: 2012-07-20 12:03:42 UTC
If the user clicks an item in the treeview, like an image, a text file or a pdf file (when the option "Show only folders" is disabled), the item does not show up using the corresponding component, like nautilus-text-view/gedit, eog or gpdf. Instead it shows the contents of the folder the item is in. However, when the item is right-clicked, and "open" is choosen from the context menu, the item is viewed using its corresponding component. Steps to reproduce: 1) Make sure the "show only folders" in the nautilus preferences is disabled 2) Open a directory containing a text file using the treeview 3) Click on the text file in the treeview Expected result: the textfile shows up on the right pane using a suitable bonobo component Real result: the contents of the folder the item is in, are shown
I get warnings that there's no component to view the selected file. This is 2.8.x. Not sure what happens in 2.9.x.
*** Bug 164631 has been marked as a duplicate of this bug. ***
We don't have any components in Nautilus 2.10. It should fire up the relevant application, though.
Created attachment 46483 [details] [review] Proposed patch (against HEAD).
- nautilus_window_info_open_location - (view->details->window, - uri, - mode, - 0, - NULL); + application = nautilus_mime_get_default_application_for_file (file); + if (application) { + nautilus_launch_application (application, file, GTK_WINDOW (view->details->window)); + gnome_vfs_mime_application_free (application); + } We open executables with their default handler??? + } + + if (nautilus_file_is_directory (file)) { nautilus_window_info_open_location (view->details->window, uri, Should this really be outside the final else clause? Then you will open a new window even if we alread did something. } + else { + application = nautilus_mime_get_default_application_for_file (file); Strange indentation. Also, for nautilus_mime_get_default_application_for_file to work you must have nautilus_mime_actions_get_open_with_file_attributes() loaded. And we only requested ACTIVATION_URI.
> We open executables with their default handler??? ...so we shouldn't do anything if we encounter such a file, right? > Should this really be outside the final else clause? Then you will > open a new window even if we alread did something. This is *IN* the final elif clause. > Strange indentation. Yes. > Also, for nautilus_mime_get_default_application_for_file to work you > must have nautilus_mime_actions_get_open_with_file_attributes() > loaded. And we only requested ACTIVATION_URI. Right.
*** Bug 46242 has been marked as a duplicate of this bug. ***
Has this patch been sent to the list/updated? At the moment nautilus just return a message saying the file is not a folder when clicking on it, which is bug #311107. With the patch that works quite fine, but it opens with one click when you use double click.
Alex? Maybe you could answer the question what we should do if we encounter executables? Sebastien: > it opens with one click when you use double click. I'm not sure whether that is intentional or not.
*** Bug 311107 has been marked as a duplicate of this bug. ***
Updating version to 2.13, milestoning to 2.14.
This is still broken, updating version.
*** Bug 604399 has been marked as a duplicate of this bug. ***
https://bugzilla.gnome.org/attachment.cgi?id=167214 is a patch from the duplicate bug 604399. We should decide whether to remove the "Show only Folders" option completely or to keep it and fix this bug.
(In reply to comment #14) > https://bugzilla.gnome.org/attachment.cgi?id=167214 is a patch from the > duplicate bug 604399. > We should decide whether to remove the "Show only Folders" option completely or > to keep it and fix this bug. I would be very annoyed if this option was removed. And very happy if the bug was fixed ! The tree view is primarily a tool to help navigate in the file system, it's not meant to replace the right pane... The "Show only folders" option should actually be the default.
Oops sorry, I misread the bug and your last comment Cosimo, forget my last message.
This bug should no longer be present with the latest Nautilus redesign.