From 1d2955bcafb23d56c55e515cdc078ca3152e2446 Mon Sep 17 00:00:00 2001 From: Johan Dahlin Date: Wed, 27 Jun 2007 00:23:56 +0000 Subject: [PATCH] Connect the destroy signal in the example instead of the ui file. Also set * demos/gtk-demo/builder.c (do_builder): Connect the destroy signal in the example instead of the ui file. Also set the screen and title of the window. (#451345, Thomas Rydzynski) svn path=/trunk/; revision=18251 --- ChangeLog | 7 +++++++ demos/gtk-demo/builder.c | 4 ++++ demos/gtk-demo/demo.ui | 2 +- 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index a379891d8e..f6465ac673 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2007-06-26 Johan Dahlin + + * demos/gtk-demo/builder.c (do_builder): Connect the + destroy signal in the example instead of the ui file. + Also set the screen and title of the window. + (#451345, Thomas Rydzynski) + 2007-06-26 Richard Hult * gtk/gtkbuilder.c: (gtk_builder_value_from_string_type): Fix a diff --git a/demos/gtk-demo/builder.c b/demos/gtk-demo/builder.c index 3363969945..1b0b8471e5 100644 --- a/demos/gtk-demo/builder.c +++ b/demos/gtk-demo/builder.c @@ -43,6 +43,10 @@ do_builder (GtkWidget *do_widget) } gtk_builder_connect_signals (builder, NULL); window = GTK_WIDGET (gtk_builder_get_object (builder, "window1")); + gtk_window_set_screen (GTK_WINDOW (window), + gtk_widget_get_screen (do_widget)); + g_signal_connect (window, "destroy", + G_CALLBACK (gtk_widget_destroyed), &window); } if (!GTK_WIDGET_VISIBLE (window)) diff --git a/demos/gtk-demo/demo.ui b/demos/gtk-demo/demo.ui index 9830ed96c8..b6d22bb811 100644 --- a/demos/gtk-demo/demo.ui +++ b/demos/gtk-demo/demo.ui @@ -141,7 +141,7 @@ 250 440 - + builder True