pidgin.next.minor: ca1b3ac9: A couple of minor fixes.

sadrul at pidgin.im sadrul at pidgin.im
Sun Nov 2 13:40:23 EST 2008


-----------------------------------------------------------------
Revision: ca1b3ac908985d80ba2b86ef01bc4fcb4cf70fb7
Ancestor: 98fe5e59d5266adcb10b8c01fe28b5f4a6eb3f67
Author: sadrul at pidgin.im
Date: 2008-11-02T18:39:39
Branch: im.pidgin.pidgin.next.minor
URL: http://d.pidgin.im/viewmtn/revision/info/ca1b3ac908985d80ba2b86ef01bc4fcb4cf70fb7

Modified files:
        libpurple/account.c libpurple/blist.h libpurple/server.c

ChangeLog: 

A couple of minor fixes.

-------------- next part --------------
============================================================
--- libpurple/account.c	d95c0704585e09c5f077a58985109b60a7fa7fba
+++ libpurple/account.c	eb00550feec92c91a9b451f4223bdfcc27a73813
@@ -2248,10 +2248,8 @@ purple_account_add_buddies(PurpleAccount
 
 		/* Make a list of what group each buddy is in */
 		for (cur = buddies; cur != NULL; cur = cur->next) {
-			PurpleBlistNode *node = cur->data;
-			PurpleBlistNode *parent = purple_blist_node_get_parent(node);
-			PurpleBlistNode *gparent = purple_blist_node_get_parent(parent);
-			groups = g_list_append(groups, gparent);
+			PurpleBuddy *buddy = cur->data;
+			groups = g_list_append(groups, purple_buddy_get_group(buddy));
 		}
 
 		if (prpl_info->add_buddies != NULL)
============================================================
--- libpurple/blist.h	5444412414fcf24a435516ecd4c55b32594f4cb2
+++ libpurple/blist.h	a656482580a13fb55e7b1b4d381d439e68b0476e
@@ -720,6 +720,7 @@ const char *purple_buddy_get_alias(Purpl
  *
  * @param buddy  The buddy
  * @return       The local alias for the buddy
+ * @since 2.6.0
  */
 const char *purple_buddy_get_local_buddy_alias(PurpleBuddy *buddy);
 
============================================================
--- libpurple/server.c	bec5078868115789fb32b482d819b723d2a49e2c
+++ libpurple/server.c	8316531c3efa5831fb5517885ed3ae978ad30868
@@ -230,7 +230,7 @@ void serv_alias_buddy(PurpleBuddy *b)
 		prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(prpl);
 
 	if(b && prpl_info && prpl_info->alias_buddy) {
-		prpl_info->alias_buddy(gc, purple_buddy_get_name(b), purple_buddy_get_alias(b));
+		prpl_info->alias_buddy(gc, purple_buddy_get_name(b), purple_buddy_get_local_buddy_alias(b));
 	}
 }
 
@@ -247,11 +247,12 @@ serv_got_alias(PurpleConnection *gc, con
 
 	while (buddies != NULL)
 	{
-		const gchar *server_alias = purple_buddy_get_server_alias(b);
+		const char *server_alias;
 
 		b = buddies->data;
 		buddies = g_slist_delete_link(buddies, buddies);
 
+		server_alias = purple_buddy_get_server_alias(b);
 		if((server_alias == NULL && alias == NULL) ||
 		    (server_alias && alias && !strcmp(server_alias, alias)))
 		{
@@ -290,11 +291,12 @@ purple_serv_got_private_alias(PurpleConn
 	buddies = purple_find_buddies(account, who);
 
 	while(buddies != NULL) {
-		const gchar *balias = purple_buddy_get_alias(b);
+		const char *balias;
 		b = buddies->data;
 
 		buddies = g_slist_delete_link(buddies, buddies);
 
+		balias = purple_buddy_get_local_buddy_alias(b);
 		if((!balias && !alias) || (balias && alias && !strcmp(balias, alias)))
 			continue;
 


More information about the Commits mailing list