summaryrefslogtreecommitdiff
path: root/gtk/gtkcomboboxtext.c
diff options
context:
space:
mode:
authorTristan Van Berkom <tristan.van.berkom@gmail.com>2011-01-26 21:56:43 +0900
committerTristan Van Berkom <tristan.van.berkom@gmail.com>2011-01-26 23:55:01 +0900
commit9487ce77c43ff5288a578881f49e11ac0dc1a52c (patch)
treebf41c322da5f409e6ff8a90bfc8530c1b1abc73f /gtk/gtkcomboboxtext.c
parent2081ade640bc66f649d17a07aa357f698571599e (diff)
downloadgtk+-9487ce77c43ff5288a578881f49e11ac0dc1a52c.tar.gz
Changed GtkComboBoxText <items> builder parser to use g_string_append_len().
Diffstat (limited to 'gtk/gtkcomboboxtext.c')
-rw-r--r--gtk/gtkcomboboxtext.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/gtk/gtkcomboboxtext.c b/gtk/gtkcomboboxtext.c
index c7a6da44fb..be0a076a1d 100644
--- a/gtk/gtkcomboboxtext.c
+++ b/gtk/gtkcomboboxtext.c
@@ -206,14 +206,9 @@ item_text (GMarkupParseContext *context,
GError **error)
{
ItemParserData *data = (ItemParserData*)user_data;
- gchar *string;
- if (!data->is_text)
- return;
-
- string = g_strndup (text, text_len);
- g_string_append (data->string, string);
- g_free (string);
+ if (data->is_text)
+ g_string_append_len (data->string, text, text_len);
}
static void