changeset 25810:41485746e2b9

A couple of minor fixes.
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Sun, 02 Nov 2008 18:39:39 +0000
parents ed13551a592a
children 88a66cb4a8d9
files libpurple/account.c libpurple/blist.h libpurple/server.c
diffstat 3 files changed, 8 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/account.c	Sun Nov 02 11:08:08 2008 +0000
+++ b/libpurple/account.c	Sun Nov 02 18:39:39 2008 +0000
@@ -2248,10 +2248,8 @@
 
 		/* 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)
--- a/libpurple/blist.h	Sun Nov 02 11:08:08 2008 +0000
+++ b/libpurple/blist.h	Sun Nov 02 18:39:39 2008 +0000
@@ -720,6 +720,7 @@
  *
  * @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);
 
--- a/libpurple/server.c	Sun Nov 02 11:08:08 2008 +0000
+++ b/libpurple/server.c	Sun Nov 02 18:39:39 2008 +0000
@@ -230,7 +230,7 @@
 		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 @@
 
 	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 @@
 	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;