changeset 22047:62147d5b4512

merge of '1c032cc023d809fb900c6bbf99dcd8619b815131' and '65f3bcd3e7dfafc090e0cdfa3e7fff40d82e3c9c'
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Wed, 09 Jan 2008 02:16:11 +0000
parents 47286f9bb434 (current diff) fbef14f35c78 (diff)
children 6704629dc478
files
diffstat 2 files changed, 13 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/finch/gntroomlist.c	Tue Jan 08 22:01:22 2008 +0000
+++ b/finch/gntroomlist.c	Wed Jan 09 02:16:11 2008 +0000
@@ -65,8 +65,12 @@
 unset_roomlist(gpointer null)
 {
 	froomlist.window = NULL;
-	if (froomlist.roomlist)
+	if (froomlist.roomlist) {
 		purple_roomlist_unref(froomlist.roomlist);
+		froomlist.roomlist = NULL;
+	}
+	froomlist.account = NULL;
+	froomlist.tree = NULL;
 }
 
 static void
@@ -97,6 +101,7 @@
 	if (!gc)
 		return;
 
+	update_roomlist(NULL);
 	froomlist.roomlist = purple_roomlist_get_list(gc);
 	gnt_box_give_focus_to_child(GNT_BOX(froomlist.window), froomlist.tree);
 }
--- a/libpurple/conversation.c	Tue Jan 08 22:01:22 2008 +0000
+++ b/libpurple/conversation.c	Wed Jan 09 02:16:11 2008 +0000
@@ -295,10 +295,14 @@
 	/* Check if this conversation already exists. */
 	if ((conv = purple_find_conversation_with_account(type, name, account)) != NULL)
 	{
-		if (purple_conversation_get_type(conv) == PURPLE_CONV_TYPE_CHAT &&
+		if (purple_conversation_get_type(conv) != PURPLE_CONV_TYPE_CHAT ||
 				purple_conv_chat_has_left(PURPLE_CONV_CHAT(conv)))
-			purple_conversation_chat_cleanup_for_rejoin(conv);
-		return conv;
+		{
+			if (purple_conversation_get_type(conv) == PURPLE_CONV_TYPE_CHAT)
+				purple_conversation_chat_cleanup_for_rejoin(conv);
+
+			return conv;
+		}
 	}
 
 	gc = purple_account_get_connection(account);