Index: libgnomecanvas/gnome-canvas-text.c
===================================================================
--- libgnomecanvas/gnome-canvas-text.c	(revisjon 1335)
+++ libgnomecanvas/gnome-canvas-text.c	(arbeidskopi)
@@ -578,7 +578,7 @@
 	text->attr_list = NULL;
 	
 	if (text->stipple)
-		gdk_bitmap_unref (text->stipple);
+		g_object_unref (text->stipple);
 	text->stipple = NULL;
 
 	if (text->priv && text->priv->bitmap.buffer) {
@@ -696,11 +696,11 @@
 set_stipple (GnomeCanvasText *text, GdkBitmap *stipple, int reconfigure)
 {
 	if (text->stipple && !reconfigure)
-		gdk_bitmap_unref (text->stipple);
+		g_object_unref (text->stipple);
 
 	text->stipple = stipple;
 	if (stipple && !reconfigure)
-		gdk_bitmap_ref (stipple);
+		g_object_ref (stipple);
 
 	if (text->gc) {
 		if (stipple) {
@@ -1259,11 +1259,11 @@
 		break;
 
 	case PROP_FILL_COLOR:
-                g_value_set_string_take_ownership (value,
-						   g_strdup_printf ("#%02x%02x%02x",
-                                                                    text->rgba >> 24,
-                                                                    (text->rgba >> 16) & 0xff,
-                                                                    (text->rgba >> 8) & 0xff));
+		g_value_take_string (value,
+				     g_strdup_printf ("#%02x%02x%02x",
+				     text->rgba >> 24,
+				     (text->rgba >> 16) & 0xff,
+				     (text->rgba >> 8) & 0xff));
 		break;
 
 	case PROP_FILL_COLOR_GDK: {
@@ -1435,7 +1435,7 @@
 
 	text = GNOME_CANVAS_TEXT (item);
 
-	gdk_gc_unref (text->gc);
+	g_object_unref (text->gc);
 	text->gc = NULL;
 
 	if (parent_class->unrealize)
Index: libgnomecanvas/gnome-canvas-bpath.c
===================================================================
--- libgnomecanvas/gnome-canvas-bpath.c	(revisjon 1335)
+++ libgnomecanvas/gnome-canvas-bpath.c	(arbeidskopi)
@@ -50,7 +50,7 @@
 
 static GnomeCanvasShapeClass *parent_class;
 
-GtkType
+GType
 gnome_canvas_bpath_get_type (void)
 {
 	static GType bpath_type;
Index: libgnomecanvas/gnome-canvas-shape.c
===================================================================
--- libgnomecanvas/gnome-canvas-shape.c	(revisjon 1335)
+++ libgnomecanvas/gnome-canvas-shape.c	(arbeidskopi)
@@ -667,10 +667,10 @@
 	if (!item->canvas->aa) {
 		g_assert (shape->priv->gdk != NULL);
 
-		gdk_gc_unref (shape->priv->gdk->fill_gc);
+		g_object_unref (shape->priv->gdk->fill_gc);
 		shape->priv->gdk->fill_gc = NULL;
 
-		gdk_gc_unref (shape->priv->gdk->outline_gc);
+		g_object_unref (shape->priv->gdk->outline_gc);
 		shape->priv->gdk->outline_gc = NULL;
 	}
 
@@ -1285,11 +1285,11 @@
 set_stipple (GdkGC *gc, GdkBitmap **internal_stipple, GdkBitmap *stipple, int reconfigure)
 {
 	if (*internal_stipple && !reconfigure)
-		gdk_bitmap_unref (*internal_stipple);
+		g_object_unref (*internal_stipple);
 
 	*internal_stipple = stipple;
 	if (stipple && !reconfigure)
-		gdk_bitmap_ref (stipple);
+		g_object_ref (stipple);
 
 	if (gc) {
 		if (stipple) {
@@ -1351,10 +1351,10 @@
 		g_assert (!gdk->outline_gc);
 
 		if (gdk->fill_stipple)
-			gdk_bitmap_unref (gdk->fill_stipple);
+			g_object_unref (gdk->fill_stipple);
 
 		if (gdk->outline_stipple)
-			gdk_bitmap_unref (gdk->outline_stipple);
+			g_object_unref (gdk->outline_stipple);
 
 		if (gdk->points)
 			g_free (gdk->points);
@@ -1433,10 +1433,10 @@
 
 		window = ((GtkWidget *) (((GnomeCanvasItem *) shape)->canvas))->window;
 
-		if (ctx->clear_gc) gdk_gc_unref (ctx->clear_gc);
-		if (ctx->xor_gc) gdk_gc_unref (ctx->xor_gc);
-		if (ctx->mask) gdk_bitmap_unref (ctx->mask);
-		if (ctx->clip) gdk_bitmap_unref (ctx->clip);
+		if (ctx->clear_gc) g_object_unref (ctx->clear_gc);
+		if (ctx->xor_gc) g_object_unref (ctx->xor_gc);
+		if (ctx->mask) g_object_unref (ctx->mask);
+		if (ctx->clip) g_object_unref (ctx->clip);
 
 		ctx->mask = gdk_pixmap_new (window, width, height, 1);
 		ctx->clip = NULL;
@@ -1456,14 +1456,14 @@
 {
 	if (--ctx->refcount < 1) {
 		if (ctx->clear_gc)
-			gdk_gc_unref (ctx->clear_gc);
+			g_object_unref (ctx->clear_gc);
 		if (ctx->xor_gc)
-			gdk_gc_unref (ctx->xor_gc);
+			g_object_unref (ctx->xor_gc);
 
 		if (ctx->mask)
-			gdk_bitmap_unref (ctx->mask);
+			g_object_unref (ctx->mask);
 		if (ctx->clip)
-			gdk_bitmap_unref (ctx->clip);
+			g_object_unref (ctx->clip);
 		
 		g_object_set_data (G_OBJECT (ctx->canvas), "BpathDrawCtx", NULL);
 		g_free (ctx);
Index: libgnomecanvas/gnome-canvas-line.c
===================================================================
--- libgnomecanvas/gnome-canvas-line.c	(revisjon 1335)
+++ libgnomecanvas/gnome-canvas-line.c	(arbeidskopi)
@@ -309,7 +309,7 @@
 	line->last_coords = NULL;
 
 	if (line->stipple)
-		gdk_bitmap_unref (line->stipple);
+		g_object_unref (line->stipple);
 	line->stipple = NULL;
 
 	if (line->fill_svp)
@@ -622,11 +622,11 @@
 set_stipple (GnomeCanvasLine *line, GdkBitmap *stipple, int reconfigure)
 {
 	if (line->stipple && !reconfigure)
-		gdk_bitmap_unref (line->stipple);
+		g_object_unref (line->stipple);
 
 	line->stipple = stipple;
 	if (stipple && !reconfigure)
-		gdk_bitmap_ref (stipple);
+		g_object_ref (stipple);
 
 	if (line->gc) {
 		if (stipple) {
@@ -883,11 +883,11 @@
 		break;
 
 	case PROP_FILL_COLOR:
-		g_value_set_string_take_ownership (value,
-						   g_strdup_printf ("#%02x%02x%02x",
-								    line->fill_rgba >> 24,
-								    (line->fill_rgba >> 16) & 0xff,
-								    (line->fill_rgba >> 8) & 0xff));
+		g_value_take_string (value,
+				     g_strdup_printf ("#%02x%02x%02x",
+				     line->fill_rgba >> 24,
+				     (line->fill_rgba >> 16) & 0xff,
+				     (line->fill_rgba >> 8) & 0xff));
 		break;
 
 	case PROP_FILL_COLOR_GDK: {
@@ -1116,7 +1116,7 @@
 
 	line = GNOME_CANVAS_LINE (item);
 
-	gdk_gc_unref (line->gc);
+	g_object_unref (line->gc);
 	line->gc = NULL;
 
 	if (parent_class->unrealize)
Index: libgnomecanvas/gnome-canvas-polygon.c
===================================================================
--- libgnomecanvas/gnome-canvas-polygon.c	(revisjon 1335)
+++ libgnomecanvas/gnome-canvas-polygon.c	(arbeidskopi)
@@ -42,16 +42,13 @@
 
 #include "gnome-canvas-shape.h"
 
-
 #define NUM_STATIC_POINTS 256	/* Number of static points to use to avoid allocating arrays */
 
-
 enum {
 	PROP_0,
 	PROP_POINTS
 };
 
-
 static void gnome_canvas_polygon_class_init (GnomeCanvasPolygonClass *class);
 static void gnome_canvas_polygon_init       (GnomeCanvasPolygon      *poly);
 static void gnome_canvas_polygon_destroy    (GtkObject               *object);
Index: libgnomecanvas/gnome-canvas-pixbuf.c
===================================================================
--- libgnomecanvas/gnome-canvas-pixbuf.c	(revisjon 1335)
+++ libgnomecanvas/gnome-canvas-pixbuf.c	(arbeidskopi)
@@ -279,7 +279,7 @@
 	    gnome_canvas_request_redraw (item->canvas, item->x1, item->y1, item->x2, item->y2);
 
 	    if (priv->pixbuf)
-		gdk_pixbuf_unref (priv->pixbuf);
+		g_object_unref (priv->pixbuf);
 
 	    g_free (priv);
 	    gcp->priv = NULL;
@@ -327,11 +327,11 @@
 				g_return_if_fail
 				    (gdk_pixbuf_get_bits_per_sample (pixbuf) == 8);
 
-				gdk_pixbuf_ref (pixbuf);
+				g_object_ref (pixbuf);
 			}
 
 			if (priv->pixbuf)
-				gdk_pixbuf_unref (priv->pixbuf);
+				g_object_unref (priv->pixbuf);
 
 			priv->pixbuf = pixbuf;
 		}
@@ -884,16 +884,14 @@
 					   w * 4,
 					   NULL, NULL);
 
-	gdk_pixbuf_render_to_drawable_alpha (pixbuf, drawable,
-					     0, 0,
-					     d_rect.x0 - x, d_rect.y0 - y,
-					     w, h,
-					     GDK_PIXBUF_ALPHA_FULL,
-					     0,
-					     GDK_RGB_DITHER_MAX,
-					     d_rect.x0, d_rect.y0);
+	gdk_draw_pixbuf (drawable, NULL, pixbuf,
+			 0, 0,
+			 d_rect.x0 - x, d_rect.y0 - y,
+			 w, h,
+			 GDK_RGB_DITHER_MAX,
+			 d_rect.x0, d_rect.y0);
 
-	gdk_pixbuf_unref (pixbuf);
+	g_object_unref (pixbuf);
 	g_free (buf);
 }
 
@@ -961,7 +959,7 @@
 				   GDK_INTERP_BILINEAR,
 				   255);
 
-	    gdk_pixbuf_unref (dest_pixbuf);
+	    g_object_unref (dest_pixbuf);
 	  }
 	else if (gdk_pixbuf_get_has_alpha(priv->pixbuf))
 		art_rgb_rgba_affine (buf->buf,
Index: libgnomecanvas/gnome-canvas.c
===================================================================
--- libgnomecanvas/gnome-canvas.c	(revisjon 1335)
+++ libgnomecanvas/gnome-canvas.c	(arbeidskopi)
@@ -1833,8 +1833,7 @@
 static void
 group_add (GnomeCanvasGroup *group, GnomeCanvasItem *item)
 {
-	g_object_ref (G_OBJECT (item));
-	gtk_object_sink (GTK_OBJECT (item));
+	g_object_ref_sink (G_OBJECT (item));
 
 	if (!group->item_list) {
 		group->item_list = g_list_append (group->item_list, item);
@@ -2129,8 +2128,7 @@
 	canvas->root = GNOME_CANVAS_ITEM (g_object_new (gnome_canvas_group_get_type (), NULL));
 	canvas->root->canvas = canvas;
 
-	g_object_ref (canvas->root);
-	gtk_object_sink (GTK_OBJECT (canvas->root));
+	g_object_ref_sink (canvas->root);
 
 	canvas->root_destroy_id = g_signal_connect (canvas->root, "destroy",
 						    G_CALLBACK (panic_root_destroyed),
@@ -2146,7 +2144,7 @@
 	if (canvas->idle_id == 0)
 		return;
 
-	gtk_idle_remove (canvas->idle_id);
+	g_source_remove (canvas->idle_id);
 	canvas->idle_id = 0;
 }
 
@@ -2330,7 +2328,7 @@
 
 	(* GNOME_CANVAS_ITEM_GET_CLASS (canvas->root)->unrealize) (canvas->root);
 
-	gdk_gc_destroy (canvas->pixmap_gc);
+	g_object_unref (canvas->pixmap_gc);
 	canvas->pixmap_gc = NULL;
 
 	if (GTK_WIDGET_CLASS (canvas_parent_class)->unrealize)
@@ -2952,7 +2950,6 @@
 		buf.rect.x1 = draw_x2;
 		buf.rect.y1 = draw_y2;
 		color = &widget->style->bg[GTK_STATE_NORMAL];
-		buf.bg_color = (((color->red & 0xff00) << 8) | (color->green & 0xff00) | (color->blue >> 8));
 		buf.is_bg = 1;
 		buf.is_buf = 0;
 
@@ -2962,7 +2959,7 @@
 			(* GNOME_CANVAS_ITEM_GET_CLASS (canvas->root)->render) (canvas->root, &buf);
 
 		if (buf.is_bg) {
-			gdk_rgb_gc_set_foreground (canvas->pixmap_gc, buf.bg_color);
+			gdk_gc_set_rgb_fg_color (canvas->pixmap_gc, color);
 			gdk_draw_rectangle (canvas->layout.bin_window,
 					    canvas->pixmap_gc,
 					    TRUE,
@@ -3000,15 +2997,15 @@
 
 		/* Copy the pixmap to the window and clean up */
 
-		gdk_draw_pixmap (canvas->layout.bin_window,
-				 canvas->pixmap_gc,
-				 pixmap,
-				 0, 0,
-				 draw_x1 + canvas->zoom_xofs,
-				 draw_y1 + canvas->zoom_yofs,
-				 draw_width, draw_height);
+		gdk_draw_drawable (canvas->layout.bin_window,
+				   canvas->pixmap_gc,
+				   pixmap,
+				   0, 0,
+				   draw_x1 + canvas->zoom_xofs,
+				   draw_y1 + canvas->zoom_yofs,
+				   draw_width, draw_height);
 
-		gdk_pixmap_unref (pixmap);
+		g_object_unref (pixmap);
 	}
 }
 
Index: libgnomecanvas/gnome-canvas-rich-text.c
===================================================================
--- libgnomecanvas/gnome-canvas-rich-text.c	(revisjon 1335)
+++ libgnomecanvas/gnome-canvas-rich-text.c	(arbeidskopi)
@@ -24,10 +24,10 @@
 #include <stdio.h>
 #include <string.h>
 
-#define GTK_TEXT_USE_INTERNAL_UNSUPPORTED_API
 #include <gdk/gdkkeysyms.h>
 #include <gtk/gtk.h>
-#include <gtk/gtktextlayout.h>
+#define GTK_TEXT_USE_INTERNAL_UNSUPPORTED_API
+#include <gtk/gtktextdisplay.h>
 
 #include "gnome-canvas.h"
 #include "gnome-canvas-util.h"
@@ -1252,7 +1252,7 @@
 	event_type = event->type;
 	if (event_type == GDK_BUTTON_PRESS) {
 		text->_priv->clicks++;
-		text->_priv->click_timeout = gtk_timeout_add(400, _click, text);
+		text->_priv->click_timeout = g_timeout_add(400, _click, text);
 
 		if (text->_priv->clicks > 3)
 			text->_priv->clicks = text->_priv->clicks % 3;
@@ -1616,10 +1616,10 @@
 
 	visible = gtk_text_layout_get_cursor_visible(text->_priv->layout);
 	if (visible)
-		text->_priv->blink_timeout = gtk_timeout_add(
+		text->_priv->blink_timeout = g_timeout_add(
 			CURSOR_OFF_TIME, blink_cb, text);
 	else
-		text->_priv->blink_timeout = gtk_timeout_add(
+		text->_priv->blink_timeout = g_timeout_add(
 			CURSOR_ON_TIME, blink_cb, text);
 
 	gtk_text_layout_set_cursor_visible(text->_priv->layout, !visible);
@@ -1639,25 +1639,25 @@
 		return;
 
 	if (text->_priv->preblink_timeout != 0) {
-		gtk_timeout_remove(text->_priv->preblink_timeout);
+		g_source_remove(text->_priv->preblink_timeout);
 		text->_priv->preblink_timeout = 0;
 	}
 
 	if (with_delay) {
 		if (text->_priv->blink_timeout != 0) {
-			gtk_timeout_remove(text->_priv->blink_timeout);
+			g_source_remove(text->_priv->blink_timeout);
 			text->_priv->blink_timeout = 0;
 		}
 
 		gtk_text_layout_set_cursor_visible(text->_priv->layout, TRUE);
 
-		text->_priv->preblink_timeout = gtk_timeout_add(
+		text->_priv->preblink_timeout = g_timeout_add(
 			PREBLINK_TIME, preblink_cb, text);
 	}
 	else {
 		if (text->_priv->blink_timeout == 0) {
 			gtk_text_layout_set_cursor_visible(text->_priv->layout, TRUE);
-			text->_priv->blink_timeout = gtk_timeout_add(
+			text->_priv->blink_timeout = g_timeout_add(
 				CURSOR_ON_TIME, blink_cb, text);
 		}
 	}
@@ -1667,7 +1667,7 @@
 gnome_canvas_rich_text_stop_cursor_blink(GnomeCanvasRichText *text)
 {
 	if (text->_priv->blink_timeout) {
-		gtk_timeout_remove(text->_priv->blink_timeout);
+		g_source_remove(text->_priv->blink_timeout);
 		text->_priv->blink_timeout = 0;
 	}
 } /* gnome_canvas_rich_text_stop_cursor_blink */
@@ -1697,7 +1697,7 @@
 
 	/* We are called from the update cycle; gotta put this in an idle
 	   loop. */
-	gtk_idle_add(request_update, text);
+	g_idle_add(request_update, text);
 } /* invalidated_handler */
 
 static void
@@ -1747,7 +1747,7 @@
 
 	/* We are called from the update cycle; gotta put this in an idle
 	   loop. */
-	gtk_idle_add(request_update, text);
+	g_idle_add(request_update, text);
 } /* changed_handler */
 
 
Index: demos/canvas-primitives.c
===================================================================
--- demos/canvas-primitives.c	(revisjon 1335)
+++ demos/canvas-primitives.c	(arbeidskopi)
@@ -236,7 +236,7 @@
 						   "outline_color", "black",
 						   "width_units", 4.0,
 						   NULL));
-		gdk_bitmap_unref (stipple);
+		g_object_unref (stipple);
 	}
 
 	setup_item (gnome_canvas_item_new (root,
@@ -299,7 +299,7 @@
 						   "outline_color", "black",
 						   "width_pixels", 0,
 						   NULL));
-		gdk_bitmap_unref (stipple);
+		g_object_unref (stipple);
 	}
 }
 
@@ -355,7 +355,7 @@
 				       "fill_color", "blue",
 				       "fill_stipple", stipple,
 				       NULL);
-		gdk_bitmap_unref (stipple);
+		g_object_unref (stipple);
 	}
 
 	gnome_canvas_item_new (make_anchor (root, 470.0, 75.0),
@@ -536,7 +536,7 @@
 						   "cap_style", GDK_CAP_PROJECTING,
 						   "join_style", GDK_JOIN_MITER,
 						   NULL));
-		gdk_bitmap_unref (stipple);
+		g_object_unref (stipple);
 	}
 
 	gnome_canvas_points_free (points);
@@ -658,7 +658,7 @@
 						   "fill_stipple", stipple,
 						   "outline_color", "black",
 						   NULL));
-		gdk_bitmap_unref (stipple);
+		g_object_unref (stipple);
 	}
 	gnome_canvas_points_free (points);
 
@@ -769,7 +769,7 @@
 
 	/* Create the canvas */
 
-	gtk_widget_push_colormap (gdk_rgb_get_cmap ());
+	gtk_widget_push_colormap (gdk_rgb_get_colormap ());
 	if (aa)
 	  canvas = gnome_canvas_new_aa ();
 	else
@@ -814,7 +814,7 @@
 	gtk_box_pack_start (GTK_BOX (hbox), w, FALSE, FALSE, 0);
 	gtk_widget_show (w);
 
-	adj = GTK_ADJUSTMENT (gtk_adjustment_new (1.00, 0.05, 5.00, 0.05, 0.50, 0.50));
+	adj = GTK_ADJUSTMENT (gtk_adjustment_new (1.00, 0.05, 5.00, 0.05, 0.50, 0));
 	g_signal_connect (adj, "value_changed",
 			  G_CALLBACK (zoom_changed),
 			  canvas);
Index: demos/canvas-curve.c
===================================================================
--- demos/canvas-curve.c	(revisjon 1335)
+++ demos/canvas-curve.c	(arbeidskopi)
@@ -234,7 +234,7 @@
 	GtkWidget        *canvas = NULL;
 	GtkWidget        *frame;
 
-	gtk_widget_push_colormap (gdk_rgb_get_cmap ());
+	gtk_widget_push_colormap (gdk_rgb_get_colormap ());
 
 	if (aa)
 		canvas = gnome_canvas_new_aa ();
