pidgin.next.minor: f7137c5c: update prpl.c to use the new purple_budd...

grim at pidgin.im grim at pidgin.im
Thu Dec 10 20:00:41 EST 2009


-----------------------------------------------------------------
Revision: f7137c5c12c16d0b446b2c0d05c1965af2a07f37
Ancestor: b6046cb41ee9bee6de4694508353ffb6b6309248
Author: grim at pidgin.im
Date: 2009-12-11T00:55:09
Branch: im.pidgin.pidgin.next.minor
URL: http://d.pidgin.im/viewmtn/revision/info/f7137c5c12c16d0b446b2c0d05c1965af2a07f37

Modified files:
        libpurple/prpl.c

ChangeLog: 

update prpl.c to use the new purple_buddy_[gs]et_media_caps api


-------------- next part --------------
============================================================
--- libpurple/prpl.c	115219b4139013d5efdc08a7dc5be9ae86a657e5
+++ libpurple/prpl.c	826b1068c9419c9222f085f3d96c89c4bb4e7967
@@ -595,17 +595,21 @@ purple_prpl_got_media_caps(PurpleAccount
 
 	while (list) {
 		PurpleBuddy *buddy = list->data;
-		PurpleMediaCaps oldcaps = buddy->media_caps;
+		PurpleMediaCaps oldcaps = purple_buddy_get_media_caps(buddy);
+		PurpleMediaCaps newcaps = 0;
 		const gchar *bname = purple_buddy_get_name(buddy);
 		list = g_slist_delete_link(list, list);
-		buddy->media_caps = purple_prpl_get_media_caps(account, bname);
 
-		if (oldcaps == buddy->media_caps)
+		
+		newcaps = purple_prpl_get_media_caps(account, bname);
+		purple_buddy_set_media_caps(buddy, newcaps);
+
+		if (oldcaps == newcaps)
 			continue;
 
 		purple_signal_emit(purple_blist_get_handle(),
 				"buddy-caps-changed", buddy,
-				buddy->media_caps, oldcaps);
+				newcaps, oldcaps);
 	}
 #endif
 }


More information about the Commits mailing list