aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2013-03-26 16:30:46 -0500
committerCharles Kerr <charles.kerr@canonical.com>2013-03-26 16:30:46 -0500
commit0430322cec5472c4cbac20e2869f3aab9218c3d7 (patch)
tree0472e537cd92e1dfed28252be23ca8c2dcba228d /src
parent49c57fdc547b91bdad22ad4c7b36d6000ff023ee (diff)
downloadayatana-ido-0430322cec5472c4cbac20e2869f3aab9218c3d7.tar.gz
ayatana-ido-0430322cec5472c4cbac20e2869f3aab9218c3d7.tar.bz2
ayatana-ido-0430322cec5472c4cbac20e2869f3aab9218c3d7.zip
in ido_user_menu_item_primitive_draw_cb_gtk_3(), remove deprecated use of gtk_widget_get_style(), gtk_widget_get_state()
Diffstat (limited to 'src')
-rw-r--r--src/idousermenuitem.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/idousermenuitem.c b/src/idousermenuitem.c
index a6fd9f0..5677065 100644
--- a/src/idousermenuitem.c
+++ b/src/idousermenuitem.c
@@ -256,9 +256,15 @@ ido_user_menu_item_primitive_draw_cb_gtk_3 (GtkWidget * widget,
/* Draw dot only when user is the current user. */
if (priv->is_current_user)
{
+ GtkStyleContext * style_context;
+ GtkStateFlags state_flags;
+ GdkRGBA color;
gdouble x, y;
- GtkStyle * style = gtk_widget_get_style (widget);
- const GtkStateType state = gtk_widget_get_state (widget);
+
+ /* get the foreground color */
+ style_context = gtk_widget_get_style_context (widget);
+ state_flags = gtk_widget_get_state_flags (widget);
+ gtk_style_context_get_color (style_context, state_flags, &color);
GtkAllocation allocation;
gtk_widget_get_allocation (widget, &allocation);
@@ -267,9 +273,8 @@ ido_user_menu_item_primitive_draw_cb_gtk_3 (GtkWidget * widget,
cairo_arc (cr, x, y, 3.0, 0.0, 2 * G_PI);
- cairo_set_source_rgb (cr, style->fg[state].red/65535.0,
- style->fg[state].green/65535.0,
- style->fg[state].blue/65535.0);
+ gdk_cairo_set_source_rgba (cr, &color);
+
cairo_fill (cr);
}