Re: GtkCombo, insert entry



TORRI Vincent wrote:

On Mon, 18 Nov 2002, Arno Dark wrote:

Hello,

I would like to insert in the GtkCombo list, an entry. So I do :

     gtk_entry_set_text(GTK_ENTRY (GTK_COMBO (combo)->entry), filtre);
     list = GTK_LIST (GTK_COMBO (combo)->list);
     items = g_list_append(NULL, filtre);

you are trying to add an element to NULL. The first parameter must be a *GList.
Yes, but I have no elments in my list. So, my list is equal to NULL.

But the segfault apear with the line :

    gtk_list_insert_items(list, items, 1);

I tested also with gtk_list_insert_items(list, items 0) but I have again a segfault.

     gtk_list_insert_items(list, items, 1);
     g_free(filtre);

But I have a segmentation fault. Could you help me ?

Also, I would like that when I insert a word in the entry of the
gtkcombo and when I press enter, it execute a function.

use the "activate" signal of the entry of your combo
I check it after, thk ;)

regards

Vincent TORRI

Thk Arno




__________________________________________________
Modem offert : 150,92 euros remboursés sur le Pack eXtense de Wanadoo ! Haut débit à partir de 30 euros/mois : http://www.ifrance.com/_reloc/w




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