aboutsummaryrefslogtreecommitdiff
path: root/libmap
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 /libmap
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 'libmap')
-rw-r--r--libmap/cc-timezone-map.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/libmap/cc-timezone-map.c b/libmap/cc-timezone-map.c
index aeac9a0..ff6eee8 100644
--- a/libmap/cc-timezone-map.c
+++ b/libmap/cc-timezone-map.c
@@ -743,19 +743,25 @@ cc_timezone_map_draw (GtkWidget *widget,
GError *err = NULL;
gdouble pointx, pointy;
gdouble alpha = 1.0;
- GtkStyle *style;
char buf[16];
gtk_widget_get_allocation (widget, &alloc);
- style = gtk_widget_get_style (widget);
-
/* Check if insensitive */
- if (gtk_widget_get_state (widget) == GTK_STATE_INSENSITIVE)
+ if (gtk_widget_get_sensitive (widget))
alpha = 0.5;
/* paint background */
+#if GTK_CHECK_VERSION(3,0,0)
+ GdkRGBA rgba;
+ gtk_style_context_get_background_color (gtk_widget_get_style_context (widget),
+ gtk_widget_get_state_flags (widget),
+ &rgba);
+ gdk_cairo_set_source_rgba (cr, &rgba);
+#else
+ GtkStyle * style = gtk_widget_get_style (widget);
gdk_cairo_set_source_color (cr, &style->bg[gtk_widget_get_state (widget)]);
+#endif
cairo_paint (cr);
gdk_cairo_set_source_pixbuf (cr, priv->background, 0, 0);
cairo_paint_with_alpha (cr, alpha);