Well, I probably answered my question.
One way to do this is to override gtk.Buildable parser_finished (), which gives access to the builder that created the class instance itself. The method is called after the entire XML file has been loaded, so all the additional widgets that we might want to get are already present and initialized:
class MyDialog(gtk.Dialog, gtk.Buildable): __gtype_name__ = "MyDialog" def do_parser_finished(self, builder): self.treeview = builder.get_object("treeview1")
It should be noted that for some reason (at least for me, in pygtk 2.12), if I do not explicitly inherit from gtk.Buildable, the override method is not called, even the thought of gtk.Dialog already implements the built-in interface.
source share