static void ide_keybindings_parsing_error (GtkCssProvider *css_provider, GtkCssSection *section, GError *error, gpointer user_data) { g_autofree gchar *filename = NULL; GFile *file; guint start_line; guint end_line; file = gtk_css_section_get_file (section); filename = g_file_get_uri (file); start_line = gtk_css_section_get_start_line (section); end_line = gtk_css_section_get_end_line (section); g_warning ("CSS parsing error in %s between lines %u and %u", filename, start_line, end_line); }
static void parsing_error_cb (GtkCssProvider *provider, GtkCssSection *section, const GError *error, GString *errors) { char *basename; basename = g_file_get_basename (gtk_css_section_get_file (section)); g_string_append_printf (errors, "%s:%u: error: ", basename, gtk_css_section_get_end_line (section) + 1); g_free (basename); if (error->domain == GTK_CSS_PROVIDER_ERROR) append_error_value (errors, GTK_TYPE_CSS_PROVIDER_ERROR, error->code); else g_string_append_printf (errors, "%s %u\n", g_quark_to_string (error->domain), error->code); g_string_append_c (errors, '\n'); }