aboutsummaryrefslogtreecommitdiff
path: root/src/datetime-service.c
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2012-02-14 18:15:59 -0600
committerCharles Kerr <charles.kerr@canonical.com>2012-02-14 18:15:59 -0600
commit895a0a2c7fcaa05bf4ea3415276af26bde90b769 (patch)
tree3fcbe661830cabc1f910b234aece9249020e3b16 /src/datetime-service.c
parent6749bbb52d4ffb13c2f4f0c24745421d33fcf788 (diff)
downloadayatana-indicator-datetime-895a0a2c7fcaa05bf4ea3415276af26bde90b769.tar.gz
ayatana-indicator-datetime-895a0a2c7fcaa05bf4ea3415276af26bde90b769.tar.bz2
ayatana-indicator-datetime-895a0a2c7fcaa05bf4ea3415276af26bde90b769.zip
Fix FTB when deprecation warnings are enabled
Diffstat (limited to 'src/datetime-service.c')
-rw-r--r--src/datetime-service.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/datetime-service.c b/src/datetime-service.c
index 8358a80..227022f 100644
--- a/src/datetime-service.c
+++ b/src/datetime-service.c
@@ -979,13 +979,19 @@ update_appointment_menu_items (gpointer user_data)
// Draw the correct icon for the appointment type and then tint it using mask fill.
// For now we'll create a circle
if (color_spec != NULL) {
- GdkColor color;
- gdk_color_parse (color_spec, &color);
g_debug("Creating a cairo surface: size, %d by %d", width, height);
cairo_surface_t *surface = cairo_image_surface_create( CAIRO_FORMAT_ARGB32, width, height );
- cairo_t *cr = cairo_create(surface);
- gdk_cairo_set_source_color(cr, &color);
+ cairo_t *cr = cairo_create(surface);
+#if GTK_CHECK_VERSION(3,0,0)
+ GdkRGBA rgba;
+ if (gdk_rgba_parse (&rgba, color_spec))
+ gdk_cairo_set_source_rgba (cr, &rgba);
+#else
+ GdkColor color;
+ if (gdk_color_parse (color_spec, &color))
+ gdk_cairo_set_source_color (cr, &color);
+#endif
cairo_paint(cr);
cairo_set_source_rgba(cr, 0,0,0,0.5);
cairo_set_line_width(cr, 1);