summaryrefslogtreecommitdiff
path: root/demos/gtk-demo/button_box.c
diff options
context:
space:
mode:
authorJonathan Blandford <jrb@redhat.com>2000-11-18 23:59:30 +0000
committerJonathan Blandford <jrb@src.gnome.org>2000-11-18 23:59:30 +0000
commitc9e39436b9cae1c03fb15242116798550a44b66e (patch)
tree04471c79ad93c6c7ec5486fee393ba144b0d6cc6 /demos/gtk-demo/button_box.c
parent14ec95efb42c28947caa74894bf5049c474dd846 (diff)
downloadgtk+-c9e39436b9cae1c03fb15242116798550a44b66e.tar.gz
Changed to have the list become non-italic when the demo window is
Sat Nov 18 18:00:17 2000 Jonathan Blandford <jrb@redhat.com> * demos/gtk-demo/main.c: Changed to have the list become non-italic when the demo window is destroyed through an external event (like a close button). Doing so found three bugs in the widget. * demos/gtk-demo/*.c (do_*): Changed to return the toplevel window. * gtk/gtkliststore.c (gtk_list_store_set_cell): emit "change" when we actually set the cell. * gtk/gtktreestore.c (gtk_tree_store_set_cell): ditto * gtk/gtktreeselection.c (gtk_tree_selection_real_select_node): free a leaked path. Thanks memprof.
Diffstat (limited to 'demos/gtk-demo/button_box.c')
-rw-r--r--demos/gtk-demo/button_box.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/demos/gtk-demo/button_box.c b/demos/gtk-demo/button_box.c
index 432bfbbfc6..6291375d2e 100644
--- a/demos/gtk-demo/button_box.c
+++ b/demos/gtk-demo/button_box.c
@@ -43,7 +43,7 @@ create_bbox (gint horizontal,
return frame;
}
-void
+GtkWidget *
do_button_box (void)
{
static GtkWidget* window = NULL;
@@ -115,8 +115,15 @@ do_button_box (void)
}
if (!GTK_WIDGET_VISIBLE (window))
- gtk_widget_show_all (window);
+ {
+ gtk_widget_show_all (window);
+ }
else
- gtk_widget_destroy (window);
+ {
+ gtk_widget_destroy (window);
+ window = NULL;
+ }
+
+ return window;
}