cssparser: Make lines and positions 0-indexed

This commit is contained in:
Benjamin Otte 2011-06-17 07:21:46 +02:00
parent 0d1b73f857
commit 62d231aeff
2 changed files with 2 additions and 2 deletions

View File

@ -61,7 +61,7 @@ _gtk_css_parser_new (const char *data,
parser->user_data = user_data; parser->user_data = user_data;
parser->line_start = data; parser->line_start = data;
parser->line = 1; parser->line = 0;
return parser; return parser;
} }

View File

@ -148,7 +148,7 @@ parsing_error_cb (GtkCssProvider *provider,
basename = g_path_get_basename (path); basename = g_path_get_basename (path);
g_string_append_printf (errors, g_string_append_printf (errors,
"%s:%u: error: ", "%s:%u: error: ",
basename, line); basename, line + 1);
g_free (basename); g_free (basename);
if (error->domain == GTK_CSS_PROVIDER_ERROR) if (error->domain == GTK_CSS_PROVIDER_ERROR)