[gnome-games/gsoc-seed-games] [same-gnome-clutter] Use the LO UI file for Same
- From: Tim Horton <hortont src gnome org>
- To: svn-commits-list gnome org
- Subject: [gnome-games/gsoc-seed-games] [same-gnome-clutter] Use the LO UI file for Same
- Date: Fri, 10 Jul 2009 01:53:08 +0000 (UTC)
commit 9473ac7218b4efe05235659dd49eccbac0331fad
Author: Tim Horton <hortont424 gmail com>
Date: Sun Jul 5 20:50:49 2009 -0400
[same-gnome-clutter] Use the LO UI file for Same
lightsoff/data/main-window.ui | 182 ++++++++++++++++----------------
same-gnome-clutter/data/same-gnome.ui | 63 ++++++++++--
same-gnome-clutter/src/main.js | 2 +-
3 files changed, 147 insertions(+), 100 deletions(-)
---
diff --git a/lightsoff/data/main-window.ui b/lightsoff/data/main-window.ui
index 2b8b218..c1d04d2 100644
--- a/lightsoff/data/main-window.ui
+++ b/lightsoff/data/main-window.ui
@@ -1,94 +1,94 @@
<?xml version="1.0"?>
<interface>
- <requires lib="gtk+" version="2.14"/>
- <object class="GtkWindow" id="game_window">
- <property name="title" translatable="yes">Lights Off</property>
- <property name="resizable">False</property>
- <accel-groups>
- <group name="accel_group"/>
- </accel-groups>
- <child>
- <object class="GtkVBox" id="game_vbox">
- <property name="visible">True</property>
- <property name="orientation">vertical</property>
- <child>
- <object class="GtkMenuBar" id="menu_bar">
- <property name="visible">True</property>
- <child>
- <object class="GtkMenuItem" id="game_menu_item">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Game</property>
- <property name="use_underline">True</property>
- <child type="submenu">
- <object class="GtkMenu" id="game_menu">
- <property name="visible">True</property>
- <child>
- <object class="GtkImageMenuItem" id="new_game_item">
- <signal name="activate" handler="reset_score"/>
- <property name="label">games-new-game</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_preferences_item">
- <signal name="activate" handler="show_settings"/>
- <property name="label">gtk-preferences</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="quit_item">
- <signal name="activate" handler="quit"/>
- <property name="label">gtk-quit</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>
- </object>
- </child>
- </object>
- </child>
- <child>
- <object class="GtkMenuItem" id="help_menu_item">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Help</property>
- <property name="use_underline">True</property>
- <child type="submenu">
- <object class="GtkMenu" id="help_menu">
- <property name="visible">True</property>
- <child>
- <object class="GtkImageMenuItem" id="show_about_item">
- <signal name="activate" handler="show_about"/>
- <property name="label">gtk-about</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>
- </object>
- </child>
- </object>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <placeholder/>
- </child>
- </object>
- </child>
- </object>
- <object class="GtkAccelGroup" id="accel_group"/>
+ <requires lib="gtk+" version="2.14"/>
+ <object class="GtkWindow" id="game_window">
+ <property name="title" translatable="yes">Lights Off</property>
+ <property name="resizable">False</property>
+ <accel-groups>
+ <group name="accel_group"/>
+ </accel-groups>
+ <child>
+ <object class="GtkVBox" id="game_vbox">
+ <property name="visible">True</property>
+ <property name="orientation">vertical</property>
+ <child>
+ <object class="GtkMenuBar" id="menu_bar">
+ <property name="visible">True</property>
+ <child>
+ <object class="GtkMenuItem" id="game_menu_item">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">_Game</property>
+ <property name="use_underline">True</property>
+ <child type="submenu">
+ <object class="GtkMenu" id="game_menu">
+ <property name="visible">True</property>
+ <child>
+ <object class="GtkImageMenuItem" id="new_game_item">
+ <signal name="activate" handler="reset_score"/>
+ <property name="label">games-new-game</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_preferences_item">
+ <signal name="activate" handler="show_settings"/>
+ <property name="label">gtk-preferences</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="quit_item">
+ <signal name="activate" handler="quit"/>
+ <property name="label">gtk-quit</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>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkMenuItem" id="help_menu_item">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">_Help</property>
+ <property name="use_underline">True</property>
+ <child type="submenu">
+ <object class="GtkMenu" id="help_menu">
+ <property name="visible">True</property>
+ <child>
+ <object class="GtkImageMenuItem" id="show_about_item">
+ <signal name="activate" handler="show_about"/>
+ <property name="label">gtk-about</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>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ </object>
+ </child>
+ </object>
+ <object class="GtkAccelGroup" id="accel_group"/>
</interface>
diff --git a/same-gnome-clutter/data/same-gnome.ui b/same-gnome-clutter/data/same-gnome.ui
index 95616fd..129b828 100644
--- a/same-gnome-clutter/data/same-gnome.ui
+++ b/same-gnome-clutter/data/same-gnome.ui
@@ -1,27 +1,45 @@
+<?xml version="1.0"?>
<interface>
- <object class="GtkWindow" id="main_window">
- <property name="title">Same Gnome</property>
+ <requires lib="gtk+" version="2.14"/>
+ <object class="GtkWindow" id="game_window">
+ <property name="title" translatable="yes">Lights Off</property>
+ <property name="resizable">False</property>
+ <accel-groups>
+ <group name="accel_group"/>
+ </accel-groups>
<child>
- <object class="GtkVBox" id="vbox">
+ <object class="GtkVBox" id="game_vbox">
+ <property name="visible">True</property>
+ <property name="orientation">vertical</property>
<child>
- <object class="GtkMenuBar" id="menu">
+ <object class="GtkMenuBar" id="menu_bar">
+ <property name="visible">True</property>
<child>
<object class="GtkMenuItem" id="game_menu_item">
- <property name="label">Game</property>
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">_Game</property>
+ <property name="use_underline">True</property>
<child type="submenu">
<object class="GtkMenu" id="game_menu">
+ <property name="visible">True</property>
<child>
<object class="GtkImageMenuItem" id="new_game_item">
+ <signal name="activate" handler="reset_score"/>
<property name="label">games-new-game</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="scores_item">
- <property name="label">games-stock-scores</property>
+ <object class="GtkImageMenuItem" id="show_preferences_item">
+ <signal name="activate" handler="show_settings"/>
+ <property name="label">gtk-preferences</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>
@@ -46,10 +64,34 @@
</child>
<child>
<object class="GtkImageMenuItem" id="quit_item">
- <signal name="activate" handler="close_game" />
+ <signal name="activate" handler="quit"/>
<property name="label">gtk-quit</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>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkMenuItem" id="help_menu_item">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">_Help</property>
+ <property name="use_underline">True</property>
+ <child type="submenu">
+ <object class="GtkMenu" id="help_menu">
+ <property name="visible">True</property>
+ <child>
+ <object class="GtkImageMenuItem" id="show_about_item">
+ <signal name="activate" handler="show_about"/>
+ <property name="label">gtk-about</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>
</object>
@@ -57,6 +99,10 @@
</object>
</child>
</object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">0</property>
+ </packing>
</child>
<child>
<object class="GtkClutterEmbed" id="clutter" />
@@ -68,5 +114,6 @@
</object>
</child>
</object>
+ <object class="GtkAccelGroup" id="accel_group"/>
</interface>
diff --git a/same-gnome-clutter/src/main.js b/same-gnome-clutter/src/main.js
index b328866..229705a 100755
--- a/same-gnome-clutter/src/main.js
+++ b/same-gnome-clutter/src/main.js
@@ -37,7 +37,7 @@ b = new Gtk.Builder();
b.add_from_file(settings.file_prefix + "/same-gnome.ui");
//b.connect_signals(handlers);
-var window = b.get_object("main_window");
+var window = b.get_object("game_window");
var clutter_embed = b.get_object("clutter");
window.signal.hide.connect(Gtk.main_quit);
//b.get_object("game_vbox").pack_start(clutter_embed, true, true);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]