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.
This commit is contained in:

committed by
Matthias Clasen

parent
7c8ee80c5a
commit
9612c64817
@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user