gtk < 3.10 does not support GtkScaleButton internal children
Submitted by Greg Sheremeta
Link to original bug (#729486)
Description
Problem: gtk < 3.10 does not support internal children
gnome3 < 3.10 can't load our window because "Unknown internal child: plus_button" even though we targeted gnome 3.6.
Additional info:
greg@ubuntu-1310-tester:/projects/pithos/pithos/data/ui$ export GLADE_CATALOG_SEARCH_PATH='/home/greg/projects/pithos/pithos/data/ui'
greg@ubuntu-1310-tester:/projects/pithos/pithos/data/ui$ glade-previewer -f PithosWindow.ui -t pithos_window
GladeUI-Message: No displayable values for property GtkEntry::input-purpose GladeUI-Message: No displayable values for property GtkEntry::input-hints GladeUI-Message: No displayable values for property GtkTextView::input-purpose GladeUI-Message: No displayable values for property GtkTextView::input-hints GladeUI-Message: 1 missing displayable value for GtkCellRendererAccel::accel-mode GladeUI-Message: Glade needs artwork; a default icon will be used for the following classes: AboutPithosDialog needs an icon named 'widget-gtk-about-dialog'
Couldn't load builder definition: Unknown internal child: plus_button
greg@ubuntu-1310-tester:~/projects/pithos/pithos/data/ui$
IRC conversation:
16:11:54| <TingPing>
when you select a target version in glade it SHOULD work on a system with that version right?
16:13:10| <xjuan>
TingPing, yes, glade will tell you which classes and properties are not available in that target version
16:13:47| <TingPing>
well it seems to fail, guess ill open a issue over it
16:15:37| <xjuan>
what fails?
16:15:48| <TingPing>
builder.add_from_file(get_ui_file('main'))
16:15:48| <TingPing>
gi._glib.GError: Unknown internal child: plus_button
16:15:57| <TingPing>
on gtkvolumebutton
16:16:06| <xjuan>
if you are using a widget or property that is not supported in that target it will not fix it for you
16:16:23| <xjuan>
it should warn you about when you save the file
16:16:32| <TingPing>
it does not have any warnings
16:17:20| <TingPing>
just creating a gtkvolumebutton on a new version of glade will always fail on older gtk releases
16:18:30| <xjuan>
which versions?
16:18:55| <TingPing>
made in glade 3.16 on system with gtk 3.12, targeting 3.6 tested on machine with 3.8
16:18:55| <xjuan>
GtkScaleButton is been around since gtk2
16:19:08| <xjuan>
ok
16:20:07| <xjuan>
GtkScaleButton and GtkVolumeButton are widgets from gtk2 so they should work in any gtk3 version
16:24:38| <xjuan>
TingPing, so you saying it fails in gtk 3.8?
16:25:01| <TingPing>
yes it fails with the error i posted above
16:25:11| <TingPing>
3.10+ works
16:26:42| <xjuan>
hmm which language are you using?
16:27:14| * xjuan wonders if there is some special casing in bindings for internal widgets
16:27:17| <TingPing>
python 3
16:32:37| <xjuan>
TingPing, try loading your ui file with glade-previewer
16:33:18| <xjuan>
with a glade-previewer linked with gtk < 3.10
16:33:47| <xjuan>
and if that works then It would mean the problem is in the python bindings
16:42:20| <TingPing>
xjuan, that results in the same error: "Couldn't load builder definition: Unknown internal child: plus_button"
<xjuan>
TingPing, ok so gtk < 3.10 does not support those internal children
<xjuan>
I mean they are there but you can not access them from GtkBuilder
<TingPing>
so that will never be supported?
<xjuan>
TingPing, please file a bug in glade about it
<xjuan>
glade should not add those internal children if target is < 3.10
<TingPing>
ok cool. gshereme ^
<xjuan>
well they are supported in gtk >= 3.10 :)
<gshereme>
i'll open a bug. thanks xjuan