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 556376 - Cannot immediately extract archive to current directory shown in file chooser dialog
Cannot immediately extract archive to current directory shown in file chooser...
Status: RESOLVED DUPLICATE of bug 516714
Product: file-roller
Classification: Applications
Component: general
2.24.x
Other All
: Normal normal
: ---
Assigned To: Paolo Bacchilega
file-roller-maint
: 518045 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2008-10-15 08:38 UTC by Matteo Settenvini
Modified: 2009-12-30 01:37 UTC
See Also:
GNOME target: ---
GNOME version: 2.23/2.24


Attachments
Small GTK example showing the bug (1.05 KB, text/x-c)
2008-12-16 19:32 UTC, Neil Roberts
  Details
Possible Workaround (270 bytes, patch)
2009-04-02 00:30 UTC, alex
none Details | Review
Better Workaround (385 bytes, patch)
2009-04-03 06:55 UTC, alex
none Details | Review
diff for previous change (18.25 KB, patch)
2009-04-03 07:14 UTC, alex
none Details | Review

Description Matteo Settenvini 2008-10-15 08:38:25 UTC
Please describe the problem:
When you select "extract archive", a file chooser window opens in order to let you select the target directory for extraction.

However, if I want to extract directly, say, to my Home directory, or the current one (the default), I cannot simply click on the "Extract" button: it won't work.

The only workaround I've found is to go up one directory, double-click on my Home dir, and *then* click "Extract". This works. Far from optimal: I've seen new users quite baffled by this.


Steps to reproduce:
1. Open an archive
2. Select the extract button from the main UI
3. Click the "Open" button


Actual results:
Nothing happens. User furrows her brow.

Expected results:
Extraction happens in currently shown directory, without navigating to some other folder and then turning back.

Does this happen every time?
Oh yes.

Other information:
Probably eligible for the "gnome-love" keyword.
Comment 1 cudjoe 2008-12-16 12:06:16 UTC
I saw this bug in Deluge as well.
https://bugs.launchpad.net/ubuntu/+source/deluge-torrent/+bug/181788
Comment 2 Neil Roberts 2008-12-16 19:32:22 UTC
Created attachment 124819 [details]
Small GTK example showing the bug

I think this is a generic problem with GTK+. It also happens when you try to import a folder with rythmbox. You can't just click ok when it defaults to importing your Music folder (you have to go up a folder and then back down).

Here's a simple test case in GTK. You can't press the ok button unless the central tree view has had focus. It will work even if you just click on the whitespace in the tree view (ie without selecting a file).
Comment 3 Matteo Settenvini 2008-12-17 09:58:26 UTC
Now that you mention it, this bug seems to happen in other applications too, only they usually want you to pick a file and not a directory, so you don't care much about it.

To be more clear: 

1. try opening EOG
2. Select "Open..." from the menu
3. Notice how a directory is selected on the treeview
4. Click on the "Open" button. Nothing happens.
5. Now click on another directory name in the treeview.
6. Clicking on "Open" will now expand the directory selected.

So, also for these, it seems that the first (automatic) selection when opening the dialog isn't honored.

Therefore, the right behavior should be, imo:
1. When selecting a file, auto-select first item in the treeview. When clicking open, expand/choose the selected item.
2. When selecting a directory, auto-select the current dir ('.'). When clicking on open, choose it.

This applies also to all other apps (like GEdit, ...), so it may very well be a gtk+ bug.
Comment 4 Gerard Lommerse 2008-12-22 01:18:22 UTC
This is indeed a gtk+ issue with file chooser, see http://bugzilla.gnome.org/show_bug.cgi?id=516714
Comment 5 alex 2009-04-02 00:30:30 UTC
Created attachment 131881 [details] [review]
Possible Workaround

The file chooser dialog is placed in the parent directory with current directory selected, if the pathbar is hidden then extract will extract to current directory (where the archive is located).
Comment 6 André Klapper 2009-04-02 08:21:21 UTC
alex: can you provide the patch by using "svn diff" and also add the ChangeLog diff by adding a ChangeLog entry to the ChangeLog file?
Comment 7 alex 2009-04-03 06:55:32 UTC
Created attachment 131976 [details] [review]
Better Workaround

I have noticed that this problem ONLY occurs when the "Location" pathbar is enabled in GtkFilechooser, therefore until Gtkfilechooser is fixed the only to get around the problem is to hide the pathbar by modifying the the gtkfilechooser.ini directly (a bit of a dirty hack but it works) so that the pathbar is hidden every time file-roller opens the dialog and thus the current directory is selected. I'm marking it as a patch, though it is more of a dirty temporary workaround.
Comment 8 alex 2009-04-03 07:14:04 UTC
Created attachment 131977 [details] [review]
diff for previous change

The patch diff file.
Comment 9 Karl Ostmo 2009-04-27 20:43:33 UTC
This bug looks like a duplicate of Bug 518045.
Comment 10 Alexander Kojevnikov 2009-08-20 08:07:51 UTC
*** Bug 518045 has been marked as a duplicate of this bug. ***
Comment 11 Nirbheek Chauhan 2009-12-30 01:28:00 UTC
This bug is a duplicate of bug 516714
Comment 12 André Klapper 2009-12-30 01:37:41 UTC
True. Thanks!

*** This bug has been marked as a duplicate of bug 516714 ***