# HG changeset patch # User Sadrul Habib Chowdhury # Date 1190172532 0 # Node ID a112d292be7f0f1117ef8da2e54fe390a9440e88 # Parent 2975adac8c5d8fe58d8bbf88f3c293ca50a0fcd4 Clear the conversation history for all the purple-convs in a pidgin-conv. diff -r 2975adac8c5d -r a112d292be7f pidgin/gtkconv.c --- 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 {