GNOME Bugzilla – Bug 160264
GtkFileChooserDialog internal children are not built correctly
Last modified: 2005-02-12 01:17:41 UTC
1. Create a GtkFileChooserDialog using Glade 2.6.7 2. Save the GUI as a GLADE file 3. Load the GLADE file using libglade 2.4.1 4. Notice that the Open/Cancel buttons are missing This happens because GtkFileChooserDialog is registered as follows in libglade 2.4.1 (glade-gtk.c, line 1236): glade_register_widget (GTK_TYPE_FILE_CHOOSER_DIALOG, glade_standard_build_widget, NULL, NULL); Note the NULLs: internal children are not handled at all. To fix this this should be changed to: glade_register_widget (GTK_TYPE_FILE_CHOOSER_DIALOG, glade_standard_build_widget, gtk_dialog_build_children, dialog_find_internal_child); I'm not sure if gtk_dialog_build_children is completely appropriate for file chooser dialogs as well but at least it seems to work. Someone with more knowledge about libglade internals should verify this...
Created attachment 34420 [details] [review] Patch to fix the problem
*** Bug 155200 has been marked as a duplicate of this bug. ***
Does this bug need additional information? I'm waiting for a libglade release with a fix for this before I release a version of my program that uses GtkFileChooserDialogs using libglade.
(This has been reported in Debian too, see <http://bugs.debian.org/291508>.)
Created attachment 36666 [details] Simple test code and glade file to exhibit the existence of this problem Here's a simple program that shows the nature of the problem without any effort. The package contains a Makefile that builds a simple source which will load the supplied .glade file with only one widget - a file chooser dialog. The file chooser dialog will not have Open/Cancel buttons in it. You can quit the program by closing the file chooser dialog window. To run: tar jxf gladetest.tar.bz2 cd gladetest make ./gladetest You can then apply the patch attached to this bug report and try the program again. The Cancel/Open buttons should appear.
To make things clear: attachment 36666 [details] is a .tar.bz2 archive.
Given the dup, marking up. Vesa, you might want to email to the glade-devel list- I know that the bugzilla is not very well looked after, unfortunately.
Thanks for the patch. I've applied it and put out a new release. Sorry about not handling it sooner.