Mercurial > hg > forks > geeqie
changeset 2116:8db9da8cc955
Fix few warnings when building with GTK+ >= 3.0.0, mostly unused vars.
author | Laurent Monin <zas@norz.org> |
---|---|
date | Thu, 30 Aug 2012 13:17:40 +0200 |
parents | d61b1c2699bd |
children | 9cb68d42605c |
files | src/ui_misc.c |
diffstat | 1 files changed, 12 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ui_misc.c Thu Aug 30 13:15:40 2012 +0200 +++ b/src/ui_misc.c Thu Aug 30 13:17:40 2012 +0200 @@ -1324,12 +1324,24 @@ static gboolean sizer_expose_cb(GtkWidget *widget, GdkEventExpose *event, gpointer data) { +#if GTK_CHECK_VERSION(3,0,0) + GtkAllocation allocation; + + gtk_widget_get_allocation(widget, &allocation); + + cairo_t *cr = gdk_cairo_create(gtk_widget_get_window(widget)); + + gtk_render_handle (gtk_widget_get_style_context (widget), + cr, allocation.x, allocation.y, allocation.width, allocation.height); + cairo_destroy(cr); +#else SizerData *sd = data; GdkRectangle clip; GtkOrientation orientation; GtkStateType state; GtkAllocation allocation; + gtk_widget_get_allocation(widget, &allocation); if (sd->position & SIZER_POS_LEFT || sd->position & SIZER_POS_RIGHT) { @@ -1349,14 +1361,6 @@ state = gtk_widget_get_state(widget); } - gtk_widget_get_allocation(widget, &allocation); -#if GTK_CHECK_VERSION(3,0,0) - cairo_t *cr = gdk_cairo_create(gtk_widget_get_window(widget)); - - gtk_render_handle (gtk_widget_get_style_context (widget), - cr, allocation.x, allocation.y, allocation.width, allocation.height); - cairo_destroy(cr); -#else gdk_region_get_clipbox(event->region, &clip); gtk_paint_handle(gtk_widget_get_style(widget), gtk_widget_get_window(widget), state,