changeset 9472:362e92781b3f

[gaim-migrate @ 10297] This puts parentheses around dead conversations' titles and tabs. I didn't mark the parentheses as translatable, but someone can do that if they feel the need. committer: Tailor Script <tailor@pidgin.im>
author Tim Ringenbach <marv@pidgin.im>
date Wed, 07 Jul 2004 06:24:58 +0000
parents 37f7100e58e6
children 670daf18649b
files ChangeLog src/gtkconv.c
diffstat 2 files changed, 14 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Wed Jul 07 05:18:55 2004 +0000
+++ b/ChangeLog	Wed Jul 07 06:24:58 2004 +0000
@@ -5,6 +5,8 @@
 	* Support for the Epiphany web browser (Leonardo Serra)
 	* Status messages in Gadu-Gadu (Andrew (proton) Wellington)
 	* Ability to send files from the conversation window (Daniel Atallah)
+	* Parentheses are now displayed around the title and tabs of
+	  conversations from offline accounts or parted chats.
 
 	Bug Fixes:
 	* The firefox browser option now works with firefox 0.9
--- a/src/gtkconv.c	Wed Jul 07 05:18:55 2004 +0000
+++ b/src/gtkconv.c	Wed Jul 07 06:24:58 2004 +0000
@@ -5405,14 +5405,20 @@
 	         type == GAIM_CONV_UPDATE_UNSEEN ||
 	         type == GAIM_CONV_UPDATE_TITLE)
 	{
-		const char *title;
+		char *title;
 		GaimConvIm *im = NULL;
+		GaimConnection *gc = gaim_conversation_get_gc(conv);
 		char color[8];
 
 		if (gaim_conversation_get_type(conv) == GAIM_CONV_IM)
 			im = GAIM_CONV_IM(conv);
 
-		title = gaim_conversation_get_title(conv);
+		if (!gc || ((gaim_conversation_get_type(conv) == GAIM_CONV_CHAT)
+		                && gaim_conv_chat_has_left(GAIM_CONV_CHAT(conv))))
+			title = g_strdup_printf("(%s)", gaim_conversation_get_title(conv));
+
+		else
+			title = g_strdup(gaim_conversation_get_title(conv));
 
 		*color = '\0';
 
@@ -5463,6 +5469,8 @@
 			if (conv == gaim_conv_window_get_active_conversation(win))
 				gtk_window_set_title(GTK_WINDOW(gtkwin->window), title);
 		}
+
+		g_free(title);
 	}
 	else if (type == GAIM_CONV_UPDATE_TOPIC)
 	{
@@ -5482,6 +5490,7 @@
 		gray_stuff_out(gaim_conv_window_get_active_conversation(win));
 		generate_send_as_items(win, NULL);
 		update_tab_icon(conv);
+		gaim_conversation_autoset_title(conv);
 	}
 	else if (type == GAIM_CONV_UPDATE_AWAY)
 	{
@@ -5490,6 +5499,7 @@
 	else if (type == GAIM_CONV_UPDATE_ADD || type == GAIM_CONV_UPDATE_REMOVE ||
 	         type == GAIM_CONV_UPDATE_CHATLEFT)
 	{
+		gaim_conversation_autoset_title(conv);
 		gray_stuff_out(conv);
 	}
 	else if (type == GAIM_CONV_UPDATE_ICON)