[gtk+/gtk-style-context: 209/276] Allow linefeeds in property values.



commit 75c4a0efd336fb5d0c307f9261be365582f5e00e
Author: Carlos Garnacho <carlosg gnome org>
Date:   Thu Sep 2 01:48:24 2010 +0200

    Allow linefeeds in property values.

 gtk/gtkcssprovider.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkcssprovider.c b/gtk/gtkcssprovider.c
index 941ff79..5e8ef56 100644
--- a/gtk/gtkcssprovider.c
+++ b/gtk/gtkcssprovider.c
@@ -765,7 +765,7 @@ css_provider_apply_scope (GtkCssProvider *css_provider,
   if (scope == SCOPE_VALUE)
     {
       priv->scanner->config->cset_identifier_first = G_CSET_a_2_z "@#-_0123456789" G_CSET_A_2_Z;
-      priv->scanner->config->cset_identifier_nth = G_CSET_a_2_z "@#-_ 0123456789(),." G_CSET_A_2_Z;
+      priv->scanner->config->cset_identifier_nth = G_CSET_a_2_z "@#-_ 0123456789(),.\n" G_CSET_A_2_Z;
       priv->scanner->config->scan_identifier_1char = TRUE;
     }
   else if (scope == SCOPE_SELECTOR)
@@ -1137,7 +1137,7 @@ parse_selector (GtkCssProvider  *css_provider,
   return G_TOKEN_NONE;
 }
 
-#define SKIP_SPACES(s) while (s[0] == ' ') s++;
+#define SKIP_SPACES(s) while (s[0] == ' ' || s[0] == '\t' || s[0] == '\n') s++;
 
 static GtkSymbolicColor *
 symbolic_color_parse_str (const gchar  *string,



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]