GNOME Bugzilla – Bug 674556
File chooser dialog does not save its sizes
Last modified: 2013-01-02 23:17:45 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.
Which exact gtk2 version is this about?
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
I can confirm this; restoring the size doesn't work in GTK+ 2.
It seems that gtkfilechooser.ini is not getting updated with the new size after you close the file chooser.
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.
Fixed in commit 85c9b5c76.
*** Bug 673790 has been marked as a duplicate of this bug. ***
*** Bug 677369 has been marked as a duplicate of this bug. ***
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.
Created attachment 217791 [details] small test case to show incorrect behaviour in gtk-2-24
I've just confirmed that reverting this commit fixes the behaviour described above.
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?
federico ... sorry for the delay, was away for a week. i'll do that. do you have a preferred title for the bug?
How about "selection is reported incorrectly in file chooser button"?
(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.
*** Bug 685347 has been marked as a duplicate of this bug. ***
federico: #691040 now filed. i found a new instance of this broken behaviour today.