~charlesk/indicator-datetime/fix-833337

« back to all changes in this revision

Viewing changes to src/datetime-service.c

  • Committer: Charles Kerr
  • Date: 2012-02-15 03:17:24 UTC
  • mfrom: (145.1.1 indicator-datetime-foo)
  • Revision ID: charles.kerr@canonical.com-20120215031724-3x0wjrf4tcxttkxq
Charles Kerr 2012-02-14 Fix FTB when deprecation warnings are enabled

Show diffs side-by-side

added added

removed removed

Lines of Context:
979
979
                // Draw the correct icon for the appointment type and then tint it using mask fill.
980
980
                // For now we'll create a circle
981
981
        if (color_spec != NULL) {
982
 
                GdkColor color;
983
 
                gdk_color_parse (color_spec, &color);   
984
982
                g_debug("Creating a cairo surface: size, %d by %d", width, height);         
985
983
                cairo_surface_t *surface = cairo_image_surface_create( CAIRO_FORMAT_ARGB32, width, height ); 
986
984
 
987
 
                cairo_t *cr = cairo_create(surface);
988
 
                        gdk_cairo_set_source_color(cr, &color);
 
985
                        cairo_t *cr = cairo_create(surface);
 
986
#if GTK_CHECK_VERSION(3,0,0)
 
987
                GdkRGBA rgba;
 
988
                if (gdk_rgba_parse (&rgba, color_spec))
 
989
                        gdk_cairo_set_source_rgba (cr, &rgba);
 
990
#else
 
991
                        GdkColor color;
 
992
                        if (gdk_color_parse (color_spec, &color))
 
993
                                gdk_cairo_set_source_color (cr, &color);
 
994
#endif
989
995
                        cairo_paint(cr);
990
996
                cairo_set_source_rgba(cr, 0,0,0,0.5);
991
997
                cairo_set_line_width(cr, 1);