pidgin: a964ba04: Added prepend functions for notify_user_...
evands at pidgin.im
evands at pidgin.im
Mon May 26 21:41:13 EDT 2008
-----------------------------------------------------------------
Revision: a964ba04f5cfd87392aa703a06c8735d5d3ccaec
Ancestor: b2e4328cd3f7566e4dbe7352abb27bff7d4e906d
Author: evands at pidgin.im
Date: 2008-05-27T01:19:07
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/a964ba04f5cfd87392aa703a06c8735d5d3ccaec
Modified files:
libpurple/notify.c libpurple/notify.h
ChangeLog:
Added prepend functions for notify_user_info section headers and breaks
-------------- next part --------------
============================================================
--- libpurple/notify.c 3000cf372f054b1837f95032e814be09661582b4
+++ libpurple/notify.c 9dc8cffcb81d377457cc490c069af62a72c91c21
@@ -629,6 +629,17 @@ void
}
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
}
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);
============================================================
--- libpurple/notify.h 9bb5d27b5f4d4f9223e2e0f387b7aac8c5e3f15e
+++ libpurple/notify.h 20c961db52434c201c7431057a374816fd246611
@@ -577,14 +577,29 @@ void purple_notify_user_info_add_section
void purple_notify_user_info_add_section_break(PurpleNotifyUserInfo *user_info);
/**
+ * Prepend a section break. A UI might display this as a horizontal line.
+ *
+ * @param user_info The PurpleNotifyUserInfo
+ */
+void purple_notify_user_info_prepend_section_break(PurpleNotifyUserInfo *user_info);
+
+/**
* Add a section header. A UI might display this in a different font from other text.
*
* @param user_info The PurpleNotifyUserInfo
* @param label The name of the section
*/
void purple_notify_user_info_add_section_header(PurpleNotifyUserInfo *user_info, const char *label);
-
+
/**
+ * Prepend a section header. A UI might display this in a different font from other text.
+ *
+ * @param user_info The PurpleNotifyUserInfo
+ * @param label The name of the section
+ */
+void purple_notify_user_info_prepend_section_header(PurpleNotifyUserInfo *user_info, const char *label);
+
+/**
* Remove the last item which was added to a PurpleNotifyUserInfo. This could be used to remove a section header which is not needed.
*/
void purple_notify_user_info_remove_last_item(PurpleNotifyUserInfo *user_info);
More information about the Commits
mailing list