revision 296:1aa1c5ba59fd
summary |
tree |
shortlog |
changelog |
graph |
changeset |
raw | bz2 | zip | gz changeset | 296:1aa1c5ba59fd |
parent | 295:6637664291a8 |
child | 297:26fc4446ac09 |
author | nkeynes |
date | Tue Jan 16 10:36:19 2007 +0000 (17 years ago) |
Bug 24: Add basic gui for save scene function
dream.glade | view | annotate | diff | log | ||
src/gui/callbacks.c | view | annotate | diff | log | ||
src/gui/callbacks.h | view | annotate | diff | log | ||
src/gui/interface.c | view | annotate | diff | log |
1.1 --- a/dream.glade Tue Jan 16 10:34:46 2007 +00001.2 +++ b/dream.glade Tue Jan 16 10:36:19 2007 +00001.3 @@ -21,6 +21,7 @@1.4 <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>1.5 <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>1.6 <property name="focus_on_map">True</property>1.7 + <property name="urgency_hint">False</property>1.8 <property name="enable_layout_config">True</property>1.9 <signal name="delete_event" handler="on_debug_win_delete_event"/>1.11 @@ -38,6 +39,8 @@1.12 <child>1.13 <widget class="GtkMenuBar" id="menubar1">1.14 <property name="visible">True</property>1.15 + <property name="pack_direction">GTK_PACK_DIRECTION_LTR</property>1.16 + <property name="child_pack_direction">GTK_PACK_DIRECTION_LTR</property>1.18 <child>1.19 <widget class="GtkMenuItem" id="file1">1.20 @@ -83,7 +86,16 @@1.21 </child>1.23 <child>1.24 - <widget class="GtkMenuItem" id="separator1">1.25 + <widget class="GtkMenuItem" id="save_next_scene1">1.26 + <property name="visible">True</property>1.27 + <property name="label" translatable="yes">Save next scene...</property>1.28 + <property name="use_underline">True</property>1.29 + <signal name="activate" handler="on_save_next_scene_activate" last_modification_time="Tue, 16 Jan 2007 07:52:47 GMT"/>1.30 + </widget>1.31 + </child>1.32 +1.33 + <child>1.34 + <widget class="GtkSeparatorMenuItem" id="separator1">1.35 <property name="visible">True</property>1.36 </widget>1.37 </child>1.38 @@ -910,6 +922,7 @@1.39 <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>1.40 <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>1.41 <property name="focus_on_map">True</property>1.42 + <property name="urgency_hint">False</property>1.43 <signal name="delete_event" handler="on_mmr_win_delete_event"/>1.45 <child>1.46 @@ -1023,6 +1036,7 @@1.47 <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>1.48 <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>1.49 <property name="focus_on_map">True</property>1.50 + <property name="urgency_hint">False</property>1.52 <child>1.53 <widget class="GtkVBox" id="vbox3">1.54 @@ -1225,6 +1239,7 @@1.55 <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>1.56 <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>1.57 <property name="focus_on_map">True</property>1.58 + <property name="urgency_hint">False</property>1.60 <child>1.61 <widget class="GtkVBox" id="vbox4">
2.1 --- a/src/gui/callbacks.c Tue Jan 16 10:34:46 2007 +00002.2 +++ b/src/gui/callbacks.c Tue Jan 16 10:36:19 2007 +00002.3 @@ -1,5 +1,5 @@2.4 /**2.5 - * $Id: callbacks.c,v 1.18 2007-01-12 10:16:02 nkeynes Exp $2.6 + * $Id: callbacks.c,v 1.19 2007-01-16 10:36:19 nkeynes Exp $2.7 *2.8 * All GTK callbacks go here (stubs are autogenerated by Glade)2.9 *2.10 @@ -30,6 +30,7 @@2.11 #include "mmio.h"2.12 #include "dreamcast.h"2.13 #include "loader.h"2.14 +#include "pvr2/pvr2.h"2.16 int selected_pc = -1;2.17 int selected_row = -1;2.18 @@ -66,6 +67,13 @@2.20 }2.22 +void2.23 +on_save_next_scene_activate( GtkMenuItem *menuitem,2.24 + gpointer user_data)2.25 +{2.26 + const gchar *dir = dreamcast_get_config_value(CONFIG_SAVE_PATH);2.27 + save_file_dialog( "Save next scene...", pvr2_save_next_scene, "*.dsc", "lxdream scene file (*.dsc)", dir );2.28 +}2.30 void2.31 on_exit1_activate (GtkMenuItem *menuitem,
3.1 --- a/src/gui/callbacks.h Tue Jan 16 10:34:46 2007 +00003.2 +++ b/src/gui/callbacks.h Tue Jan 16 10:36:19 2007 +00003.3 @@ -1,5 +1,5 @@3.4 /**3.5 - * $Id: callbacks.h,v 1.5 2006-12-15 10:17:08 nkeynes Exp $3.6 + * $Id: callbacks.h,v 1.6 2007-01-16 10:36:19 nkeynes Exp $3.7 *3.8 * GTK callback declarations (stubs are autogenerated by Glade)3.9 *3.10 @@ -34,6 +34,10 @@3.11 gpointer user_data);3.13 void3.14 +on_save_next_scene_activate (GtkMenuItem *menuitem,3.15 + gpointer user_data);3.16 +3.17 +void3.18 on_exit1_activate (GtkMenuItem *menuitem,3.19 gpointer user_data);
4.1 --- a/src/gui/interface.c Tue Jan 16 10:34:46 2007 +00004.2 +++ b/src/gui/interface.c Tue Jan 16 10:36:19 2007 +00004.3 @@ -32,6 +32,13 @@4.4 GNOMEUIINFO_MENU_OPEN_ITEM (on_open1_activate, NULL),4.5 GNOMEUIINFO_MENU_SAVE_ITEM (on_save1_activate, NULL),4.6 GNOMEUIINFO_MENU_SAVE_AS_ITEM (on_save_as1_activate, NULL),4.7 + {4.8 + GNOME_APP_UI_ITEM, N_("Save next scene..."),4.9 + NULL,4.10 + (gpointer) on_save_next_scene_activate, NULL, NULL,4.11 + GNOME_APP_PIXMAP_NONE, NULL,4.12 + 0, (GdkModifierType) 0, NULL4.13 + },4.14 GNOMEUIINFO_SEPARATOR,4.15 GNOMEUIINFO_MENU_EXIT_ITEM (on_exit1_activate, NULL),4.16 GNOMEUIINFO_END
.