Re: gtk_combo_set_propdown_strings()



Martin Baulig <martin home-of-linux org> writes:

> Hi guys,
> 
> gtk_combo_set_popdown_strings (GtkCombo * combo, GList * strings)
> {
>   GList *list;
>   GtkWidget *li;
> 
>   g_return_if_fail (combo != NULL);
>   g_return_if_fail (GTK_IS_COMBO (combo));
>   g_return_if_fail (strings != NULL);
>   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> 
> Why is this g_return_if_fail() there ?
> IMO the most intuitive way to clear the list of popdown strings is
> to call this function with strings == NULL - and I also don't see
> any other way to do this.

Fine with me if you go ahead and commit a change (to HEAD) removing
this check, since it doesn't make sense - an empty list is stil
a list.

I think you are "allowed" to do:

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

Since accessing the list directly is in some sense part of the
API.

Regards,
                                        Owen




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