From 21f14abc1e25468e15aed799e7d5ca50fad11569 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ant=C3=B3nio=20Fernandes?= Date: Sat, 1 Jan 2022 21:42:20 +0000 Subject: paned: Don't override properties when buildable We set GtkPaned:{shrink,resize}-{start,end}-child when adding children as buildable. This overrides whatever value the UI definition had set for the properties. Even if not set explicitly, the properties have a default value anyway. This fixes an issue I found while porting nautilus to GTK 4, as the start child was shrinkable even though :shrink-start-child was set to FALSE in the .ui file. --- gtk/gtkpaned.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/gtk/gtkpaned.c b/gtk/gtkpaned.c index 51a35d95fc..32c58ea5c5 100644 --- a/gtk/gtkpaned.c +++ b/gtk/gtkpaned.c @@ -787,28 +787,20 @@ gtk_paned_buildable_add_child (GtkBuildable *buildable, if (g_strcmp0 (type, "start") == 0) { gtk_paned_set_start_child (self, GTK_WIDGET (child)); - gtk_paned_set_resize_start_child (self, FALSE); - gtk_paned_set_shrink_start_child (self, TRUE); } else if (g_strcmp0 (type, "end") == 0) { gtk_paned_set_end_child (self, GTK_WIDGET (child)); - gtk_paned_set_resize_end_child (self, TRUE); - gtk_paned_set_shrink_end_child (self, TRUE); } else if (type == NULL && GTK_IS_WIDGET (child)) { if (self->start_child == NULL) { gtk_paned_set_start_child (self, GTK_WIDGET (child)); - gtk_paned_set_resize_start_child (self, FALSE); - gtk_paned_set_shrink_start_child (self, TRUE); } else if (self->end_child == NULL) { gtk_paned_set_end_child (self, GTK_WIDGET (child)); - gtk_paned_set_resize_end_child (self, TRUE); - gtk_paned_set_shrink_end_child (self, TRUE); } else g_warning ("GtkPaned only accepts two widgets as children"); -- cgit v1.2.1