[gnome-games/sudoku-vala] gnome-sudoku: Connect show toolbar item
- From: Robert Ancell <rancell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-games/sudoku-vala] gnome-sudoku: Connect show toolbar item
- Date: Thu, 7 Apr 2011 23:58:37 +0000 (UTC)
commit 4b42612a7831b66ffe09746e97b8e408122bec5a
Author: Tiffany Antopolski <tiffany antopolski com>
Date: Fri Apr 8 09:58:25 2011 +1000
gnome-sudoku: Connect show toolbar item
gnome-sudoku/src/gnome-sudoku.vala | 14 +++++++++-----
1 files changed, 9 insertions(+), 5 deletions(-)
---
diff --git a/gnome-sudoku/src/gnome-sudoku.vala b/gnome-sudoku/src/gnome-sudoku.vala
index 0d890e4..c12143d 100644
--- a/gnome-sudoku/src/gnome-sudoku.vala
+++ b/gnome-sudoku/src/gnome-sudoku.vala
@@ -3,7 +3,7 @@ public class Application
private Gtk.Builder builder;
private SudokuGame game;
-
+ private Gtk.Toolbar toolbar;
private Gtk.Window window;
private SudokuView view;
@@ -22,6 +22,7 @@ public class Application
}
window = (Gtk.Window) builder.get_object ("sudoku_app");
var main_vbox = (Gtk.VBox) builder.get_object ("main_vbox");
+ toolbar = (Gtk.Toolbar) builder.get_object ("sudoku_toolbar");
game = new SudokuGame ();
game.set_from_string ("---------" +
@@ -37,7 +38,7 @@ public class Application
view = new SudokuView (game);
view.show ();
main_vbox.pack_start (view);
-
+ toolbar.hide();
builder.connect_signals (this);
}
@@ -113,9 +114,12 @@ public class Application
}
[CCode (cname = "G_MODULE_EXPORT toggle_toolbar_cb", instance_pos = -1)]
- public void toggle_toolbar_cb (Gtk.Widget widget)
- {
- stdout.printf ("TODO: Toggle toolbar\n");
+ public void toggle_toolbar_cb (Gtk.CheckMenuItem item)
+ {
+ if (item.active)
+ toolbar.show();
+ else
+ toolbar.hide();
}
[CCode (cname = "G_MODULE_EXPORT toggle_highlighter_cb", instance_pos = -1)]
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]