im.pidgin.pidgin: 5e11f89fad2bba2d5ef3307befb618c9ca110561
jeff2 at soc.pidgin.im
jeff2 at soc.pidgin.im
Thu Feb 14 02:55:43 EST 2008
-----------------------------------------------------------------
Revision: 5e11f89fad2bba2d5ef3307befb618c9ca110561
Ancestor: 3639bb4d5d5a867f6bdb2a82be21e4887179b929
Author: jeff2 at soc.pidgin.im
Date: 2008-02-14T07:49:57
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/5e11f89fad2bba2d5ef3307befb618c9ca110561
Modified files:
libpurple/protocols/myspace/myspace.c
ChangeLog:
In msimprpl, for server-side contacts, first search for an existing group
on the client before creating one and adding it to the beginning of the list.
If there is an existing group, use that. Fixes problem where MySpaceIM
groups always move to the top of the buddy list upon sign-on, because they
were always created anew.
Closes #3378.
-------------- next part --------------
============================================================
--- libpurple/protocols/myspace/myspace.c f475fa3a96381694b2501b2b414a293d0ae10609
+++ libpurple/protocols/myspace/myspace.c 93f7b9bf5df4ce1f596c29da2841c49db184b293
@@ -2797,7 +2797,14 @@ msim_add_contact_from_server_cb(MsimSess
* the documentation claims). */
group_name = msim_msg_get_string(contact_info, "GroupName");
if (group_name) {
- group = purple_group_new(group_name);
+ group = purple_find_group(group_name);
+ if (!group) {
+ group = purple_group_new(group_name);
+ /* Add group to beginning. See #2752. */
+ purple_blist_add_group(group, NULL);
+
+ }
+
purple_debug_info("msim_add_contact_from_server_cb",
"adding to GroupName: %s\n", group_name);
g_free(group_name);
@@ -2813,9 +2820,6 @@ msim_add_contact_from_server_cb(MsimSess
buddy = purple_buddy_new(session->account, username, NULL);
}
- /* Add group to beginning. See #2752. */
- purple_blist_add_group(group, NULL);
-
/* TODO: use 'Position' in contact_info to take into account where buddy is */
purple_blist_add_buddy(buddy, NULL, group, NULL /* insertion point */);
More information about the Commits
mailing list