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 674556 - File chooser dialog does not save its sizes
File chooser dialog does not save its sizes
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: GtkFileChooser
2.24.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
Federico Mena Quintero
: 673790 677369 685347 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2012-04-22 11:38 UTC by Rion
Modified: 2013-01-02 23:17 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gtk+-2.24.10-r1.ebuild (7.82 KB, application/octet-stream)
2012-04-22 15:56 UTC, Rion
Details
small test case to show incorrect behaviour in gtk-2-24 (2.09 KB, text/x-csrc)
2012-07-01 22:10 UTC, Paul Davis
Details

Description Rion 2012-04-22 11:38:01 UTC
File chooser dialog is too large for my screen (almost full screen).
And unfortunately it does not remember its geometry. so I have to resize it every time when I need a smaller dialog (for example when "always on top" windows overlaps file chooser)

After some googling I found the sizes used are from .config/gtk-2.0/gtkfilechooser.ini file. So I temporary set more appropriate sizes there.
but I think this should be done automatically.
If I remove this file the geometry is not saved anyway.

Notice, its gtk-2 only problem. With gtk-3 file chooser works fine.
But since I use xfce and some additional gtk2 programs I'd like this to be fixed in gtk2 branch.
Comment 1 André Klapper 2012-04-22 15:27:39 UTC
Which exact gtk2 version is this about?
Comment 2 Rion 2012-04-22 15:56:52 UTC
Created attachment 212548 [details]
gtk+-2.24.10-r1.ebuild

2.24.10 with some gentoo patches
see attached gentoo ebuild (from official gentoo portage) for details
Comment 3 Federico Mena Quintero 2012-04-23 19:36:51 UTC
I can confirm this; restoring the size doesn't work in GTK+ 2.
Comment 4 Federico Mena Quintero 2012-04-23 19:43:15 UTC
It seems that gtkfilechooser.ini is not getting updated with the new size after you close the file chooser.
Comment 5 Federico Mena Quintero 2012-04-23 19:54:11 UTC
Argh!  Commit a0280d7f broke this.  In GTK+ 2.24, GtkFileChooserDialog no longer explicitly unmaps the child widget when the dialog gets unmapped, so gtk_file_chooser_default_unmap() doesn't get a chance to run.  That is where the size settings get saved.

Fix upcoming.
Comment 6 Federico Mena Quintero 2012-04-23 20:42:27 UTC
Fixed in commit 85c9b5c76.
Comment 7 Federico Mena Quintero 2012-06-06 19:55:32 UTC
*** Bug 673790 has been marked as a duplicate of this bug. ***
Comment 8 Federico Mena Quintero 2012-06-07 18:14:42 UTC
*** Bug 677369 has been marked as a duplicate of this bug. ***
Comment 9 Paul Davis 2012-07-01 22:09:09 UTC
Fairly sure that this commit broke/changed the behaviour of the file chooser button.

Small test program attached. Run program. Press "Click Me" to bring up a dialog with an FCB. Click the FCB, select "Other". Click on a folder in the left hand list, then click Open. The program will print to stdout indicating that the current folder has been changed. Then click "OK" in the dialog with the FCB.

GTK+ 2.24.10: after the dialog has run, the current folder is the same as the one selected.

Git 2-24: after the dialog has run, the current folder is the last one set by the program.
Comment 10 Paul Davis 2012-07-01 22:10:13 UTC
Created attachment 217791 [details]
small test case to show incorrect behaviour in gtk-2-24
Comment 11 Paul Davis 2012-07-01 22:18:00 UTC
I've just confirmed that reverting this commit fixes the behaviour described above.
Comment 12 Federico Mena Quintero 2012-07-03 18:22:55 UTC
Strange.  The only thing I can imagine causing this is the call to cancel_all_operations() in the unmap callback, but even that shouldn't change the selection.

Paul, is there a chance you could open a new bug with this info and the test program?
Comment 13 Paul Davis 2012-07-08 14:33:41 UTC
federico ... sorry for the delay, was away for a week. i'll do that. do you have a preferred title for the bug?
Comment 14 Federico Mena Quintero 2012-08-17 17:55:33 UTC
 How about "selection is reported incorrectly in file chooser button"?
Comment 15 Steven Sheehy 2012-09-16 02:43:20 UTC
(In reply to comment #13)
> federico ... sorry for the delay, was away for a week. i'll do that. do you
> have a preferred title for the bug?

Paul, did you ever open a bug for this regression? This is impacting users of my application with GTK+ 2.24.11.
Comment 16 Federico Mena Quintero 2012-10-03 20:20:45 UTC
*** Bug 685347 has been marked as a duplicate of this bug. ***
Comment 17 Paul Davis 2013-01-02 23:17:45 UTC
federico: #691040 now filed. i found a new instance of this broken behaviour today.