From 1f63896c6b9d01930bb3ab04eb0bdd528eb46ab9 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Fri, 1 May 2020 14:53:55 -0400 Subject: [PATCH] Use gtk_aspect_frame_set_child throughout Replace all uses of gtk_container_add on aspect frames by gtk_aspect_frame_set_child. --- demos/gtk-demo/sliding_puzzle.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/demos/gtk-demo/sliding_puzzle.c b/demos/gtk-demo/sliding_puzzle.c index 2c8abf8ac7..82442b4b54 100644 --- a/demos/gtk-demo/sliding_puzzle.c +++ b/demos/gtk-demo/sliding_puzzle.c @@ -270,12 +270,12 @@ start_puzzle (GdkPaintable *paintable) /* Remove the old grid (if there is one) */ grid = gtk_bin_get_child (GTK_BIN (frame)); if (grid) - gtk_container_remove (GTK_CONTAINER (frame), grid); + gtk_aspect_frame_set_child (GTK_ASPECT_FRAME (frame), NULL); /* Create a new grid */ grid = gtk_grid_new (); gtk_widget_set_can_focus (grid, TRUE); - gtk_container_add (GTK_CONTAINER (frame), grid); + gtk_aspect_frame_set_child (GTK_ASPECT_FRAME (frame), grid); aspect_ratio = gdk_paintable_get_intrinsic_aspect_ratio (paintable); if (aspect_ratio == 0.0) aspect_ratio = 1.0;