[four-in-a-row] Clean activate method.
- From: Arnaud B. <arnaudb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [four-in-a-row] Clean activate method.
- Date: Sat, 21 Dec 2019 16:37:41 +0000 (UTC)
commit f1a0c2e83edf418c3899b3dc81d28b6b3723ad13
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date: Sat Dec 21 14:55:29 2019 +0100
Clean activate method.
src/four-in-a-row.vala | 13 +++++--------
1 file changed, 5 insertions(+), 8 deletions(-)
---
diff --git a/src/four-in-a-row.vala b/src/four-in-a-row.vala
index 6b05699..19b94f2 100644
--- a/src/four-in-a-row.vala
+++ b/src/four-in-a-row.vala
@@ -164,6 +164,7 @@ private class FourInARow : Gtk.Application
history_button_2);
scorebox = new Scorebox (window, this);
+ scorebox.update (score, one_player_game); /* update visible player descriptions */
add_actions ();
@@ -178,6 +179,9 @@ private class FourInARow : Gtk.Application
window.allow_hint (false);
window.allow_undo (false);
+ prompt_player ();
+ game_reset ();
+
add_window (window);
}
private inline void add_actions ()
@@ -246,14 +250,7 @@ private class FourInARow : Gtk.Application
protected override void activate ()
{
- if (window.is_visible ())
- return;
-
- window.show ();
- game_board_view.queue_draw ();
- scorebox.update (score, one_player_game); /* update visible player descriptions */
- prompt_player ();
- game_reset ();
+ window.present ();
}
/*\
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]