[gnome-tetravex] Disable pause button when game is solved.
- From: Mario Wenzel <mariowenzel src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-tetravex] Disable pause button when game is solved.
- Date: Wed, 12 Feb 2014 10:38:32 +0000 (UTC)
commit ab8efe8b79aa68c5d0c86540c57671b31e1aab43
Author: Mario Wenzel <maweki gmail com>
Date: Wed Feb 12 11:38:06 2014 +0100
Disable pause button when game is solved.
When the game is allready solved via the "solve" button there is
no need to have the game be pauseable.
src/gnome-tetravex.vala | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/src/gnome-tetravex.vala b/src/gnome-tetravex.vala
index 12f6c99..4ce53ae 100644
--- a/src/gnome-tetravex.vala
+++ b/src/gnome-tetravex.vala
@@ -220,6 +220,7 @@ public class Tetravex : Gtk.Application
var pause = lookup_action ("pause") as SimpleAction;
pause.change_state (false);
+ pause.set_enabled (true);
new_game_solve_stack.set_visible_child_name ("solve");
update_button_states ();
@@ -297,6 +298,9 @@ public class Tetravex : Gtk.Application
{
puzzle.solve ();
new_game_solve_stack.set_visible_child_name ("new-game");
+
+ var pause = lookup_action ("pause") as SimpleAction;
+ pause.set_enabled (false);
}
private void help_cb ()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]