pidgin: 8cf39704: Do not mistakenly use the preference to ...

sadrul at pidgin.im sadrul at pidgin.im
Fri Dec 5 18:30:52 EST 2008


-----------------------------------------------------------------
Revision: 8cf397040e5bbbe1391d730f0ae0b78345e9a307
Ancestor: 97d295a04f3a9852a3b29cf0df43d56d1ddcc672
Author: sadrul at pidgin.im
Date: 2008-12-05T23:28:47
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/8cf397040e5bbbe1391d730f0ae0b78345e9a307

Modified files:
        pidgin/gtkconv.c

ChangeLog: 

Do not mistakenly use the preference to hide new IMs for persistent
chats. Fixes #5312.

-------------- next part --------------
============================================================
--- pidgin/gtkconv.c	bd8b7cd437c2521d890a1c0c534bc1ca7f4561e4
+++ pidgin/gtkconv.c	42f70a36e28c8b11752f0548316a48ac5c2df054
@@ -7282,19 +7282,15 @@ account_status_changed_cb(PurpleAccount 
 	if(purple_status_is_available(oldstatus) || !purple_status_is_available(newstatus))
 		return;
 
-	while ((l = hidden_convwin->gtkconvs) != NULL)
-	{
+	for (l = hidden_convwin->gtkconvs; l; ) {
 		gtkconv = l->data;
+		l = l->next;
 
 		conv = gtkconv->active_conv;
+		if (purple_conversation_get_type(conv) == PURPLE_CONV_TYPE_CHAT ||
+				account != purple_conversation_get_account(conv))
+			continue;
 
-		while(l && !purple_status_is_available(
-					purple_account_get_active_status(
-					purple_conversation_get_account(conv))))
-			l = l->next;
-		if (!l)
-			break;
-
 		pidgin_conv_attach_to_conversation(conv);
 
 		/* TODO: do we need to do anything for any other conversations that are in the same gtkconv here?


More information about the Commits mailing list