[gtk/bin-removal: 8/12] Use gtk_aspect_frame_set_child throughout



commit b8153fb9f1a3c615850911aab55d66004054be28
Author: Matthias Clasen <mclasen redhat com>
Date:   Fri May 1 14:53:55 2020 -0400

    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;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]