[gnome-games] [lightsoff] Add help menuitem
- From: Tim Horton <hortont src gnome org>
- To: svn-commits-list gnome org
- Subject: [gnome-games] [lightsoff] Add help menuitem
- Date: Thu, 16 Jul 2009 22:32:57 +0000 (UTC)
commit 6ee077a82d677a240e2407cc223f84bd9d458ce7
Author: Tim Horton <hortont424 gmail com>
Date: Sat Jul 11 21:39:17 2009 -0400
[lightsoff] Add help menuitem
lightsoff/data/main-window.ui | 10 ++++++++++
lightsoff/src/About.js | 3 +--
lightsoff/src/main.js.in | 5 +++++
3 files changed, 16 insertions(+), 2 deletions(-)
---
diff --git a/lightsoff/data/main-window.ui b/lightsoff/data/main-window.ui
index c1d04d2..d70d820 100644
--- a/lightsoff/data/main-window.ui
+++ b/lightsoff/data/main-window.ui
@@ -65,6 +65,16 @@
<object class="GtkMenu" id="help_menu">
<property name="visible">True</property>
<child>
+ <object class="GtkImageMenuItem" id="show_help_item">
+ <signal name="activate" handler="show_help"/>
+ <property name="label">games-contents</property>
+ <property name="visible">True</property>
+ <property name="use_underline">True</property>
+ <property name="use_stock">True</property>
+ <property name="accel_group">accel_group</property>
+ </object>
+ </child>
+ <child>
<object class="GtkImageMenuItem" id="show_about_item">
<signal name="activate" handler="show_about"/>
<property name="label">gtk-about</property>
diff --git a/lightsoff/src/About.js b/lightsoff/src/About.js
index a92d6db..177d494 100644
--- a/lightsoff/src/About.js
+++ b/lightsoff/src/About.js
@@ -3,7 +3,6 @@ GnomeGamesSupport = imports.gi.GnomeGamesSupport;
main = imports.main;
-// Not sure that this is acceptable; if it is, should it be in a Seed extension?
var _ = imports.gettext.gettext;
function show_about_dialog()
@@ -17,7 +16,7 @@ function show_about_dialog()
about_dialog.wrap_license = true;
about_dialog.logo_icon_name = "gnome-lightsoff";
about_dialog.website = "http://www.gnome.org/projects/gnome-games/";
- about_dialog.website_label = _("GNOME Games web site"); // this doesn't work for anyone
+ about_dialog.website_label = _("GNOME Games web site");
about_dialog.translator_credits = _("translator-credits");
about_dialog.set_authors(["Tim Horton"]);
diff --git a/lightsoff/src/main.js.in b/lightsoff/src/main.js.in
index 77bf9e3..4f5770e 100755
--- a/lightsoff/src/main.js.in
+++ b/lightsoff/src/main.js.in
@@ -7,6 +7,7 @@ Clutter = imports.gi.Clutter;
Gtk = imports.gi.Gtk;
GtkBuilder = imports.gtkbuilder;
GnomeGamesSupport = imports.gi.GnomeGamesSupport;
+var _ = imports.gettext.gettext;
GtkClutter.init(Seed.argv);
GnomeGamesSupport.runtime_init("lightsoff");
@@ -25,6 +26,10 @@ handlers = {
{
About.show_about_dialog();
},
+ show_help: function(selector, ud)
+ {
+ GnomeGamesSupport.help_display(window, _("lightsoff"), null);
+ },
reset_score: function(selector, ud)
{
game.reset_game();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]