Skip to content

Commit

Permalink
Fix few warnings when building with GTK+ >= 3.0.0, mostly unused vars.
Browse files Browse the repository at this point in the history
  • Loading branch information
zas committed Aug 30, 2012
1 parent 502c19f commit e48a30b
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions src/ui_misc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1324,12 +1324,24 @@ static gboolean sizer_leave_cb(GtkWidget *widget, GdkEventCrossing *event, gpoin

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)
{
Expand All @@ -1349,14 +1361,6 @@ static gboolean sizer_expose_cb(GtkWidget *widget, GdkEventExpose *event, gpoint
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,
Expand Down

0 comments on commit e48a30b

Please sign in to comment.