From: <ev...@us...> - 2006-12-26 03:15:09
|
Revision: 18056 http://svn.sourceforge.net/gaim/?rev=18056&view=rev Author: evands Date: 2006-12-25 19:15:08 -0800 (Mon, 25 Dec 2006) Log Message: ----------- Fix a problem with [18053] and add gaim_notify_user_info_remove_entry() Modified Paths: -------------- trunk/libgaim/notify.c trunk/libgaim/notify.h Modified: trunk/libgaim/notify.c =================================================================== --- trunk/libgaim/notify.c 2006-12-26 02:47:13 UTC (rev 18055) +++ trunk/libgaim/notify.c 2006-12-26 03:15:08 UTC (rev 18056) @@ -475,7 +475,7 @@ return NULL; } -static GaimNotifyUserInfoEntry * +GaimNotifyUserInfoEntry * gaim_notify_user_info_entry_new(const char *label, const char *value) { GaimNotifyUserInfoEntry *user_info_entry; @@ -621,7 +621,7 @@ } void -gaim_notify_user_info_entry_set_value(GaimNotifyUserInfoEntry *user_info_entry, GaimNotifyUserInfoEntryType type) +gaim_notify_user_info_entry_set_type(GaimNotifyUserInfoEntry *user_info_entry, GaimNotifyUserInfoEntryType type) { g_return_if_fail(user_info_entry != NULL); @@ -647,6 +647,15 @@ } void +gaim_notify_user_info_remove_entry(GaimNotifyUserInfo *user_info, GaimNotifyUserInfoEntry *user_info_entry) +{ + g_return_if_fail(user_info != NULL); + g_return_if_fail(user_info_entry != NULL); + + user_info->user_info_entries = g_list_remove(user_info->user_info_entries, entry); +} + +void gaim_notify_user_info_add_section_header(GaimNotifyUserInfo *user_info, const char *label) { GaimNotifyUserInfoEntry *entry; Modified: trunk/libgaim/notify.h =================================================================== --- trunk/libgaim/notify.h 2006-12-26 02:47:13 UTC (rev 18055) +++ trunk/libgaim/notify.h 2006-12-26 03:15:08 UTC (rev 18056) @@ -448,6 +448,8 @@ * GaimNotifyUserInfoEntry are allowed in the list. If a GaimNotifyUserInfoEntry item is added to the list, * it should not be g_free()'d by the caller; GaimNotifyUserInfo will g_free it when destroyed. * + * To remove a GaimNotifyUserInfoEntry, use gaim_notify_user_info_remove_entry(). Do not use the GList directly. + * * @param user_info The GaimNotifyUserInfo * * @result A GList of GaimNotifyUserInfoEntry objects @@ -463,7 +465,8 @@ char *gaim_notify_user_info_get_text_with_newline(GaimNotifyUserInfo *user_info, const char *newline); /** - * Add a label/value pair to a GaimNotifyUserInfo object. GaimNotifyUserInfo keeps track of the order in which pairs are added. + * Add a label/value pair to a GaimNotifyUserInfo object. + * GaimNotifyUserInfo keeps track of the order in which pairs are added. * * @param user_info The GaimNotifyUserInfo * @param label A label, which for example might be displayed by a UI with a colon after it ("Status:"). Do not include a colon. @@ -487,6 +490,13 @@ void gaim_notify_user_info_prepend_pair(GaimNotifyUserInfo *user_info, const char *label, const char *value); /** + * Remove a GaimNotifyUserInfoEntry from a GaimNotifyUserInfo object + * + * @param user_info The GaimNotifyUserInfo + * @param user_info_entry The GaimNotifyUserInfoEntry + */ +void gaim_notify_user_info_remove_entry(GaimNotifyUserInfo *user_info, GaimNotifyUserInfoEntry *user_info_entry); +/** * Create a new GaimNotifyUserInfoEntry * * If added to a GaimNotifyUserInfo object, this should not be free()'d, as GaimNotifyUserInfo will do so This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |