comparison libpurple/prpl.c @ 29345:13fa0fffac6d

merge of '1529fa495883d559527375c0d8b7fbe68cf019c2' and '3e607deb45a1ba0c62a1b8f376d94b2751ec8343'
author Paul Aurich <paul@darkrain42.org>
date Sat, 09 Jan 2010 02:00:18 +0000
parents 31a34388fb1d
children a8cc50c2279f
comparison
equal deleted inserted replaced
29321:c4ed54041d6e 29345:13fa0fffac6d
593 if ((list = purple_find_buddies(account, name)) == NULL) 593 if ((list = purple_find_buddies(account, name)) == NULL)
594 return; 594 return;
595 595
596 while (list) { 596 while (list) {
597 PurpleBuddy *buddy = list->data; 597 PurpleBuddy *buddy = list->data;
598 PurpleMediaCaps oldcaps = buddy->media_caps; 598 PurpleMediaCaps oldcaps = purple_buddy_get_media_caps(buddy);
599 PurpleMediaCaps newcaps = 0;
599 const gchar *bname = purple_buddy_get_name(buddy); 600 const gchar *bname = purple_buddy_get_name(buddy);
600 list = g_slist_delete_link(list, list); 601 list = g_slist_delete_link(list, list);
601 buddy->media_caps = purple_prpl_get_media_caps(account, bname); 602
602 603
603 if (oldcaps == buddy->media_caps) 604 newcaps = purple_prpl_get_media_caps(account, bname);
605 purple_buddy_set_media_caps(buddy, newcaps);
606
607 if (oldcaps == newcaps)
604 continue; 608 continue;
605 609
606 purple_signal_emit(purple_blist_get_handle(), 610 purple_signal_emit(purple_blist_get_handle(),
607 "buddy-caps-changed", buddy, 611 "buddy-caps-changed", buddy,
608 buddy->media_caps, oldcaps); 612 newcaps, oldcaps);
609 } 613 }
610 #endif 614 #endif
611 } 615 }
612 616
613 /************************************************************************** 617 /**************************************************************************