diff src/gtkconv.c @ 8155:77d1252b3803

[gaim-migrate @ 8867] Patch by Etan Reisner. The tabs now stay green when they are supposed to, and the offline accounts in account drop-down lists are now greyed, like in the accounts window. committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Wed, 21 Jan 2004 03:22:52 +0000
parents 8633dc570442
children e1e871897a4b
line wrap: on
line diff
--- a/src/gtkconv.c	Tue Jan 20 20:03:24 2004 +0000
+++ b/src/gtkconv.c	Wed Jan 21 03:22:52 2004 +0000
@@ -5038,24 +5038,6 @@
 }
 
 static void
-gaim_gtkconv_set_title(GaimConversation *conv, const char *title)
-{
-	GaimGtkConversation *gtkconv;
-	GaimConvWindow *win;
-	GaimGtkWindow *gtkwin;
-
-	win = gaim_conversation_get_window(conv);
-	gtkwin = GAIM_GTK_WINDOW(win);
-	gtkconv = GAIM_GTK_CONVERSATION(conv);
-
-	gtk_label_set_text(GTK_LABEL(gtkconv->tab_label), title);
-	gtk_label_set_text(GTK_LABEL(gtkconv->menu_label), title);
-
-	if(conv == gaim_conv_window_get_active_conversation(win))
-		gtk_window_set_title(GTK_WINDOW(gtkwin->window), title);
-}
-
-static void
 update_tab_icon(GaimConversation *conv)
 {
 	GaimGtkConversation *gtkconv;
@@ -5110,7 +5092,8 @@
 		update_tab_icon(conv);
 	}
 	else if (type == GAIM_CONV_UPDATE_TYPING ||
-			 type == GAIM_CONV_UPDATE_UNSEEN)
+	         type == GAIM_CONV_UPDATE_UNSEEN ||
+	         type == GAIM_CONV_UPDATE_TITLE)
 	{
 		const char *title;
 		GaimConvIm *im = NULL;
@@ -5152,7 +5135,7 @@
 			char *label;
 
 			label = g_strdup_printf("<span color=\"%s\">%s</span>",
-									color, title);
+			                        color, title);
 			gtk_label_set_markup(GTK_LABEL(gtkconv->tab_label), label);
 			g_free(label);
 		}
@@ -5161,6 +5144,12 @@
 
 		if (conv == gaim_conv_window_get_active_conversation(win))
 			update_typing_icon(conv);
+
+		if (type == GAIM_CONV_UPDATE_TITLE) {
+			gtk_label_set_text(GTK_LABEL(gtkconv->menu_label), title);
+			if (conv == gaim_conv_window_get_active_conversation(win))
+				gtk_window_set_title(GTK_WINDOW(gtkwin->window), title);
+		}
 	}
 	else if (type == GAIM_CONV_UPDATE_TOPIC)
 	{
@@ -5172,7 +5161,7 @@
 
 		gtk_entry_set_text(GTK_ENTRY(gtkchat->topic_text),topic);
 		gtk_tooltips_set_tip(gtkconv->tooltips, gtkchat->topic_text,
-							 topic, NULL);
+		                     topic, NULL);
 	}
 	else if (type == GAIM_CONV_ACCOUNT_ONLINE ||
 			 type == GAIM_CONV_ACCOUNT_OFFLINE)
@@ -5208,7 +5197,6 @@
 	gaim_gtkconv_chat_rename_user,   /* chat_rename_user     */
 	gaim_gtkconv_chat_remove_user,   /* chat_remove_user     */
 	gaim_gtkconv_chat_remove_users,  /* chat_remove_users    */
-	gaim_gtkconv_set_title,          /* set_title            */
 	NULL,                            /* update_progress      */
 	gaim_gtkconv_updated             /* updated              */
 };