summaryrefslogtreecommitdiff
path: root/src/themes/coco/coco-theme.c
diff options
context:
space:
mode:
authorinfirit <[email protected]>2015-07-22 15:18:11 +0200
committerinfirit <[email protected]>2015-07-22 17:58:34 +0200
commit178b9b65fd56ec5f1ff2b4c84569f0d7e92cac90 (patch)
treec2ff43b382a55dd7acf3d577dc9ef241adf922e7 /src/themes/coco/coco-theme.c
parent102117d5251942e0664c837588cbe1525f1c8f4b (diff)
downloadmate-notification-daemon-178b9b65fd56ec5f1ff2b4c84569f0d7e92cac90.tar.bz2
mate-notification-daemon-178b9b65fd56ec5f1ff2b4c84569f0d7e92cac90.tar.xz
coco: Always use GtkAllocation
Rids us of some GTK_CHECK_VERSION
Diffstat (limited to 'src/themes/coco/coco-theme.c')
-rw-r--r--src/themes/coco/coco-theme.c22
1 files changed, 4 insertions, 18 deletions
diff --git a/src/themes/coco/coco-theme.c b/src/themes/coco/coco-theme.c
index 6eb52fa..ae25c2f 100644
--- a/src/themes/coco/coco-theme.c
+++ b/src/themes/coco/coco-theme.c
@@ -281,38 +281,24 @@ countdown_expose_cb(GtkWidget *pie,
{
cairo_t *context;
cairo_surface_t *surface;
-#if GTK_CHECK_VERSION (3, 0, 0)
GtkAllocation alloc;
-#else
+#if !GTK_CHECK_VERSION (3, 0, 0)
cairo_t *cr;
#endif
context = gdk_cairo_create(gtk_widget_get_window(pie));
cairo_set_operator(context, CAIRO_OPERATOR_SOURCE);
-#if GTK_CHECK_VERSION (3, 0, 0)
gtk_widget_get_allocation(pie, &alloc);
surface = cairo_surface_create_similar(cairo_get_target(context),
- CAIRO_CONTENT_COLOR_ALPHA,
- alloc.width,
- alloc.height);
-#else
- surface = cairo_surface_create_similar(cairo_get_target(context),
- CAIRO_CONTENT_COLOR_ALPHA,
- pie->allocation.width,
- pie->allocation.height);
-#endif
+ CAIRO_CONTENT_COLOR_ALPHA,
+ alloc.width,
+ alloc.height);
cr = cairo_create(surface);
-#if GTK_CHECK_VERSION(3, 0, 0)
cairo_translate (cr, -alloc.x, -alloc.y);
fill_background (pie, windata, cr);
cairo_translate (cr, alloc.x, alloc.y);
-#else
- cairo_translate (cr, -pie->allocation.x, -pie->allocation.y);
- fill_background (pie, windata, cr);
- cairo_translate (cr, pie->allocation.x, pie->allocation.y);
-#endif
draw_pie (pie, windata, cr);
#if !GTK_CHECK_VERSION(3, 0, 0)