7b2037542c
thanks OBS-URL: https://build.opensuse.org/request/show/55899 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/mutter?expand=0&rev=43
51 lines
1.8 KiB
Diff
51 lines
1.8 KiB
Diff
From 544c8edd9e06e3144e36f89e847585cfe2f779f4 Mon Sep 17 00:00:00 2001
|
|
From: Colin Walters <walters@verbum.org>
|
|
Date: Sat, 04 Dec 2010 22:19:44 +0000
|
|
Subject: theme: Handle new GTK+ states
|
|
|
|
---
|
|
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>";
|
|
--
|
|
cgit v0.8.3.1
|
|
|