On Tue, 22 Feb 2011, Timo Schneider wrote:

> The GTK+ Reference Manual states that a combo box created with
> gtk_combo_box_new_text() should only be manipulated with the functions
> gtk_combo_box_append_text(), gtk_combo_box_insert_text(),
> gtk_combo_box_prepend_text() and gtk_combo_box_remove_text().
>
> I am interested in removing all text entries from such a combo
> box [...]

It seems that you are in fact OK using the GtkComboBox API for
this purpose, as in

void depopulate_combo_box (GtkComboBox *box)
{
    GtkTreeModel *model = gtk_combo_box_get_model(box);
    GtkTreeIter iter;

    while (gtk_tree_model_get_iter_first(model, &iter)) {
        gtk_combo_box_remove_text(box, 0);
    }
}

Allin Cottrell
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Reply via email to