summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorHavoc Pennington <hp@redhat.com>2001-02-09 00:40:48 +0000
committerHavoc Pennington <hp@src.gnome.org>2001-02-09 00:40:48 +0000
commit45510aefc34ce131b5de0db7c4ebf3783d9854b4 (patch)
tree42b08773edbea6846d0d2e7e3123d85ec5fc6c1f /tests
parent589b4726093be0f1653648110d5e40150f2e375c (diff)
downloadgdk-pixbuf-45510aefc34ce131b5de0db7c4ebf3783d9854b4.tar.gz
better error message if you try to add a widget to a bin that already has
2001-02-08 Havoc Pennington <hp@redhat.com> * gtk/gtkbin.c (gtk_bin_add): better error message if you try to add a widget to a bin that already has a child. * gdk/gdkcc.h, gdk/gdkcc-x11.c: Remove GdkColorContext, #50512 * docs/Changes-2.0.txt: note that GdkColorContext is gone. * gdk/x11/Makefile.am (libgdk_x11_la_SOURCES): remove gdkcc-x11.c * gdk/gdk.h: remove gdkcc.h * gdk/Makefile.am (gdk_public_h_sources): remove gdkcc.h * gtk/gtkpixmap.c (build_insensitive_pixmap): rewrite using GdkPixbuf, since the previous implementation was GdkColorContext dependent. * gtk/testgtk.c (create_pixmap): add test for insensitive GtkPixmap
Diffstat (limited to 'tests')
-rw-r--r--tests/testgtk.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/tests/testgtk.c b/tests/testgtk.c
index 3c0e461d9..d14d45d7a 100644
--- a/tests/testgtk.c
+++ b/tests/testgtk.c
@@ -1988,7 +1988,6 @@ static GtkWidget*
create_sensitivity_control (GtkWidget *widget)
{
GtkWidget *button;
- GtkWidget *toplevel;
button = gtk_toggle_button_new_with_label ("Sensitive");
@@ -2442,6 +2441,20 @@ create_pixmap (void)
gtk_container_add (GTK_CONTAINER (box3), label);
gtk_container_add (GTK_CONTAINER (button), box3);
+ button = gtk_button_new ();
+ gtk_box_pack_start (GTK_BOX (box2), button, FALSE, FALSE, 0);
+
+ pixmapwid = new_pixmap ("test.xpm", window->window, NULL);
+
+ label = gtk_label_new ("Pixmap\ntest");
+ box3 = gtk_hbox_new (FALSE, 0);
+ gtk_container_set_border_width (GTK_CONTAINER (box3), 2);
+ gtk_container_add (GTK_CONTAINER (box3), pixmapwid);
+ gtk_container_add (GTK_CONTAINER (box3), label);
+ gtk_container_add (GTK_CONTAINER (button), box3);
+
+ gtk_widget_set_sensitive (button, FALSE);
+
separator = gtk_hseparator_new ();
gtk_box_pack_start (GTK_BOX (box1), separator, FALSE, TRUE, 0);