Commit 0e09e8b3 authored by Johan Dahlin's avatar Johan Dahlin Committed by Johan Dahlin

Allow domains to be overridden in <interface>'s if a translation-domain is

2008-01-06  Johan Dahlin  <johan@gnome.org>

	* gtk/gtkbuilderparser.c (parse_interface): 
	Allow domains to be overridden in <interface>'s if a translation-domain
	is set in the builder.
	(_gtk_builder_parser_parse_buffer): Do not modify the translation-domain
	of the builder, make the domain set in the <interface> apply only to strings
	in that interface.
	(#496831, Ryan Lortie)


svn path=/trunk/; revision=19316
parent bf4f2111
2008-01-06 Johan Dahlin <johan@gnome.org>
* gtk/gtkbuilderparser.c (parse_interface):
Allow domains to be overridden in <interface>'s if a translation-domain
is set in the builder.
(_gtk_builder_parser_parse_buffer): Do not modify the translation-domain
of the builder, make the domain set in the <interface> apply only to strings
in that interface.
(#496831, Ryan Lortie)
* gtk/gtkbuilder.c: Avoid adding unnecessary trailing newlines
to g_warning calls.
......
......@@ -534,8 +534,9 @@ parse_interface (ParserData *data,
for (i = 0; names[i] != NULL; i++)
{
if (strcmp (names[i], "domain") == 0 && !data->domain)
if (strcmp (names[i], "domain") == 0)
{
g_free (data->domain);
data->domain = g_strdup (values[i]);
break;
}
......@@ -962,7 +963,6 @@ _gtk_builder_parser_parse_buffer (GtkBuilder *builder,
if (!g_markup_parse_context_parse (data->ctx, buffer, length, error))
goto out;
gtk_builder_set_translation_domain (data->builder, data->domain);
_gtk_builder_finish (builder);
/* Custom parser_finished */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment