[gnome-games] [same-gnome-clutter] Add "Help" menuitem, currently launches normal Same help
- From: Tim Horton <hortont src gnome org>
- To: svn-commits-list gnome org
- Subject: [gnome-games] [same-gnome-clutter] Add "Help" menuitem, currently launches normal Same help
- Date: Sat, 18 Jul 2009 22:40:32 +0000 (UTC)
commit 64c1023a2a0cd62e670815d2095ad46e4721d59f
Author: Tim Horton <hortont svn gnome org>
Date: Sat Jul 18 18:38:20 2009 -0400
[same-gnome-clutter] Add "Help" menuitem, currently launches normal Same help
lightsoff/Makefile.am | 6 +++++-
lightsoff/src/main.js | 3 +--
same-gnome-clutter/Makefile.am | 4 ++++
same-gnome-clutter/data/same-gnome.ui | 10 ++++++++++
same-gnome-clutter/src/main.js | 4 ++++
5 files changed, 24 insertions(+), 3 deletions(-)
---
diff --git a/lightsoff/Makefile.am b/lightsoff/Makefile.am
index f3ad262..e90a768 100644
--- a/lightsoff/Makefile.am
+++ b/lightsoff/Makefile.am
@@ -1,4 +1,8 @@
-SUBDIRS = data/themes help
+SUBDIRS = data/themes
+
+if BUILD_HELP
+SUBDIRS += help
+endif
lightsoffdir = $(pkgdatadir)/lightsoff
lightsoff_DATA = \
diff --git a/lightsoff/src/main.js b/lightsoff/src/main.js
index 4c8a55a..5b76bdf 100755
--- a/lightsoff/src/main.js
+++ b/lightsoff/src/main.js
@@ -7,7 +7,6 @@ Clutter = imports.gi.Clutter;
Gtk = imports.gi.Gtk;
GtkBuilder = imports.gtkbuilder;
GnomeGamesSupport = imports.gi.GnomeGamesSupport;
-_ = imports.gettext.gettext;
Gtk.init(Seed.argv);
GtkClutter.init(Seed.argv);
@@ -30,7 +29,7 @@ handlers = {
},
show_help: function(selector, ud)
{
- GnomeGamesSupport.help_display(window, _("lightsoff"), null);
+ GnomeGamesSupport.help_display(window, "lightsoff", null);
},
reset_score: function(selector, ud)
{
diff --git a/same-gnome-clutter/Makefile.am b/same-gnome-clutter/Makefile.am
index 7374e08..dd4b700 100644
--- a/same-gnome-clutter/Makefile.am
+++ b/same-gnome-clutter/Makefile.am
@@ -1,5 +1,9 @@
SUBDIRS = data/themes
+#if BUILD_HELP
+#SUBDIRS += help
+#endif
+
samedir=$(pkgdatadir)/same-gnome-clutter
same_DATA = \
diff --git a/same-gnome-clutter/data/same-gnome.ui b/same-gnome-clutter/data/same-gnome.ui
index 1a23f0e..c02510d 100644
--- a/same-gnome-clutter/data/same-gnome.ui
+++ b/same-gnome-clutter/data/same-gnome.ui
@@ -97,6 +97,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/same-gnome-clutter/src/main.js b/same-gnome-clutter/src/main.js
index 76d47d4..e404734 100755
--- a/same-gnome-clutter/src/main.js
+++ b/same-gnome-clutter/src/main.js
@@ -39,6 +39,10 @@ handlers = {
show_scores: function(selector, ud)
{
},
+ show_help: function(selector, ud)
+ {
+ GnomeGamesSupport.help_display(window, "same-gnome", null);
+ },
new_game: function(selector, ud)
{
board.new_game();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]