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
This commit is contained in:
Johan Dahlin
2007-06-27 00:23:56 +00:00
parent a992482da2
commit 1d2955bcaf
3 changed files with 12 additions and 1 deletions

View File

@ -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))