Commit eb09bee4 authored by Matthias Clasen's avatar Matthias Clasen

css: Deprecate :sorted pseudo class

This was used with regions in GtkTreeView, and is not used
anymore, so deprecate it.
parent 2b27096f
...@@ -1176,7 +1176,7 @@ parse_selector_pseudo_class (GtkCssParser *parser, ...@@ -1176,7 +1176,7 @@ parse_selector_pseudo_class (GtkCssParser *parser,
{ "first-child", 0, 0, POSITION_FORWARD, 0, 1 }, { "first-child", 0, 0, POSITION_FORWARD, 0, 1 },
{ "last-child", 0, 0, POSITION_BACKWARD, 0, 1 }, { "last-child", 0, 0, POSITION_BACKWARD, 0, 1 },
{ "only-child", 0, 0, POSITION_ONLY, 0, 0 }, { "only-child", 0, 0, POSITION_ONLY, 0, 0 },
{ "sorted", 0, 0, POSITION_SORTED, 0, 0 }, { "sorted", 1, 0, POSITION_SORTED, 0, 0 },
{ "active", 0, GTK_STATE_FLAG_ACTIVE, }, { "active", 0, GTK_STATE_FLAG_ACTIVE, },
{ "prelight", 1, GTK_STATE_FLAG_PRELIGHT, }, { "prelight", 1, GTK_STATE_FLAG_PRELIGHT, },
{ "hover", 0, GTK_STATE_FLAG_PRELIGHT, }, { "hover", 0, GTK_STATE_FLAG_PRELIGHT, },
...@@ -1215,11 +1215,17 @@ parse_selector_pseudo_class (GtkCssParser *parser, ...@@ -1215,11 +1215,17 @@ parse_selector_pseudo_class (GtkCssParser *parser,
selector->state.state = pseudo_classes[i].state_flag; selector->state.state = pseudo_classes[i].state_flag;
if (pseudo_classes[i].deprecated) if (pseudo_classes[i].deprecated)
{ {
_gtk_css_parser_error_full (parser, if (pseudo_classes[i + 1].state_flag == pseudo_classes[i].state_flag)
GTK_CSS_PROVIDER_ERROR_DEPRECATED, _gtk_css_parser_error_full (parser,
"The :%s pseudo-class is deprecated. Use :%s instead.", GTK_CSS_PROVIDER_ERROR_DEPRECATED,
pseudo_classes[i].name, "The :%s pseudo-class is deprecated. Use :%s instead.",
pseudo_classes[i + 1].name); pseudo_classes[i].name,
pseudo_classes[i + 1].name);
else
_gtk_css_parser_error_full (parser,
GTK_CSS_PROVIDER_ERROR_DEPRECATED,
"The :%s pseudo-class is deprecated.",
pseudo_classes[i].name);
} }
} }
else else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment