[gnome-mines/arnaudb/wip/gtk4: 35/40] Adapt old Container API.




commit e09ca5d1db9a6cff284488244beec28df4a3398a
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date:   Mon Sep 7 17:59:36 2020 +0200

    Adapt old Container API.

 src/gnome-mines.vala           | 10 +++++-----
 src/minefield-view.vala        |  2 +-
 src/theme-selector-dialog.vala | 10 +++++-----
 3 files changed, 11 insertions(+), 11 deletions(-)
---
diff --git a/src/gnome-mines.vala b/src/gnome-mines.vala
index 3a2d467..4aa2011 100644
--- a/src/gnome-mines.vala
+++ b/src/gnome-mines.vala
@@ -255,7 +255,7 @@ public class Mines : Gtk.Application
         minefield_overlay = (Overlay) ui_builder.get_object ("minefield_overlay");
         minefield_aspect = (AspectFrame) ui_builder.get_object ("minefield_aspect");
         minefield_aspect.obey_child = true;
-        minefield_overlay.add (minefield_view);
+        minefield_overlay.set_child (minefield_view);
 
         paused_box = (Box) ui_builder.get_object ("paused_box");
         buttons_box = (Box) ui_builder.get_object ("buttons_box");
@@ -349,7 +349,7 @@ public class Mines : Gtk.Application
         var label = new Label (null);
         label.set_markup (make_minefield_description (8, 8, 10));
         label.set_justify (Justification.CENTER);
-        button.add (label);
+        button.set_child (label);
 
         button = (Button) builder.get_object ("medium_size_btn");
         button.clicked.connect (medium_size_clicked_cb);
@@ -357,7 +357,7 @@ public class Mines : Gtk.Application
         label = new Label (null);
         label.set_markup (make_minefield_description (16, 16, 40));
         label.set_justify (Justification.CENTER);
-        button.add (label);
+        button.set_child (label);
 
         button = (Button) builder.get_object ("large_size_btn");
         button.clicked.connect (large_size_clicked_cb);
@@ -365,7 +365,7 @@ public class Mines : Gtk.Application
         label = new Label (null);
         label.set_markup (make_minefield_description (30, 16, 99));
         label.set_justify (Justification.CENTER);
-        button.add (label);
+        button.set_child (label);
 
         button = (Button) builder.get_object ("custom_size_btn");
         button.clicked.connect (show_custom_game_screen);
@@ -373,7 +373,7 @@ public class Mines : Gtk.Application
         label = new Label (null);
         label.set_markup_with_mnemonic ("<span size='xx-large' weight='heavy'>?</span>\n" + dpgettext2 
(null, "board size", _("Custom")));
         label.set_justify (Justification.CENTER);
-        button.add (label);
+        button.set_child (label);
     }
 
     private void startup_custom_game_screen (Builder builder)
diff --git a/src/minefield-view.vala b/src/minefield-view.vala
index 5fd98ad..c895217 100644
--- a/src/minefield-view.vala
+++ b/src/minefield-view.vala
@@ -160,7 +160,7 @@ public class MinefieldView : Gtk.Widget
         frame.insert_after (this, /* insert first */ null);
 
         grid = new Gtk.Grid ();
-        frame.add (grid);
+        frame.set_child (grid);
 
         this.force_nolongpress = false;
         grid.row_homogeneous = true;
diff --git a/src/theme-selector-dialog.vala b/src/theme-selector-dialog.vala
index 5c6126a..6252891 100644
--- a/src/theme-selector-dialog.vala
+++ b/src/theme-selector-dialog.vala
@@ -93,9 +93,9 @@ public class ThemeSelectorDialog : Gtk.Dialog
         frame.margin_end = 6;
         frame.margin_top = 6;
         frame.margin_bottom = 6;
-        frame.add (view);
+        frame.set_child (view);
         reveal_nonmines (view);
-        box.add (frame);
+        box.append (frame);
 
         return box;
     }
@@ -119,10 +119,10 @@ public class ThemeSelectorDialog : Gtk.Dialog
 
         var headerbar = get_header_bar () as Gtk.HeaderBar;
         headerbar.set_show_title_buttons (true);
-        get_content_area ().add (create_preview_widget (out minefield));
+        get_content_area ().append (create_preview_widget (out minefield));
 
-        buttons_holder.add (previous);
-        buttons_holder.add (next);
+        buttons_holder.append (previous);
+        buttons_holder.append (next);
         buttons_holder.add_css_class ("linked");
         headerbar.pack_start (buttons_holder);
 


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