[gnome-games] gnomine: Change icon on pause button when paused
- From: Robert Ancell <rancell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-games] gnomine: Change icon on pause button when paused
- Date: Tue, 21 Aug 2012 04:47:56 +0000 (UTC)
commit f5911b5bb520d763d4160c82ff7f07edaaaadd3c
Author: Robert Ancell <robert ancell canonical com>
Date: Tue Aug 21 16:28:58 2012 +1200
gnomine: Change icon on pause button when paused
gnomine/src/gnomine.vala | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/gnomine/src/gnomine.vala b/gnomine/src/gnomine.vala
index 6f85d07..4846a64 100644
--- a/gnomine/src/gnomine.vala
+++ b/gnomine/src/gnomine.vala
@@ -23,6 +23,7 @@ public class GnoMine : Gtk.Application
private Gtk.Image worried_face_image;
private Gtk.ToolButton fullscreen_button;
+ private Gtk.ToolButton pause_button;
/* Main window */
private Gtk.Window window;
@@ -184,7 +185,7 @@ public class GnoMine : Gtk.Application
hint_button.show ();
toolbar.insert (hint_button, -1);
- var pause_button = new Gtk.ToolButton.from_stock (GnomeGamesSupport.STOCK_PAUSE_GAME);
+ pause_button = new Gtk.ToolButton.from_stock (GnomeGamesSupport.STOCK_PAUSE_GAME);
pause_button.action_name = "app.pause";
pause_button.show ();
toolbar.insert (pause_button, -1);
@@ -622,11 +623,13 @@ public class GnoMine : Gtk.Application
{
minefield_view.minefield.paused = true;
hint_action.set_enabled (false);
+ pause_button.stock_id = GnomeGamesSupport.STOCK_RESUME_GAME;
}
else
{
minefield_view.minefield.paused = false;
hint_action.set_enabled (true);
+ pause_button.stock_id = GnomeGamesSupport.STOCK_PAUSE_GAME;
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]