GtkButton GTK_WIDGET_RECEIVES_DEFAULT not set when using old .glade files
Submitted by Roger Leigh
Link to original bug (#605974)
Description
Created attachment 150748 Old glade interface
Version: 3.6.7 (on Debian GNU/Linux [current unstable])
I'm converting existing .glade files used with libglade to GtkBuilder .ui files.
If you load the attached file in glade, and inspect the three GtkButtons (Quit, Reset, Calculate) at the bottom of the window, you'll see that Reset and Calculate can default, and Calculate has the default. However, none of the three can receive default, and this is required. I suspect GTK_WIDGET_RECEIVES_DEFAULT is a new-ish addition to GTK+, and this is an issue loading older .glade files. If I create a new GtkButton in glade and inspect it, it will receive the default by default, and this should also be the case when loading older files or else the interface behaviour is broken.
What's broken: when the interface is loaded, you can't activate a button by tabbing to it and pressing enter; only space activates. This is fixed by manually setting the "receives default" property, but this should not be required--glade should be correctly defaulting the property so that old glade interfaces behave correctly.
Other issues I noticed: GtkVBoxes pack horizontally unless you manually set the orientation to vertical (I saw this was already reported). GtkBuilder has no means to load the interface from a given root. Given that my primary use of libglade is to load in a widget hierarchy and then pack it into a custom subclassed GtkWindow widget, I'll now need to mess around with reparenting widgets. Not having this existing functionality present in GtkBuilder is quite a regression, which I hope will be rectified. Alternatively, allowing GtkBuilder widget hierarchies to /not/ have a GtkWindow as the top-level widget would also be a valid solution--it would just require the user to manually pack the top-level (which would be fine by me).
Regards, Roger
Attachment 150748, "Old glade interface":
ogcalc.glade