summaryrefslogtreecommitdiff
path: root/gtk/gtkstyle.c
diff options
context:
space:
mode:
authorTristan Van Berkom <tristan.van.berkom@gmail.com>2010-08-30 14:56:28 +0900
committerTristan Van Berkom <tristan.van.berkom@gmail.com>2010-08-30 14:56:28 +0900
commit54d44a9bd04cfbed8426614fc69c027a46f41a14 (patch)
tree34bdf65a6e8d5d6d4016154345d1d803ba0da379 /gtk/gtkstyle.c
parentb3b22c31b997fb85b3319b392a1a69407703184c (diff)
parent67194ed77b153eb5a7eb6c596f3c20e274b7787a (diff)
downloadgtk+-native-layout.tar.gz
Merge branch 'master' into native-layoutnative-layout
Conflicts: gtk/gtkplug.c gtk/gtkscrolledwindow.c
Diffstat (limited to 'gtk/gtkstyle.c')
-rw-r--r--gtk/gtkstyle.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/gtk/gtkstyle.c b/gtk/gtkstyle.c
index f836ab101e..e8b13f372e 100644
--- a/gtk/gtkstyle.c
+++ b/gtk/gtkstyle.c
@@ -5698,13 +5698,16 @@ get_insertion_cursor_color (GtkWidget *widget,
gboolean is_primary)
{
CursorInfo *cursor_info;
+ GtkStyle *style;
GdkColor *cursor_color;
- cursor_info = g_object_get_data (G_OBJECT (widget->style), "gtk-style-cursor-info");
+ style = gtk_widget_get_style (widget);
+
+ cursor_info = g_object_get_data (G_OBJECT (style), "gtk-style-cursor-info");
if (!cursor_info)
{
cursor_info = g_new0 (CursorInfo, 1);
- g_object_set_data (G_OBJECT (widget->style), I_("gtk-style-cursor-info"), cursor_info);
+ g_object_set_data (G_OBJECT (style), I_("gtk-style-cursor-info"), cursor_info);
cursor_info->for_type = G_TYPE_INVALID;
}
@@ -5728,7 +5731,7 @@ get_insertion_cursor_color (GtkWidget *widget,
}
else
{
- cursor_info->primary = widget->style->text[GTK_STATE_NORMAL];
+ cursor_info->primary = style->text[GTK_STATE_NORMAL];
}
gtk_widget_style_get (widget, "secondary-cursor-color", &cursor_color, NULL);
@@ -5741,7 +5744,7 @@ get_insertion_cursor_color (GtkWidget *widget,
{
/* text_aa is the average of text and base colors,
* in usual black-on-white case it's grey. */
- cursor_info->secondary = widget->style->text_aa[GTK_STATE_NORMAL];
+ cursor_info->secondary = style->text_aa[GTK_STATE_NORMAL];
}
}
@@ -5768,7 +5771,7 @@ _gtk_widget_get_cursor_color (GtkWidget *widget,
gdk_color_free (style_color);
}
else
- *color = widget->style->text[GTK_STATE_NORMAL];
+ *color = gtk_widget_get_style (widget)->text[GTK_STATE_NORMAL];
}
static void