diff src/gtkconv.c @ 8256:1d86096ae0f4

[gaim-migrate @ 8979] Tim Ringenbach says this shouldn't have gotten into 0.76, because 0.76 should have been release two weeks ago. He also doesn't have a good description, so I'll just say it fixed a bunch of idiot mistakes and ugly hacks on my part regarding the removing of users from the chat lists and parting chats/channels. Thanks Tim. committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Sat, 14 Feb 2004 21:07:29 +0000
parents 0c5977fd3101
children 84ec38c3efcc
line wrap: on
line diff
--- a/src/gtkconv.c	Sat Feb 14 20:45:28 2004 +0000
+++ b/src/gtkconv.c	Sat Feb 14 21:07:29 2004 +0000
@@ -2466,7 +2466,9 @@
 	 * Handle graying stuff out based on whether an account is connected 
 	 * and what features that account supports.
 	 */
-	if (gc != NULL) {
+	if ((gc != NULL) &&
+	   ( (gaim_conversation_get_type(conv) != GAIM_CONV_CHAT) ||
+	    !gaim_conv_chat_has_left(GAIM_CONV_CHAT(conv)) )) {
 		/* Account is online */
 
 		/* Deal with buttons */
@@ -2523,6 +2525,7 @@
 								 (prpl_info->options & OPT_PROTO_IM_IMAGE));
 	} else {
 		/* Account is offline */
+		/* Or it's a chat where we left. */
 
 		/* Deal with buttons */
 		gtk_widget_set_sensitive(gtkconv->add, FALSE);
@@ -5245,7 +5248,7 @@
 	GList *l;
 	char tmp[BUF_LONG];
 	int num_users;
-	int f = 1;
+	gboolean f;
 
 	chat    = GAIM_CONV_CHAT(conv);
 	gtkconv = GAIM_GTK_CONVERSATION(conv);
@@ -5268,7 +5271,7 @@
 												   &iter))
 					break;
 
-				while (f != 0) {
+				do {
 					char *val;
 
 					gtk_tree_model_get(GTK_TREE_MODEL(model), &iter,
@@ -5280,7 +5283,7 @@
 					f = gtk_tree_model_iter_next(GTK_TREE_MODEL(model), &iter);
 
 					g_free(val);
-				}
+				} while (f);
 				
 				break;
 			}
@@ -5410,7 +5413,8 @@
 		if (gaim_prefs_get_bool("/gaim/gtk/conversations/icons_on_tabs"))
 			update_tab_icon(conv);
 	}
-	else if (type == GAIM_CONV_UPDATE_ADD || type == GAIM_CONV_UPDATE_REMOVE)
+	else if (type == GAIM_CONV_UPDATE_ADD || type == GAIM_CONV_UPDATE_REMOVE ||
+	         type == GAIM_CONV_UPDATE_CHATLEFT)
 	{
 		gray_stuff_out(conv);
 	}