diff --git a/Makefile.am b/Makefile.am
index 131ca9f..5f02bf4 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -3,7 +3,7 @@ INCLUDES = $(GTK_CFLAGS)
 SUBDIRS = schema
 DIST_SUBDIRS = $(SUBDIRS) po
 
-enginedir = $(libdir)/gtk-2.0/$(GTK_VERSION)/engines
+enginedir = $(libdir)/gtk-3.0/$(GTK_VERSION)/engines
 engine_LTLIBRARIES = libmurrine.la
 
 EXTRA_DIST = ./src/config.h.in \
diff --git a/configure.ac b/configure.ac
index 832edec..a69e244 100644
--- a/configure.ac
+++ b/configure.ac
@@ -39,15 +39,15 @@ AC_ARG_ENABLE(rgba,
               [rgba=$enableval],
               [rgba="yes"], )
 
-PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.18.0,,
-                  AC_MSG_ERROR([GTK+-2.18 is required to compile murrine]))
+PKG_CHECK_MODULES(GTK, gtk+-3.0 >= 2.91.0,,
+                  AC_MSG_ERROR([GTK+-3.0 is required to compile murrine]))
 
 PKG_CHECK_MODULES(pixman,[pixman-1],,AC_MSG_ERROR([Pixman is required to compile murrine]))
 
 AC_SUBST(GTK_CFLAGS)
 AC_SUBST(GTK_LIBS)
 
-GTK_VERSION=`$PKG_CONFIG --variable=gtk_binary_version gtk+-2.0`
+GTK_VERSION=`$PKG_CONFIG --variable=gtk_binary_version gtk+-3.0`
 AC_SUBST(GTK_VERSION)
 
 AC_SUBST(BUILD_ENGINES)
diff --git a/schema/Makefile.am b/schema/Makefile.am
index d16a3ec..64cb9f5 100644
--- a/schema/Makefile.am
+++ b/schema/Makefile.am
@@ -1,4 +1,4 @@
-xmldir = $(datadir)/gtk-engines
+xmldir = $(datadir)/gtk-engines/3.0
 
 xml_DATA = murrine.xml
 xml_in_files = $(xml_DATA:.xml=.xml.in)
diff --git a/src/cairo-support.c b/src/cairo-support.c
index 5ba17d3..2a3592c 100644
--- a/src/cairo-support.c
+++ b/src/cairo-support.c
@@ -263,24 +263,41 @@ murrine_gdk_color_to_rgb (GdkColor *c, double *r, double *g, double *b)
 }
 
 void
+murrine_gdk_color_to_murrinergb (const GdkColor *c, MurrineRGB *cc)
+{
+	gdouble r, g, b;
+
+	g_return_if_fail (c && cc);
+
+	r = c->red / 65535.0;
+	g = c->green / 65535.0;
+	b = c->blue / 65535.0;
+
+	cc->r = r;
+	cc->g = g;
+	cc->b = b;
+}
+
+void
 murrine_get_parent_bg (const GtkWidget *widget, MurrineRGB *color)
 {
 	GtkStateType state_type;
 	const GtkWidget *parent;
 	GdkColor *gcolor;
 	gboolean stop;
+	GtkStyle *style;
 
 	if (widget == NULL)
 		return;
 
-	parent = widget->parent;
+	parent = gtk_widget_get_parent ((GtkWidget *) widget);
 	stop = FALSE;
 
 	while (parent && !stop)
 	{
 		stop = FALSE;
 
-		stop |= !GTK_WIDGET_NO_WINDOW (parent);
+		stop |= !gtk_widget_get_has_window ((GtkWidget *) parent);
 		stop |= GTK_IS_NOTEBOOK (parent) &&
 		        gtk_notebook_get_show_tabs (GTK_NOTEBOOK (parent)) &&
 		        gtk_notebook_get_show_border (GTK_NOTEBOOK (parent));
@@ -294,20 +311,53 @@ murrine_get_parent_bg (const GtkWidget *widget, MurrineRGB *color)
 		}
 
 		if (!stop)
-			parent = parent->parent;
+			parent = gtk_widget_get_parent ((GtkWidget *) parent);
 	}
 
 	if (parent == NULL)
 		return;
 
-	state_type = GTK_WIDGET_STATE (parent);
+	state_type = gtk_widget_get_state ((GtkWidget *) parent);
 
-	gcolor = &parent->style->bg[state_type];
+	style = gtk_widget_get_style ((GtkWidget *) parent);
+	gcolor = &style->bg[state_type];
 
 	murrine_gdk_color_to_rgb (gcolor, &color->r, &color->g, &color->b);
 }
 
 void
