summaryrefslogtreecommitdiff
path: root/demos/gtk-demo
diff options
context:
space:
mode:
authorChristian Dywan <christian@twotoasts.de>2010-10-18 09:10:27 +0200
committerChristian Dywan <christian@twotoasts.de>2010-10-18 09:13:44 +0200
commit6db62c66179fbe0f127b37f5c1dac41a22f304cf (patch)
tree43cd885f9cbce3ff9fc61593e75c0214540bf35d /demos/gtk-demo
parentf891c58432a08df37544d5332decedbabe677d6e (diff)
downloadgtk+-6db62c66179fbe0f127b37f5c1dac41a22f304cf.tar.gz
Use new GtkComboBoxEntry in all tests
Diffstat (limited to 'demos/gtk-demo')
-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 ff2111b2ff..79fa323669 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);