[gtk+/gtk-style-context] GtkCssProvider: Parse default/sorted region flags.
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-style-context] GtkCssProvider: Parse default/sorted region flags.
- Date: Tue, 19 Oct 2010 11:00:44 +0000 (UTC)
commit b4ebece7980ef31c32f33988fe74bf1a0e3b52ef
Author: Carlos Garnacho <carlosg gnome org>
Date: Tue Oct 19 13:00:07 2010 +0200
GtkCssProvider: Parse default/sorted region flags.
gtk/gtkcssprovider.c | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkcssprovider.c b/gtk/gtkcssprovider.c
index 1a1c4b2..e70ee14 100644
--- a/gtk/gtkcssprovider.c
+++ b/gtk/gtkcssprovider.c
@@ -469,6 +469,8 @@ enum ParserSymbol {
SYMBOL_NTH_CHILD = GTK_STATE_LAST,
SYMBOL_FIRST_CHILD,
SYMBOL_LAST_CHILD,
+ SYMBOL_DEFAULT_CHILD,
+ SYMBOL_SORTED_CHILD,
/* Scope: nth-child */
SYMBOL_NTH_CHILD_EVEN,
@@ -695,6 +697,8 @@ create_scanner (void)
g_scanner_scope_add_symbol (scanner, SCOPE_PSEUDO_CLASS, "nth-child", GUINT_TO_POINTER (SYMBOL_NTH_CHILD));
g_scanner_scope_add_symbol (scanner, SCOPE_PSEUDO_CLASS, "first-child", GUINT_TO_POINTER (SYMBOL_FIRST_CHILD));
g_scanner_scope_add_symbol (scanner, SCOPE_PSEUDO_CLASS, "last-child", GUINT_TO_POINTER (SYMBOL_LAST_CHILD));
+ g_scanner_scope_add_symbol (scanner, SCOPE_PSEUDO_CLASS, "default", GUINT_TO_POINTER (SYMBOL_DEFAULT_CHILD));
+ g_scanner_scope_add_symbol (scanner, SCOPE_PSEUDO_CLASS, "sorted", GUINT_TO_POINTER (SYMBOL_SORTED_CHILD));
g_scanner_scope_add_symbol (scanner, SCOPE_NTH_CHILD, "even", GUINT_TO_POINTER (SYMBOL_NTH_CHILD_EVEN));
g_scanner_scope_add_symbol (scanner, SCOPE_NTH_CHILD, "odd", GUINT_TO_POINTER (SYMBOL_NTH_CHILD_ODD));
@@ -1307,6 +1311,10 @@ parse_nth_child (GtkCssProvider *css_provider,
*flags = GTK_REGION_FIRST;
else if (symbol == SYMBOL_LAST_CHILD)
*flags = GTK_REGION_LAST;
+ else if (symbol == SYMBOL_DEFAULT_CHILD)
+ *flags = GTK_REGION_DEFAULT;
+ else if (symbol == SYMBOL_SORTED_CHILD)
+ *flags = GTK_REGION_SORTED;
else
{
*flags = 0;
@@ -1453,7 +1461,9 @@ parse_selector (GtkCssProvider *css_provider,
if (symbol == SYMBOL_FIRST_CHILD ||
symbol == SYMBOL_LAST_CHILD ||
- symbol == SYMBOL_NTH_CHILD)
+ symbol == SYMBOL_NTH_CHILD ||
+ symbol == SYMBOL_DEFAULT_CHILD ||
+ symbol == SYMBOL_SORTED_CHILD)
{
GTokenType token;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]