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 696498 - can't set download folder
can't set download folder
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: GtkFileChooser
3.7.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
Federico Mena Quintero
Depends on:
Blocks:
 
 
Reported: 2013-03-24 16:33 UTC by Adam Dingle
Modified: 2013-06-22 00:39 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Bug 696498 - Emit "file-set" on select file in GtkFileChooserButton (983 bytes, patch)
2013-06-20 18:04 UTC, Garrett Regier
none Details | Review
Bug 696498 - Connect to the correct GtkFileChooserButton signal (1.05 KB, patch)
2013-06-20 18:10 UTC, Garrett Regier
none Details | Review

Description Adam Dingle 2013-03-24 16:33:44 UTC
I'm running Epiphany 3.7.92 on Ubuntu 13.04 (Raring).

Epiphany won't let me set the download folder.  When I open the Preferences window, the "Download folder:" item there appears empty.  If I select a folder such as Desktop, then when I close the Preferences window and open it again, "Download folder" appears empty once again, and downloads still show up in my Downloads folder, not the folder I chose.

I wonder whether this bug is specific to Ubuntu.
Comment 1 Xan Lopez 2013-03-25 09:17:36 UTC
This works if you open the file chooser and select a folder, but not if you select it from the initial dropdown. The "current-folder-changed" signal is not emitted in the second case. Looks like a GTK+ bug to me, reassigning.
Comment 2 Adam Dingle 2013-03-25 20:24:16 UTC
On Ubuntu at least, this doesn't work even if I open the file chooser and select a folder.   For me, even in that case if I close the Preferences window and reopen it then "Download folder" is empty again.
Comment 3 Adam Dingle 2013-03-25 20:31:45 UTC
Aha - if I open the file chooser and select a folder then Epiphany actually *does* use that folder for saving downloads.  The folder is not displayed in the Preferences window, however.
Comment 4 Xan Lopez 2013-03-25 21:30:44 UTC
(In reply to comment #3)
> Aha - if I open the file chooser and select a folder then Epiphany actually
> *does* use that folder for saving downloads.  The folder is not displayed in
> the Preferences window, however.

For me the folder *is* displayed in the file chooser button. I guess we are just using different (but both broken) versions of GTK+.

This used to work until relatively recently, so I assume it is related to the latest changes in the widget that Federico blogged about. FWIW I use the gtk-3-8 branch as of today (5442023b80).
Comment 5 Adam Dingle 2013-03-25 21:33:13 UTC
Interesting.  I'm using libgtk 3.7.12 (including the various GTK patches that Ubuntu applies).
Comment 6 Adam Dingle 2013-04-01 11:04:54 UTC
Looks like this is related to or maybe a duplicate of bug 695216 .
Comment 7 Garrett Regier 2013-06-20 18:04:04 UTC
Created attachment 247371 [details] [review]
Bug 696498 - Emit "file-set" on select file in GtkFileChooserButton

Otherwise, when the combo box changes and calls select file
the combo box is updated but the signal is not emitted, unlike
when the file is selected in the dialog.
Comment 8 Garrett Regier 2013-06-20 18:10:40 UTC
Created attachment 247372 [details] [review]
Bug 696498 - Connect to the correct GtkFileChooserButton signal

See https://git.gnome.org/browse/gtk+/commit/?id=45ad8a06ad511ad95a74172172b9fe459bc666ad
Comment 9 Federico Mena Quintero 2013-06-22 00:39:36 UTC
(In reply to comment #7)
> Created an attachment (id=247371) [details] [review]
> Bug 696498 - Emit "file-set" on select file in GtkFileChooserButton
> 
> Otherwise, when the combo box changes and calls select file
> the combo box is updated but the signal is not emitted, unlike
> when the file is selected in the dialog.

Thanks!  Good catch.

I've put the signal emission in a slightly better place, where it is *actually* the user that changed the selection, as opposed to any programmatic change through the file chooser's API.  This is in the master branch in commit 32e75adf6, and in the gtk-3-8 branch in commit 22ca91ffa.

At this point I don't remember while GtkFileChooserButton makes a distinction between user-initiated changes and programmatic ones.  I think applications are better off just listening for the "selection-changed" signal; Epiphany should definitely do that.

Epiphany and other applications should *NOT* use "current-folder-changed" to detect changes in the selection.  That signal only means, "the user changed directories in the file chooser dialog", not necessarily that the *selection* has been changed.

I've just pushed a fix for Epiphany to use "selection-changed".