Re: G_LIST_REMOVE not working... at least not for me :-)



No, that doesn't appear to work.

I get an error stating that I can not GTK_LIST_CLEAR a
G_LIST.

Here is my error:

(FMC:2376): GLib-GObject-WARNING **: invalid cast from
(NULL) pointer to `GtkList'

(FMC:2376): Gtk-CRITICAL **: file gtklist.c: line 1139
(gtk_list_clear_items): assertion `GTK_IS_LIST (list)'
failed


There is no G_LIST_CLEAR_ITEMS equivelent, and my list
is a G_LIST, not a GTK_LIST.... so at this point I'm
pretty much lost.  There seems to be no API reference
or command explaining how--when you remove the last
item from a G_LIST--you are about to update the parent
Combo box to show the now empty (NULL) list.  Since
you can't 'gtk_combo_set_popdown_strings' a NULL list,
I have no idea what the GTK developers do to resolve
this.

Thoroughly confused...

-Mike

--- Havoc Pennington <hp redhat com> wrote:
On Sat, Nov 16, 2002 at 06:04:52PM -0800, Mike
Dailey wrote: 
If the item you are removing from the combo box is
the
last item in there, how do you remove that last
item
and update the combo box to show it as "empty"?

I'm not sure, but I wouldn't be surprised if you
have to do:

  gtk_list_clear_items (GTK_LIST (combo->list), 0,
-1);

GtkCombo isn't the most convenient widget, it's
scheduled for
replacement in GTK 2.4.

(Note that for noneditable choices, you should use
GtkOptionMenu or
GtkTreeView instead, according to most UI
guidelines. This is a
difference between Windows and Mac/Unix. With GTK
2.4 most likely the
option menu will just theme to look like a combo on
Windows.)

Havoc


__________________________________________________
Do you Yahoo!?
Yahoo! Web Hosting - Let the expert host your site
http://webhosting.yahoo.com



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