summaryrefslogtreecommitdiff
path: root/gtk/gtkcssprovider.c
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2019-04-11 06:10:52 +0200
committerBenjamin Otte <otte@redhat.com>2019-04-12 19:34:28 +0200
commit24cc721bc6b6294d2e8d0c7c32569096e4272dbe (patch)
tree9372e4f5ad17bdb52d6304003a544656614cfd7e /gtk/gtkcssprovider.c
parentd41580adfce78cf68d80701565ef4bba5ff0a571 (diff)
downloadgtk+-24cc721bc6b6294d2e8d0c7c32569096e4272dbe.tar.gz
cssprovider: Mark whole @import statement on import error
Diffstat (limited to 'gtk/gtkcssprovider.c')
-rw-r--r--gtk/gtkcssprovider.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/gtk/gtkcssprovider.c b/gtk/gtkcssprovider.c
index 865a357952..1e841fb2f3 100644
--- a/gtk/gtkcssprovider.c
+++ b/gtk/gtkcssprovider.c
@@ -711,9 +711,12 @@ parse_import (GtkCssScanner *scanner)
else if (gtk_css_scanner_would_recurse (scanner, file))
{
char *path = g_file_get_path (file);
- gtk_css_parser_error_import (scanner->parser,
- "Loading '%s' would recurse",
- path);
+ gtk_css_parser_error (scanner->parser,
+ GTK_CSS_PARSER_ERROR_IMPORT,
+ gtk_css_parser_get_block_location (scanner->parser),
+ gtk_css_parser_get_end_location (scanner->parser),
+ "Loading '%s' would recurse",
+ path);
g_free (path);
}
else
@@ -1077,9 +1080,12 @@ gtk_css_provider_load_internal (GtkCssProvider *self,
}
else
{
- gtk_css_parser_error_import (parent->parser,
- "Failed to import: %s",
- load_error->message);
+ gtk_css_parser_error (parent->parser,
+ GTK_CSS_PARSER_ERROR_IMPORT,
+ gtk_css_parser_get_block_location (parent->parser),
+ gtk_css_parser_get_end_location (parent->parser),
+ "Failed to import: %s",
+ load_error->message);
}
}
}