[gnome-nibbles] Prevent user clicking buttons before the score is saved
- From: Iulian Radu <iulianradu src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-nibbles] Prevent user clicking buttons before the score is saved
- Date: Sun, 14 Feb 2016 18:37:32 +0000 (UTC)
commit 8c133dd0fdccc7b7d2336e56265b913e7877c028
Author: Gabriel Ivascu <ivascu gabriel59 gmail com>
Date: Sun Feb 14 18:45:08 2016 +0200
Prevent user clicking buttons before the score is saved
src/gnome-nibbles.vala | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/src/gnome-nibbles.vala b/src/gnome-nibbles.vala
index b3aed25..470dd23 100644
--- a/src/gnome-nibbles.vala
+++ b/src/gnome-nibbles.vala
@@ -700,6 +700,10 @@ public class Nibbles : Gtk.Application
// trigger the scores dialog to be opened if the high scores table is
// not yet filled....)
+ /* Disable these here to prevent the user clicking the buttons before the score is saved */
+ new_game_action.set_enabled (false);
+ pause_action.set_enabled (false);
+
if (game.numhumans != 1)
return;
@@ -826,9 +830,6 @@ public class Nibbles : Gtk.Application
private void game_over (int score, long last_score)
{
- new_game_action.set_enabled (false);
- pause_action.set_enabled (false);
-
var game_over_label = new Gtk.Label (_(@"Game Over!"));
game_over_label.halign = Gtk.Align.CENTER;
game_over_label.valign = Gtk.Align.START;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]