aboutsummaryrefslogtreecommitdiffstats
path: root/lib/widgets/ephy-spinner.c
diff options
context:
space:
mode:
authorXan Lopez <xan@gnome.org>2010-10-05 13:04:29 +0800
committerXan Lopez <xan@gnome.org>2010-10-05 13:04:29 +0800
commit2d556b740f1b21dd3b5652271de6194df0d48ac5 (patch)
tree4760b0f630075acebdfad8d5b61a68f45697399d /lib/widgets/ephy-spinner.c
parent639a3f6aa2b594c5a5f339ac32db599ae98ed39b (diff)
downloadgsoc2013-epiphany-2d556b740f1b21dd3b5652271de6194df0d48ac5.tar
gsoc2013-epiphany-2d556b740f1b21dd3b5652271de6194df0d48ac5.tar.gz
gsoc2013-epiphany-2d556b740f1b21dd3b5652271de6194df0d48ac5.tar.bz2
gsoc2013-epiphany-2d556b740f1b21dd3b5652271de6194df0d48ac5.tar.lz
gsoc2013-epiphany-2d556b740f1b21dd3b5652271de6194df0d48ac5.tar.xz
gsoc2013-epiphany-2d556b740f1b21dd3b5652271de6194df0d48ac5.tar.zst
gsoc2013-epiphany-2d556b740f1b21dd3b5652271de6194df0d48ac5.zip
Adapt to latest changes in the GTK+ drawing model
Mostly moving from ::expose-event to ::draw, and adapting to the changes in the paint functions.
Diffstat (limited to 'lib/widgets/ephy-spinner.c')
-rw-r--r--lib/widgets/ephy-spinner.c18
1 files changed, 4 insertions, 14 deletions
diff --git a/lib/widgets/ephy-spinner.c b/lib/widgets/ephy-spinner.c
index cec0deaf4..3b610a19f 100644
--- a/lib/widgets/ephy-spinner.c
+++ b/lib/widgets/ephy-spinner.c
@@ -616,16 +616,15 @@ ephy_spinner_init (EphySpinner *spinner)
details->need_load = TRUE;
}
-static int
-ephy_spinner_expose (GtkWidget *widget,
- GdkEventExpose *event)
+static gboolean
+ephy_spinner_draw (GtkWidget *widget,
+ cairo_t *cr)
{
EphySpinner *spinner = EPHY_SPINNER (widget);
EphySpinnerDetails *details = spinner->details;
EphySpinnerImages *images;
GtkAllocation allocation;
GdkPixbuf *pixbuf;
- cairo_t *cr;
int x_offset, y_offset, width, height;
GdkRectangle pix_area, dest;
@@ -669,18 +668,9 @@ ephy_spinner_expose (GtkWidget *widget,
pix_area.width = width;
pix_area.height = height;
- if (!gdk_rectangle_intersect (&event->area, &pix_area, &dest))
- {
- return FALSE;
- }
-
- cr = gdk_cairo_create (gtk_widget_get_window (widget));
-
gdk_cairo_set_source_pixbuf (cr, pixbuf, dest.x, dest.y);
cairo_paint (cr);
- cairo_destroy (cr);
-
return FALSE;
}
@@ -876,7 +866,7 @@ ephy_spinner_class_init (EphySpinnerClass *class)
object_class->dispose = ephy_spinner_dispose;
object_class->finalize = ephy_spinner_finalize;
- widget_class->expose_event = ephy_spinner_expose;
+ widget_class->draw = ephy_spinner_draw;
widget_class->size_request = ephy_spinner_size_request;
widget_class->map = ephy_spinner_map;
widget_class->unmap = ephy_spinner_unmap;