Mercurial > pidgin.yaz
view libpurple/plugins/mono/loader/blist-glue.c @ 29443:d4b9df8e17f6
jabber: Fix another corner case that introduced duplicates to the list.
This occurs when the roster contains either two groups with the exact
same name or a name that differs only by case. The solution: uniquify
the list of groups. Fixes #10950.
author | Paul Aurich <paul@darkrain42.org> |
---|---|
date | Tue, 16 Feb 2010 00:36:25 +0000 |
parents | 32c366eeeb99 |
children | a8cc50c2279f |
line wrap: on
line source
#include <string.h> #include "blist.h" #include "mono-helper.h" #include "mono-glue.h" MonoObject* purple_blist_get_handle_glue(void) { void *handle = purple_blist_get_handle(); return mono_value_box(ml_get_domain(), mono_get_intptr_class(), &handle); } MonoObject* purple_blist_build_buddy_object(void* data) { MonoObject *obj = NULL; PurpleBuddy *buddy = (PurpleBuddy*)data; obj = ml_create_api_object("Buddy"); g_return_val_if_fail(obj != NULL, NULL); ml_set_prop_string(obj, "Name", (char*)purple_buddy_get_name(buddy)); ml_set_prop_string(obj, "Alias", (char*)purple_buddy_get_alias(buddy)); return obj; }