changeset 14408:a57d7f0cfc0c

[gaim-migrate @ 17116] Show the account name and prpl in conversation-window titles. committer: Tailor Script <tailor@pidgin.im>
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Fri, 01 Sep 2006 18:34:53 +0000
parents 2a5ec27c3f0c
children a6034bc8c84e
files console/gntconv.c
diffstat 1 files changed, 11 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/console/gntconv.c	Fri Sep 01 18:29:50 2006 +0000
+++ b/console/gntconv.c	Fri Sep 01 18:34:53 2006 +0000
@@ -201,6 +201,7 @@
 	char *title;
 	GaimConversationType type;
 	GaimConversation *cc;
+	GaimAccount *account;
 
 	if (ggc)
 		return;
@@ -220,8 +221,10 @@
 		return;
 	}
 
+	account = gaim_conversation_get_account(conv);
 	type = gaim_conversation_get_type(conv);
-	title = g_strdup_printf(_("%s"), gaim_conversation_get_title(conv));
+	title = g_strdup_printf(_("%s (%s -- %s)"), gaim_conversation_get_title(conv),
+			gaim_account_get_username(account), gaim_account_get_protocol_name(account));
 	
 	ggc->window = gnt_box_new(FALSE, TRUE);
 	gnt_box_set_title(GNT_BOX(ggc->window), title);
@@ -633,11 +636,17 @@
 void gg_conversation_set_active(GaimConversation *conv)
 {
 	GGConv *ggconv = conv->ui_data;
+	GaimAccount *account;
+	char *title;
 
 	g_return_if_fail(ggconv);
 	g_return_if_fail(g_list_find(ggconv->list, conv));
 
 	ggconv->active_conv = conv;
-	gnt_screen_rename_widget(ggconv->window, gaim_conversation_get_title(conv));
+	account = gaim_conversation_get_account(conv);
+	title = g_strdup_printf(_("%s (%s -- %s)"), gaim_conversation_get_title(conv),
+			gaim_account_get_username(account), gaim_account_get_protocol_name(account));
+	gnt_screen_rename_widget(ggconv->window, title);
+	g_free(title);
 }