API: cssprovider: Change parsing-error signal

Instead of path, line and position, emit the section the error happened
in. This has a lot more information to consume.
This commit is contained in:
Benjamin Otte
2011-06-17 07:39:11 +02:00
parent 8d6b560ff3
commit 26e9d07718
7 changed files with 98 additions and 81 deletions

View File

@ -134,21 +134,16 @@ append_error_value (GString *string,
static void
parsing_error_cb (GtkCssProvider *provider,
const gchar *path,
guint line,
guint position,
const GError * error,
GString * errors)
GtkCssSection *section,
const GError *error,
GString *errors)
{
char *basename;
g_assert (path);
g_assert (line > 0);
basename = g_path_get_basename (path);
basename = g_file_get_basename (gtk_css_section_get_file (section));
g_string_append_printf (errors,
"%s:%u: error: ",
basename, line + 1);
basename, gtk_css_section_get_end_line (section) + 1);
g_free (basename);
if (error->domain == GTK_CSS_PROVIDER_ERROR)