Hi,
in GTK 4, gtk_builder_connect_signals
and gtk_builder_connect_signals_full
were removed:
https://developer.gnome.org/gtk4/stable/GtkBuilder.html
What are your advice to replace those functions ?
Hi,
in GTK 4, gtk_builder_connect_signals
and gtk_builder_connect_signals_full
were removed:
https://developer.gnome.org/gtk4/stable/GtkBuilder.html
What are your advice to replace those functions ?
Look at GtkBuilderScope, though where possible you should use templates instead of GtkBuilder directly
To clarify:
GtkBuilderScope
interface in an ancillary objectGtkBuilderScope
interface provides virtual functions for:
GType
of a type from its type name (the old GtkBuilderClass.get_type_from_name()
virtual function)GType
of a type from a function nameGClosure
for a function name and its arguments (the old GtkBuilderConnectFunc
)GtkBuilderScope
implementation, you set it as the scope of the GtkBuilder
instance you need to connect signals toSo, for instance, Python bindings would need to create a BuilderPythonScope
class that implements GtkBuilderScope
, and set it as the scope for the GtkBuilder
instance if they want to resolve Python callables to signal handlers.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.