summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorRamiro Estrugo <ramiro@src.gnome.org>2001-02-13 02:19:18 +0000
committerRamiro Estrugo <ramiro@src.gnome.org>2001-02-13 02:19:18 +0000
commitb28f5a6e9b63e0ae375dd7a5280b6139549beedc (patch)
tree4c9d48e8ff893d3d4a151443fd847867183a24de /test
parent7f73d4f40f7b68e5845082e86c34ebe8384854e4 (diff)
downloadnautilus-b28f5a6e9b63e0ae375dd7a5280b6139549beedc.tar.gz
reviewed by: Darin Adler <darin@eazel.com>
* libnautilus-extensions/nautilus-gtk-extensions.h: * libnautilus-extensions/nautilus-gtk-extensions.c: (while_realized_disconnecter), (nautilus_gtk_signal_connect_while_realized): New function to connect to a signal of an object while a widget is realized. (while_realized_disconnecter): Changed signature to be void - no need to return a value here. As such, the GTK_SIGNAL_FUNC casts are no longer needed. * libnautilus-extensions/nautilus-clickable-image.c: (nautilus_clickable_image_realize), (nautilus_clickable_image_unrealize): Use nautilus_gtk_signal_connect_while_realized so that we dont have to keep track of the signal ids and ancestor widget. * libnautilus-extensions/nautilus-image-table.c: (nautilus_image_table_realize), (nautilus_image_table_unrealize): Use nautilus_gtk_signal_connect_while_realized so that we dont have to keep track of the signal ids and ancestor widget. * test/test-nautilus-clickable-image.c: (main): Add a windowed ancestor inbetween in order to test nautilus_gtk_signal_connect_while_realized.
Diffstat (limited to 'test')
-rw-r--r--test/test-nautilus-clickable-image.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/test/test-nautilus-clickable-image.c b/test/test-nautilus-clickable-image.c
index d87acb977..3885a0d60 100644
--- a/test/test-nautilus-clickable-image.c
+++ b/test/test-nautilus-clickable-image.c
@@ -50,13 +50,16 @@ main (int argc, char* argv[])
GtkWidget *window;
GtkWidget *vbox;
GtkWidget *clickable_images[3];
+ GtkWidget *event_box;
GdkPixbuf *pixbuf;
test_init (&argc, &argv);
window = test_window_new ("Simple Label Test", 20);
+ event_box = gtk_event_box_new ();
vbox = gtk_vbox_new (TRUE, 10);
- gtk_container_add (GTK_CONTAINER (window), vbox);
+ gtk_container_add (GTK_CONTAINER (window), event_box);
+ gtk_container_add (GTK_CONTAINER (event_box), vbox);
clickable_images[0] = NULL;
clickable_images[1] = NULL;
@@ -64,8 +67,8 @@ main (int argc, char* argv[])
pixbuf = test_pixbuf_new_named ("/usr/share/pixmaps/gnome-globe.png", 1.0);
if (1) clickable_images[0] = clickable_image_new ("Clickable Image", pixbuf);
- if (0) clickable_images[1] = clickable_image_new ("Clickable Image No pixbuf", NULL);
- if (0) clickable_images[2] = clickable_image_new (NULL, pixbuf);
+ if (1) clickable_images[1] = clickable_image_new ("Clickable Image No pixbuf", NULL);
+ if (1) clickable_images[2] = clickable_image_new (NULL, pixbuf);
gdk_pixbuf_unref (pixbuf);
if (clickable_images[0]) gtk_box_pack_start (GTK_BOX (vbox), clickable_images[0], FALSE, FALSE, 0);