summaryrefslogtreecommitdiff
path: root/demos
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2010-10-18 08:17:50 -0400
committerMatthias Clasen <mclasen@redhat.com>2010-10-18 08:17:50 -0400
commit5e94e36f9a52d7e88e75e6bcbf91109a0e5f91f0 (patch)
tree4d7be7c99adf6827ae18576df8bbae848606ed48 /demos
parent883835d17bb67fd567d824d11ec792f42eb70a86 (diff)
downloadgtk+-5e94e36f9a52d7e88e75e6bcbf91109a0e5f91f0.tar.gz
Use new GtkComboBoxEntry in all tests
(cherry picked from commit 6db62c66179fbe0f127b37f5c1dac41a22f304cf)
Diffstat (limited to 'demos')
-rw-r--r--demos/gtk-demo/combobox.c19
1 files changed, 6 insertions, 13 deletions
diff --git a/demos/gtk-demo/combobox.c b/demos/gtk-demo/combobox.c
index f8622ad223..439db18cb7 100644
--- a/demos/gtk-demo/combobox.c
+++ b/demos/gtk-demo/combobox.c
@@ -238,12 +238,12 @@ is_capital_sensitive (GtkCellLayout *cell_layout,
}
static void
-fill_combo_entry (GtkWidget *entry)
+fill_combo_entry (GtkWidget *combo)
{
- gtk_combo_box_append_text (GTK_COMBO_BOX (entry), "One");
- gtk_combo_box_append_text (GTK_COMBO_BOX (entry), "Two");
- gtk_combo_box_append_text (GTK_COMBO_BOX (entry), "2\302\275");
- gtk_combo_box_append_text (GTK_COMBO_BOX (entry), "Three");
+ gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo), "One");
+ gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo), "Two");
+ gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo), "2\302\275");
+ gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo), "Three");
}
@@ -428,14 +428,7 @@ do_combobox (GtkWidget *do_widget)
gtk_container_set_border_width (GTK_CONTAINER (box), 5);
gtk_container_add (GTK_CONTAINER (frame), box);
- 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);
-
+ combo = gtk_combo_box_text_new_with_entry ();
fill_combo_entry (combo);
gtk_container_add (GTK_CONTAINER (box), combo);