changeset 10809:f9e01ccd6046

[gaim-migrate @ 12461] sean asked that the conversation view log option be contact aware as well, rlaager did the leg work involved. committer: Tailor Script <tailor@pidgin.im>
author Luke Schierer <lschiere@pidgin.im>
date Mon, 11 Apr 2005 00:47:04 +0000
parents dcfb8d8784e6
children 9a1ced2bc585
files src/gtkconv.c
diffstat 1 files changed, 17 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/gtkconv.c	Mon Apr 11 00:19:40 2005 +0000
+++ b/src/gtkconv.c	Mon Apr 11 00:47:04 2005 +0000
@@ -900,6 +900,9 @@
 	GaimConvWindow *win = (GaimConvWindow *)data;
 	GaimConversation *conv;
 	GaimLogType type;
+	const char *name;
+	GaimAccount *account;
+	GaimBuddy *buddy;
 
 	conv = gaim_conv_window_get_active_conversation(win);
 
@@ -910,8 +913,19 @@
 	else
 		return;
 
-	gaim_gtk_log_show(type, gaim_conversation_get_name(conv),
-					  gaim_conversation_get_account(conv));
+	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;
+	}
+
+	gaim_gtk_log_show(type, name, account);
 }
 
 static void
@@ -3608,6 +3622,7 @@
 	gtkwin->menu.view_log =
 		gtk_item_factory_get_widget(gtkwin->menu.item_factory,
 									N_("/Conversation/View Log"));
+
 	/* --- */
 
 	gtkwin->menu.send_file =