Re: GtkBuilder Public API - Last call



Samuel Cormier-Iijima wrote:
> 
>  
> 
>     /**
>     * gtk_builder_enum_from_string:
>     * @type: a #GType
>     * @string: string containing an enum
>     *
>     * This function is used to convert a string to a enum value. You can
>     use the
>     * enums nick or blurb representations to convert from.
>     *
>     * Return value: converted enum value
>     *
>     * Since: 2.12
>     */
>     gint         gtk_builder_enum_from_string        (GType         type,
>                                                       const char   *string);
> 
> 
> Just curious, but why do you have gtk_builder_enum_from_string when
> something
> similar already exists in GObject as g_enum_get_value_by_nick/name?

Since it accepts a nick, name or number, it's using
g_enum_get_value_by_nick/name internally.

-- 
Johan Dahlin <jdahlin async com br>
Async Open Source



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