forked from AuroraMiddleware/gtk
cssparser: Make lines and positions 0-indexed
This commit is contained in:
parent
0d1b73f857
commit
62d231aeff
@ -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;
|
||||||
}
|
}
|
||||||
|
@ -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)
|
||||||
|
Loading…
Reference in New Issue
Block a user