GtkBuilder: Unify builder error messages

Don't use <%s> for an attribute.
This commit is contained in:
Matthias Clasen 2015-04-25 19:29:40 -04:00
parent 31ff1204a4
commit 44bf00d5da

View File

@ -243,11 +243,6 @@ parse_requires (ParserData *data,
const gchar *version = NULL;
gchar **split;
gint i, version_major = 0, version_minor = 0;
gint line_number, char_number;
g_markup_parse_context_get_position (data->ctx,
&line_number,
&char_number);
for (i = 0; names[i] != NULL; i++)
{
@ -268,12 +263,14 @@ parse_requires (ParserData *data,
if (!(split = g_strsplit (version, ".", 2)) || !split[0] || !split[1])
{
gint line, col;
g_markup_parse_context_get_position (data->ctx, &line, &col);
g_set_error (error,
GTK_BUILDER_ERROR,
GTK_BUILDER_ERROR_INVALID_VALUE,
"%s:%d:%d <%s> attribute has malformed value \"%s\"",
data->filename,
line_number, char_number, "version", version);
"%s:%d:%d '%s' attribute has malformed value \"%s\"",
data->filename, line, col, "version", version);
return;
}
version_major = g_ascii_strtoll (split[0], NULL, 10);