diff options
author | Javier Jardón <javierjc1982@gmail.com> | 2009-09-22 17:27:30 +0800 |
---|---|---|
committer | Xan Lopez <xan@gnome.org> | 2009-09-22 17:33:15 +0800 |
commit | 0eadd147c38a58cd235571d228e393216416cd3e (patch) | |
tree | 943359c4cb4d5ac6dcf797684322d5926f4c5c6a /lib/widgets/ephy-spinner.c | |
parent | f279bbf2de2896f39ef08e52961e8638b9f1a29b (diff) | |
download | gsoc2013-epiphany-0eadd147c38a58cd235571d228e393216416cd3e.tar gsoc2013-epiphany-0eadd147c38a58cd235571d228e393216416cd3e.tar.gz gsoc2013-epiphany-0eadd147c38a58cd235571d228e393216416cd3e.tar.bz2 gsoc2013-epiphany-0eadd147c38a58cd235571d228e393216416cd3e.tar.lz gsoc2013-epiphany-0eadd147c38a58cd235571d228e393216416cd3e.tar.xz gsoc2013-epiphany-0eadd147c38a58cd235571d228e393216416cd3e.tar.zst gsoc2013-epiphany-0eadd147c38a58cd235571d228e393216416cd3e.zip |
GTK+ 2.17.11 is now the required version
I've used all the GTK+ 2.17.11 api available, still missing:
GTK_WIDGET_REALIZED (GTK_WIDGET ())
GTK_WIDGET_MAPPED (GTK_WIDGET ())
GTK_ENTRY->im_context
GTK_STATUSBAR->frame
GTK_STATUSBAR->label
GTK_MESSAGE_DIALOG->label
https://bugzilla.gnome.org/show_bug.cgi?id=595791
Signed-off-by: Xan Lopez <xan@gnome.org>
Diffstat (limited to 'lib/widgets/ephy-spinner.c')
-rw-r--r-- | lib/widgets/ephy-spinner.c | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/lib/widgets/ephy-spinner.c b/lib/widgets/ephy-spinner.c index a210a156b..068a36a8e 100644 --- a/lib/widgets/ephy-spinner.c +++ b/lib/widgets/ephy-spinner.c @@ -598,7 +598,7 @@ ephy_spinner_init (EphySpinner *spinner) details = spinner->details = EPHY_SPINNER_GET_PRIVATE (spinner); - GTK_WIDGET_SET_FLAGS (GTK_WIDGET (spinner), GTK_NO_WINDOW); + gtk_widget_set_has_window (GTK_WIDGET (spinner), FALSE); details->cache = ephy_spinner_cache_ref (); details->size = GTK_ICON_SIZE_DIALOG; @@ -614,12 +614,14 @@ ephy_spinner_expose (GtkWidget *widget, EphySpinner *spinner = EPHY_SPINNER (widget); EphySpinnerDetails *details = spinner->details; EphySpinnerImages *images; + GtkAllocation allocation; GdkPixbuf *pixbuf; + GdkWindow *window; GdkGC *gc; int x_offset, y_offset, width, height; GdkRectangle pix_area, dest; - if (!GTK_WIDGET_DRAWABLE (spinner)) + if (!gtk_widget_is_drawable (GTK_WIDGET (spinner))) { return FALSE; } @@ -650,11 +652,12 @@ ephy_spinner_expose (GtkWidget *widget, height = gdk_pixbuf_get_height (pixbuf); /* Compute the offsets for the image centered on our allocation */ - x_offset = (widget->allocation.width - width) / 2; - y_offset = (widget->allocation.height - height) / 2; + gtk_widget_get_allocation (widget, &allocation); + x_offset = (allocation.width - width) / 2; + y_offset = (allocation.height - height) / 2; - pix_area.x = x_offset + widget->allocation.x; - pix_area.y = y_offset + widget->allocation.y; + pix_area.x = x_offset + allocation.x; + pix_area.y = y_offset + allocation.y; pix_area.width = width; pix_area.height = height; @@ -663,10 +666,11 @@ ephy_spinner_expose (GtkWidget *widget, return FALSE; } - gc = gdk_gc_new (widget->window); - gdk_draw_pixbuf (widget->window, gc, pixbuf, - dest.x - x_offset - widget->allocation.x, - dest.y - y_offset - widget->allocation.y, + window = gtk_widget_get_window (widget); + gc = gdk_gc_new (window); + gdk_draw_pixbuf (window, gc, pixbuf, + dest.x - x_offset - allocation.x, + dest.y - y_offset - allocation.y, dest.x, dest.y, dest.width, dest.height, GDK_RGB_DITHER_MAX, 0, 0); @@ -924,7 +928,7 @@ ephy_spinner_stop (EphySpinner *spinner) { ephy_spinner_remove_update_callback (spinner); - if (GTK_WIDGET_MAPPED (GTK_WIDGET (spinner))) + //if (GTK_WIDGET_MAPPED (GTK_WIDGET (spinner))) { gtk_widget_queue_draw (GTK_WIDGET (spinner)); } |