[gtk+/gtk-style-context: 417/540] GtkStyle: Fix typo.
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-style-context: 417/540] GtkStyle: Fix typo.
- Date: Fri, 3 Dec 2010 03:11:11 +0000 (UTC)
commit 68627bdf0df322d51dce490cc20197e29ab21945
Author: Carlos Garnacho <carlosg gnome org>
Date: Fri Nov 19 20:54:13 2010 +0100
GtkStyle: Fix typo.
GtkStateType was being used in gtk_style_context_get(), instead of
GtkStateFlags, oops.
gtk/gtkstyle.c | 27 +++++++++++++++++++++++----
1 files changed, 23 insertions(+), 4 deletions(-)
---
diff --git a/gtk/gtkstyle.c b/gtk/gtkstyle.c
index 4acab1b..eaa0a25 100644
--- a/gtk/gtkstyle.c
+++ b/gtk/gtkstyle.c
@@ -651,31 +651,50 @@ set_color (GtkStyle *style,
GtkStateType state,
GtkRcFlags prop)
{
+ GtkStateFlags flags;
GdkRGBA *color = NULL;
GdkColor *dest = { 0 }; /* Shut up gcc */
+ switch (state)
+ {
+ case GTK_STATE_ACTIVE:
+ flags = GTK_STATE_FLAG_ACTIVE;
+ break;
+ case GTK_STATE_PRELIGHT:
+ flags = GTK_STATE_FLAG_PRELIGHT;
+ break;
+ case GTK_STATE_SELECTED:
+ flags = GTK_STATE_FLAG_SELECTED;
+ break;
+ case GTK_STATE_INSENSITIVE:
+ flags = GTK_STATE_FLAG_INSENSITIVE;
+ break;
+ default:
+ flags = 0;
+ }
+
switch (prop)
{
case GTK_RC_BG:
- gtk_style_context_get (context, state,
+ gtk_style_context_get (context, flags,
"background-color", &color,
NULL);
dest = &style->bg[state];
break;
case GTK_RC_FG:
- gtk_style_context_get (context, state,
+ gtk_style_context_get (context, flags,
"color", &color,
NULL);
dest = &style->fg[state];
break;
case GTK_RC_TEXT:
- gtk_style_context_get (context, state,
+ gtk_style_context_get (context, flags,
"color", &color,
NULL);
dest = &style->text[state];
break;
case GTK_RC_BASE:
- gtk_style_context_get (context, state,
+ gtk_style_context_get (context, flags,
"background-color", &color,
NULL);
dest = &style->base[state];
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]