Skip to content

Add 'remove' method to GtkPaned

Rastersoft requested to merge rastersoft/gtk:add_remove_method_to_paned into main

In Gtk3, GtkPaned supports, as any widget derived from GtkContainer, the 'gtk_container_remove' method.

In Gtk4, GtkContainer was removed, and thus any widget that can contain other widgets must implement its own set of methods to allow to remove a child.

Although gtk_paned_set_start_child() and gtk_paned_set_end_child() can be used to remove the inner children just by passing NULL, it requires to know in which side is located the child. Also, porting code from Gtk3 can be a little more complex due to this lack.

This patch fixes this by adding a gtk_paned_remove() method.

Edited by Rastersoft

Merge request reports