[gegl-gtk] examples: connect gtk_main_quit to "destroy" signal
- From: Massimo Valentini <mvalentini src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl-gtk] examples: connect gtk_main_quit to "destroy" signal
- Date: Sat, 3 Sep 2011 15:35:50 +0000 (UTC)
commit 867342eef95c83bd53c63b0174f52bd6c05b16ae
Author: Massimo Valentini <mvalentini src gnome org>
Date: Sat Sep 3 17:11:25 2011 +0200
examples: connect gtk_main_quit to "destroy" signal
the default implementation of the delete-event signal
already calls gtk_widget_destroy and its callbacks should
return a gboolean differently from gtk_main_quit.
Simpler connect it to GtkWidget "destroy" signal,
avoiding the risk of a double call to
gtk_widget_destroy with relative warning.
examples/gegl-gtk-basic.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/examples/gegl-gtk-basic.c b/examples/gegl-gtk-basic.c
index fd95f1b..ea7f3cb 100644
--- a/examples/gegl-gtk-basic.c
+++ b/examples/gegl-gtk-basic.c
@@ -55,8 +55,8 @@ main (gint argc,
view = g_object_new (GEGL_GTK_TYPE_VIEW, "node", node, NULL);
gtk_container_add (GTK_CONTAINER (window), view);
- g_signal_connect (G_OBJECT (window), "delete-event",
- G_CALLBACK (gtk_main_quit), window);
+ g_signal_connect (window, "destroy",
+ G_CALLBACK (gtk_main_quit), NULL);
gtk_widget_show_all (window);
/* Run */
@@ -64,7 +64,6 @@ main (gint argc,
/* Cleanup */
g_object_unref (graph);
- gtk_widget_destroy (window);
gegl_exit ();
return 0;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]