[gtk+] Fix setting child properties
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] Fix setting child properties
- Date: Sat, 4 May 2013 02:31:41 +0000 (UTC)
commit ed5ef04127c5663d03ec81759fdee6d1a3a8a8af
Author: Matthias Clasen <mclasen redhat com>
Date: Fri May 3 22:29:20 2013 -0400
Fix setting child properties
This was broken in e9f182e37a7f6e2dc339054841a3c9f930f573ed
gtk/gtkcontainer.c | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/gtk/gtkcontainer.c b/gtk/gtkcontainer.c
index 4a642df..2d7ab23 100644
--- a/gtk/gtkcontainer.c
+++ b/gtk/gtkcontainer.c
@@ -664,16 +664,17 @@ attributes_end_element (GMarkupParseContext *context,
/* translate the string */
if (parser_data->string->len && parser_data->translatable)
{
- const gchar *translated;
+ gchar *translated;
const gchar *domain;
domain = gtk_builder_get_translation_domain (parser_data->builder);
- translated = _gtk_builder_parser_translate (domain,
- parser_data->context,
- parser_data->string->str);
+ translated = g_strdup (_gtk_builder_parser_translate (domain,
+ parser_data->context,
+ parser_data->string->str));
g_string_set_size (parser_data->string, 0);
g_string_append (parser_data->string, translated);
+ g_free (translated);
}
if (parser_data->child_prop_name)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]