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 691479 - Should provide "Open with" for folders
Should provide "Open with" for folders
Status: RESOLVED FIXED
Product: nautilus
Classification: Core
Component: File and Folder Operations
3.6.x
Other Linux
: Normal normal
: 3.16
Assigned To: Nautilus Maintainers
Nautilus Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-01-10 15:14 UTC by Torsten Schoenfeld
Modified: 2015-05-13 13:23 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
nautilus-view: allow folders to be opened in other app (1.33 KB, patch)
2015-03-02 22:13 UTC, Pawel Golinski
none Details | Review
his bug can be fixed by adding function nautilus_file_is_directory() which was previously deleted as mentioned in the bug (646 bytes, patch)
2015-03-04 09:20 UTC, rishabh
needs-work Details | Review
nautilus-view: allow folders to be opened in other app (1.16 KB, patch)
2015-05-13 11:17 UTC, Carlos Soriano
committed Details | Review

Description Torsten Schoenfeld 2013-01-10 15:14:52 UTC
Nautilus used to provide "Open with" options for folders in their context menu, until:

<http://git.gnome.org/browse/nautilus/commit/?id=7b9212cef4858f2a3f9158679c128be4bed65732>

The justification given is that no other applications handle folders by default.  Well, various media players like vlc do.  And image viewers like gthumb do.  The suggested workaround -- go into folder and select all files -- is cumbersome if it works.  For one thing, before you can successfully use "Select All", you have to wait for the folder to finish loading, which can be a while for big folders; if you do "Select All" too early, only a subset of the files will be selected.  But most importantly, in some cases this workaround doesn't work at all.

For example, what if I want to open a folder containing a mix of images and videos?  With nautilus 3.4, "Open with" on the folder allowed me to choose, say, gthumb which handles both file types just fine.  With 3.6, if I enter the folder and select all files, nautilus opens two applications in parallel (eog and totem).  Or this: I have a custom .desktop file that associates "/usr/bin/vlc bluray://%U" with inode/directory.  With nautilus 3.4, this allowed me to open blurays correctly via "Open with".

So, please reconsider.
Comment 1 André Klapper 2013-01-27 18:29:20 UTC
Surprised that this was available again in the meantime, as this was already removed earlier in bug 569668. Probably WONTFIX.
Comment 2 Torsten Schoenfeld 2013-01-27 18:43:00 UTC
I haven't read all the comments, but it appears to me that bug 569668 is about being able to change the default handler for folders.  This is not what this bug is about.
Comment 3 chris 2013-01-30 00:00:52 UTC
I think this is definitive an must have.
why does all this usefull things gone in nautiilus :(.
Comment 4 Luke Benstead 2015-02-21 10:07:05 UTC
I've written a text editor that allows opening a folder (as a project) and this is the primary action.

I just tried to make it possible to open a folder in my editor by right clicking, and selecting "Open With" like you can with files, and frustratingly found out that this is not possible with Nautilus.

While I understand that "Open" on a folder should open that folder in Nautilus, I don't see any reason why "Open With" can't also be provided if applications are registered to handle the inode/directory mimetype or similar.

It seems highly inconsistent to allow this behaviour on files and not folders when the result of the action is the same (e.g. to pass a path to the handling application). The only difference in behaviour is that the default should not be changeable.

If a patch was provided for this behaviour, would it be accepted?
Comment 5 Carlos Soriano 2015-02-23 10:45:40 UTC
I don't have some strong reason against this. It's not in the design tho.
I would like to have design input here, Allan?
Comment 6 Carlos Soriano 2015-02-25 13:23:18 UTC
bug intended for newcommers
Comment 7 Carlos Soriano 2015-02-25 13:25:05 UTC
I forgot to mention, Allan agreed on have this
Comment 8 Pawel Golinski 2015-03-02 22:13:16 UTC
Created attachment 298350 [details] [review]
nautilus-view: allow folders to be opened in other app

Option is being shown not only if there exists an app different
than nautilus to open that file, but also if user selected folders only.
Comment 9 rishabh 2015-03-04 09:20:12 UTC
Created attachment 298506 [details] [review]
his bug can be fixed by adding function nautilus_file_is_directory() which was previously deleted as mentioned in the bug
Comment 10 Carlos Soriano 2015-03-04 10:05:31 UTC
Review of attachment 298506 [details] [review]:

I think you are developing in something that is not master, since that code doesn't even exists.
Comment 11 Carlos Soriano 2015-03-04 10:29:22 UTC
Review of attachment 298350 [details] [review]:

::: src/nautilus-view.c
@@ +5990,3 @@
+	g_simple_action_set_enabled (G_SIMPLE_ACTION (action),
+                                     app != NULL ||
+                                    (selection_count >= 1 &&

Looks more clear selection_count > 0

Otherwise the code looks good =)
Comment 12 Isaac Ge 2015-03-12 03:14:35 UTC
(In reply to Pawel Golinski from comment #8)
> Created attachment 298350 [details] [review] [review]
> nautilus-view: allow folders to be opened in other app
> 
> Option is being shown not only if there exists an app different
> than nautilus to open that file, but also if user selected folders only.

Amazing that this fix the same place as Bug 745898. And my commit have been accepted already. These fixes may be conflict.

@Carlos Soriano So any idea?
Comment 13 Carlos Soriano 2015-03-12 08:37:18 UTC
(In reply to Isaac Ge from comment #12)
> (In reply to Pawel Golinski from comment #8)
> > Created attachment 298350 [details] [review] [review] [review]
> > nautilus-view: allow folders to be opened in other app
> > 
> > Option is being shown not only if there exists an app different
> > than nautilus to open that file, but also if user selected folders only.
> 
> Amazing that this fix the same place as Bug 745898. And my commit have been
> accepted already. These fixes may be conflict.
> 
> @Carlos Soriano So any idea?

Do you mean that the patch doesn't apply now?
If so, yes, because they modify lines in the same place. But we still want this (and I completely forgot to put it as a 3.16 target and therefore to fix it =) )
Comment 14 Carlos Soriano 2015-05-13 11:17:11 UTC
Created attachment 303301 [details] [review]
nautilus-view: allow folders to be opened in other app

So the user can open a folder in a different app.
This is useful in cases like IDEs or text editors
for entire projects.
Comment 15 Carlos Soriano 2015-05-13 13:23:15 UTC
Attachment 303301 [details] pushed as 5b197d1 - nautilus-view: allow folders to be opened in other app