[gnome-sudoku/arnaudb/wip/gtk4: 18/43] Widgets are visible.
- From: Arnaud B. <arnaudb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-sudoku/arnaudb/wip/gtk4: 18/43] Widgets are visible.
- Date: Wed, 5 Aug 2020 17:40:59 +0000 (UTC)
commit c8752f5b55cbe275c90201b0b4e8f571b570a481
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date: Sun Apr 12 14:25:56 2020 +0200
Widgets are visible.
TODO check the revealer.
src/gnome-sudoku.vala | 11 +++++------
src/number-picker.vala | 5 -----
src/print-dialog.vala | 3 +--
src/sudoku-view.vala | 4 +---
4 files changed, 7 insertions(+), 16 deletions(-)
---
diff --git a/src/gnome-sudoku.vala b/src/gnome-sudoku.vala
index 896a6a4..32b60e5 100644
--- a/src/gnome-sudoku.vala
+++ b/src/gnome-sudoku.vala
@@ -315,7 +315,7 @@ public class Sudoku : Gtk.Application
dialog.destroy ();
});
- dialog.show ();
+ dialog.present ();
}
}
@@ -387,7 +387,6 @@ public class Sudoku : Gtk.Application
view.show_warnings = settings.get_boolean ("show-warnings");
view.highlighter = settings.get_boolean ("highlighter");
- view.show ();
game_box.pack_start (view);
game.cell_changed.connect (() => {
@@ -428,7 +427,7 @@ public class Sudoku : Gtk.Application
dialog.destroy ();
});
- dialog.show ();
+ dialog.present ();
});
}
@@ -506,7 +505,7 @@ public class Sudoku : Gtk.Application
dialog.destroy ();
});
- dialog.show ();
+ dialog.present ();
}
private void show_game_view ()
@@ -524,14 +523,14 @@ public class Sudoku : Gtk.Application
if (current_game_mode == GameMode.PLAY)
{
play_custom_game_button.visible = false;
- play_pause_button.visible = true;
+ play_pause_button.show ();
}
else
{
clock_label.hide ();
clock_image.hide ();
play_custom_game_button.visible = true;
- play_pause_button.visible = false;
+ play_pause_button.hide ();
}
}
diff --git a/src/number-picker.vala b/src/number-picker.vala
index b503d49..e98c77b 100644
--- a/src/number-picker.vala
+++ b/src/number-picker.vala
@@ -54,7 +54,6 @@ private class NumberPicker : Grid
label.margin_top = earmark ? 0 : 4;
label.margin_bottom = earmark ? 8 : 4;
button.add (label);
- label.show ();
if (!earmark)
button.clicked.connect (() => {
@@ -71,8 +70,6 @@ private class NumberPicker : Grid
if (n == 5)
button.grab_focus ();
-
- button.show ();
}
}
@@ -85,7 +82,6 @@ private class NumberPicker : Grid
var label = new Label ("<big>%s</big>".printf (_("Clear")));
label.use_markup = true;
clear_button.add (label);
- label.show ();
clear_button.clicked.connect (() => {
number_picked (0);
@@ -100,7 +96,6 @@ private class NumberPicker : Grid
this.margin_bottom = 2;
this.row_spacing = 3;
this.column_spacing = 3;
- this.show ();
}
public void set_clear_button_visibility (bool visible)
diff --git a/src/print-dialog.vala b/src/print-dialog.vala
index 79956d3..4766b4d 100644
--- a/src/print-dialog.vala
+++ b/src/print-dialog.vala
@@ -86,7 +86,6 @@ public class PrintDialog : Dialog
public bool start_spinner_cb ()
{
revealer.set_transition_type (RevealerTransitionType.SLIDE_LEFT);
- revealer.show_all ();
spinner.start ();
revealer.set_reveal_child (true);
return Source.REMOVE;
@@ -128,7 +127,7 @@ public class PrintDialog : Dialog
var boards = SudokuGenerator.generate_boards_async.end (res);
spinner.stop ();
- revealer.hide ();
+ revealer.hide (); // TODO check if hide is the good thing
var printer = new SudokuPrinter (boards, this);
if (printer.print_sudoku () == PrintOperationResult.APPLY)
diff --git a/src/sudoku-view.vala b/src/sudoku-view.vala
index c3b2175..b6d65e4 100644
--- a/src/sudoku-view.vala
+++ b/src/sudoku-view.vala
@@ -509,6 +509,7 @@ public class SudokuView : AspectFrame
add (overlay);
drawing = new DrawingArea ();
+ drawing.visible = false;
drawing.draw.connect (draw_board);
if (grid != null)
@@ -597,9 +598,6 @@ public class SudokuView : AspectFrame
overlay.add_overlay (drawing);
overlay.add (grid);
- grid.show_all ();
- overlay.show ();
- drawing.hide ();
}
private void update_highlights ()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]