[mutter] theme: Handle new GTK+ states
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] theme: Handle new GTK+ states
- Date: Sun, 5 Dec 2010 00:03:16 +0000 (UTC)
commit 544c8edd9e06e3144e36f89e847585cfe2f779f4
Author: Colin Walters <walters verbum org>
Date: Sat Dec 4 17:19:44 2010 -0500
theme: Handle new GTK+ states
src/ui/theme.c | 18 +++++++++++++-----
1 files changed, 13 insertions(+), 5 deletions(-)
---
diff --git a/src/ui/theme.c b/src/ui/theme.c
index f7ac4aa..1de6b62 100644
--- a/src/ui/theme.c
+++ b/src/ui/theme.c
@@ -6089,16 +6089,20 @@ meta_gradient_type_to_string (MetaGradientType type)
GtkStateType
meta_gtk_state_from_string (const char *str)
{
- if (strcmp ("normal", str) == 0 || strcmp ("NORMAL", str) == 0)
+ if (g_ascii_strcasecmp ("normal", str) == 0)
return GTK_STATE_NORMAL;
- else if (strcmp ("prelight", str) == 0 || strcmp ("PRELIGHT", str) == 0)
+ else if (g_ascii_strcasecmp ("prelight", str) == 0)
return GTK_STATE_PRELIGHT;
- else if (strcmp ("active", str) == 0 || strcmp ("ACTIVE", str) == 0)
+ else if (g_ascii_strcasecmp ("active", str) == 0)
return GTK_STATE_ACTIVE;
- else if (strcmp ("selected", str) == 0 || strcmp ("SELECTED", str) == 0)
+ else if (g_ascii_strcasecmp ("selected", str) == 0)
return GTK_STATE_SELECTED;
- else if (strcmp ("insensitive", str) == 0 || strcmp ("INSENSITIVE", str) == 0)
+ else if (g_ascii_strcasecmp ("insensitive", str) == 0)
return GTK_STATE_INSENSITIVE;
+ else if (g_ascii_strcasecmp ("inconsistent", str) == 0)
+ return GTK_STATE_INCONSISTENT;
+ else if (g_ascii_strcasecmp ("focused", str) == 0)
+ return GTK_STATE_FOCUSED;
else
return -1; /* hack */
}
@@ -6118,6 +6122,10 @@ meta_gtk_state_to_string (GtkStateType state)
return "SELECTED";
case GTK_STATE_INSENSITIVE:
return "INSENSITIVE";
+ case GTK_STATE_INCONSISTENT:
+ return "INCONSISTENT";
+ case GTK_STATE_FOCUSED:
+ return "FOCUSED";
}
return "<unknown>";
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]