From cb98231c7df0c2cd222aad83c0c2bf6a87206695 Mon Sep 17 00:00:00 2001 From: Tim Janik Date: Tue, 24 Mar 1998 14:04:07 +0000 Subject: implemented new flag shrink_on_detach (TRUE by default) which will cause Tue Mar 24 14:59:50 1998 Tim Janik * gtk/gtkhandlebox.h: * gtk/gtkhandlebox.c: implemented new flag shrink_on_detach (TRUE by default) which will cause the handle boxes requisition to collapse in case the child is already detached. removed duplicate ChangeLog entry from owen. --- tests/testgtk.c | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) (limited to 'tests') diff --git a/tests/testgtk.c b/tests/testgtk.c index b60780b506..af57b65140 100644 --- a/tests/testgtk.c +++ b/tests/testgtk.c @@ -1465,15 +1465,21 @@ create_handle_box () static GtkWidget* window = NULL; GtkWidget *handle_box; GtkWidget *handle_box2; + GtkWidget *vbox; GtkWidget *hbox; GtkWidget *toolbar; GtkWidget *label; + GtkWidget *separator; if (!window) { window = gtk_window_new (GTK_WINDOW_TOPLEVEL); gtk_window_set_title (GTK_WINDOW (window), "Handle Box Test"); + gtk_window_set_policy (GTK_WINDOW (window), + TRUE, + TRUE, + FALSE); gtk_signal_connect (GTK_OBJECT (window), "destroy", GTK_SIGNAL_FUNC(gtk_widget_destroyed), @@ -1481,10 +1487,30 @@ create_handle_box () gtk_container_border_width (GTK_CONTAINER (window), 20); + vbox = gtk_vbox_new (FALSE, 0); + gtk_container_add (GTK_CONTAINER (window), vbox); + gtk_widget_show (vbox); + + label = gtk_label_new ("Above"); + gtk_container_add (GTK_CONTAINER (vbox), label); + gtk_widget_show (label); + + separator = gtk_hseparator_new (); + gtk_container_add (GTK_CONTAINER (vbox), separator); + gtk_widget_show (separator); + hbox = gtk_hbox_new (FALSE, 10); - gtk_container_add (GTK_CONTAINER (window), hbox); + gtk_container_add (GTK_CONTAINER (vbox), hbox); gtk_widget_show (hbox); - + + separator = gtk_hseparator_new (); + gtk_container_add (GTK_CONTAINER (vbox), separator); + gtk_widget_show (separator); + + label = gtk_label_new ("Below"); + gtk_container_add (GTK_CONTAINER (vbox), label); + gtk_widget_show (label); + handle_box = gtk_handle_box_new (); gtk_container_add (GTK_CONTAINER (hbox), handle_box); gtk_signal_connect (GTK_OBJECT (handle_box), -- cgit v1.2.1