Mercurial > pidgin
diff libpurple/notify.c @ 23205:84693a70ea3a
Added prepend functions for notify_user_info section headers and breaks
| author | Evan Schoenberg <evan.s@dreskin.net> |
|---|---|
| date | Tue, 27 May 2008 01:19:07 +0000 |
| parents | 5e6b42e77fb7 |
| children | 8282911d5e17 |
line wrap: on
line diff
--- a/libpurple/notify.c Mon May 26 14:30:00 2008 +0000 +++ b/libpurple/notify.c Tue May 27 01:19:07 2008 +0000 @@ -629,6 +629,17 @@ } void +purple_notify_user_info_prepend_section_header(PurpleNotifyUserInfo *user_info, const char *label) +{ + PurpleNotifyUserInfoEntry *entry; + + entry = purple_notify_user_info_entry_new(label, NULL); + entry->type = PURPLE_NOTIFY_USER_INFO_ENTRY_SECTION_HEADER; + + user_info->user_info_entries = g_list_prepend(user_info->user_info_entries, entry); +} + +void purple_notify_user_info_add_section_break(PurpleNotifyUserInfo *user_info) { PurpleNotifyUserInfoEntry *entry; @@ -640,6 +651,17 @@ } void +purple_notify_user_info_prepend_section_break(PurpleNotifyUserInfo *user_info) +{ + PurpleNotifyUserInfoEntry *entry; + + entry = purple_notify_user_info_entry_new(NULL, NULL); + entry->type = PURPLE_NOTIFY_USER_INFO_ENTRY_SECTION_BREAK; + + user_info->user_info_entries = g_list_prepend(user_info->user_info_entries, entry); +} + +void purple_notify_user_info_remove_last_item(PurpleNotifyUserInfo *user_info) { GList *last = g_list_last(user_info->user_info_entries);
