summaryrefslogtreecommitdiff
path: root/demos
diff options
context:
space:
mode:
authorJohan Dahlin <johan@src.gnome.org>2007-06-27 00:23:56 +0000
committerJohan Dahlin <johan@src.gnome.org>2007-06-27 00:23:56 +0000
commit1d2955bcafb23d56c55e515cdc078ca3152e2446 (patch)
treef8a1f568c08d0cc9db3c06d17b8062fc8fdcbc37 /demos
parenta992482da283de31070b0afba7c96e8605761e7c (diff)
downloadgtk+-1d2955bcafb23d56c55e515cdc078ca3152e2446.tar.gz
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
Diffstat (limited to 'demos')
-rw-r--r--demos/gtk-demo/builder.c4
-rw-r--r--demos/gtk-demo/demo.ui2
2 files changed, 5 insertions, 1 deletions
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 @@
<object class="GtkWindow" id="window1">
<property name="default_height">250</property>
<property name="default_width">440</property>
- <signal name="destroy" handler="gtk_widget_destroyed"/>
+ <property name="title">builder</property>
<child>
<object class="GtkVBox" id="vbox1">
<property name="visible">True</property>