Index: layersel/layersel.c =================================================================== --- layersel/layersel.c (revision 8495) +++ layersel/layersel.c (revision 8496) @@ -49,24 +49,10 @@ return ls->grp_row; } -static GtkWidget *test_gdk_pixbuf_fill() +static GtkWidget *test_pixbuf_pixel_manipulated(int filled) { GdkPixbuf *pixbuf; GtkWidget *image; - - pixbuf = gdk_pixbuf_new(GDK_COLORSPACE_RGB, TRUE, 8, 16, 16); - gdk_pixbuf_fill(pixbuf, 0x0000ffff); - - image = gtk_image_new_from_pixbuf(pixbuf); - g_object_unref(pixbuf); - - return image; -} - -static GtkWidget *test_pixbuf_pixel_manipulated() -{ - GdkPixbuf *pixbuf; - GtkWidget *image; gint width, height; guchar *pixels; guint32 color = 0x00ff00ff; /* Green */ @@ -88,7 +74,7 @@ w = width; p = pixels; while (w--) { - if (w > height) { + if ((w > height) || (filled)) { p[0] = r; p[1] = g; p[2] = b; @@ -135,10 +121,10 @@ gtk_container_add(GTK_CONTAINER(event_box), label); g_signal_connect(event_box, "button-press-event", G_CALLBACK(group_button_press_cb), NULL); - image = test_gdk_pixbuf_fill(); + image = test_pixbuf_pixel_manipulated(0); gtk_box_pack_start(GTK_BOX(box), image, FALSE, FALSE, 0); gtk_box_pack_start(GTK_BOX(box), gtk_vseparator_new(), FALSE, FALSE, 2); - image = test_pixbuf_pixel_manipulated(); + image = test_pixbuf_pixel_manipulated(1); gtk_box_pack_start(GTK_BOX(box), image, FALSE, FALSE, 0); label = gtk_label_new("layer_1"); gtk_box_pack_start(GTK_BOX(box), label, FALSE, FALSE, 0);