[Epiphany] Spinner patch



A much more controversial patch than the toolbar editor one, this patch
removes the use of a deprecated function in GTK2.3 (yes, I know we're
not using it yet, but the replacement function exists in 2.2, so I don't
see why we can't start replacing deprecated functions now)

May I commit?
iain
-- 
Index: lib/widgets/ephy-spinner.c
===================================================================
RCS file: /cvs/gnome/epiphany/lib/widgets/ephy-spinner.c,v
retrieving revision 1.9
diff -u -p -r1.9 ephy-spinner.c
--- lib/widgets/ephy-spinner.c	9 Mar 2003 00:32:34 -0000	1.9
+++ lib/widgets/ephy-spinner.c	12 Mar 2003 00:45:55 -0000
@@ -246,6 +246,7 @@ ephy_spinner_expose (GtkWidget *widget, 
 {
 	EphySpinner *spinner;
 	GdkPixbuf *pixbuf;
+	GdkGC *gc;
 	int x_offset, y_offset, width, height;
 	GdkRectangle pix_area, dest;
 
@@ -277,14 +278,13 @@ ephy_spinner_expose (GtkWidget *widget, 
 		return FALSE;
 	}
 
-	gdk_pixbuf_render_to_drawable_alpha (
-		pixbuf, widget->window,
-		dest.x - x_offset, dest.y - y_offset,
-		dest.x, dest.y,
-		dest.width, dest.height,
-		GDK_PIXBUF_ALPHA_BILEVEL, 128,
-		GDK_RGB_DITHER_MAX,
-		0, 0);
+	gc = gdk_gc_new (widget->window);
+	gdk_draw_pixbuf (widget->window, gc, pixbuf,
+			 dest.x - x_offset, dest.y - y_offset,
+			 dest.x, dest.y,
+			 dest.width, dest.height,
+			 GDK_RGB_DITHER_MAX, 0, 0);
+	g_object_unref (gc);
 
 	g_object_unref (pixbuf);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]