[gnome-sudoku/arnaudb/wip/gtk4: 39/47] Adapt to Container disparition.
- From: Arnaud B. <arnaudb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-sudoku/arnaudb/wip/gtk4: 39/47] Adapt to Container disparition.
- Date: Wed, 23 Sep 2020 16:36:39 +0000 (UTC)
commit 77d63b2d292e87870596e241951bcb869a28f979
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date: Wed Aug 5 19:07:29 2020 +0200
Adapt to Container disparition.
src/number-picker.vala | 4 ++--
src/print-dialog.vala | 2 +-
src/sudoku-view.vala | 14 +++++++++-----
3 files changed, 12 insertions(+), 8 deletions(-)
---
diff --git a/src/number-picker.vala b/src/number-picker.vala
index e98c77b..07bc108 100644
--- a/src/number-picker.vala
+++ b/src/number-picker.vala
@@ -53,7 +53,7 @@ private class NumberPicker : Grid
label.margin_end = earmark ? 16 : 8;
label.margin_top = earmark ? 0 : 4;
label.margin_bottom = earmark ? 8 : 4;
- button.add (label);
+ button.set_child (label);
if (!earmark)
button.clicked.connect (() => {
@@ -81,7 +81,7 @@ private class NumberPicker : Grid
var label = new Label ("<big>%s</big>".printf (_("Clear")));
label.use_markup = true;
- clear_button.add (label);
+ clear_button.set_child (label);
clear_button.clicked.connect (() => {
number_picked (0);
diff --git a/src/print-dialog.vala b/src/print-dialog.vala
index 2c4a05d..509c6b6 100644
--- a/src/print-dialog.vala
+++ b/src/print-dialog.vala
@@ -60,7 +60,7 @@ public class PrintDialog : Dialog
spinner = new Spinner ();
revealer = new Revealer ();
- revealer.add (spinner);
+ revealer.set_child (spinner);
revealer.valign = Align.CENTER;
((HeaderBar) get_header_bar ()).pack_end (revealer);
diff --git a/src/sudoku-view.vala b/src/sudoku-view.vala
index e49f817..c8761af 100644
--- a/src/sudoku-view.vala
+++ b/src/sudoku-view.vala
@@ -202,7 +202,7 @@ private class SudokuCellView : Widget
number_picker.set_clear_button_visibility (value != 0);
popover = new Popover ();
- popover.add (number_picker);
+ popover.set_child (number_picker);
popover.set_autohide (false);
popover.position = PositionType.BOTTOM;
popover.set_parent (this);
@@ -226,7 +226,7 @@ private class SudokuCellView : Widget
create_earmark_picker ();
earmark_popover = new Popover ();
- earmark_popover.add (earmark_picker);
+ earmark_popover.set_child (earmark_picker);
earmark_popover.set_autohide (false);
earmark_popover.position = PositionType.BOTTOM;
earmark_popover.set_parent (this);
@@ -538,14 +538,18 @@ public class SudokuView : Widget
frame.insert_after (this, /* insert first */ null);
overlay = new Overlay ();
- frame.add (overlay);
+ frame.set_child (overlay);
drawing = new DrawingArea ();
drawing.visible = false;
drawing.set_draw_func (draw_board);
if (grid != null)
- overlay.remove (grid);
+ {
+ grid.unparent ();
+ grid.destroy ();
+ overlay.set_child (null);
+ }
this.game = game;
this.game.paused_changed.connect(() => {
@@ -629,7 +633,7 @@ public class SudokuView : Widget
}
overlay.add_overlay (drawing);
- overlay.add (grid);
+ overlay.set_child (grid);
}
private void update_highlights ()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]