+murrine_transform_for_layout (cairo_t *cr,
+                              PangoLayout *layout,
+                              int x,
+                              int y)
+{
+        const PangoMatrix *matrix;
+
+        matrix = pango_context_get_matrix (pango_layout_get_context (layout));
+        if (matrix)
+        {
+                cairo_matrix_t cairo_matrix;
+                PangoRectangle rect;
+
+                cairo_matrix_init (&cairo_matrix,
+                                   matrix->xx, matrix->yx,
+                                   matrix->xy, matrix->yy,
+                                   matrix->x0, matrix->y0);
+
+                pango_layout_get_extents (layout, NULL, &rect);
+                pango_matrix_transform_rectangle (matrix, &rect);
+                pango_extents_to_pixels (&rect, NULL);
+
+                cairo_matrix.x0 += x - rect.x;
+                cairo_matrix.y0 += y - rect.y;
+
+                cairo_set_matrix (cr, &cairo_matrix);
+        }
+        else
+                cairo_translate (cr, x, y);
+}
+
+void
 murrine_set_color_rgb (cairo_t *cr, const MurrineRGB *color)
 {
 	g_return_if_fail (cr && color);
diff --git a/src/cairo-support.h b/src/cairo-support.h
index cb9082f..c9f81a3 100644
--- a/src/cairo-support.h
+++ b/src/cairo-support.h
@@ -33,9 +33,13 @@ G_GNUC_INTERNAL void murrine_mix_color (const MurrineRGB *color1, const MurrineR
 G_GNUC_INTERNAL void murrine_gdk_color_to_rgb (GdkColor *c,
                                                double *r, double *g, double *b);
 
+G_GNUC_INTERNAL void murrine_gdk_color_to_murrinergb (const GdkColor * gc, MurrineRGB *cc);
+
 G_GNUC_INTERNAL void murrine_get_parent_bg (const GtkWidget *widget,
                                             MurrineRGB *color);
 
+G_GNUC_INTERNAL void murrine_transform_for_layout (cairo_t *cr, PangoLayout *layout, int x, int y);
+
 G_GNUC_INTERNAL void murrine_set_color_rgb (cairo_t *cr,
                                             const MurrineRGB *color);
 
diff --git a/src/murrine_draw.c b/src/murrine_draw.c
index eb7f92d..01e1beb 100644
--- a/src/murrine_draw.c
+++ b/src/murrine_draw.c
@@ -719,8 +719,8 @@ murrine_draw_slider_handle (cairo_t *cr,
 
 	if (!horizontal)
 	{
-		rotate_mirror_translate (cr, M_PI/2, x, y, FALSE, FALSE);
-		int tmp = height; height = width; width = tmp;
+		murrine_exchange_axis (cr, &x, &y, &width, &height);
+		cairo_translate (cr, x, y);
 	}
 
 	if (width % 2 != 0)
@@ -865,21 +865,24 @@ murrine_draw_progressbar_fill (cairo_t *cr,
 	/* progressbar->orientation < 2 == boolean is_horizontal */
 	if (progressbar->orientation < 2)
 	{
-		if (progressbar->orientation == MRN_ORIENTATION_LEFT_TO_RIGHT)
-			rotate_mirror_translate (cr, 0, x, y, FALSE, FALSE);
-		else
-			rotate_mirror_translate (cr, 0, x+width, y, TRUE, FALSE);
+		cairo_translate (cr, x, y);
+/*		if (progressbar->orientation == MRN_ORIENTATION_LEFT_TO_RIGHT)*/
+/*			rotate_mirror_translate (cr, 0, x, y, FALSE, FALSE);*/
+/*		else*/
+/*			rotate_mirror_translate (cr, 0, x+width, y, TRUE, FALSE);*/
 	}
 	else
 	{
-		int tmp = height; height = width; width = tmp;
+/*		int tmp = height; height = width; width = tmp;*/
 
-		x = x+1; y = y-1; width = width+2; height = height-2;
+		x = x+1; y = y-1; width = width-2; height = height+2;
 
-		if (progressbar->orientation == MRN_ORIENTATION_TOP_TO_BOTTOM)
-			rotate_mirror_translate (cr, M_PI/2, x, y, FALSE, FALSE);
-		else
-			rotate_mirror_translate (cr, M_PI/2, x, y+width, TRUE, FALSE);
+		murrine_exchange_axis (cr, &x, &y, &width, &height);
+
+/*		if (progressbar->orientation == MRN_ORIENTATION_TOP_TO_BOTTOM)*/
+/*			rotate_mirror_translate (cr, M_PI/2, x, y, FALSE, FALSE);*/
+/*		else*/
+/*			rotate_mirror_translate (cr, M_PI/2, x, y+width, TRUE, FALSE);*/
 	}
 
 	roundness = MIN (widget->roundness-widget->xthickness, height/2.0);
@@ -1048,34 +1051,6 @@ murrine_draw_combobox (cairo_t *cr,
 }
 
 static void
-murrine_draw_optionmenu (cairo_t *cr,
-                         const MurrineColors        *colors,
-                         const WidgetParameters     *widget,
-                         const OptionMenuParameters *optionmenu,
-                         int x, int y, int width, int height)
-{
-	ButtonParameters button;
-	button.has_default_button_color = FALSE;
-	int offset = widget->ythickness + 1;
-
-	boolean horizontal = TRUE;
-	if (((float)width/height<0.5) || (widget->glazestyle > 0 && width<height))
-		horizontal = FALSE;
-
-	widget->style_functions->draw_button (cr, colors, widget, &button, x, y, width, height, horizontal);
-
-	/* Draw the separator */
-	MurrineRGB *dark = (MurrineRGB*)&colors->shade[6];
-
-	cairo_translate        (cr, optionmenu->linepos+0.5, 1);
-
-	murrine_set_color_rgba (cr, dark, 0.4);
-	cairo_move_to          (cr, 0.0, offset);
-	cairo_line_to          (cr, 0.0, height - offset - widget->ythickness + 1);
-	cairo_stroke           (cr);
-}
-
-static void
 murrine_draw_menubar (cairo_t *cr,
                       const MurrineColors *colors,
                       const WidgetParameters *widget,
@@ -1901,10 +1876,11 @@ murrine_draw_scrollbar_trough (cairo_t *cr,
 	}
 	else
 	{
-		int tmp = height;
-		rotate_mirror_translate (cr, M_PI/2, x, y, FALSE, FALSE);
-		height = width;
-		width = tmp;
+/*		int tmp = height;*/
+/*		rotate_mirror_translate (cr, M_PI/2, x, y, FALSE, FALSE);*/
+/*		height = width;*/
+/*		width = tmp;*/
+		murrine_exchange_axis (cr, &x, &y, &width, &height);
 	}
 
 	/* Draw fill */
@@ -1924,20 +1900,24 @@ murrine_draw_scrollbar_trough (cairo_t *cr,
 		murrine_rounded_rectangle_closed (cr, 0.5, 0.5, width-1, height-1, widget->roundness, widget->corners);
 		cairo_clip (cr);
 
-		corners = MRN_CORNER_BOTTOMLEFT | MRN_CORNER_BOTTOMRIGHT;
-		murrine_rounded_rectangle_inverted (cr, 0.5, 0.5, width-1, scrollbar->steppersize, widget->roundness, corners);
-		murrine_set_color_rgb (cr, &fill_stepper);
-		cairo_fill_preserve (cr);
-		murrine_draw_trough_border_from_path (cr, &border,0.5, 0.5, width-1, scrollbar->steppersize, widget->mrn_gradient, 1.0, FALSE);
-
-		corners = MRN_CORNER_TOPLEFT | MRN_CORNER_TOPRIGHT;
-		murrine_rounded_rectangle_inverted (cr, 0.5, height-scrollbar->steppersize-0.5, width-1, scrollbar->steppersize, widget->roundness, corners);
-		murrine_set_color_rgb (cr, &fill_stepper);
-		cairo_fill_preserve (cr);
-		murrine_draw_trough_border_from_path (cr, &border, 0.5, height-scrollbar->steppersize-0.5, width-1, scrollbar->steppersize, widget->mrn_gradient, 1.0, FALSE);
-
-		cairo_restore (cr);
+		if (!scrollbar->trough_upper)
+		{
+			corners = MRN_CORNER_BOTTOMLEFT | MRN_CORNER_BOTTOMRIGHT;
+			murrine_rounded_rectangle_inverted (cr, 0.5, 0.5, width-1, scrollbar->steppersize, widget->roundness, corners);
+			murrine_set_color_rgb (cr, &fill_stepper);
+			cairo_fill_preserve (cr);
+			murrine_draw_trough_border_from_path (cr, &border,0.5, 0.5, width-1, scrollbar->steppersize, widget->mrn_gradient, 1.0, FALSE);
+		}
+		else
+		{
+			corners = MRN_CORNER_TOPLEFT | MRN_CORNER_TOPRIGHT;
+			murrine_rounded_rectangle_inverted (cr, 0.5, height-scrollbar->steppersize-0.5, width-1, scrollbar->steppersize, widget->roundness, corners);
+			murrine_set_color_rgb (cr, &fill_stepper);
+			cairo_fill_preserve (cr);
+			murrine_draw_trough_border_from_path (cr, &border, 0.5, height-scrollbar->steppersize-0.5, width-1, scrollbar->steppersize, widget->mrn_gradient, 1.0, FALSE);
 	}
+			cairo_restore (cr);
+		}
 
 	/* Draw border */
 	if (!scrollbar->within_bevel)
@@ -2068,12 +2048,7 @@ murrine_draw_scrollbar_slider (cairo_t *cr,
 	if (scrollbar->horizontal)
 		cairo_translate (cr, x, y);
 	else
-	{
-		int tmp = height;
-		rotate_mirror_translate (cr, M_PI/2, x, y, FALSE, FALSE);
-		height = width;
-		width = tmp;
-	}
+		murrine_exchange_axis (cr, &x, &y, &width, &height);
 
 	cairo_save (cr);
 
@@ -2485,10 +2460,11 @@ murrine_draw_handle (cairo_t *cr,
 
 	if (handle->horizontal)
 	{
-		int tmp = height;
-		rotate_mirror_translate (cr, M_PI/2, x+0.5+width/2-bar_height/2, y+height/2-bar_width/2, FALSE, FALSE);
-		height = width;
-		width = tmp;
+/*		int tmp = height;*/
+/*		rotate_mirror_translate (cr, M_PI/2, x+0.5+width/2-bar_height/2, y+height/2-bar_width/2, FALSE, FALSE);*/
+/*		height = width;*/
+/*		width = tmp;*/
+		murrine_exchange_axis (cr, &x, &y, &width, &height);
 	}
 	else
 	{
@@ -2778,12 +2754,12 @@ murrine_draw_arrow (cairo_t *cr,
 
 	if (widget->disabled)
 	{
+		cairo_save (cr);
 		_murrine_draw_arrow (cr, &colors->shade[0], arrow,
 		                     tx+0.5, ty+0.5, width, height);
+		cairo_restore (cr);
 	}
 
-	cairo_identity_matrix (cr);
-
 	_murrine_draw_arrow (cr, &color, arrow,
 	                     tx, ty, width, height);
 }
@@ -3666,7 +3642,6 @@ murrine_register_style_murrine (MurrineStyleFunctions *functions)
 	functions->draw_slider_handle      = murrine_draw_slider_handle;
 	functions->draw_spinbutton         = murrine_draw_spinbutton;
 	functions->draw_spinbutton_down    = murrine_draw_spinbutton_down;
-	functions->draw_optionmenu         = murrine_draw_optionmenu;
 	functions->draw_combo_separator    = murrine_draw_combo_separator;
 	functions->draw_menubar	           = murrine_draw_menubar;
 	functions->draw_tab                = murrine_draw_tab;
diff --git a/src/murrine_draw_rgba.c b/src/murrine_draw_rgba.c
index 4a6df60..539e965 100644
--- a/src/murrine_draw_rgba.c
+++ b/src/murrine_draw_rgba.c
@@ -693,21 +693,24 @@ murrine_rgba_draw_progressbar_fill (cairo_t *cr,
 	/* progressbar->orientation < 2 == boolean is_horizontal */
 	if (progressbar->orientation < 2)
 	{
-		if (progressbar->orientation == MRN_ORIENTATION_LEFT_TO_RIGHT)
-			rotate_mirror_translate (cr, 0, x, y, FALSE, FALSE);
-		else
-			rotate_mirror_translate (cr, 0, x+width, y, TRUE, FALSE);
+		cairo_translate (cr, x, y);
+/*		if (progressbar->orientation == MRN_ORIENTATION_LEFT_TO_RIGHT)*/
+/*			rotate_mirror_translate (cr, 0, x, y, FALSE, FALSE);*/
+/*		else*/
+/*			rotate_mirror_translate (cr, 0, x+width, y, TRUE, FALSE);*/
 	}
 	else
 	{
-		int tmp = height; height = width; width = tmp;
+/*		int tmp = height; height = width; width = tmp;*/
 
-		x = x+1; y = y-1; width = width+2; height = height-2;
+		x = x+1; y = y-1; width = width-2; height = height+2;
 
-		if (progressbar->orientation == MRN_ORIENTATION_TOP_TO_BOTTOM)
-			rotate_mirror_translate (cr, M_PI/2, x, y, FALSE, FALSE);
-		else
-			rotate_mirror_translate (cr, M_PI/2, x, y+width, TRUE, FALSE);
+		murrine_exchange_axis (cr, &x, &y, &width, &height);
+
+/*		if (progressbar->orientation == MRN_ORIENTATION_TOP_TO_BOTTOM)*/
+/*			rotate_mirror_translate (cr, M_PI/2, x, y, FALSE, FALSE);*/
+/*		else*/
+/*			rotate_mirror_translate (cr, M_PI/2, x, y+width, TRUE, FALSE);*/
 	}
 
 	roundness = MIN (widget->roundness-widget->xthickness, height/2.0);
@@ -1340,10 +1343,11 @@ murrine_rgba_draw_scrollbar_trough (cairo_t *cr,
 	}
 	else
 	{
-		int tmp = height;
-		rotate_mirror_translate (cr, M_PI/2, x, y, FALSE, FALSE);
-		height = width;
-		width = tmp;
+/*		int tmp = height;*/
+/*		rotate_mirror_translate (cr, M_PI/2, x, y, FALSE, FALSE);*/
+/*		height = width;*/
+/*		width = tmp;*/
+		murrine_exchange_axis (cr, &x, &y, &width, &height);
 	}
 
 	/* Draw fill */
@@ -1510,10 +1514,11 @@ murrine_rgba_draw_scrollbar_slider (cairo_t *cr,
 		cairo_translate (cr, x, y);
 	else
 	{
-		int tmp = height;
-		rotate_mirror_translate (cr, M_PI/2, x, y, FALSE, FALSE);
-		height = width;
-		width = tmp;
+/*		int tmp = height;*/
+/*		rotate_mirror_translate (cr, M_PI/2, x, y, FALSE, FALSE);*/
+/*		height = width;*/
+/*		width = tmp;*/
+		murrine_exchange_axis (cr, &x, &y, &width, &height);
 	}
 
 	cairo_save (cr);
@@ -1736,10 +1741,11 @@ murrine_rgba_draw_handle (cairo_t *cr,
 
 	if (handle->horizontal)
 	{
-		int tmp = height;
-		rotate_mirror_translate (cr, M_PI/2, x+0.5+width/2-bar_height/2, y+height/2-bar_width/2, FALSE, FALSE);
-		height = width;
-		width = tmp;
+/*		int tmp = height;*/
+/*		rotate_mirror_translate (cr, M_PI/2, x+0.5+width/2-bar_height/2, y+height/2-bar_width/2, FALSE, FALSE);*/
+/*		height = width;*/
+/*		width = tmp;*/
+		murrine_exchange_axis (cr, &x, &y, &width, &height);
 	}
 	else
 	{
diff --git a/src/murrine_rc_style.h b/src/murrine_rc_style.h
index 8e3d7a8..79f9a99 100644
--- a/src/murrine_rc_style.h
+++ b/src/murrine_rc_style.h
@@ -18,7 +18,7 @@
  *
  */
 
-#include <gtk/gtkrc.h>
+#include <gtk/gtk.h>
 
 #ifndef MURRINE_RC_STYLE_H
 #define MURRINE_RC_STYLE_H
@@ -153,6 +153,7 @@ struct _MurrineRcStyleClass
 	GtkRcStyleClass parent_class;
 };
 
-GType murrine_rc_style_get_type	(void);
+G_GNUC_INTERNAL void  murrine_rc_style_register_types (GTypeModule *module);
+G_GNUC_INTERNAL GType murrine_rc_style_get_type       (void);
 
 #endif /* MURRINE_RC_STYLE_H */
diff --git a/src/murrine_style.c b/src/murrine_style.c
index 30af80e..99ace6e 100644
--- a/src/murrine_style.c
+++ b/src/murrine_style.c
@@ -22,7 +22,6 @@
 #include <cairo.h>
 #include <math.h>
 #include <string.h>
-#include <sys/time.h>
 
 #include "murrine_style.h"
 #include "murrine_rc_style.h"
@@ -35,13 +34,11 @@
 #define SCALE_SIZE 5
 
 #define DETAIL(xx) ((detail) && (!strcmp(xx, detail)))
-#define COMPARE_COLORS(a,b) (a.red == b.red && a.green == b.green && a.blue == b.blue)
 
 #define DRAW_ARGS GtkStyle      *style, \
-                  GdkWindow     *window, \
+                  cairo_t       *cr, \
                   GtkStateType  state_type, \
                   GtkShadowType shadow_type, \
-                  GdkRectangle  *area, \
                   GtkWidget     *widget, \
                   const gchar   *detail, \
                   gint          x, \
@@ -50,19 +47,9 @@
                   gint          height
 
 #define CHECK_ARGS \
-	g_return_if_fail (window != NULL); \
-	g_return_if_fail (style != NULL);
-
-#define SANITIZE_SIZE \
-	g_return_if_fail (width  >= -1); \
-	g_return_if_fail (height >= -1); \
-	\
-	if ((width == -1) && (height == -1)) \
-		gdk_drawable_get_size (window, &width, &height); \
-	else if (width == -1) \
-		gdk_drawable_get_size (window, &width, NULL); \
-	else if (height == -1) \
-		gdk_drawable_get_size (window, NULL, &height);
+	g_return_if_fail (cr != NULL);			\
+	g_return_if_fail (style != NULL);                     \
+	cairo_set_line_width (cr, 1.0);
 
 #ifdef HAVE_ANIMATION
 #include "animation.h"
@@ -70,27 +57,9 @@
 
 #define STYLE_FUNCTION(function) (MURRINE_STYLE_GET_CLASS (style)->style_functions[params.style].function)
 
-G_DEFINE_DYNAMIC_TYPE (MurrineStyle, murrine_style, GTK_TYPE_STYLE)
-
-static cairo_t *
-murrine_begin_paint (GdkDrawable *window, GdkRectangle *area)
-{
-	cairo_t *cr;
-
-	g_return_val_if_fail (window != NULL, NULL);
-
-	cr = (cairo_t*) gdk_cairo_create (window);
-	cairo_set_line_width (cr, 1.0);
-
-	if (area)
-	{
-		cairo_rectangle (cr, area->x, area->y, area->width, area->height);
-		cairo_clip_preserve (cr);
-		cairo_new_path (cr);
-	}
+#define PRINT_DETAIL(section,detail,widget) printf("%s: %s %s\n", section, detail, G_OBJECT_TYPE_NAME (widget));
 
-	return cr;
-}
+G_DEFINE_DYNAMIC_TYPE (MurrineStyle, murrine_style, GTK_TYPE_STYLE)
 
 static
 boolean murrine_widget_is_rgba (GtkWidget *widget)
@@ -106,10 +75,20 @@ boolean murrine_widget_is_rgba (GtkWidget *widget)
 #ifdef HAVE_RGBA
 	if (gdk_screen_is_composited(screen))
 	{
-		GdkVisual *visual = gtk_widget_get_visual (widget);
-		if (visual->depth == 32 && (visual->red_mask   == 0xff0000 &&
-		                            visual->green_mask == 0x00ff00 &&
-		                            visual->blue_mask  == 0x0000ff))
+		GdkVisual *visual;
+		guint32 red_mask;
+		guint32 green_mask;
+		guint32 blue_mask;
+
+		visual = gtk_widget_get_visual (widget);
+
+		gdk_visual_get_red_pixel_details (visual, &red_mask, NULL, NULL);
+		gdk_visual_get_green_pixel_details (visual, &green_mask, NULL, NULL);
+		gdk_visual_get_blue_pixel_details (visual, &blue_mask, NULL, NULL);
+
+		if (gdk_visual_get_depth (visual) == 32 && (red_mask == 0xff0000 &&
+		                                            green_mask == 0x00ff00 &&
+		                                            blue_mask  == 0x0000ff))
 			use_rgba = TRUE;
 	}
 #endif
@@ -128,11 +107,11 @@ murrine_set_widget_parameters (const GtkWidget  *widget,
 	params->active     = (state_type == GTK_STATE_ACTIVE);
 	params->prelight   = (state_type == GTK_STATE_PRELIGHT);
 	params->disabled   = (state_type == GTK_STATE_INSENSITIVE);
-	params->state_type = (MurrineStateType)state_type;
+	params->state_type = state_type;
 	params->corners    = MRN_CORNER_ALL;
 	params->ltr        = murrine_widget_is_ltr ((GtkWidget*)widget);
-	params->focus      = (MURRINE_STYLE (style)->focusstyle != 0) && widget && GTK_WIDGET_HAS_FOCUS (widget);
-	params->is_default = widget && GTK_WIDGET_HAS_DEFAULT (widget);
+	params->focus      = (MURRINE_STYLE (style)->focusstyle != 0) && widget && gtk_widget_has_focus ((GtkWidget *) widget);
+	params->is_default = widget && gtk_widget_has_default ((GtkWidget *) widget);
 
 	params->xthickness = style->xthickness;
 	params->ythickness = style->ythickness;
@@ -247,12 +226,8 @@ murrine_style_draw_flat_box (DRAW_ARGS)
 	{
 		MurrineStyle  *murrine_style = MURRINE_STYLE (style);
 		MurrineColors *colors = &murrine_style->colors;
-		cairo_t       *cr;
 
 		CHECK_ARGS
-		SANITIZE_SIZE
-
-		cr = murrine_begin_paint (window, area);
 
 		WidgetParameters params;
 		CellParameters cell;
@@ -262,19 +237,13 @@ murrine_style_draw_flat_box (DRAW_ARGS)
 		murrine_set_widget_parameters (widget, style, state_type, &params);
 
 		STYLE_FUNCTION(draw_selected_cell) (cr, colors, &params, &cell, x, y, width, height);
-
-		cairo_destroy (cr);
 	}
 	else if (DETAIL ("tooltip"))
 	{
 		MurrineStyle  *murrine_style = MURRINE_STYLE (style);
 		MurrineColors *colors = &murrine_style->colors;
-		cairo_t       *cr;
 
 		CHECK_ARGS
-		SANITIZE_SIZE
-
-		cr = murrine_begin_paint (window, area);
 
 		WidgetParameters params;
 
@@ -287,27 +256,19 @@ murrine_style_draw_flat_box (DRAW_ARGS)
 			params.corners = MRN_CORNER_NONE;
 
 		STYLE_FUNCTION(draw_tooltip) (cr, colors, &params, x, y, width, height);
-
-		cairo_destroy (cr);
 	}
 	else if (DETAIL ("icon_view_item"))
 	{
 		MurrineStyle  *murrine_style = MURRINE_STYLE (style);
 		MurrineColors *colors = &murrine_style->colors;
-		cairo_t       *cr;
 
 		CHECK_ARGS
-		SANITIZE_SIZE
-
-		cr = murrine_begin_paint (window, area);
 
 		WidgetParameters params;
 
 		murrine_set_widget_parameters (widget, style, state_type, &params);
 
-		STYLE_FUNCTION(draw_iconview) (cr, colors, &params, x, y, width, height);
-
-		cairo_destroy (cr);	
+		STYLE_FUNCTION(draw_iconview) (cr, colors, &params, x, y, width, height);	
 	}
 	else
 	{
@@ -315,25 +276,21 @@ murrine_style_draw_flat_box (DRAW_ARGS)
 		{
 			MurrineStyle  *murrine_style = MURRINE_STYLE (style);
 			MurrineColors *colors = &murrine_style->colors;
-			cairo_t       *cr;
 			boolean use_rgba = FALSE;
 
 			CHECK_ARGS
-			SANITIZE_SIZE
 
 			use_rgba = (murrine_widget_is_rgba (widget) && murrine_style->rgba);
 
 			if (!use_rgba)
 			{
-				GTK_STYLE_CLASS (murrine_style_parent_class)->draw_flat_box (style, window, state_type,
-				                                                             shadow_type,
-				                                                             area, widget, detail,
-				                                                             x, y, width, height);
+				GTK_STYLE_CLASS (murrine_style_parent_class)->draw_flat_box (style, cr, state_type,
+		                                                                             shadow_type,
+		                                                                             widget, detail,
+		                                                                             x, y, width, height);
 			}
 			else
 			{
-				cr = (cairo_t*) gdk_cairo_create (window);
-
 				if (DETAIL ("entry_bg"))
 				{
 					cairo_set_operator (cr, CAIRO_OPERATOR_SOURCE);
@@ -361,17 +318,15 @@ murrine_style_draw_flat_box (DRAW_ARGS)
 					cairo_fill       (cr);
 					cairo_pattern_destroy (pat);
 				}
-
-				cairo_destroy (cr);
 			}
 		}
 		else
 		{
 /*			printf( "draw_flat_box: %s %s\n", detail, G_OBJECT_TYPE_NAME (widget));*/
-			GTK_STYLE_CLASS (murrine_style_parent_class)->draw_flat_box (style, window, state_type,
-			                                                             shadow_type,
-			                                                             area, widget, detail,
-			                                                             x, y, width, height);
+				GTK_STYLE_CLASS (murrine_style_parent_class)->draw_flat_box (style, cr, state_type,
+		                                                                             shadow_type,
+		                                                                             widget, detail,
+		                                                                             x, y, width, height);
 		}
 	}
 
@@ -387,12 +342,8 @@ murrine_style_draw_flat_box (DRAW_ARGS)
 			case 1:
 			{
 				MurrineColors *colors = &murrine_style->colors;
-				cairo_t       *cr;
 
 				CHECK_ARGS
-				SANITIZE_SIZE
-
-				cr = murrine_begin_paint (window, area);
 
 				cairo_translate (cr, x, y);
 				int i;
@@ -404,19 +355,13 @@ murrine_style_draw_flat_box (DRAW_ARGS)
 					cairo_rectangle (cr, -pos, i, 1, 1);
 					cairo_fill (cr);
 				}
-
-				cairo_destroy (cr);
 				break;
 			}
 			case 2:
 			{
 				MurrineColors *colors = &murrine_style->colors;
-				cairo_t       *cr;
 
 				CHECK_ARGS
-				SANITIZE_SIZE
-
-				cr = murrine_begin_paint (window, area);
 
 				cairo_translate (cr, murrine_style->listviewheaderstyle != 1 ? x-1 : x, y);
 
@@ -424,8 +369,6 @@ murrine_style_draw_flat_box (DRAW_ARGS)
 				cairo_line_to (cr, -0.5, height);
 				murrine_set_color_rgba (cr, &colors->text[GTK_STATE_NORMAL], 0.2);
 				cairo_stroke (cr);
-
-				cairo_destroy (cr);
 				break;
 			}
 		}
@@ -437,14 +380,10 @@ murrine_style_draw_shadow (DRAW_ARGS)
 {
 	MurrineStyle  *murrine_style = MURRINE_STYLE (style);
 	MurrineColors *colors = &murrine_style->colors;
-	cairo_t       *cr;
 
 	CHECK_ARGS
-	SANITIZE_SIZE
-
-	cr = murrine_begin_paint (window, area);
 
-	if (DETAIL ("entry") && !(widget && widget->parent && MRN_IS_TREE_VIEW (widget->parent)))
+	if (DETAIL ("entry") && !(widget && gtk_widget_get_parent (widget) && MRN_IS_TREE_VIEW (gtk_widget_get_parent (widget))))
 	{
 		WidgetParameters params;
 		FocusParameters  focus;
@@ -452,12 +391,12 @@ murrine_style_draw_shadow (DRAW_ARGS)
 		/* Override the entries state type, because we are too lame to handle this via
 		 * the focus ring, and GtkEntry doesn't even set the INSENSITIVE state ... */
 		if (state_type == GTK_STATE_NORMAL && widget && MRN_IS_ENTRY (widget))
-			state_type = GTK_WIDGET_STATE (widget);
+			state_type = gtk_widget_get_state (widget);
 
 		murrine_set_widget_parameters (widget, style, state_type, &params);
 
-		if (widget && (MRN_IS_COMBO (widget->parent) ||
-		               MRN_IS_COMBO_BOX_ENTRY(widget->parent) ||
+		if (widget && (MRN_IS_COMBO (gtk_widget_get_parent (widget)) ||
+		               MRN_IS_COMBO_BOX_ENTRY(gtk_widget_get_parent (widget)) ||
 		               MRN_IS_SPIN_BUTTON (widget)))
 		{
 			width += style->xthickness;
@@ -505,7 +444,7 @@ murrine_style_draw_shadow (DRAW_ARGS)
 		STYLE_FUNCTION(draw_entry) (cr, &murrine_style->colors, &params, &focus,
 		                            x, y, width, height);
 	}
-	else if (DETAIL ("frame") && widget && MRN_IS_STATUSBAR (widget->parent))
+	else if (DETAIL ("frame") && widget && MRN_IS_STATUSBAR (gtk_widget_get_parent (widget)))
 	{
 		WidgetParameters params;
 
@@ -513,8 +452,8 @@ murrine_style_draw_shadow (DRAW_ARGS)
 
 		if (!params.mrn_gradient.use_rgba)
 		{
-			gtk_style_apply_default_background (style, window, TRUE, state_type,
-			                                    area, x, y, width, height);
+			gtk_style_apply_default_background (style, cr, gtk_widget_get_window (widget),
+                                                            state_type, x, y, width, height);;
 		}
 
 		if (shadow_type != GTK_SHADOW_NONE)
@@ -566,8 +505,6 @@ murrine_style_draw_shadow (DRAW_ARGS)
 
 		STYLE_FUNCTION(draw_frame) (cr, colors, &params, &frame, x, y, width, height);
 	}
-
-	cairo_destroy (cr);
 }
 
 static void
@@ -578,12 +515,8 @@ murrine_style_draw_box_gap (DRAW_ARGS,
 {
 	MurrineStyle  *murrine_style = MURRINE_STYLE (style);
 	MurrineColors *colors = &murrine_style->colors;
-	cairo_t       *cr;
 
 	CHECK_ARGS
-	SANITIZE_SIZE
-
-	cr = murrine_begin_paint (window, area);
 
 	if (DETAIL ("notebook"))
 	{
@@ -673,13 +606,11 @@ murrine_style_draw_box_gap (DRAW_ARGS,
 	else
 	{
 		//printf( "draw_box_gap: %s %s\n", detail, G_OBJECT_TYPE_NAME (widget));
-		GTK_STYLE_CLASS (murrine_style_parent_class)->draw_box_gap (style, window, state_type, shadow_type,
-		                                                            area, widget, detail,
+		GTK_STYLE_CLASS (murrine_style_parent_class)->draw_box_gap (style, cr, state_type, shadow_type,
+		                                                            widget, detail,
 		                                                            x, y, width, height,
 		                                                            gap_side, gap_x, gap_width);
 	}
-
-	cairo_destroy (cr);
 }
 
 static void
@@ -687,12 +618,8 @@ murrine_style_draw_extension (DRAW_ARGS, GtkPositionType gap_side)
 {
 	MurrineStyle  *murrine_style = MURRINE_STYLE (style);
 	MurrineColors *colors = &murrine_style->colors;
-	cairo_t       *cr;
 
 	CHECK_ARGS
-	SANITIZE_SIZE
-
-	cr = murrine_begin_paint (window, area);
 
 	if (DETAIL ("tab"))
 	{
@@ -723,11 +650,9 @@ murrine_style_draw_extension (DRAW_ARGS, GtkPositionType gap_side)
 	else
 	{
 		//printf( "draw_extension: %s %s\n", detail, G_OBJECT_TYPE_NAME (widget));
-		GTK_STYLE_CLASS (murrine_style_parent_class)->draw_extension (style, window, state_type, shadow_type, area,
+		GTK_STYLE_CLASS (murrine_style_parent_class)->draw_extension (style, cr, state_type, shadow_type,
 		                                                              widget, detail, x, y, width, height, gap_side);
 	}
-
-	cairo_destroy (cr);
 }
 
 static void
@@ -735,12 +660,8 @@ murrine_style_draw_handle (DRAW_ARGS, GtkOrientation orientation)
 {
 	MurrineStyle  *murrine_style = MURRINE_STYLE (style);
 	MurrineColors *colors = &murrine_style->colors;
-	cairo_t       *cr;
 
 	CHECK_ARGS
-	SANITIZE_SIZE
-
-	cr = murrine_begin_paint (window, area);
 
 	if (DETAIL ("handlebox"))
 	{
@@ -753,6 +674,7 @@ murrine_style_draw_handle (DRAW_ARGS, GtkOrientation orientation)
 
 		murrine_set_widget_parameters (widget, style, state_type, &params);
 
+
 		STYLE_FUNCTION(draw_handle) (cr, colors, &params, &handle, x, y, width, height);
 	}
 	else if (DETAIL ("paned"))
@@ -781,8 +703,6 @@ murrine_style_draw_handle (DRAW_ARGS, GtkOrientation orientation)
 
 		STYLE_FUNCTION(draw_handle) (cr, colors, &params, &handle, x, y, width, height);
 	}
-
-	cairo_destroy (cr);
 }
 
 static void
@@ -790,15 +710,11 @@ murrine_style_draw_box (DRAW_ARGS)
 {
 	MurrineStyle *murrine_style = MURRINE_STYLE (style);
 	MurrineColors *colors = &murrine_style->colors;
-	cairo_t *cr;
 
 	CHECK_ARGS
-	SANITIZE_SIZE
-
-	cr = murrine_begin_paint (window, area);
 
 	if (DETAIL ("menubar") &&
-	    !(widget && (murrine_is_panel_widget (widget->parent))))
+	    !(widget && (murrine_is_panel_widget (gtk_widget_get_parent (widget)))))
 	{
 		WidgetParameters params;
 		gboolean horizontal;
@@ -826,9 +742,8 @@ murrine_style_draw_box (DRAW_ARGS)
 			STYLE_FUNCTION(draw_menubar) (cr, colors, &params, x, y,
 			                              width, height+offset, menubarstyle);
 	}
-	else if (DETAIL ("button") && widget && widget->parent &&
-	                 (MRN_IS_TREE_VIEW (widget->parent) ||
-	                  MRN_IS_CLIST (widget->parent)))
+	else if (DETAIL ("button") && widget && gtk_widget_get_parent (widget) &&
+	         MRN_IS_TREE_VIEW (gtk_widget_get_parent (widget)))
 	{
 		WidgetParameters params;
 		ListViewHeaderParameters header;
@@ -844,17 +759,12 @@ murrine_style_draw_box (DRAW_ARGS)
 		murrine_set_widget_parameters (widget, style, state_type, &params);
 		params.corners = MRN_CORNER_NONE;
 
-		if (MRN_IS_TREE_VIEW (widget->parent))
+		if (MRN_IS_TREE_VIEW (gtk_widget_get_parent (widget)))
 		{
-			murrine_gtk_treeview_get_header_index (GTK_TREE_VIEW(widget->parent),
+			murrine_gtk_treeview_get_header_index (GTK_TREE_VIEW(gtk_widget_get_parent (widget)),
 			                                       widget, &column_index, &columns,
 			                                       &resizable);
 		}
-		else if (MRN_IS_CLIST (widget->parent))
-		{
-			murrine_gtk_clist_get_header_index (GTK_CLIST(widget->parent),
-			                                    widget, &column_index, &columns);
-		}
 
 		header.resizable = resizable;
 
@@ -864,7 +774,7 @@ murrine_style_draw_box (DRAW_ARGS)
 		if (column_index == columns-1)
 			header.order |= params.ltr ? MRN_ORDER_LAST : MRN_ORDER_FIRST;
 
-		gtk_style_apply_default_background (style, window, FALSE, state_type, area, x, y, width, height);
+		gtk_style_apply_default_background (style, cr, gtk_widget_get_window (widget), state_type, x, y, width, height);
 
 		STYLE_FUNCTION(draw_list_view_header) (cr, colors, &params, &header, x, y, width, height);
 	}
@@ -899,7 +809,7 @@ murrine_style_draw_box (DRAW_ARGS)
 		    (murrine_style->highlight_shade != 1.0 && murrine_style->glazestyle > 0 && width<height))
 			horizontal = FALSE;
 
-		if ((widget && (MRN_IS_COMBO_BOX_ENTRY (widget->parent) || MRN_IS_COMBO (widget->parent))))
+		if ((widget && (MRN_IS_COMBO_BOX_ENTRY (gtk_widget_get_parent (widget)) || MRN_IS_COMBO (gtk_widget_get_parent (widget)))))
 		{
 			if (murrine_style->roundness > 0)
 			{
@@ -929,20 +839,20 @@ murrine_style_draw_box (DRAW_ARGS)
 		}
 
 		/* Basic hack to theme the task list when x/y thickness == 0 */
-		if (widget->parent && widget->parent->parent && 
-                    MRN_IS_PANEL_APPLET(widget->parent->parent))
-		{
-			if (params.xthickness == 0 && params.ythickness == 0)
-			{
-				x--; width+=1;
-				y-=2; height+=4;
-				params.roundness = 0;
-			}		
-		}
-
-		if (!MRN_IS_COMBO_BOX(widget->parent) ||
-		     MRN_IS_COMBO_BOX_ENTRY (widget->parent) ||
-		     MRN_IS_COMBO (widget->parent))
+/*		if (gtk_widget_get_parent (widget) && widget->parent->parent && */
+/*                    MRN_IS_PANEL_APPLET(widget->parent->parent))*/
+/*		{*/
+/*			if (params.xthickness == 0 && params.ythickness == 0)*/
+/*			{*/
+/*				x--; width+=1;*/
+/*				y-=2; height+=4;*/
+/*				params.roundness = 0;*/
+/*			}		*/
+/*		}*/
+
+		if (!MRN_IS_COMBO_BOX(gtk_widget_get_parent (widget)) ||
+		     MRN_IS_COMBO_BOX_ENTRY (gtk_widget_get_parent (widget)) ||
+		     MRN_IS_COMBO (gtk_widget_get_parent (widget)))
 			STYLE_FUNCTION(draw_button) (cr, &murrine_style->colors, &params, &button, x, y, width, height, horizontal);
 		else
 		{
@@ -952,7 +862,7 @@ murrine_style_draw_box (DRAW_ARGS)
 			combobox.style = murrine_style->comboboxstyle;
 			combobox.prelight_shade = murrine_style->prelight_shade;
 
-			gtk_widget_style_get (widget->parent, "appears-as-list", &combobox.as_list, NULL);
+			gtk_widget_style_get (gtk_widget_get_parent (widget), "appears-as-list", &combobox.as_list, NULL);
 
 			STYLE_FUNCTION(draw_combobox) (cr, murrine_style->colors, params, &combobox, x, y, width, height, horizontal);
 		}
@@ -1003,7 +913,7 @@ murrine_style_draw_box (DRAW_ARGS)
 		/* The "spinbutton" box is always drawn with state NORMAL, even if it is insensitive.
 		 * So work around this here. */
 		if (state_type == GTK_STATE_NORMAL && widget && MRN_IS_ENTRY (widget))
-			state_type = GTK_WIDGET_STATE (widget);
+			state_type = gtk_widget_get_state (widget);
 
 		murrine_set_widget_parameters (widget, style, state_type, &params);
 
@@ -1056,7 +966,7 @@ murrine_style_draw_box (DRAW_ARGS)
 
 		slider.lower = DETAIL ("trough-lower");
 		slider.fill_level = DETAIL ("trough-fill-level") || DETAIL ("trough-fill-level-full");
-		slider.horizontal = (GTK_RANGE (widget)->orientation == GTK_ORIENTATION_HORIZONTAL);
+		slider.horizontal = gtk_orientable_get_orientation (GTK_ORIENTABLE (widget)) == GTK_ORIENTATION_HORIZONTAL;
 
 		murrine_set_widget_parameters (widget, style, state_type, &params);
 		params.corners = MRN_CORNER_ALL;
@@ -1094,34 +1004,49 @@ murrine_style_draw_box (DRAW_ARGS)
 		}
 
 		if (widget && MRN_IS_PROGRESS_BAR (widget))
-			progressbar.orientation = gtk_progress_bar_get_orientation (GTK_PROGRESS_BAR (widget));
+		{			
+			if (gtk_orientable_get_orientation (GTK_ORIENTABLE (widget)) == GTK_ORIENTATION_HORIZONTAL)
+			{
+				if (gtk_progress_bar_get_inverted (GTK_PROGRESS_BAR (widget)))
+					progressbar.orientation = MRN_ORIENTATION_RIGHT_TO_LEFT;
+				else
+					progressbar.orientation = MRN_ORIENTATION_LEFT_TO_RIGHT;
+			}
+			else
+			{
+				if (gtk_progress_bar_get_inverted (GTK_PROGRESS_BAR (widget)))
+					progressbar.orientation = MRN_ORIENTATION_BOTTOM_TO_TOP;
+				else
+					progressbar.orientation = MRN_ORIENTATION_TOP_TO_BOTTOM;
+			}	
+		}
 		else
 			progressbar.orientation = MRN_ORIENTATION_LEFT_TO_RIGHT;
 
 		if (!params.ltr)
 		{
-			if (progressbar.orientation == GTK_PROGRESS_LEFT_TO_RIGHT)
-				progressbar.orientation = GTK_PROGRESS_RIGHT_TO_LEFT;
-			else if (progressbar.orientation == GTK_PROGRESS_RIGHT_TO_LEFT)
-				progressbar.orientation = GTK_PROGRESS_LEFT_TO_RIGHT;
+			if (progressbar.orientation == MRN_ORIENTATION_LEFT_TO_RIGHT)
+				progressbar.orientation = MRN_ORIENTATION_RIGHT_TO_LEFT;
+			else if (progressbar.orientation == MRN_ORIENTATION_RIGHT_TO_LEFT)
+				progressbar.orientation = MRN_ORIENTATION_LEFT_TO_RIGHT;
 		}
 
 		STYLE_FUNCTION(draw_progressbar_trough) (cr, colors, &params, &progressbar, x, y, width, height);
 	}
-	else if (DETAIL ("trough") && widget && (MRN_IS_VSCROLLBAR (widget) || MRN_IS_HSCROLLBAR (widget)))
+	else if ((DETAIL ("trough-upper") || DETAIL ("trough-lower")) && widget && (MRN_IS_VSCROLLBAR (widget) || MRN_IS_HSCROLLBAR (widget)))
 	{
 		WidgetParameters params;
 		ScrollBarParameters scrollbar;
 		boolean within_bevel = FALSE;
 
-		if (widget->parent && MRN_IS_SCROLLED_WINDOW (widget->parent))
-			gtk_widget_style_get (widget->parent, "scrollbars-within-bevel", &within_bevel, NULL);
+		if (gtk_widget_get_parent (widget) && MRN_IS_SCROLLED_WINDOW (gtk_widget_get_parent (widget)))
+			gtk_widget_style_get (gtk_widget_get_parent (widget), "scrollbars-within-bevel", &within_bevel, NULL);
 
 		scrollbar.horizontal   = TRUE;
 		scrollbar.junction     = murrine_scrollbar_get_junction (widget);
-		scrollbar.steppers     = murrine_scrollbar_visible_steppers (widget);
 		scrollbar.stepperstyle = murrine_style->stepperstyle;
 		scrollbar.within_bevel = within_bevel;
+		scrollbar.trough_upper = DETAIL ("trough-upper");
 		gtk_widget_style_get (widget, "stepper-size", &scrollbar.steppersize, NULL);
 
 		murrine_set_widget_parameters (widget, style, state_type, &params);
@@ -1129,8 +1054,7 @@ murrine_style_draw_box (DRAW_ARGS)
 		if (within_bevel)
 			params.corners = MRN_CORNER_NONE;
 
-		if (MRN_IS_RANGE (widget))
-			scrollbar.horizontal = GTK_RANGE (widget)->orientation == GTK_ORIENTATION_HORIZONTAL;
+		scrollbar.horizontal = gtk_orientable_get_orientation ((GtkOrientable*)widget) == GTK_ORIENTATION_HORIZONTAL;
 
 		if (murrine_style->stepperstyle != 1 && murrine_style->stepperstyle != 3 && !params.mrn_gradient.use_rgba)
 		{
@@ -1158,25 +1082,45 @@ murrine_style_draw_box (DRAW_ARGS)
 		progressbar.style = murrine_style->progressbarstyle;
 
 		if (widget && MRN_IS_PROGRESS_BAR (widget))
-			progressbar.orientation = gtk_progress_bar_get_orientation (GTK_PROGRESS_BAR (widget));
+		{			
+			if (gtk_orientable_get_orientation (GTK_ORIENTABLE (widget)) == GTK_ORIENTATION_HORIZONTAL)
+			{
+				if (gtk_progress_bar_get_inverted (GTK_PROGRESS_BAR (widget)))
+					progressbar.orientation = MRN_ORIENTATION_RIGHT_TO_LEFT;
+				else
+					progressbar.orientation = MRN_ORIENTATION_LEFT_TO_RIGHT;
+/*				x-=1;*/
+/*				width+=2;*/
+			}
+			else
+			{
+				if (gtk_progress_bar_get_inverted (GTK_PROGRESS_BAR (widget)))
+					progressbar.orientation = MRN_ORIENTATION_BOTTOM_TO_TOP;
+				else
+					progressbar.orientation = MRN_ORIENTATION_TOP_TO_BOTTOM;
+
+/*				x-=1;*/
+/*				y-=2;*/
+/*				width+=2;*/
+/*				height+=4;*/
+			}	
+		}
 		else
 			progressbar.orientation = MRN_ORIENTATION_LEFT_TO_RIGHT;
 
 		if (!params.ltr)
 		{
-			if (progressbar.orientation == GTK_PROGRESS_LEFT_TO_RIGHT)
-				progressbar.orientation = GTK_PROGRESS_RIGHT_TO_LEFT;
-			else if (progressbar.orientation == GTK_PROGRESS_RIGHT_TO_LEFT)
-				progressbar.orientation = GTK_PROGRESS_LEFT_TO_RIGHT;
+			if (progressbar.orientation == MRN_ORIENTATION_LEFT_TO_RIGHT)
+				progressbar.orientation = MRN_ORIENTATION_RIGHT_TO_LEFT;
+			else if (progressbar.orientation == MRN_ORIENTATION_RIGHT_TO_LEFT)
+				progressbar.orientation = MRN_ORIENTATION_LEFT_TO_RIGHT;
 		}
 
 #ifdef HAVE_ANIMATION
 		if(murrine_style->animation && MRN_IS_PROGRESS_BAR (widget))
 		{
-			gboolean activity_mode = GTK_PROGRESS (widget)->activity_mode;
-
-			if (!activity_mode)
-				murrine_animation_progressbar_add ((gpointer)widget);
+#warning Assuming non-pulsing progress bars because there is currently no way to query them in GTK+ 3.0.
+			murrine_animation_progressbar_add ((gpointer)widget);
 		}
 
 		elapsed = murrine_animation_elapsed (widget);
@@ -1229,51 +1173,25 @@ murrine_style_draw_box (DRAW_ARGS)
 			/* We got an entry, but well, we may not be drawing to
 			 * this particular widget ... it may not even be realized.
 			 * Also, we need to be drawing on a window obviously ... */
-			if (GTK_WIDGET_REALIZED (widget) &&
-			    GDK_IS_WINDOW (window) &&
-			    gdk_window_is_visible (widget->window))
+			if (gtk_widget_get_realized (widget) &&
+			    gdk_window_is_visible (gtk_widget_get_window (widget)))
 			{
 				/* Assumptions done by this code:
 				 *  - GtkEntry has some nested windows.
-				 *  - widget->window is the entries window
-				 *  - widget->window is the size of the entry part
+				 *  - gtk_widget_get_window (widget) is the entries window
+				 *  - gtk_widget_get_window (widget) is the size of the entry part
 				 *    (and not larger)
 				 *  - only one layer of subwindows
 				 * These should be true with any GTK+ 2.x version.
 				 */
 
-				if (widget->window == window)
-				{
-					progress.max_size_known = TRUE;
-					gdk_drawable_get_size (widget->window,
-					                       &progress.max_size.width,
-					                       &progress.max_size.height);
-
-				}
-				else
-				{
-					GdkWindow *parent;
-					parent = gdk_window_get_parent (window);
-					if (widget->window == parent)
-					{
-						gint pos_x, pos_y;
-						/* widget->window is the parent window
-						 * of the current one. This means we can
-						 * calculate the correct offsets. */
-						gdk_window_get_position (window, &pos_x, &pos_y);
-						progress.max_size.x = -pos_x;
-						progress.max_size.y = -pos_y;
-
-						progress.max_size_known = TRUE;
-						gdk_drawable_get_size (widget->window,
-						                       &progress.max_size.width,
-						                       &progress.max_size.height);
-					} /* Nothing we can do in this case ... */
-				}
+	                        progress.max_size_known = TRUE;
+                                progress.max_size.width = gdk_window_get_width (gtk_widget_get_window (widget));
+                                progress.max_size.height = gdk_window_get_height (gtk_widget_get_window (widget));
 
 				/* Now, one more thing needs to be done. If interior-focus
 				 * is off, then the entry may be a bit smaller. */
-				if (progress.max_size_known && GTK_WIDGET_HAS_FOCUS (widget))
+				if (progress.max_size_known && gtk_widget_has_focus (widget))
 				{
 					gboolean interior_focus = TRUE;
 					gint focus_line_width = 1;
@@ -1357,50 +1275,21 @@ murrine_style_draw_box (DRAW_ARGS)
 			STYLE_FUNCTION(draw_slider_handle) (cr, &murrine_style->colors, &params, &handle, x, y, width, height, horizontal);
 		}
 	}
-	else if (DETAIL ("optionmenu"))
-	{
-		WidgetParameters params;
-		OptionMenuParameters optionmenu;
-
-		GtkRequisition indicator_size;
-		GtkBorder indicator_spacing;
-
-		murrine_option_menu_get_props (widget, &indicator_size, &indicator_spacing);
-
-		if (widget && murrine_get_direction (widget) == GTK_TEXT_DIR_RTL)
-			optionmenu.linepos = (indicator_size.width+indicator_spacing.left+indicator_spacing.right)+style->xthickness;
-		else
-			optionmenu.linepos = width-(indicator_size.width+indicator_spacing.left+indicator_spacing.right)-style->xthickness;
-
-		murrine_set_widget_parameters (widget, style, state_type, &params);
-
-		if (murrine_style->comboboxstyle > 0)
-		{
-			ComboBoxParameters combobox;
-			combobox.as_list = FALSE;
-			combobox.box_w = indicator_size.width+indicator_spacing.left+indicator_spacing.right+3;
-			combobox.style = murrine_style->comboboxstyle;
-			combobox.prelight_shade = murrine_style->prelight_shade;
-			STYLE_FUNCTION(draw_combobox) (cr, murrine_style->colors, params, &combobox, x, y, width, height, TRUE);
-		}
-		else
-			STYLE_FUNCTION(draw_optionmenu) (cr, colors, &params, &optionmenu, x, y, width, height);
-	}
 	else if (DETAIL ("menuitem"))
 	{
 		WidgetParameters params;
 
 		murrine_set_widget_parameters (widget, style, state_type, &params);
 
-		if (widget && !(MRN_IS_MENU_BAR (widget->parent) && murrine_style->menubaritemstyle))
+		if (widget && !(MRN_IS_MENU_BAR (gtk_widget_get_parent (widget)) && murrine_style->menubaritemstyle))
 		{
-			if (murrine_style->menustyle != 1 || (MRN_IS_MENU_BAR (widget->parent) && !murrine_style->menubaritemstyle))
+			if (murrine_style->menustyle != 1 || (MRN_IS_MENU_BAR (gtk_widget_get_parent (widget)) && !murrine_style->menubaritemstyle))
 				STYLE_FUNCTION(draw_menuitem) (cr, colors, &params, x, y, width, height, murrine_style->menuitemstyle);
 			else
 				STYLE_FUNCTION(draw_menuitem) (cr, colors, &params, x+3, y, width-3, height, murrine_style->menuitemstyle);
 		}
 
-		if (widget && MRN_IS_MENU_BAR (widget->parent) && murrine_style->menubaritemstyle)
+		if (widget && MRN_IS_MENU_BAR (gtk_widget_get_parent (widget)) && murrine_style->menubaritemstyle)
 		{
 			ButtonParameters button;
 			button.has_default_button_color = FALSE;
@@ -1408,7 +1297,7 @@ murrine_style_draw_box (DRAW_ARGS)
 			params.active = FALSE;
 			params.prelight = TRUE;
 			params.focus = TRUE;
-			params.state_type = MRN_STATE_SELECTED;
+			params.state_type = GTK_STATE_SELECTED;
 			params.xthickness = 2;
 			params.ythickness = 2;
 			params.reliefstyle = 0;
@@ -1417,7 +1306,7 @@ murrine_style_draw_box (DRAW_ARGS)
 			STYLE_FUNCTION(draw_button) (cr, colors, &params, &button, x, y, width, height+1, TRUE);
 		}
 	}
-	else if (DETAIL ("hscrollbar") || DETAIL ("vscrollbar") || DETAIL ("slider") || DETAIL ("stepper"))
+	else if (detail && (g_str_has_prefix (detail, "hscrollbar") || g_str_has_prefix (detail, "vscrollbar"))) /* This can't be "stepper" for scrollbars ... */
 	{
 		WidgetParameters    params;
 		ScrollBarParameters scrollbar;
@@ -1427,14 +1316,12 @@ murrine_style_draw_box (DRAW_ARGS)
 		scrollbar.horizontal     = TRUE;
 		scrollbar.junction       = murrine_scrollbar_get_junction (widget);
 		scrollbar.handlestyle    = murrine_style->handlestyle;
-		scrollbar.steppers       = murrine_scrollbar_visible_steppers (widget);
 		scrollbar.style          = murrine_style->scrollbarstyle;
 		scrollbar.stepperstyle   = murrine_style->stepperstyle;
 		scrollbar.prelight_shade = murrine_style->prelight_shade;
 		gtk_widget_style_get (widget, "stepper-size", &scrollbar.steppersize, NULL);
 
-		if (MRN_IS_RANGE (widget))
-			scrollbar.horizontal = GTK_RANGE (widget)->orientation == GTK_ORIENTATION_HORIZONTAL;
+		scrollbar.horizontal = g_str_has_prefix (detail, "hscrollbar");
 
 		if (murrine_style->colorize_scrollbar)
 		{
@@ -1447,68 +1334,55 @@ murrine_style_draw_box (DRAW_ARGS)
 		murrine_set_widget_parameters (widget, style, state_type, &params);
 		params.corners = MRN_CORNER_NONE;
 
-		if (DETAIL ("slider"))
+		if (murrine_style->roundness > 1)
 		{
-			int trough_border = 0;
-			int trough_under_steppers = 1;
-
-			gtk_widget_style_get (widget,
-			                      "trough-border", &trough_border,
-			                      "trough-under-steppers", &trough_under_steppers,
-			                      NULL);
-
-			if (trough_border > 0 ||
-			    trough_under_steppers == 0 ||
-			    scrollbar.stepperstyle == 2 ||
-			    scrollbar.stepperstyle == 3 ||
-			    murrine_style->roundness == 1)
-				params.corners = MRN_CORNER_ALL;
+			ScrollBarStepperParameters stepper;
+			GdkRectangle this_rectangle = { x, y, width, height };
+
+			if (g_str_equal(detail + 10, "_start"))
+				stepper.stepper = MRN_STEPPER_START;
+			else if (g_str_equal(detail + 10, "_end"))
+				stepper.stepper = MRN_STEPPER_END;
+			else if (g_str_equal(detail + 10, "_start_inner"))
+				stepper.stepper = MRN_STEPPER_START_INNER;
+			else if (g_str_equal(detail + 10, "_end_inner"))
+				stepper.stepper = MRN_STEPPER_END_INNER;
 			else
-				params.corners = MRN_CORNER_NONE;
-
-			STYLE_FUNCTION(draw_scrollbar_slider) (cr, colors, &params, &scrollbar, x, y, width, height);
-		}
-		else
-		{
-			if (murrine_style->roundness > 1)
-			{
-				ScrollBarStepperParameters stepper;
-				GdkRectangle this_rectangle = { x, y, width, height };
+				stepper.stepper = MRN_STEPPER_UNKNOWN;
 
-				stepper.stepper = murrine_scrollbar_get_stepper (widget, &this_rectangle);
+			/* XXX Check later for corners - might be OK 20101013 */
 
-				if (scrollbar.horizontal)
-				{
-					if (stepper.stepper == MRN_STEPPER_A)
-						params.corners = MRN_CORNER_TOPLEFT | MRN_CORNER_BOTTOMLEFT;
-					else if (stepper.stepper == MRN_STEPPER_D)
-						params.corners = MRN_CORNER_TOPRIGHT | MRN_CORNER_BOTTOMRIGHT;
-				}
-				else
-				{
-					if (stepper.stepper == MRN_STEPPER_A)
-						params.corners = MRN_CORNER_BOTTOMLEFT | MRN_CORNER_TOPLEFT;
-					else if (stepper.stepper == MRN_STEPPER_D)
-						params.corners = MRN_CORNER_TOPRIGHT | MRN_CORNER_BOTTOMRIGHT;
-				}
+			if (scrollbar.horizontal)
+			{
+				if (stepper.stepper == MRN_STEPPER_START)
+					params.corners = MRN_CORNER_TOPLEFT | MRN_CORNER_BOTTOMLEFT;
+				else if (stepper.stepper == MRN_STEPPER_END)
+					params.corners = MRN_CORNER_TOPRIGHT | MRN_CORNER_BOTTOMRIGHT;
 			}
-			else if (murrine_style->roundness == 1)
-				params.corners = MRN_CORNER_ALL;
 			else
-				params.corners = MRN_CORNER_NONE;
+			{
+				if (stepper.stepper == MRN_STEPPER_START)
+					params.corners = MRN_CORNER_BOTTOMLEFT | MRN_CORNER_TOPLEFT;
+				else if (stepper.stepper == MRN_STEPPER_END)
+					params.corners = MRN_CORNER_TOPRIGHT | MRN_CORNER_BOTTOMRIGHT;
+			}
+		}
+		else if (murrine_style->roundness == 1)
+			params.corners = MRN_CORNER_ALL;
+		else
+			params.corners = MRN_CORNER_NONE;
 
-			if (widget->parent && MRN_IS_SCROLLED_WINDOW (widget->parent))
-				gtk_widget_style_get (widget->parent, "scrollbars-within-bevel", &within_bevel, NULL);
+		if (gtk_widget_get_parent (widget) && MRN_IS_SCROLLED_WINDOW (gtk_widget_get_parent (widget)))
+			gtk_widget_style_get (gtk_widget_get_parent (widget), "scrollbars-within-bevel", &within_bevel, NULL);
 
-			if (within_bevel)
-				params.corners = MRN_CORNER_NONE;
+		if (within_bevel)
+			params.corners = MRN_CORNER_NONE;
 
-			if (scrollbar.stepperstyle == 2)
-				params.corners = MRN_CORNER_NONE;
+		if (scrollbar.stepperstyle == 2)
+			params.corners = MRN_CORNER_NONE;
 
-			if (scrollbar.stepperstyle != 1 && scrollbar.stepperstyle != 3)
-				STYLE_FUNCTION(draw_scrollbar_stepper) (cr, colors, &params, &scrollbar, x, y, width, height);
-		}
+		if (scrollbar.stepperstyle != 1 && scrollbar.stepperstyle != 3)
+			STYLE_FUNCTION(draw_scrollbar_stepper) (cr, colors, &params, &scrollbar, x, y, width, height);
 	}
 	else if (DETAIL ("toolbar") || DETAIL ("handlebox_bin") || DETAIL ("dockitem_bin"))
 	{
@@ -1518,7 +1392,7 @@ murrine_style_draw_box (DRAW_ARGS)
 
 		murrine_set_widget_parameters (widget, style, state_type, &params);
 
-		murrine_set_toolbar_parameters (&toolbar, widget, window, x, y);
+		murrine_set_toolbar_parameters (&toolbar, widget, x, y);
 		toolbar.style = murrine_style->toolbarstyle;
 
 		if ((DETAIL ("handlebox_bin") || DETAIL ("dockitem_bin")) && MRN_IS_BIN (widget))
@@ -1577,33 +1451,81 @@ murrine_style_draw_box (DRAW_ARGS)
 
 		if (DETAIL ("hseparator"))
 		{
-			gtk_paint_hline (style, window, state_type, area, widget, new_detail,
+			gtk_paint_hline (style, cr, state_type, widget, new_detail,
 			                 x, x+width-1, y+height/2);
 		}
 		else
-			gtk_paint_vline (style, window, state_type, area, widget, new_detail,
+			gtk_paint_vline (style, cr, state_type, widget, new_detail,
 			                 y, y+height-1, x+width/2);
 	}
 	else
 	{
 		//printf( "draw_box: %s %s\n", detail, G_OBJECT_TYPE_NAME (widget));
-		GTK_STYLE_CLASS (murrine_style_parent_class)->draw_box (style, window, state_type, shadow_type, area,
+		GTK_STYLE_CLASS (murrine_style_parent_class)->draw_box (style, cr, state_type, shadow_type,
 		                                                        widget, detail, x, y, width, height);
 	}
-
-	cairo_destroy (cr);
 }
 
 static void
 murrine_style_draw_slider (DRAW_ARGS, GtkOrientation orientation)
 {
+	MurrineStyle *murrine_style = MURRINE_STYLE (style);
+	MurrineColors *colors = &murrine_style->colors;
+
+	CHECK_ARGS
+
 	if (DETAIL ("hscale") || DETAIL ("vscale"))
 	{
-		murrine_style_draw_box (style, window, state_type, shadow_type, area,
+		murrine_style_draw_box (style, cr, state_type, shadow_type,
 		                        widget, detail, x, y, width, height);
 	}
+	else if (DETAIL ("slider"))
+	{
+		WidgetParameters    params;
+		ScrollBarParameters scrollbar;
+		boolean within_bevel = FALSE;
+
+		scrollbar.has_color      = FALSE;
+		scrollbar.horizontal     = (orientation == GTK_ORIENTATION_HORIZONTAL);
+		scrollbar.junction       = murrine_scrollbar_get_junction (widget);
+		scrollbar.handlestyle    = murrine_style->handlestyle;
+		scrollbar.style          = murrine_style->scrollbarstyle;
+		scrollbar.stepperstyle   = murrine_style->stepperstyle;
+		scrollbar.prelight_shade = murrine_style->prelight_shade;
+		gtk_widget_style_get (widget, "stepper-size", &scrollbar.steppersize, NULL);
+
+		if (murrine_style->colorize_scrollbar)
+		{
+			scrollbar.color = colors->spot[1];
+			scrollbar.has_color = TRUE;
+		}
+		else
+			scrollbar.color = colors->bg[0];
+
+		murrine_set_widget_parameters (widget, style, state_type, &params);
+		params.corners = MRN_CORNER_NONE;
+
+		int trough_border = 0;
+		int trough_under_steppers = 1;
+
+		gtk_widget_style_get (widget,
+		                      "trough-border", &trough_border,
+		                      "trough-under-steppers", &trough_under_steppers,
+		                      NULL);
+
+		if (trough_border > 0 ||
+		    trough_under_steppers == 0 ||
+		    scrollbar.stepperstyle == 2 ||
+		    scrollbar.stepperstyle == 3 ||
+		    murrine_style->roundness == 1)
+			params.corners = MRN_CORNER_ALL;
+		else
+			params.corners = MRN_CORNER_NONE;
+
+		STYLE_FUNCTION(draw_scrollbar_slider) (cr, colors, &params, &scrollbar, x, y, width, height);
+	}
 	else
-		GTK_STYLE_CLASS (murrine_style_parent_class)->draw_slider (style, window, state_type, shadow_type, area,
+		GTK_STYLE_CLASS (murrine_style_parent_class)->draw_slider (style, cr, state_type, shadow_type,
 		                                                           widget, detail, x, y, width, height, orientation);
 }
 
@@ -1612,19 +1534,15 @@ murrine_style_draw_option (DRAW_ARGS)
 {
 	MurrineStyle *murrine_style = MURRINE_STYLE (style);
 	MurrineColors *colors = &murrine_style->colors;
-	cairo_t *cr;
 
 	CHECK_ARGS
-	SANITIZE_SIZE
-
-	cr = murrine_begin_paint (window, area);
 
 	WidgetParameters params;
 	CheckboxParameters checkbox;
 
 	checkbox.shadow_type = shadow_type;
 	checkbox.in_cell = DETAIL ("cellradio");
-	checkbox.in_menu = (widget && widget->parent && GTK_IS_MENU(widget->parent));
+	checkbox.in_menu = (widget && gtk_widget_get_parent (widget) && GTK_IS_MENU(gtk_widget_get_parent (widget)));
 
 	murrine_set_widget_parameters (widget, style, state_type, &params);
 
@@ -1645,8 +1563,6 @@ murrine_style_draw_option (DRAW_ARGS)
 #endif
 
 	STYLE_FUNCTION(draw_radiobutton) (cr, colors, &params, &checkbox, x, y, width, height, trans);
-
-	cairo_destroy (cr);
 }
 
 static void
@@ -1654,19 +1570,15 @@ murrine_style_draw_check (DRAW_ARGS)
 {
 	MurrineStyle *murrine_style = MURRINE_STYLE (style);
 	MurrineColors *colors = &murrine_style->colors;
-	cairo_t *cr;
 
 	CHECK_ARGS
-	SANITIZE_SIZE
-
-	cr = murrine_begin_paint (window, area);
 
 	WidgetParameters params;
 	CheckboxParameters checkbox;
 
 	checkbox.shadow_type = shadow_type;
 	checkbox.in_cell = DETAIL ("cellcheck");
-	checkbox.in_menu = (widget && widget->parent && GTK_IS_MENU(widget->parent));
+	checkbox.in_menu = (widget && gtk_widget_get_parent (widget) && GTK_IS_MENU(gtk_widget_get_parent (widget)));
 
 	murrine_set_widget_parameters (widget, style, state_type, &params);
 
@@ -1686,8 +1598,6 @@ murrine_style_draw_check (DRAW_ARGS)
 #endif
 
 	STYLE_FUNCTION(draw_checkbox) (cr, colors, &params, &checkbox, x, y, width, height, trans);
-
-	cairo_destroy (cr);
 }
 
 static void
@@ -1696,12 +1606,7 @@ murrine_style_draw_tab (DRAW_ARGS)
 	MurrineStyle *murrine_style = MURRINE_STYLE (style);
 	MurrineColors *colors = &murrine_style->colors;
 
-	cairo_t *cr;
-
 	CHECK_ARGS
-	SANITIZE_SIZE
-
-	cr = murrine_begin_paint (window, area);
 
 	WidgetParameters params;
 	ArrowParameters  arrow;
@@ -1713,15 +1618,12 @@ murrine_style_draw_tab (DRAW_ARGS)
 	murrine_set_widget_parameters (widget, style, state_type, &params);
 
 	STYLE_FUNCTION(draw_arrow) (cr, colors, &params, &arrow, x, y, width, height);
-
-	cairo_destroy (cr);
 }
 
 static void
 murrine_style_draw_vline (GtkStyle     *style,
-                          GdkWindow    *window,
+                          cairo_t      *cr,
                           GtkStateType  state_type,
-                          GdkRectangle *area,
                           GtkWidget    *widget,
                           const gchar  *detail,
                           gint          y1,
@@ -1733,12 +1635,9 @@ murrine_style_draw_vline (GtkStyle     *style,
 
 	MurrineStyle  *murrine_style = MURRINE_STYLE (style);
 	MurrineColors *colors = &murrine_style->colors;
-	cairo_t *cr;
 
 	CHECK_ARGS
 
-	cr = murrine_begin_paint (window, area);
-
 	SeparatorParameters separator;
 	separator.horizontal = FALSE;
 	separator.style = murrine_style->separatorstyle;
@@ -1753,21 +1652,18 @@ murrine_style_draw_vline (GtkStyle     *style,
 	}
 
 	if (!(widget &&
-	    MRN_IS_HBOX (widget->parent) &&
-	    MRN_IS_TOGGLE_BUTTON (widget->parent->parent) &&
-	    MRN_IS_COMBO_BOX (widget->parent->parent->parent)))
+	    MRN_IS_HBOX (gtk_widget_get_parent (widget)) &&
+	    MRN_IS_TOGGLE_BUTTON (gtk_widget_get_parent (gtk_widget_get_parent (widget))) &&
+	    MRN_IS_COMBO_BOX (gtk_widget_get_parent (gtk_widget_get_parent (gtk_widget_get_parent (widget))))))
 	{
 		STYLE_FUNCTION(draw_separator) (cr, colors, &params, &separator, x, y1, 2, y2-y1);
 	}
-
-	cairo_destroy (cr);
 }
 
 static void
 murrine_style_draw_hline (GtkStyle     *style,
-                          GdkWindow    *window,
+                          cairo_t      *cr,
                           GtkStateType  state_type,
-                          GdkRectangle *area,
                           GtkWidget    *widget,
                           const gchar  *detail,
                           gint          x1,
@@ -1779,12 +1675,9 @@ murrine_style_draw_hline (GtkStyle     *style,
 
 	MurrineStyle *murrine_style = MURRINE_STYLE (style);
 	MurrineColors *colors = &murrine_style->colors;
-	cairo_t *cr;
 
 	CHECK_ARGS
 
-	cr = murrine_begin_paint (window, area);
-
 	SeparatorParameters separator;
 	separator.horizontal = TRUE;
 	separator.style = murrine_style->separatorstyle;
@@ -1799,8 +1692,6 @@ murrine_style_draw_hline (GtkStyle     *style,
 	}
 
 	STYLE_FUNCTION(draw_separator) (cr, colors, &params, &separator, x1, y, x2-x1, 2);
-
-	cairo_destroy (cr);
 }
 
 static void
@@ -1811,12 +1702,8 @@ murrine_style_draw_shadow_gap (DRAW_ARGS,
 {
 	MurrineStyle *murrine_style = MURRINE_STYLE (style);
 	const MurrineColors *colors = &murrine_style->colors;
-	cairo_t *cr;
 
 	CHECK_ARGS
-	SANITIZE_SIZE
-
-	cr = murrine_begin_paint (window, area);
 
 	if (DETAIL ("frame"))
 	{
@@ -1838,19 +1725,16 @@ murrine_style_draw_shadow_gap (DRAW_ARGS,
 	}
 	else
 	{
-		GTK_STYLE_CLASS (murrine_style_parent_class)->draw_shadow_gap (style, window, state_type, shadow_type, area,
+		GTK_STYLE_CLASS (murrine_style_parent_class)->draw_shadow_gap (style, cr, state_type, shadow_type,
 		                                                               widget, detail, x, y, width, height,
 		                                                               gap_side, gap_x, gap_width);
 	}
-
-	cairo_destroy (cr);
 }
 
 static void
 murrine_style_draw_resize_grip (GtkStyle      *style,
-                                GdkWindow     *window,
+                                cairo_t       *cr,
                                 GtkStateType  state_type,
-                                GdkRectangle  *area,
                                 GtkWidget     *widget,
                                 const gchar   *detail,
                                 GdkWindowEdge edge,
@@ -1862,12 +1746,7 @@ murrine_style_draw_resize_grip (GtkStyle      *style,
 	MurrineStyle *murrine_style = MURRINE_STYLE (style);
 	MurrineColors *colors = &murrine_style->colors;
 
-	cairo_t *cr;
-
 	CHECK_ARGS
-	SANITIZE_SIZE
-
-	cr = murrine_begin_paint (window, area);
 
 	WidgetParameters params;
 	ResizeGripParameters grip;
@@ -1875,8 +1754,6 @@ murrine_style_draw_resize_grip (GtkStyle      *style,
 
 	int lx, ly;
 
-	g_return_if_fail (window != NULL);
-
 	if (edge != GDK_WINDOW_EDGE_SOUTH_EAST)
 		return; /* sorry... need to work on this :P */
 
@@ -1884,17 +1761,14 @@ murrine_style_draw_resize_grip (GtkStyle      *style,
 
 	STYLE_FUNCTION(draw_resize_grip) (cr, colors, &params, &grip, x, y, width, height);
 
-	cairo_destroy (cr);
-
 	return;
 }
 
 static void
 murrine_style_draw_arrow (GtkStyle     *style,
-                          GdkWindow    *window,
+                          cairo_t      *cr,
                           GtkStateType  state_type,
                           GtkShadowType shadow,
-                          GdkRectangle  *area,
                           GtkWidget     *widget,
                           const gchar   *detail,
                           GtkArrowType  arrow_type,
@@ -1906,19 +1780,14 @@ murrine_style_draw_arrow (GtkStyle     *style,
 {
 	MurrineStyle  *murrine_style = MURRINE_STYLE (style);
 	MurrineColors *colors = &murrine_style->colors;
-	cairo_t *cr;
 
 	CHECK_ARGS
-	SANITIZE_SIZE;
-
-	cr = murrine_begin_paint (window, area);
 
 	WidgetParameters params;
 	ArrowParameters  arrow;
 
 	if (arrow_type == GTK_ARROW_NONE)
 	{
-		cairo_destroy (cr);
 		return;
 	}
 
@@ -1950,7 +1819,7 @@ murrine_style_draw_arrow (GtkStyle     *style,
 				height = 5; width = 4;
 			}
 		}
-		else if (DETAIL ("hscrollbar") || DETAIL ("vscrollbar"))
+		else if (g_str_has_prefix (detail, "hscrollbar") || g_str_has_prefix (detail, "vscrollbar"))
 		{
 			int steppersize;
 			gtk_widget_style_get (widget, "stepper-size", &steppersize, NULL);	
@@ -2032,29 +1901,20 @@ murrine_style_draw_arrow (GtkStyle     *style,
 	}
 
 	STYLE_FUNCTION(draw_arrow) (cr, colors, &params, &arrow, x, y, width, height);
-
-	cairo_destroy (cr);
 }
 
 static void
 murrine_style_draw_layout (GtkStyle     *style,
-                           GdkWindow    *window,
+                           cairo_t      *cr,
                            GtkStateType state_type,
                            gboolean     use_text,
-                           GdkRectangle *area,
                            GtkWidget    *widget,
                            const gchar  *detail, gint x, gint y,
                            PangoLayout  *layout)
 {
-	GdkGC *gc;
-
-	g_return_if_fail (GTK_IS_STYLE (style));
-	g_return_if_fail (window != NULL);
-
-	gc = use_text ? style->text_gc[state_type] : style->fg_gc[state_type];
+	CHECK_ARGS
 
-	if (area)
-		gdk_gc_set_clip_rectangle (gc, area);
+	murrine_transform_for_layout (cr, layout, x, y);
 
 	if (widget && (state_type == GTK_STATE_INSENSITIVE || 
 	    (MURRINE_STYLE (style)->textstyle != 0 &&
@@ -2068,7 +1928,6 @@ murrine_style_draw_layout (GtkStyle     *style,
 
 		murrine_set_widget_parameters (widget, style, state_type, &params);
 
-		GdkColor etched;
 		MurrineRGB temp;
 
 		double shade_level = murrine_style->text_shade;
@@ -2103,23 +1962,22 @@ murrine_style_draw_layout (GtkStyle     *style,
 		if (!gtk_widget_get_has_window (widget))
 		{
 			boolean use_parentbg = TRUE;
-			while (widget->parent)
+			while (gtk_widget_get_parent (widget))
 			{
-				if (MRN_IS_BUTTON(widget->parent) ||
-				    MRN_IS_TOGGLE_BUTTON(widget->parent) ||
-				    MRN_IS_COMBO_BOX(widget->parent) ||
-				    MRN_IS_COMBO_BOX_ENTRY(widget->parent) ||
-				    MRN_IS_COMBO(widget->parent) ||
-				    MRN_IS_OPTION_MENU(widget->parent) ||
-				    MRN_IS_NOTEBOOK(widget->parent))
+				if (MRN_IS_BUTTON(gtk_widget_get_parent (widget)) ||
+				    MRN_IS_TOGGLE_BUTTON(gtk_widget_get_parent (widget)) ||
+				    MRN_IS_COMBO_BOX(gtk_widget_get_parent (widget)) ||
+				    MRN_IS_COMBO_BOX_ENTRY(gtk_widget_get_parent (widget)) ||
+				    MRN_IS_COMBO(gtk_widget_get_parent (widget)) ||
+				    MRN_IS_NOTEBOOK(gtk_widget_get_parent (widget)))
 				{
 					GtkReliefStyle relief = GTK_RELIEF_NORMAL;
 					/* Check for the shadow type. */
-					if (MRN_IS_BUTTON (widget->parent))
-						g_object_get (G_OBJECT (widget->parent), "relief", &relief, NULL);
+					if (MRN_IS_BUTTON (gtk_widget_get_parent (widget)))
+						g_object_get (G_OBJECT (gtk_widget_get_parent (widget)), "relief", &relief, NULL);
 
-					if (!MRN_IS_CHECK_BUTTON(widget->parent) &&
-					    !MRN_IS_RADIO_BUTTON(widget->parent) &&
+					if (!MRN_IS_CHECK_BUTTON(gtk_widget_get_parent (widget)) &&
+					    !MRN_IS_RADIO_BUTTON(gtk_widget_get_parent (widget)) &&
 					    !(relief == GTK_RELIEF_NONE &&
 					      (state_type == GTK_STATE_NORMAL ||
 					       state_type == GTK_STATE_INSENSITIVE)))
@@ -2127,38 +1985,27 @@ murrine_style_draw_layout (GtkStyle     *style,
 
 					break;
 				}
-				widget = widget->parent;
+				widget = gtk_widget_get_parent (widget);
 			}
 
 			if (use_parentbg)
 				murrine_shade (&params.parentbg, shade_level, &temp);
-			else if (DETAIL ("cellrenderertext"))
-				murrine_shade (&colors->base[state_type], shade_level, &temp);
 			else
-				murrine_shade (&colors->bg[state_type], shade_level, &temp);
+				murrine_shade (use_text ? &colors->base[state_type] : &colors->bg[state_type], shade_level, &temp);
 		}
-		else if (DETAIL ("cellrenderertext"))
-			murrine_shade (&colors->base[state_type], shade_level, &temp);
 		else
-			murrine_shade (&colors->bg[state_type], shade_level, &temp);
-
-		etched.red = (int) (temp.r*65535);
-		etched.green = (int) (temp.g*65535);
-		etched.blue = (int) (temp.b*65535);
+			murrine_shade (use_text ? &colors->base[state_type] : &colors->bg[state_type], shade_level, &temp);
 
-/*		gdk_draw_layout_with_colors (window, gc, x+xos, y+yos, layout, &etched, NULL);*/
+		cairo_save (cr);
 
-		/* with cairo *
-		 */
-		cairo_t *cr; 
-		cr = murrine_begin_paint (window, area); 
-		cairo_translate (cr, x+xos, y+yos); 
+		/* XXX or cairo_move_to (cr, xos, yos); */
+		cairo_translate (cr, xos, yos); 
 		pango_cairo_layout_path (cr, layout);
 		murrine_set_color_rgba (cr, &temp, 0.5);
 		cairo_stroke (cr);
-		cairo_destroy (cr);
 
-/*		printf( "draw_layout: %s %s\n", detail, G_OBJECT_TYPE_NAME (widget->parent));*/
+		cairo_restore (cr);
+/*		printf( "draw_layout: %s %s\n", detail, G_OBJECT_TYPE_NAME (gtk_widget_get_parent (widget)));*/
 	}
 
 	if (DETAIL ("accellabel"))
@@ -2170,29 +2017,26 @@ murrine_style_draw_layout (GtkStyle     *style,
 
 		murrine_set_widget_parameters (widget, style, state_type, &params);
 
-		GdkColor etched;
 		MurrineRGB temp;
 
 		murrine_mix_color (&colors->fg[state_type], &params.parentbg, state_type != GTK_STATE_PRELIGHT ? 0.4 : 0.2, &temp);
 
-		etched.red = (int) (temp.r*65535);
-		etched.green = (int) (temp.g*65535);
-		etched.blue = (int) (temp.b*65535);
+		murrine_set_color_rgb (cr, &temp);
 
-		gdk_draw_layout_with_colors(window, gc, x, y, layout, &etched, NULL);
+        	pango_cairo_show_layout (cr, layout);
 	}
 	else
-		gdk_draw_layout (window, gc, x, y, layout);
+	{
+		gdk_cairo_set_source_color (cr, use_text ? &style->text[state_type] : &style->fg[state_type]);
 
-	if (area)
-		gdk_gc_set_clip_rectangle (gc, NULL);
+		pango_cairo_show_layout (cr, layout);
+	}
 }
 
 static void
 murrine_style_draw_expander (GtkStyle        *style,
-                             GdkWindow       *window,
+                             cairo_t         *cr,
                              GtkStateType     state_type,
-                             GdkRectangle    *area,
                              GtkWidget       *widget,
                              const gchar     *detail,
                              gint             x,
@@ -2202,12 +2046,8 @@ murrine_style_draw_expander (GtkStyle        *style,
 	MurrineStyle  *murrine_style = MURRINE_STYLE (style);
 	MurrineColors *colors = &murrine_style->colors;
 
-	cairo_t *cr;
-
 	CHECK_ARGS
 
-	cr = murrine_begin_paint (window, area);
-
 	WidgetParameters params;
 	ExpanderParameters expander;
 
@@ -2224,13 +2064,11 @@ murrine_style_draw_expander (GtkStyle        *style,
 	expander.style = murrine_style->expanderstyle;
 
 	STYLE_FUNCTION(draw_expander) (cr, colors, &params, &expander, x, y);
-
-	cairo_destroy (cr);
 }
 
 static void
-murrine_style_draw_focus (GtkStyle *style, GdkWindow *window, GtkStateType state_type,
-                          GdkRectangle *area, GtkWidget *widget, const gchar *detail,
+murrine_style_draw_focus (GtkStyle *style, cairo_t *cr, GtkStateType state_type,
+                          GtkWidget *widget, const gchar *detail,
                           gint x, gint y, gint width, gint height)
 {
 	MurrineStyle *murrine_style = MURRINE_STYLE (style);
@@ -2239,21 +2077,16 @@ murrine_style_draw_focus (GtkStyle *style, GdkWindow *window, GtkStateType state
 	FocusParameters focus;
 	guint8* dash_list;
 
-	cairo_t *cr;
-
 	CHECK_ARGS
-	SANITIZE_SIZE
 
 	/* Just return if focus drawing is disabled. */
 	if (murrine_style->focusstyle == 0)
 		return;
 
-	cr = gdk_cairo_create (window);
-
 	murrine_set_widget_parameters (widget, style, state_type, &params);
 
 	/* Corners */
-	if (widget && widget->parent && MRN_IS_COMBO_BOX_ENTRY(widget->parent))
+	if (widget && gtk_widget_get_parent (widget) && MRN_IS_COMBO_BOX_ENTRY(gtk_widget_get_parent (widget)))
 	{
 		if (params.ltr)
 			params.corners = MRN_CORNER_TOPRIGHT | MRN_CORNER_BOTTOMRIGHT;
@@ -2292,9 +2125,8 @@ murrine_style_draw_focus (GtkStyle *style, GdkWindow *window, GtkStateType state
 	/* Focus type */
 	if (DETAIL("button"))
 	{
-		if (widget && widget->parent &&
-		    (MRN_IS_TREE_VIEW (widget->parent) ||
-		     MRN_IS_CLIST (widget->parent)))
+		if (widget && gtk_widget_get_parent (widget) &&
+		    (MRN_IS_TREE_VIEW (gtk_widget_get_parent (widget))))
 		{
 			focus.type = MRN_FOCUS_TREEVIEW_HEADER;
 		}
@@ -2308,7 +2140,7 @@ murrine_style_draw_focus (GtkStyle *style, GdkWindow *window, GtkStateType state
 
 			if (relief == GTK_RELIEF_NORMAL)
 			{
-				if (widget && GTK_WIDGET_HAS_DEFAULT (widget))
+				if (widget && gtk_widget_has_default (widget))
 					focus.type = MRN_FOCUS_BUTTON_DEFAULT;
 				else
 					focus.type = MRN_FOCUS_BUTTON;
@@ -2406,8 +2238,6 @@ murrine_style_draw_focus (GtkStyle *style, GdkWindow *window, GtkStateType state
 	STYLE_FUNCTION(draw_focus) (cr, colors, &params, &focus, x, y, width, height);
 
 	g_free (focus.dash_list);
-
-	cairo_destroy (cr);
 }
 
 static void
@@ -2523,11 +2353,9 @@ murrine_style_realize (GtkStyle *style)
 
 	contrast = MURRINE_RC_STYLE (style->rc_style)->contrast;
 
-	bg_normal.r = style->bg[0].red/65535.0;
-	bg_normal.g = style->bg[0].green/65535.0;
-	bg_normal.b = style->bg[0].blue/65535.0;
+	murrine_gdk_color_to_murrinergb (&style->bg[GTK_STATE_NORMAL], &bg_normal);
 
-	/* Apply contrast */
+	/* (GtkWidget *) Apply contrast */
 	for (i = 0; i < 9; i++)
 	{
 		murrine_shade (&bg_normal,
@@ -2536,9 +2364,7 @@ murrine_style_realize (GtkStyle *style)
 	}
 	spots[2] = murrine_get_contrast(spots[2], contrast);
 
-	spot_color.r = style->bg[GTK_STATE_SELECTED].red/65535.0;
-	spot_color.g = style->bg[GTK_STATE_SELECTED].green/65535.0;
-	spot_color.b = style->bg[GTK_STATE_SELECTED].blue/65535.0;
+	murrine_gdk_color_to_murrinergb (&style->bg[GTK_STATE_SELECTED], &spot_color);
 
 	murrine_shade (&spot_color, spots[0], &murrine_style->colors.spot[0]);
 	murrine_shade (&spot_color, spots[1], &murrine_style->colors.spot[1]);
@@ -2546,25 +2372,10 @@ murrine_style_realize (GtkStyle *style)
 
 	for (i=0; i<5; i++)
 	{
-		murrine_gdk_color_to_rgb (&style->bg[i],
-		                          &murrine_style->colors.bg[i].r,
-		                          &murrine_style->colors.bg[i].g,
-		                          &murrine_style->colors.bg[i].b);
-
-		murrine_gdk_color_to_rgb (&style->base[i],
-		                          &murrine_style->colors.base[i].r,
-		                          &murrine_style->colors.base[i].g,
-		                          &murrine_style->colors.base[i].b);
-
-		murrine_gdk_color_to_rgb (&style->text[i],
-		                          &murrine_style->colors.text[i].r,
-		                          &murrine_style->colors.text[i].g,
-		                          &murrine_style->colors.text[i].b);
-
-		murrine_gdk_color_to_rgb (&style->fg[i],
-		                          &murrine_style->colors.fg[i].r,
-		                          &murrine_style->colors.fg[i].g,
-		                          &murrine_style->colors.fg[i].b);
+		murrine_gdk_color_to_murrinergb (&style->bg[i], &murrine_style->colors.bg[i]);
+		murrine_gdk_color_to_murrinergb (&style->base[i], &murrine_style->colors.base[i]);
+		murrine_gdk_color_to_murrinergb (&style->text[i], &murrine_style->colors.text[i]);
+		murrine_gdk_color_to_murrinergb (&style->fg[i], &murrine_style->colors.fg[i]);
 	}
 }
 
@@ -2741,9 +2552,9 @@ murrine_style_draw_render_icon (GtkStyle            *style,
 		screen = gtk_widget_get_screen (widget);
 		settings = gtk_settings_get_for_screen (screen);
 	}
-	else if (style->colormap)
+	else if (style->visual)
 	{
-		screen = gdk_colormap_get_screen (style->colormap);
+		screen = gdk_visual_get_screen (style->visual);
 		settings = gtk_settings_get_for_screen (screen);
 	}
 	else
diff --git a/src/murrine_style.h b/src/murrine_style.h
index 33ae51c..609f910 100644
--- a/src/murrine_style.h
+++ b/src/murrine_style.h
@@ -18,7 +18,7 @@
  *
  */
 
-#include <gtk/gtkstyle.h>
+#include <gtk/gtk.h>
 
 #ifndef MURRINE_STYLE_H
 #define MURRINE_STYLE_H
@@ -101,6 +101,7 @@ struct _MurrineStyleClass
 	MurrineStyleFunctions style_functions[MRN_NUM_DRAW_STYLES];
 };
 
-GType murrine_style_get_type (void);
+G_GNUC_INTERNAL void  murrine_style_register_types (GTypeModule *module);
+G_GNUC_INTERNAL GType murrine_style_get_type       (void);
 
 #endif /* MURRINE_STYLE_H */
diff --git a/src/murrine_types.h b/src/murrine_types.h
index 5dd76a5..9d46b02 100644
--- a/src/murrine_types.h
+++ b/src/murrine_types.h
@@ -34,14 +34,6 @@ typedef enum
 
 typedef enum
 {
-	MRN_STATE_NORMAL,
-	MRN_STATE_ACTIVE,
-	MRN_STATE_SELECTED,
-	MRN_STATE_INSENSITIVE
-} MurrineStateType;
-
-typedef enum
-{
 	MRN_CORNER_NONE        = 0,
 	MRN_CORNER_TOPLEFT     = 1,
 	MRN_CORNER_TOPRIGHT    = 2,
@@ -66,11 +58,11 @@ typedef enum
 
 typedef enum
 {
-	MRN_STEPPER_UNKNOWN    = 0,
-	MRN_STEPPER_A          = 1,
-	MRN_STEPPER_B          = 2,
-	MRN_STEPPER_C          = 4,
-	MRN_STEPPER_D          = 8
+	MRN_STEPPER_UNKNOWN     = 0,
+	MRN_STEPPER_START       = 1,
+	MRN_STEPPER_START_INNER = 2,
+	MRN_STEPPER_END         = 4,
+	MRN_STEPPER_END_INNER   = 8
 } MurrineStepper;
 
 typedef enum
@@ -314,6 +306,7 @@ typedef struct
 	boolean         horizontal;
 	boolean         has_color;
 	boolean         within_bevel;
+	boolean         trough_upper;
 	int             handlestyle;
 	int             style;
 	int             steppersize;
@@ -370,7 +363,7 @@ typedef struct
 	boolean ltr;
 	boolean focus;
 	boolean is_default;
-	MurrineStateType state_type;
+	GtkStateType state_type;
 	uint8 corners;
 	uint8 xthickness;
 	uint8 ythickness;
@@ -470,12 +463,6 @@ struct _MurrineStyleFunctions
 	                              const WidgetParameters *widget,
 	                              int x, int y, int width, int height);
 
-	void (*draw_optionmenu) (cairo_t *cr,
-	                         const MurrineColors        *colors,
-	                         const WidgetParameters     *widget,
-	                         const OptionMenuParameters *optionmenu,
-	                         int x, int y, int width, int height);
-
 	void (*draw_menubar) (cairo_t *cr,
 	                      const MurrineColors    *colors,
 	                      const WidgetParameters *widget,
diff --git a/src/support.c b/src/support.c
index dc3a71a..95850fe 100644
--- a/src/support.c
+++ b/src/support.c
@@ -46,35 +46,18 @@ murrine_gtk_treeview_get_header_index (GtkTreeView *tv, GtkWidget *header,
 	do
 	{
 		GtkTreeViewColumn *column = GTK_TREE_VIEW_COLUMN(list->data);
-		if ( column->button == header )
+		if ( gtk_tree_view_column_get_widget (column) == header )
 		{
 			*column_index = *columns;
-			*resizable = column->resizable;
+			*resizable = gtk_tree_view_column_get_resizable (column);
 		}
-		if ( column->visible )
+		if ( gtk_tree_view_column_get_visible (column) )
 			(*columns)++;
 	} while ((list = g_list_next(list)));
 
 	g_list_free (list_start);
 }
 
-void
-murrine_gtk_clist_get_header_index (GtkCList *clist, GtkWidget *button,
-                                    gint *column_index, gint *columns)
-{
-	int i;
-	*columns = clist->columns;
-
-	for (i=0; i<*columns; i++)
-	{
-		if (clist->column[i].button == button)
-		{
-			*column_index = i;
-			break;
-		}
-	}
-}
-
 static GtkRequisition default_option_indicator_size = { 7, 13 };
 static GtkBorder default_option_indicator_spacing = { 7, 5, 2, 2 };
 
@@ -107,46 +90,6 @@ murrine_option_menu_get_props (GtkWidget      *widget,
 		*indicator_spacing = default_option_indicator_spacing;
 }
 
-GtkWidget* 
-murrine_special_get_ancestor (GtkWidget *widget, GType widget_type)
-{
-	g_return_val_if_fail(GTK_IS_WIDGET(widget), NULL);
-
-	while (widget && widget->parent
-	       && !g_type_is_a(GTK_WIDGET_TYPE(widget->parent),
-	       widget_type))
-		widget = widget->parent;
-
-	if (!
-	    (widget && widget->parent
-	     && g_type_is_a(GTK_WIDGET_TYPE(widget->parent), widget_type)))
-		return NULL;
-
-	return widget;
-}
-
-GtkWidget*
-murrine_get_parent_window (GtkWidget *widget)
-{
-	GtkWidget *parent = widget->parent;
-
-	while (parent && GTK_WIDGET_NO_WINDOW (parent))
-		parent = parent->parent;
-
-	return parent;
-}
-
-GdkColor*
-murrine_get_parent_bgcolor (GtkWidget *widget)
-{
-	GtkWidget *parent = murrine_get_parent_window (widget);
-
-	if (parent && parent->style)
-		return &parent->style->bg[GTK_STATE_NORMAL];
-
-	return NULL;
-}
-
 gboolean
 murrine_object_is_a (const GObject * object, const gchar * type_name)
 {
@@ -190,7 +133,7 @@ murrine_find_combo_box_widget (GtkWidget *widget)
 		if (GTK_IS_COMBO_BOX (widget))
 			result = widget;
 		else
-			result = murrine_find_combo_box_widget(widget->parent);
+			result = murrine_find_combo_box_widget(gtk_widget_get_parent(widget));
 	}
 
 	return result;
@@ -202,100 +145,19 @@ murrine_is_combo_box (GtkWidget *widget)
 	return (murrine_find_combo_box_widget(widget) != NULL);
 }
 
-MurrineStepper
-murrine_scrollbar_get_stepper (GtkWidget    *widget,
-                               GdkRectangle *stepper)
-{
-	MurrineStepper value = MRN_STEPPER_UNKNOWN;
-	GdkRectangle tmp;
-	GdkRectangle check_rectangle;
-	GtkOrientation orientation;
-
-	g_return_val_if_fail (GTK_IS_RANGE (widget), MRN_STEPPER_UNKNOWN);
-
-	check_rectangle.x      = widget->allocation.x;
-	check_rectangle.y      = widget->allocation.y;
-	check_rectangle.width  = stepper->width;
-	check_rectangle.height = stepper->height;
-
-	orientation = GTK_RANGE (widget)->orientation;
-
-	if (widget->allocation.x == -1 && widget->allocation.y == -1)
-		return MRN_STEPPER_UNKNOWN;
-
-	if (gdk_rectangle_intersect (stepper, &check_rectangle, &tmp))
-		value = MRN_STEPPER_A;
-
-	if (value == MRN_STEPPER_UNKNOWN) /* Haven't found a match */
-	{
-		if (orientation == GTK_ORIENTATION_HORIZONTAL)
-			check_rectangle.x = widget->allocation.x + stepper->width;
-		else
-			check_rectangle.y = widget->allocation.y + stepper->height;
-
-		if (gdk_rectangle_intersect (stepper, &check_rectangle, &tmp))
-			value = MRN_STEPPER_B;
-	}
-
-	if (value == MRN_STEPPER_UNKNOWN) /* Still haven't found a match */
-	{
-		if (orientation == GTK_ORIENTATION_HORIZONTAL)
-			check_rectangle.x = widget->allocation.x + widget->allocation.width - (stepper->width * 2);
-		else
-			check_rectangle.y = widget->allocation.y + widget->allocation.height - (stepper->height * 2);
-
-		if (gdk_rectangle_intersect (stepper, &check_rectangle, &tmp))
-			value = MRN_STEPPER_C;
-	}
-
-	if (value == MRN_STEPPER_UNKNOWN) /* STILL haven't found a match */
-	{
-		if (orientation == GTK_ORIENTATION_HORIZONTAL)
-			check_rectangle.x = widget->allocation.x + widget->allocation.width - stepper->width;
-		else
-			check_rectangle.y = widget->allocation.y + widget->allocation.height - stepper->height;
-
-		if (gdk_rectangle_intersect (stepper, &check_rectangle, &tmp))
-			value = MRN_STEPPER_D;
-	}
-
-	return value;
-}
-
-MurrineStepper
-murrine_scrollbar_visible_steppers (GtkWidget *widget)
-{
-	MurrineStepper steppers = 0;
-
-	g_return_val_if_fail (GTK_IS_RANGE (widget), MRN_STEPPER_UNKNOWN);
-
-	if (GTK_RANGE (widget)->has_stepper_a)
-		steppers |= MRN_STEPPER_A;
-
-	if (GTK_RANGE (widget)->has_stepper_b)
-		steppers |= MRN_STEPPER_B;
-
-	if (GTK_RANGE (widget)->has_stepper_c)
-		steppers |= MRN_STEPPER_C;
-
-	if (GTK_RANGE (widget)->has_stepper_d)
-		steppers |= MRN_STEPPER_D;
-
-	return steppers;
-}
-
 MurrineJunction
 murrine_scrollbar_get_junction (GtkWidget *widget)
 {
 	GtkAdjustment *adj;
 	MurrineJunction junction = MRN_JUNCTION_NONE;
 
-	g_return_val_if_fail (GTK_IS_RANGE (widget), MRN_JUNCTION_NONE);
+	if (!GTK_IS_RANGE (widget))
+		return MRN_JUNCTION_NONE;
 
-	adj = GTK_RANGE (widget)->adjustment;
+	adj = gtk_range_get_adjustment(GTK_RANGE (widget));
 
-	if (adj->value <= adj->lower &&
-	    (GTK_RANGE (widget)->has_stepper_a || GTK_RANGE (widget)->has_stepper_b))
+	if (gtk_adjustment_get_value(adj) <= gtk_adjustment_get_lower(adj) /*&&
+	    (GTK_RANGE (widget)->has_stepper_a || GTK_RANGE (widget)->has_stepper_b)*/)
 	{
 		if (!gtk_range_get_inverted (GTK_RANGE (widget)))
 			junction |= MRN_JUNCTION_BEGIN;
@@ -303,8 +165,8 @@ murrine_scrollbar_get_junction (GtkWidget *widget)
 			junction |= MRN_JUNCTION_END;
 	}
 
-	if (adj->value >= adj->upper - adj->page_size &&
-	    (GTK_RANGE (widget)->has_stepper_c || GTK_RANGE (widget)->has_stepper_d))
+	if (gtk_adjustment_get_value(adj) >= gtk_adjustment_get_upper(adj) - gtk_adjustment_get_page_size(adj) /*&&
+	    (GTK_RANGE (widget)->has_stepper_c || GTK_RANGE (widget)->has_stepper_d)*/)
 	{
 		if (!gtk_range_get_inverted (GTK_RANGE (widget)))
 			junction |= MRN_JUNCTION_END;
@@ -324,16 +186,17 @@ gboolean murrine_is_panel_widget (GtkWidget *widget)
 void
 murrine_set_toolbar_parameters (ToolbarParameters *toolbar,
                                 GtkWidget *widget,
-                                GdkWindow *window,
                                 gint x, gint y)
 {
+	GtkAllocation allocation;
+
+	gtk_widget_get_allocation (widget, &allocation);
 	toolbar->topmost = FALSE;
 
-	if (x == 0 && y == 0)
-	{
-		if (widget && widget->allocation.x == 0 && widget->allocation.y == 0)
+	if (x == 0 && y == 0) {
+		if (widget && allocation.x == 0 && allocation.y == 0)
 		{
-			if (widget->window == window && MRN_IS_TOOLBAR (widget))
+			if (MRN_IS_TOOLBAR (widget))
 			{
 				toolbar->topmost = TRUE;
 			}
@@ -382,7 +245,7 @@ murrine_get_notebook_tab_position (GtkWidget *widget,
 
 			/* Skip invisible tabs */
 			tab_label = gtk_notebook_get_tab_label (notebook, tab_child);
-			if (!tab_label || !GTK_WIDGET_VISIBLE (tab_label))
+			if (!tab_label || !gtk_widget_get_visible (tab_label))
 				continue;
 			/* This is the same what the notebook does internally. */
 			if (tab_label && !gtk_widget_get_child_visible (tab_label))
@@ -394,29 +257,23 @@ murrine_get_notebook_tab_position (GtkWidget *widget,
 				return;
 			}
 
-			gtk_notebook_query_tab_label_packing (notebook, tab_child,
-			                                      &expand,
-			                                      NULL, /* don't need fill */
-			                                      &pack_type);
+                        gtk_container_child_get (GTK_CONTAINER (notebook), tab_child,
+                                                 "tab-expand", &expand,
+                                                 "tab-pack", &pack_type,
+                                                 NULL);
 
-			if (!found_tabs)
-			{
+			if (!found_tabs) {
 				found_tabs = TRUE;
 				*start = FALSE;
 				*end = FALSE;
 			}
 
-			if (expand)
-			{
+			if (expand) {
 				*start = TRUE;
 				*end = TRUE;
-			}
-			else if (pack_type == GTK_PACK_START)
-			{
+			} else if (pack_type == GTK_PACK_START) {
 				*start = TRUE;
-			}
-			else
-			{
+			} else {
 				*end = TRUE;
 			}
 		}
diff --git a/src/support.h b/src/support.h
index 719edcf..e0c7d17 100644
--- a/src/support.h
+++ b/src/support.h
@@ -129,10 +129,6 @@ G_GNUC_INTERNAL void murrine_gtk_treeview_get_header_index (GtkTreeView *tv,
                                                             gint        *column_index,
                                                             gint        *columns,
                                                             gboolean    *resizable);
-G_GNUC_INTERNAL void murrine_gtk_clist_get_header_index (GtkCList  *clist,
-                                                         GtkWidget *button,
-                                                         gint      *column_index,
-                                                         gint      *columns);
 G_GNUC_INTERNAL void murrine_option_menu_get_props (GtkWidget      *widget,
                                                     GtkRequisition *indicator_size,
                                                     GtkBorder      *indicator_spacing);
@@ -142,7 +138,6 @@ G_GNUC_INTERNAL MurrineJunction murrine_scrollbar_get_junction (GtkWidget *widge
 G_GNUC_INTERNAL gboolean murrine_is_panel_widget (GtkWidget *widget);
 G_GNUC_INTERNAL void murrine_set_toolbar_parameters (ToolbarParameters *toolbar,
                                                      GtkWidget *widget,
-                                                     GdkWindow *window,
                                                      gint x, gint y);
 G_GNUC_INTERNAL void murrine_get_notebook_tab_position (GtkWidget *widget,
                                                         gboolean  *start,
