After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 133393 - Clicking on items in the treeview does not open the item in the right pane
Clicking on items in the treeview does not open the item in the right pane
Status: RESOLVED OBSOLETE
Product: nautilus
Classification: Core
Component: [obsolete] Sidebar Panel: Tree
2.91.x
Other All
: Normal normal
: 3.2
Assigned To: Nautilus Maintainers
Nautilus Maintainers
: 46242 164631 311107 604399 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2004-02-04 12:52 UTC by miko2
Modified: 2012-07-20 12:03 UTC
See Also:
GNOME target: ---
GNOME version: 2.91/3.0


Attachments
Proposed patch (against HEAD). (3.27 KB, patch)
2005-05-16 12:27 UTC, Christian Neumair
needs-work Details | Review

Description miko2 2004-02-04 12:52:13 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
Comment 1 Kjartan Maraas 2005-01-11 13:24:08 UTC
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.
Comment 2 Sebastien Bacher 2005-05-15 23:13:21 UTC
*** Bug 164631 has been marked as a duplicate of this bug. ***
Comment 3 Christian Neumair 2005-05-16 12:26:22 UTC
We don't have any components in Nautilus 2.10. It should fire up the relevant
application, though.
Comment 4 Christian Neumair 2005-05-16 12:27:03 UTC
Created attachment 46483 [details] [review]
Proposed patch (against HEAD).
Comment 5 Alexander Larsson 2005-05-16 13:09:45 UTC
-			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.

Comment 6 Christian Neumair 2005-05-16 13:25:56 UTC
> 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.
Comment 7 Christian Neumair 2005-05-22 16:21:15 UTC
*** Bug 46242 has been marked as a duplicate of this bug. ***
Comment 8 Sebastien Bacher 2005-08-15 18:00:08 UTC
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.
Comment 9 Christian Neumair 2005-09-18 14:33:11 UTC
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.
Comment 10 Christian Neumair 2005-10-12 21:24:34 UTC
*** Bug 311107 has been marked as a duplicate of this bug. ***
Comment 11 Christian Neumair 2005-10-12 21:25:11 UTC
Updating version to 2.13, milestoning to 2.14.
Comment 12 Cosimo Cecchi 2008-08-21 10:23:41 UTC
This is still broken, updating version.
Comment 13 Cosimo Cecchi 2011-03-31 19:32:06 UTC
*** Bug 604399 has been marked as a duplicate of this bug. ***
Comment 14 Cosimo Cecchi 2011-03-31 19:33:18 UTC
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.
Comment 15 Ovocean 2011-09-11 08:11:09 UTC
(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.
Comment 16 Ovocean 2011-09-11 08:17:43 UTC
Oops sorry, I misread the bug and your last comment Cosimo, forget my last message.
Comment 17 William Jon McCann 2012-07-20 12:03:42 UTC
This bug should no longer be present with the latest Nautilus redesign.