[gtk+] cssprovider: Emit an error when parsing a binding fails
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] cssprovider: Emit an error when parsing a binding fails
- Date: Wed, 20 Jul 2011 00:53:09 +0000 (UTC)
commit 1a763044fe071d791dbce9be4caa7da6fc3dbe9f
Author: Benjamin Otte <otte redhat com>
Date: Wed Jul 20 02:11:51 2011 +0200
cssprovider: Emit an error when parsing a binding fails
gtk/gtkcssprovider.c | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkcssprovider.c b/gtk/gtkcssprovider.c
index c0bbed6..97d6b85 100644
--- a/gtk/gtkcssprovider.c
+++ b/gtk/gtkcssprovider.c
@@ -1803,7 +1803,15 @@ parse_binding_set (GtkCssScanner *scanner)
continue;
}
- gtk_binding_entry_add_signal_from_string (binding_set, name);
+ if (gtk_binding_entry_add_signal_from_string (binding_set, name) != G_TOKEN_NONE)
+ {
+ gtk_css_provider_error_literal (scanner->provider,
+ scanner,
+ GTK_CSS_PROVIDER_ERROR,
+ GTK_CSS_PROVIDER_ERROR_SYNTAX,
+ "Failed to parse binding set.");
+ }
+
g_free (name);
if (!_gtk_css_parser_try (scanner->parser, ";", TRUE))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]