[gaim-migrate @ 12517]

Tue, 19 Apr 2005 03:52:18 +0000

author
Richard Laager <rlaager@pidgin.im>
date
Tue, 19 Apr 2005 03:52:18 +0000
changeset 10845
72c2fdf8e16c
parent 10844
fb5b88957742
child 10846
345ede622d46

[gaim-migrate @ 12517]
sf patch #1184976, from Richard Laager
"This contact-izes the View Log in the conversation window
correctly."

Richard, you may want to double-check my changes to the for loop.

committer: Mark Doliner <markdoliner@pidgin.im>

src/gtkconv.c file | annotate | diff | comparison | revisions
--- a/src/gtkconv.c	Tue Apr 19 03:40:55 2005 +0000
+++ b/src/gtkconv.c	Tue Apr 19 03:52:18 2005 +0000
@@ -911,7 +911,7 @@
 	GaimLogType type;
 	const char *name;
 	GaimAccount *account;
-	GaimBuddy *buddy;
+	GSList *buddies, *cur;
 
 	conv = gaim_conv_window_get_active_conversation(win);
 
@@ -925,14 +925,18 @@
 	name = gaim_conversation_get_name(conv);
 	account = gaim_conversation_get_account(conv);
 
-	buddy = gaim_find_buddy(account, name);
-	if (buddy != NULL &&
-	    buddy->node.parent != NULL &&
-	    GAIM_BLIST_NODE_IS_CONTACT(buddy->node.parent)) {
-
-		gaim_gtk_log_show_contact((GaimContact *)buddy->node.parent);
-		return;
+	buddies = gaim_find_buddies(account, name);
+	for (cur = buddies; cur != NULL; cur = cur->next)
+	{
+		GaimBlistNode *node = cur->data;
+		if ((node != NULL) && (node->next != NULL))
+		{
+			gaim_gtk_log_show_contact((GaimContact *)node->parent);
+			g_slist_free(buddies);
+			return;
+		}
 	}
+	g_slist_free(buddies);
 
 	gaim_gtk_log_show(type, name, account);
 }

mercurial