[gnome-sudoku/arnaudb/wip/gtk4: 40/43] Adapt to Container disparition.
- From: Arnaud B. <arnaudb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-sudoku/arnaudb/wip/gtk4: 40/43] Adapt to Container disparition.
- Date: Wed, 5 Aug 2020 17:41:00 +0000 (UTC)
commit d47778a783bd7193835b7432516d11b413a72c3b
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 0314ecd..ab75ac7 100644
--- a/src/print-dialog.vala
+++ b/src/print-dialog.vala
@@ -58,7 +58,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 ead0f6c..6edbf87 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);
@@ -533,14 +533,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(() => {
@@ -624,7 +628,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]