Re: gtk_combo_box_new_text() API



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 02/22/2011 08:46 AM, Allin Cottrell wrote:

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
_______________________________________________

If your going to use the model, then perhaps this will work...

gtk_list_store_clear(GTK_LIST_STORE(gtk_combo_box_get_model(GTK_COMBO_BOX(combo_box))));


Kevin
- -- 
Get my public GnuPG key from
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x7D0BD5D1
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iEYEARECAAYFAk1j25YACgkQ6w2kMH0L1dHwowCgjtC1y4jCCjfE1Rd+lmoh+4uV
fS8AnRm15KaRiuCzXsi3MAc3Pn1JBD7X
=Ljrw
-----END PGP SIGNATURE-----



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]