[gtk+/font-chooser] cssprovider: Get the location right for semicolon warnings



commit 9b54e589117e9e880038be1c0e419195c9099a1c
Author: Benjamin Otte <otte redhat com>
Date:   Wed Jul 20 02:01:34 2011 +0200

    cssprovider: Get the location right for semicolon warnings

 gtk/gtkcssprovider.c |   15 +++++++++------
 1 files changed, 9 insertions(+), 6 deletions(-)
---
diff --git a/gtk/gtkcssprovider.c b/gtk/gtkcssprovider.c
index 6ffb1a6..c0bbed6 100644
--- a/gtk/gtkcssprovider.c
+++ b/gtk/gtkcssprovider.c
@@ -1833,12 +1833,15 @@ parse_binding_set (GtkCssScanner *scanner)
     }
 
 skip_semicolon:
-  if (_gtk_css_parser_try (scanner->parser, ";", TRUE))
-    gtk_css_provider_error_literal (scanner->provider,
-                                    scanner,
-                                    GTK_CSS_PROVIDER_ERROR,
-                                    GTK_CSS_PROVIDER_ERROR_DEPRECATED,
-                                    "Nonstandard semicolon at end of binding set");
+  if (_gtk_css_parser_begins_with (scanner->parser, ';'))
+    {
+      gtk_css_provider_error_literal (scanner->provider,
+                                      scanner,
+                                      GTK_CSS_PROVIDER_ERROR,
+                                      GTK_CSS_PROVIDER_ERROR_DEPRECATED,
+                                      "Nonstandard semicolon at end of binding set");
+      _gtk_css_parser_try (scanner->parser, ";", TRUE);
+    }
 }
 
 static void



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