[gtk+/font-chooser] cssprovider: Emit an error when parsing a binding fails
- From: Alberto Ruiz <aruiz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/font-chooser] cssprovider: Emit an error when parsing a binding fails
- Date: Wed, 20 Jul 2011 20:21:34 +0000 (UTC)
commit 83aad7669aa552d36ae54a37bdc25bd6e703ae6a
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]