From 6f889e832c2cb02b70f2d5b891938c571a37c7b1 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Mon, 21 Dec 2015 08:26:58 -0500 Subject: [PATCH] css: Support CSS names for pseudo states What we call :insensitive is called :disabled in CSS, and :inconsistent is :indeterminate. Recognize these names, but still support the old ones. --- gtk/gtkcssselector.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gtk/gtkcssselector.c b/gtk/gtkcssselector.c index 0647c296ef..0db8c368df 100644 --- a/gtk/gtkcssselector.c +++ b/gtk/gtkcssselector.c @@ -736,8 +736,8 @@ print_pseudoclass_state (const GtkCssSelector *selector, "active", "hover", "selected", - "insensitive", - "inconsistent", + "disabled", + "indeterminate", "focus", "backdrop", "dir(ltr)", @@ -1181,7 +1181,9 @@ parse_selector_pseudo_class (GtkCssParser *parser, { "hover", GTK_STATE_FLAG_PRELIGHT, }, { "selected", GTK_STATE_FLAG_SELECTED, }, { "insensitive", GTK_STATE_FLAG_INSENSITIVE, }, + { "disabled", GTK_STATE_FLAG_INSENSITIVE, }, { "inconsistent", GTK_STATE_FLAG_INCONSISTENT, }, + { "indeterminate",GTK_STATE_FLAG_INCONSISTENT, }, { "focused", GTK_STATE_FLAG_FOCUSED, }, { "focus", GTK_STATE_FLAG_FOCUSED, }, { "backdrop", GTK_STATE_FLAG_BACKDROP, },