diff -r 69f29e0c8111 -r 1067482b6de1 libpurple/request.h --- a/libpurple/request.h Sun Apr 05 20:06:11 2009 +0000 +++ b/libpurple/request.h Mon Apr 06 05:19:40 2009 +0000 @@ -150,6 +150,7 @@ struct { GList *items; + GList *icons; GHashTable *item_data; GList *selected; GHashTable *selected_table; @@ -947,15 +948,30 @@ void *purple_request_field_list_get_data(const PurpleRequestField *field, const char *text); +#if !(defined PURPLE_DISABLE_DEPRECATED) || (defined _PURPLE_REQUEST_C_) /** * Adds an item to a list field. * * @param field The list field. * @param item The list item. * @param data The associated data. + * + * @deprecated Use purple_request_field_list_add_icon() instead. */ void purple_request_field_list_add(PurpleRequestField *field, const char *item, void *data); +#endif + +/** + * Adds an item to a list field. + * + * @param field The list field. + * @param item The list item. + * @param icon_path The path to icon file, or @c NULL for no icon. + * @param data The associated data. + */ +void purple_request_field_list_add_icon(PurpleRequestField *field, + const char *item, const char* icon_path, void* data); /** * Adds a selected item to the list field. @@ -1015,6 +1031,18 @@ */ GList *purple_request_field_list_get_items(const PurpleRequestField *field); +/** + * Returns a list of icons in a list field. + * + * The icons will correspond with the items, in order. + * + * @param field The field. + * + * @constreturn The list of icons or @c NULL (i.e. the empty GList) if no + * items have icons. + */ +GList *purple_request_field_list_get_icons(const PurpleRequestField *field); + /*@}*/ /**************************************************************************/