diff options
author | Christian Dywan <christian@twotoasts.de> | 2010-10-15 16:29:30 +0200 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2010-10-15 17:00:13 -0400 |
commit | d70b7f49b62d8e7147d30a08340968633f36b0e7 (patch) | |
tree | 184fa80e0bb159ad79740293a497078713ef343e /gtk/gtkcombobox.c | |
parent | 50cbd23d5b9589ccc850dbc5304cd5805780bc40 (diff) | |
download | gtk+-d70b7f49b62d8e7147d30a08340968633f36b0e7.tar.gz |
Use property system to coerce model data to G_TYPE_STRING
Fixes: https://bugzilla.gnome.org/show_bug.cgi?id=423201
Diffstat (limited to 'gtk/gtkcombobox.c')
-rw-r--r-- | gtk/gtkcombobox.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/gtk/gtkcombobox.c b/gtk/gtkcombobox.c index d01791ec90..a3888e9fbb 100644 --- a/gtk/gtkcombobox.c +++ b/gtk/gtkcombobox.c @@ -5670,7 +5670,6 @@ gtk_combo_box_entry_active_changed (GtkComboBox *combo_box, GtkComboBoxPrivate *priv = combo_box->priv; GtkTreeModel *model; GtkTreeIter iter; - gchar *str = NULL; if (gtk_combo_box_get_active_iter (combo_box, &iter)) { @@ -5678,17 +5677,18 @@ gtk_combo_box_entry_active_changed (GtkComboBox *combo_box, if (entry) { + GValue value = {0,}; + g_signal_handlers_block_by_func (entry, gtk_combo_box_entry_contents_changed, combo_box); model = gtk_combo_box_get_model (combo_box); - gtk_tree_model_get (model, &iter, - priv->text_column, &str, - -1); - gtk_entry_set_text (entry, str); - g_free (str); + gtk_tree_model_get_value (model, &iter, + priv->text_column, &value); + g_object_set_property (G_OBJECT (entry), "text", &value); + g_value_unset (&value); g_signal_handlers_unblock_by_func (entry, gtk_combo_box_entry_contents_changed, |