diff --git a/docs/reference/gtk/migrating-GtkComboBox.sgml b/docs/reference/gtk/migrating-GtkComboBox.sgml index 4114bdc15a..126e3ed15e 100644 --- a/docs/reference/gtk/migrating-GtkComboBox.sgml +++ b/docs/reference/gtk/migrating-GtkComboBox.sgml @@ -56,11 +56,11 @@ gtk_option_menu_set_menu (GTK_OPTION_MENU (option_menu), menu); GtkWidget *combo_box; -combo_box = gtk_combo_box_new_text (); +combo_box = gtk_combo_box_text_new (); -gtk_combo_box_append_text (GTK_COMBO_BOX (combo_box), "First Item"); -gtk_combo_box_append_text (GTK_COMBO_BOX (combo_box), "Second Item"); -gtk_combo_box_append_text (GTK_COMBO_BOX (combo_box), "Third Item"); +gtk_combo_box_text_append (GTK_COMBO_BOX_TEXT (combo_box), "First Item"); +gtk_combo_box_text_append (GTK_COMBO_BOX_TEXT (combo_box), "Second Item"); +gtk_combo_box_text_append (GTK_COMBO_BOX_TEXT (combo_box), "Third Item"); In order to react to the user's selection, connect to the #GtkComboBox::changed signal and use gtk_combo_box_get_active() @@ -149,11 +149,11 @@ gtk_combo_set_popdown_strings (GTK_COMBO (combo), items); And here is how it would be done using #GtkComboBoxEntry: -combo_box = gtk_combo_box_entry_new_text (); +combo_box = gtk_combo_box_text_new_with_entry (); -gtk_combo_box_append_text (GTK_COMBO_BOX (combo_box), "First Item"); -gtk_combo_box_append_text (GTK_COMBO_BOX (combo_box), "Second Item"); -gtk_combo_box_append_text (GTK_COMBO_BOX (combo_box), "Third Item"); +gtk_combo_box_text_append (GTK_COMBO_BOX_TEXT (combo_box), "First Item"); +gtk_combo_box_text_append (GTK_COMBO_BOX_TEXT (combo_box), "Second Item"); +gtk_combo_box_text_append (GTK_COMBO_BOX_TEXT (combo_box), "Third Item"); In order to react to the user's selection, connect to the #GtkComboBox::changed signal on the combo and use