diff options
author | Tristan Van Berkom <tristanvb@openismus.com> | 2010-10-13 21:52:27 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2010-10-13 21:52:27 -0400 |
commit | 9612c648176378bf237ad0e1a8c6c995b0ca7c61 (patch) | |
tree | 875a7b2a6ce93657d756b2bae1a3c5ae07a75574 /demos | |
parent | 7c8ee80c5af0909735d1e36b8aba7aa02bf83c95 (diff) | |
download | gtk+-9612c648176378bf237ad0e1a8c6c995b0ca7c61.tar.gz |
Deprecate GtkComboBoxEntry in favor of added properties to GtkComboBox
GtkComboBox now sports a construct-only "has-entry" property which
decides if it uses a GtkEntry to allow additional user input. Also
it has a new "entry-text-column" to fetch strings for the entry
from the model.
This patch deprecates the GtkComboBoxEntry and updates the rest of GTK+
to use the new semantics on GtkComboBox instead.
GtkComboBoxEntry will be removed altogether before GTK+ 3, in a
later commit.
Diffstat (limited to 'demos')
-rw-r--r-- | demos/gtk-demo/combobox.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/demos/gtk-demo/combobox.c b/demos/gtk-demo/combobox.c index 82588b2923..ff2111b2ff 100644 --- a/demos/gtk-demo/combobox.c +++ b/demos/gtk-demo/combobox.c @@ -428,7 +428,14 @@ do_combobox (GtkWidget *do_widget) gtk_container_set_border_width (GTK_CONTAINER (box), 5); gtk_container_add (GTK_CONTAINER (frame), box); - combo = gtk_combo_box_entry_new_text (); + model = (GtkTreeModel *)gtk_list_store_new (1, G_TYPE_STRING); + combo = g_object_new (GTK_TYPE_COMBO_BOX, + "has-entry", TRUE, + "model", model, + "entry-text-column", 0, + NULL); + g_object_unref (model); + fill_combo_entry (combo); gtk_container_add (GTK_CONTAINER (box), combo); |