gtk+ r19316 - in trunk: . gtk



Author: johan
Date: Sun Jan  6 15:17:26 2008
New Revision: 19316
URL: http://svn.gnome.org/viewvc/gtk+?rev=19316&view=rev

Log:
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)



Modified:
   trunk/ChangeLog
   trunk/gtk/gtkbuilderparser.c

Modified: trunk/ChangeLog
==============================================================================
--- trunk/ChangeLog	(original)
+++ trunk/ChangeLog	Sun Jan  6 15:17:26 2008
@@ -1,5 +1,13 @@
 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.
 

Modified: trunk/gtk/gtkbuilderparser.c
==============================================================================
--- trunk/gtk/gtkbuilderparser.c	(original)
+++ trunk/gtk/gtkbuilderparser.c	Sun Jan  6 15:17:26 2008
@@ -534,8 +534,9 @@
 
   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 @@
   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 */



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]