GNOME Bugzilla – Bug 556376
Cannot immediately extract archive to current directory shown in file chooser dialog
Last modified: 2009-12-30 01:37:41 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.
I saw this bug in Deluge as well. https://bugs.launchpad.net/ubuntu/+source/deluge-torrent/+bug/181788
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).
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.
This is indeed a gtk+ issue with file chooser, see http://bugzilla.gnome.org/show_bug.cgi?id=516714
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).
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?
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.
Created attachment 131977 [details] [review] diff for previous change The patch diff file.
This bug looks like a duplicate of Bug 518045.
*** Bug 518045 has been marked as a duplicate of this bug. ***
This bug is a duplicate of bug 516714
True. Thanks! *** This bug has been marked as a duplicate of bug 516714 ***