GNOME Bugzilla – Bug 600540
Widget not exposed in glade 3 when creating catalog.
Last modified: 2018-03-26 15:10:29 UTC
Hello. I don't know if this is a glade 3 bug or a gtk+ bug. The bug itself is: 1.- Create a widget (using pygtk, but I think the bindings are not the problem) derived from gtk.Bin. This widget uses a gtk.Builder file with a treeview and a treemodel. 2.- The treeview from the gtk.Builder file is reparented to my derived gtk.Bin widget, like this: self.treeview = self.builder.get_object("mytreeview") self.treeview.reparent(self) #self is my widget derived from gtk.Bin. When using this widget in a catalog, the treeview is not shown at all. But the strange thing is that if I make my widget inherit from gtk.VBox, everything works correctly. I think it should do the same for gtk.Bin, if I'm right.
Im not sure that its a bug at all. When exactly do you get this problem; when building your target UI with GtkBuilder on the target system ? or when loading the custom catalog to use locally in Glade ? I think that if you are deriving from GtkBin, then Glade will automatically give you a child placeholder in the adaptor's ->post_create() vfunc, you can safely override that function to not be called and not have the placeholder there. Essentially though, my guess is that you are just calling gtk_widget_reparent() on the treeview, to put it into a GtkBin, that already contains a placeholder, so as it is a GtkBin; it will refuse to add your treeview.
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/glade/issues/49.