connect to delete event instead of destroy

This commit is contained in:
Brandon Lewis 2010-08-05 16:19:35 +02:00 committed by Edward Hervey
parent e0dbbcce6f
commit e98e10bad8
2 changed files with 5 additions and 4 deletions

View file

@ -94,7 +94,7 @@ typedef struct App
* These are declared non-static for signal auto-connection * These are declared non-static for signal auto-connection
*/ */
void window_destroy_cb (GtkObject * window, App * app); gboolean window_delete_event_cb (GtkObject * window, App * app);
void quit_item_activate_cb (GtkMenuItem * item, App * app); void quit_item_activate_cb (GtkMenuItem * item, App * app);
void delete_activate_cb (GtkAction * item, App * app); void delete_activate_cb (GtkAction * item, App * app);
void play_activate_cb (GtkAction * item, App * app); void play_activate_cb (GtkAction * item, App * app);
@ -1060,10 +1060,11 @@ fail:
/* UI callbacks ************************************************************/ /* UI callbacks ************************************************************/
void gboolean
window_destroy_cb (GtkObject * window, App * app) window_delete_event_cb (GtkObject * window, App * app)
{ {
gtk_main_quit (); gtk_main_quit ();
return TRUE;
} }
void void

View file

@ -41,7 +41,7 @@
<property name="title" translatable="yes">GES Demo</property> <property name="title" translatable="yes">GES Demo</property>
<property name="default_width">540</property> <property name="default_width">540</property>
<property name="default_height">450</property> <property name="default_height">450</property>
<signal name="destroy" handler="window_destroy_cb"/> <signal name="delete_event" handler="window_delete_event_cb"/>
<child> <child>
<object class="GtkVBox" id="vbox1"> <object class="GtkVBox" id="vbox1">
<property name="visible">True</property> <property name="visible">True</property>