Mercurial > pidgin
changeset 29334:31a34388fb1d
update prpl.c to use the new purple_buddy_[gs]et_media_caps api
author | Gary Kramlich <grim@reaperworld.com> |
---|---|
date | Fri, 11 Dec 2009 00:55:09 +0000 |
parents | 4055d0f7f1ea |
children | e26af064fe8c |
files | libpurple/prpl.c |
diffstat | 1 files changed, 8 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/prpl.c Fri Dec 11 00:54:46 2009 +0000 +++ b/libpurple/prpl.c Fri Dec 11 00:55:09 2009 +0000 @@ -595,17 +595,21 @@ 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 }