I have this UI file edited with Glade 3.18.3. I open the UI in the (C) gtk program (no problem here, no error messages).
Then I tried to get the widget references out of the builder object using gtk_builder_get_object, but could not find any.
I read that gtkbuilder used to set the name attribute of the widgets to the id, but doesn't do that anymore. So I defined the name in a couple of widgets, but that didn't help.
In desesperation, I added a simple loop which calls gtk_builder_get_objects, but this function returns NULL:
GSList *lp, *lst = gtk_builder_get_objects(builder);
printf("%p\n", lst);
for (lp = lst; lp != NULL; lp = lp->next) {
printf("%s\n", (char *)(lp->data));
}
Anyone?
The problem was that the
nameproperty of the window containing the widgets must also be set in the UI, else thegtk_builder_add_objects_from_filewon't work either.This is going to be a major headache. The UI is quite complicated (a couple of hundreds of widgets). So that means I have to visit them all in Glade to edit their
name... or maybe write a script. And this worked so well before.