changeset 20172:a112d292be7f

Clear the conversation history for all the purple-convs in a pidgin-conv.
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Wed, 19 Sep 2007 03:28:52 +0000
parents 2975adac8c5d
children 16f887f25044
files pidgin/gtkconv.c
diffstat 1 files changed, 4 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/pidgin/gtkconv.c	Mon Sep 17 11:43:27 2007 +0000
+++ b/pidgin/gtkconv.c	Wed Sep 19 03:28:52 2007 +0000
@@ -376,10 +376,13 @@
 static void clear_conversation_scrollback(PurpleConversation *conv)
 {
 	PidginConversation *gtkconv = NULL;
+	GList *iter;
 
 	gtkconv = PIDGIN_CONVERSATION(conv);
 
 	gtk_imhtml_clear(GTK_IMHTML(gtkconv->imhtml));
+	for (iter = gtkconv->convs; iter; iter = iter->next)
+		purple_conversation_clear_message_history(iter->data);
 }
 
 static PurpleCmdRet
@@ -387,7 +390,6 @@
                  const char *cmd, char **args, char **error, void *data)
 {
 	clear_conversation_scrollback(conv);
-	purple_conversation_clear_message_history(conv);
 	return PURPLE_CMD_STATUS_OK;
 }
 
@@ -1099,12 +1101,9 @@
 {
 	PidginWindow *win = data;
 	PurpleConversation *conv;
-	PidginConversation *gtkconv;
 
 	conv = pidgin_conv_window_get_active_conversation(win);
-	gtkconv = PIDGIN_CONVERSATION(conv);
-
-	gtk_imhtml_clear(GTK_IMHTML(gtkconv->imhtml));
+	clear_conversation_scrollback(conv);
 }
 
 struct _search {