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 547988 - Open button sensitive when nothing selected, returns nothing
Open button sensitive when nothing selected, returns nothing
Status: RESOLVED OBSOLETE
Product: gtk+
Classification: Platform
Component: Widget: GtkFileChooser
2.8.x
Other All
: Normal minor
: ---
Assigned To: gtk-bugs
Federico Mena Quintero
nautilus[EMC08]
Depends on:
Blocks:
 
 
Reported: 2008-08-16 05:43 UTC by Fabricio Godoy
Modified: 2018-04-15 00:16 UTC
See Also:
GNOME target: ---
GNOME version: 2.21/2.22


Attachments
Where is current directory (65.74 KB, image/png)
2010-07-10 15:05 UTC, Fabricio Godoy
  Details
file-chooser: make accept action sensitive only when has selection (5.01 KB, patch)
2014-02-20 20:48 UTC, William Jon McCann
committed Details | Review
file-chooser: emit selection-changed when location entry changes too (4.83 KB, patch)
2014-02-28 20:20 UTC, William Jon McCann
committed Details | Review

Description Fabricio Godoy 2008-08-16 05:43:30 UTC
Please describe the problem:
In an open directory dialog when followed bellow steps I'm not able to choose current directory.

Steps to reproduce:
1. Open Nautilus
2. Press Ctrl+F
3. Search anything
4. In field from side of "Local", choose "Other"
5. Browse a subfolder (example: /home/user/documents)
6. Back to parent by clicking on navigation buttons (example: /home/user)
7. Press "Open"

Actual results:
The subfolder (child) is choosed instead of parent.

Expected results:
Parent folder choosed to open.

Does this happen every time?
Yes

Other information:
Comment 1 Edouard Ewans 2008-12-14 17:22:36 UTC
The only problem is see is that the subfolder is still "highlighted".
Are you sure this is a bug?
Comment 2 Fabricio Godoy 2008-12-14 17:31:39 UTC
Is not an error, but should be desired a easiest behavior.
Comment 3 Edouard Ewans 2008-12-16 16:16:43 UTC
OK. I am trying to fix this issue. I think the problem is  nautilus-query-editor.c. Have you any ideas to improve this behavior? thanks.
Comment 4 Fabricio Godoy 2008-12-16 16:31:16 UTC
I think that when you back to parent none of childs should be selected as you go to any folder at first time.
Comment 5 Allan Day 2010-07-09 10:02:39 UTC
This is a difficult report to understand. What is 'field from side of "Local"'?! What is the open directory dialog?!

What I think you are suggesting is that selections should be remembered when browsing via search results. Opening a directory in a search result and then pressing back to return to those search results, the directory should be selected.

We already have a generic bug for remembering selections when browsing. I'm going to mark this as a dupe of that for now. Please let me know if I have interpreted your report correctly though.

*** This bug has been marked as a duplicate of bug 557462 ***
Comment 6 Fabricio Godoy 2010-07-09 15:51:19 UTC
No, the bug relates to open directory dialog not nautilus himself.
Open directory dialog example: http://dl.dropbox.com/u/1671797/open.dialog.bug547988.png

Do a search into a directory that contains subdirectories.
Choose a location to search: http://dl.dropbox.com/u/1671797/second.box.bug547988.png
In open direcory dialog, first subdirectory will be selected.
Click in Open button, the subdirectory will be selected not current one.

If you go to subdirectory and come back to parent happens this too.
The open dialog should select current directory not the selected, I think.
This can, of course, confuse people. How to know if current directory or selected directory should be selected.

A better solution maybe should be do not select any directory or file automatically, the user only may do this.
Then coming back to parent directory none of subdirectories should be selected, meaning that user wants to open current directory.

Let me know if you understand.
Comment 7 Allan Day 2010-07-09 16:25:06 UTC
Ah, I follow you. Steps to reproduce:

1. Perform a search in Nautilus.
2. Add a location filter
3. Select Other... from the location combobox
4. Press Open in the open dialog

Expected behaviour: the first directory should be opened.

Actual behaviour: the open dialog closes but the search location hasn't updated.

Seems like this is a generic bug relating to GtkFileChooser. I can't see a dupe.

The open button isn't greyed out when nothing is selected. If the open button is used while nothing is selected, the dialog closes but doesn't seem to return anything.

Hope I got this right. ;)
Comment 8 Allan Day 2010-07-09 16:28:40 UTC
Renaming for clarity.
Comment 9 Fabricio Godoy 2010-07-09 19:20:05 UTC
Here, nautilus 2.28.4, when FileChooser is opened the first directory is automatically selected.
Even when is a directory without subdirectories the open button works well, nothing to update (it's right, I think).

The problem is: How I select current directory?
FileChooser always select one item, this force me to go up one level to select current directory.
Comment 10 Allan Day 2010-07-10 10:08:02 UTC
(In reply to comment #9)
> Here, nautilus 2.28.4, when FileChooser is opened the first directory is
> automatically selected.

Not here - I don't get that.

> Even when is a directory without subdirectories the open button works well,
> nothing to update (it's right, I think).
> 
> The problem is: How I select current directory?
> FileChooser always select one item, this force me to go up one level to select
> current directory.

What do you mean by current directory?
Comment 11 Fabricio Godoy 2010-07-10 15:05:58 UTC
Created attachment 165630 [details]
Where is current directory

This image say everything
Comment 12 William Jon McCann 2014-02-20 20:48:52 UTC
Created attachment 269838 [details] [review]
file-chooser: make accept action sensitive only when has selection
Comment 13 Jasper St. Pierre (not reading bugmail) 2014-02-20 21:53:51 UTC
Review of attachment 269838 [details] [review]:

Looks good.
Comment 14 William Jon McCann 2014-02-20 22:24:16 UTC
Attachment 269838 [details] pushed as 1e87b82 - file-chooser: make accept action sensitive only when has selection
Comment 15 Volker Sobek (weld) 2014-02-27 00:21:00 UTC
Reopening because this patch prevents you to create a new file with gedit and its kind in case there is no file selected. It's especially obvious when you try to create a new file in an empty directory.
Comment 16 William Jon McCann 2014-02-28 20:20:05 UTC
Created attachment 270597 [details] [review]
file-chooser: emit selection-changed when location entry changes too
Comment 17 Matthias Clasen 2014-03-03 11:35:18 UTC
Attachment 270597 [details] pushed as 77fced5 - file-chooser: emit selection-changed when location entry changes too
Comment 18 Ondrej Holy 2015-01-20 10:00:50 UTC
Still it is possible to return nothing:
1/ run e.g. eog
2/ image->open 
3/ ctrl+l
4/ press enter or use open button
Comment 19 André Klapper 2016-09-15 08:30:25 UTC
[Removing outdated "GNOME target" value.]
Comment 20 Matthias Clasen 2018-02-10 05:01:59 UTC
We're moving to gitlab! As part of this move, we are moving bugs to NEEDINFO if they haven't seen activity in more than a year. If this issue is still important to you and still relevant with GTK+ 3.22 or master, please reopen it and we will migrate it to gitlab.
Comment 21 Matthias Clasen 2018-04-15 00:16:14 UTC
As announced a while ago, we are migrating to gitlab, and bugs that haven't seen activity in the last year or so will be not be migrated, but closed out in bugzilla.

If this bug is still relevant to you, you can open a new issue describing the symptoms and how to reproduce it with gtk 3.22.x or master in gitlab:

https://gitlab.gnome.org/GNOME/gtk/issues/new