diff options
author | Christian Dywan <christian@twotoasts.de> | 2010-10-18 09:10:27 +0200 |
---|---|---|
committer | Christian Dywan <christian@twotoasts.de> | 2010-10-18 09:13:44 +0200 |
commit | 6db62c66179fbe0f127b37f5c1dac41a22f304cf (patch) | |
tree | 43cd885f9cbce3ff9fc61593e75c0214540bf35d /tests/testsocket_common.c | |
parent | f891c58432a08df37544d5332decedbabe677d6e (diff) | |
download | gtk+-6db62c66179fbe0f127b37f5c1dac41a22f304cf.tar.gz |
Use new GtkComboBoxEntry in all tests
Diffstat (limited to 'tests/testsocket_common.c')
-rw-r--r-- | tests/testsocket_common.c | 35 |
1 files changed, 14 insertions, 21 deletions
diff --git a/tests/testsocket_common.c b/tests/testsocket_common.c index ababbf2b78..0023909f84 100644 --- a/tests/testsocket_common.c +++ b/tests/testsocket_common.c @@ -132,28 +132,21 @@ add_buttons (GtkWidget *widget, GtkWidget *box) static GtkWidget * create_combo (void) { - GtkComboBox *combo; + GtkComboBoxText *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); - - gtk_combo_box_append_text (combo, "item0"); - gtk_combo_box_append_text (combo, "item1 item1"); - gtk_combo_box_append_text (combo, "item2 item2 item2"); - gtk_combo_box_append_text (combo, "item3 item3 item3 item3"); - gtk_combo_box_append_text (combo, "item4 item4 item4 item4 item4"); - gtk_combo_box_append_text (combo, "item5 item5 item5 item5 item5 item5"); - gtk_combo_box_append_text (combo, "item6 item6 item6 item6 item6"); - gtk_combo_box_append_text (combo, "item7 item7 item7 item7"); - gtk_combo_box_append_text (combo, "item8 item8 item8"); - gtk_combo_box_append_text (combo, "item9 item9"); + + combo = GTK_COMBO_BOX_TEXT (gtk_combo_box_text_new_with_entry ()); + + gtk_combo_box_text_append_text (combo, "item0"); + gtk_combo_box_text_append_text (combo, "item1 item1"); + gtk_combo_box_text_append_text (combo, "item2 item2 item2"); + gtk_combo_box_text_append_text (combo, "item3 item3 item3 item3"); + gtk_combo_box_text_append_text (combo, "item4 item4 item4 item4 item4"); + gtk_combo_box_text_append_text (combo, "item5 item5 item5 item5 item5 item5"); + gtk_combo_box_text_append_text (combo, "item6 item6 item6 item6 item6"); + gtk_combo_box_text_append_text (combo, "item7 item7 item7 item7"); + gtk_combo_box_text_append_text (combo, "item8 item8 item8"); + gtk_combo_box_text_append_text (combo, "item9 item9"); entry = gtk_bin_get_child (GTK_BIN (combo)); gtk_entry_set_text (GTK_ENTRY (entry), "hello world"); |