[gtk+] Fixed GtkContainer buildable implementation to set packing properties explicitly set to "" (i.e. exp
- From: tvb src gnome org
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] Fixed GtkContainer buildable implementation to set packing properties explicitly set to "" (i.e. exp
- Date: Wed, 2 Feb 2011 06:15:19 +0000 (UTC)
commit fb3e221559c518d0ac1dfa41f14ffd8e4cdea9e8
Author: Tristan Van Berkom <tristan van berkom gmail com>
Date: Wed Feb 2 15:19:39 2011 +0900
Fixed GtkContainer buildable implementation to set packing properties explicitly set to "" (i.e. explicitly set to nothing).
gtk/gtkcontainer.c | 38 ++++++++++++++++++--------------------
1 files changed, 18 insertions(+), 20 deletions(-)
---
diff --git a/gtk/gtkcontainer.c b/gtk/gtkcontainer.c
index 5bf6f4d..18f046c 100644
--- a/gtk/gtkcontainer.c
+++ b/gtk/gtkcontainer.c
@@ -643,30 +643,28 @@ attributes_end_element (GMarkupParseContext *context,
{
PackingPropertiesData *parser_data = (PackingPropertiesData*)user_data;
- /* Append the translated strings */
- if (parser_data->string->len)
+ /* translate the string */
+ if (parser_data->string->len && parser_data->translatable)
{
- if (parser_data->translatable)
- {
- 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);
- g_string_set_size (parser_data->string, 0);
- g_string_append (parser_data->string, translated);
- }
-
- gtk_container_buildable_set_child_property (parser_data->container,
- parser_data->builder,
- parser_data->child,
- parser_data->child_prop_name,
+ 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);
+ g_string_set_size (parser_data->string, 0);
+ g_string_append (parser_data->string, translated);
}
+ if (parser_data->child_prop_name)
+ gtk_container_buildable_set_child_property (parser_data->container,
+ parser_data->builder,
+ parser_data->child,
+ parser_data->child_prop_name,
+ parser_data->string->str);
+
g_string_set_size (parser_data->string, 0);
g_free (parser_data->child_prop_name);
g_free (parser_data->context);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]