Re: [gtk-list] gtk_list_remove_items doesn't works!
- From: Tim Janik <timj gtk org>
- To: gtk-list redhat com
- Subject: Re: [gtk-list] gtk_list_remove_items doesn't works!
- Date: Sun, 28 Mar 1999 11:40:51 +0200 (CEST)
On Sat, 27 Mar 1999, Claudemir Todo Bom wrote:
> Hi people!
>
> I'm having some trouble with gtk_list_remove_items, the line is:
>
> gtk_list_remove_items ( GTK_LIST(mylist),GTK_LIST(mylist)->selection );
you can't pass GTK_LIST(mylist)->selection into remove_items and expect
things to work. obviously, upon removal of list items,
GTK_LIST(mylist)->selection has to be updated, this is done at the beginning
of gtk_list_remove_items() and then the list pointer you passed into the
function becomes invalid.
do this instead:
GList *copy = g_list_copy (GTK_LIST(mylist)->selection);
gtk_list_remove_items (GTK_LIST (mylist), copy);
g_list_free (copy);
---
ciaoTJ
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]