[gnome-nibbles] game: change pause button label to Resume when paused, switch focus to game view on resume
- From: Iulian Radu <iulianradu src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-nibbles] game: change pause button label to Resume when paused, switch focus to game view on resume
- Date: Mon, 26 Oct 2015 00:21:46 +0000 (UTC)
commit 1a255b03ea41bfbbec774b0fd44fb4a8192c25f0
Author: Iulian Radu <iulian radu67 gmail com>
Date: Thu Aug 20 14:26:39 2015 +0300
game: change pause button label to Resume when paused, switch focus to game view on resume
src/gnome-nibbles.vala | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/src/gnome-nibbles.vala b/src/gnome-nibbles.vala
index f209d5d..e6dd426 100644
--- a/src/gnome-nibbles.vala
+++ b/src/gnome-nibbles.vala
@@ -356,7 +356,7 @@ public class Nibbles : Gtk.Application
private void new_game_cb ()
{
- game.pause ();
+ pause_cb ();
var dialog = new Gtk.MessageDialog (window,
Gtk.DialogFlags.MODAL,
@@ -384,9 +384,16 @@ public class Nibbles : Gtk.Application
if (game != null)
{
if (game.is_running)
+ {
game.pause ();
+ pause_button.set_label (_("_Resume"));
+ }
else
+ {
game.unpause ();
+ pause_button.set_label (_("_Pause"));
+ view.grab_focus ();
+ }
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]