changeset 21765:8922d61c738a

Fix a bug when changing 'close new ims' to always, then to never.
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Tue, 04 Dec 2007 09:30:25 +0000
parents e9760c22bab5
children 8c1bcaaaac34
files pidgin/gtkconv.c
diffstat 1 files changed, 6 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/pidgin/gtkconv.c	Mon Dec 03 22:57:49 2007 +0000
+++ b/pidgin/gtkconv.c	Tue Dec 04 09:30:25 2007 +0000
@@ -7193,15 +7193,18 @@
 	if(strcmp(purple_prefs_get_string(PIDGIN_PREFS_ROOT "/conversations/im/hide_new"), "away")==0)
 		when_away = TRUE;
 
-	while ((l = hidden_convwin->gtkconvs) != NULL)
+	for (l = hidden_convwin->gtkconvs; l; )
 	{
 		gtkconv = l->data;
+		l = l->next;
 
 		conv = gtkconv->active_conv;
 
-		if(when_away && !purple_status_is_available(
+		if (conv->type == PURPLE_CONV_TYPE_CHAT ||
+				gtkconv->unseen_count == 0 ||
+				(when_away && !purple_status_is_available(
 							purple_account_get_active_status(
-							purple_conversation_get_account(conv))))
+							purple_conversation_get_account(conv)))))
 			continue;
 
 		pidgin_conv_window_remove_gtkconv(hidden_convwin, gtkconv);