In this example listview application I am writing, I am attaching custom signals to custom widgets put inside the Gtk.ListItems.
I’d like the parent of the listview to receive such custom signals.
The way I am trying to do this is to propagate the signal in cascade from child to parent; to finish climbing up the tree I would need the Gtk.ListItem (the one for the factory) to connect to such signal and handle a custom callback to further propagate the signal, but I don’t know how to change the BuilderScope of the ListItem ui file to do that.
You literally need to provide an object that implements the BuilderScope interface, and more accurately the BuilderScope.create_closure() virtual function. The create_closure() vfunc creates a closure—a callable object—from the name in the GtkBuilder UI definition file.
I’ve partially made it, meaning that I made the Gtk.ListItem execute a function which should emit the same custom signal of its child (hardcoded), but I still don’t know how to connect a callback to the Gtk.ListItems from the Gtk.Listview (changes pushed).