summaryrefslogtreecommitdiff
path: root/tests/testsocket_common.c
diff options
context:
space:
mode:
authorTristan Van Berkom <tristanvb@openismus.com>2010-10-13 21:52:27 -0400
committerMatthias Clasen <mclasen@redhat.com>2010-10-13 21:52:27 -0400
commit9612c648176378bf237ad0e1a8c6c995b0ca7c61 (patch)
tree875a7b2a6ce93657d756b2bae1a3c5ae07a75574 /tests/testsocket_common.c
parent7c8ee80c5af0909735d1e36b8aba7aa02bf83c95 (diff)
downloadgtk+-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 'tests/testsocket_common.c')
-rw-r--r--tests/testsocket_common.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/testsocket_common.c b/tests/testsocket_common.c
index da28f3a81c..78eb7d55ca 100644
--- a/tests/testsocket_common.c
+++ b/tests/testsocket_common.c
@@ -134,8 +134,16 @@ create_combo (void)
{
GtkComboBox *combo;
GtkWidget *entry;
+ GtkListStore *store;
+
+ store = gtk_list_store_new (1, G_TYPE_STRING);
+ combo = g_object_new (GTK_TYPE_COMBO_BOX,
+ "has-entry", TRUE,
+ "model", store,
+ "entry-text-column", 0,
+ NULL);
+ g_object_unref (store);
- combo = GTK_COMBO_BOX (gtk_combo_box_entry_new_text ());
gtk_combo_box_append_text (combo, "item0");
gtk_combo_box_append_text (combo, "item1 item1");
gtk_combo_box_append_text (combo, "item2 item2 item2");