Deleting selected items from a list

Hi all,

I have a list which I am able to delete all its entries by just calling

GtkList *liste;
GList   *to_delete = GTK_LIST(liste)->children;
gtk_list_remove_items(liste, to_delete);

Well, the problem occurs when I am trying to delete the selected ones using a similar code to above:

GtkList *liste;
GList   *to_delete = GTK_LIST(liste)->selection;
gtk_list_remove_items(liste, to_delete);

What am I missing?

The messages I am getting are:

Gtk-CRITICAL **: file gtkwidget.c: line 1247 (gtk_widget_unparent):
assertion `widget != NULL' failed.

Gtk-CRITICAL **: file gtksignal.c: line 981 (gtk_signal_disconnect_by_data): assertion `object != NULL' failed.

Thanks in advance,
Get Your Private, Free E-mail from MSN Hotmail at

Share information about yourself, create your own public profile at

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