removing all items from GtkCombo->list
- From: Filippo Rusconi <listes rusconi laposte net>
- To: gtk-app-devel-list gnome org
- Subject: removing all items from GtkCombo->list
- Date: Wed, 4 Dec 2002 21:45:35 +0100
Hi,
I'm porting a Gtk+-1.4 program to Gtk-2.0. In some situations I need to remove all items from a GtkCombo
widget, which I used to do by getting to the GSList object that belongs to the GtkList, which in turn belongs
to the GtkCombo. For this I did something like this:
GtkList *list = NULL;
GList *glist = NULL;
list = (GtkList *) GTK_COMBO (combo)->list;
g_assert (list != NULL);
/* ATTENTION, if the list contains items already we first have
* to remove them, otherwise the ones that we "calculate" now
* would be appended to the preexisting ones.
*/
if (GTK_LIST (list)->children != NULL)
gtk_list_remove_items (list, (GList *) list->children);
The problem is that GtkList is now deprecated in Gtk+-2.0, and I
cannot use the GTK_LIST () macro anymore (nor can I use any other
GtkList-related function, in fact).
This means that, while trying to access the (GList *) list->children
GList object in this manner:
glist = GTK_COMBO (combo)->list->children
the compiler complains with the following message:
gcc -->> structure has no member named `children'
Does somebody have a solution to this question ?
Thanks for your kind help,
Filippo
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]