projects
/
geeqie.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
502c19f
)
Fix few warnings when building with GTK+ >= 3.0.0, mostly unused vars.
author
Laurent Monin
<zas@norz.org>
Thu, 30 Aug 2012 11:17:40 +0000
(13:17 +0200)
committer
Laurent Monin
<zas@norz.org>
Thu, 30 Aug 2012 11:17:40 +0000
(13:17 +0200)
src/ui_misc.c
patch
|
blob
|
history
diff --git
a/src/ui_misc.c
b/src/ui_misc.c
index
2aef411
..
45a087e
100644
(file)
--- a/
src/ui_misc.c
+++ b/
src/ui_misc.c
@@
-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)
{
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;
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)
{
if (sd->position & SIZER_POS_LEFT || sd->position & SIZER_POS_RIGHT)
{
@@
-1349,14
+1361,6
@@
static gboolean sizer_expose_cb(GtkWidget *widget, GdkEventExpose *event, gpoint
state = gtk_widget_get_state(widget);
}
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,
gdk_region_get_clipbox(event->region, &clip);
gtk_paint_handle(gtk_widget_get_style(widget), gtk_widget_get_window(widget), state,