[gtk/bin-removal: 7/44] aspect frame use fixup



commit 1adfb284e627aedac5495f6dd048638876f170fc
Author: Matthias Clasen <mclasen redhat com>
Date:   Sat May 2 11:05:27 2020 -0400

    aspect frame use fixup

 demos/gtk-demo/sliding_puzzle.c | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)
---
diff --git a/demos/gtk-demo/sliding_puzzle.c b/demos/gtk-demo/sliding_puzzle.c
index 82442b4b54..9ea5c1ca3d 100644
--- a/demos/gtk-demo/sliding_puzzle.c
+++ b/demos/gtk-demo/sliding_puzzle.c
@@ -267,11 +267,6 @@ start_puzzle (GdkPaintable *paintable)
   guint x, y;
   float aspect_ratio;
 
-  /* Remove the old grid (if there is one) */
-  grid = gtk_bin_get_child (GTK_BIN (frame));
-  if (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);
@@ -345,7 +340,7 @@ reshuffle (void)
 {
   GtkWidget *grid;
 
-  grid = gtk_bin_get_child (GTK_BIN (frame));
+  grid = gtk_aspect_frame_get_child (GTK_ASPECT_FRAME (frame));
   if (solved)
     start_puzzle (puzzle);
   else
@@ -378,7 +373,7 @@ reconfigure (void)
   start_puzzle (puzzle); 
   popover = gtk_widget_get_ancestor (size_spin, GTK_TYPE_POPOVER);
   gtk_popover_popdown (GTK_POPOVER (popover));
-  grid = gtk_bin_get_child (GTK_BIN (frame));
+  grid = gtk_aspect_frame_get_child (GTK_ASPECT_FRAME (frame));
   gtk_widget_grab_focus (grid);
 }
 


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