changeset 23117:d11c993700e6

Add the purple_blist_update_node_icon function and deprecate the purple_blist_update_buddy_icon function.
author Etan Reisner <pidgin@unreliablesource.net>
date Tue, 13 May 2008 04:26:28 +0000
parents d53f72735830
children 944059cb7807
files ChangeLog.API libpurple/blist.c libpurple/blist.h
diffstat 3 files changed, 32 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog.API	Mon May 12 02:19:06 2008 +0000
+++ b/ChangeLog.API	Tue May 13 04:26:28 2008 +0000
@@ -1,10 +1,15 @@
 Pidgin and Finch: The Pimpin' Penguin IM Clients That're Good for the Soul
 
 version 2.5.0:
-    libpurple:
-        Added:
-        * purple_serv_got_join_chat_failed
-        * chat-join-failed signal (see conversation-signals.dox)
+	libpurple:
+		Added:
+		* purple_serv_got_join_chat_failed
+		* chat-join-failed signal (see conversation-signals.dox)
+		* purple_blist_update_node_icon
+
+		Deprecated:
+		* purple_blist_update_buddy_icon
+
 	perl:
 		Added:
 		* Purple::Prefs::get_children_names.
--- a/libpurple/blist.c	Mon May 12 02:19:06 2008 +0000
+++ b/libpurple/blist.c	Tue May 13 04:26:28 2008 +0000
@@ -824,16 +824,25 @@
 		ops->update(purplebuddylist, (PurpleBlistNode *)buddy);
 }
 
-void purple_blist_update_buddy_icon(PurpleBuddy *buddy)
+void
+purple_blist_update_node_icon(PurpleBlistNode *node)
 {
 	PurpleBlistUiOps *ops = purple_blist_get_ui_ops();
 
-	g_return_if_fail(buddy != NULL);
+	g_return_if_fail(node != NULL);
 
 	if (ops && ops->update)
-		ops->update(purplebuddylist, (PurpleBlistNode *)buddy);
+		ops->update(purplebuddylist, node);
 }
 
+#ifndef PURPLE_DISABLE_DEPRECATED
+void
+purple_blist_update_buddy_icon(PurpleBuddy *buddy)
+{
+	purple_blist_update_node_icon((PurpleBlistNode *)buddy);
+}
+#endif
+
 /*
  * TODO: Maybe remove the call to this from server.c and call it
  * from oscar.c and toc.c instead?
--- a/libpurple/blist.h	Mon May 12 02:19:06 2008 +0000
+++ b/libpurple/blist.h	Tue May 13 04:26:28 2008 +0000
@@ -317,11 +317,22 @@
 void purple_blist_update_buddy_status(PurpleBuddy *buddy, PurpleStatus *old_status);
 
 /**
+ * Updates a node's custom icon.
+ *
+ * @param node  The PurpleBlistNode whose custom icon has changed.
+ * @since 2.5.0
+ */
+void purple_blist_update_node_icon(PurpleBlistNode *node);
+
+#ifndef PURPLE_DISABLE_DEPRECATED
+/**
  * Updates a buddy's icon.
  *
  * @param buddy  The buddy whose buddy icon has changed
+ * @deprecated Use purple_blist_update_node_icon() instead.
  */
 void purple_blist_update_buddy_icon(PurpleBuddy *buddy);
+#endif
 
 /**
  * Renames a buddy in the buddy list.