# HG changeset patch
# Node ID 42bae1267f10
# Parent  f9e2468bb27b
diff --git a/ChangeLog.API b/ChangeLog.API
--- a/ChangeLog.API
+++ b/ChangeLog.API
@@ -479,9 +479,11 @@
 		* purple_conv_custom_smiley_write
 		* PurpleConversationType
 		* purple_conversation_add_smiley
+		* purple_conversation_clear_message_history
 		* purple_conversation_close_logs
 		* purple_conversation_do_command
 		* purple_conversation_get_max_message_size
+		* purple_conversation_get_message_history
 		* purple_conversation_get_remote_smileys
 		* purple_conversation_get_smiley
 		* purple_conversation_is_logging
diff --git a/finch/gntconv.c b/finch/gntconv.c
--- a/finch/gntconv.c
+++ b/finch/gntconv.c
@@ -461,13 +461,6 @@
 }
 
 static void
-clear_scrollback_cb(GntMenuItem *item, gpointer ggconv)
-{
-	FinchConv *ggc = ggconv;
-	purple_conversation_clear_message_history(ggc->active_conv);
-}
-
-static void
 send_file_cb(GntMenuItem *item, gpointer ggconv)
 {
 	FinchConv *ggc = ggconv;
@@ -580,10 +573,6 @@
 	sub = gnt_menu_new(GNT_MENU_POPUP);
 	gnt_menuitem_set_submenu(item, GNT_MENU(sub));
 
-	item = gnt_menuitem_new(_("Clear Scrollback"));
-	gnt_menu_add_item(GNT_MENU(sub), item);
-	gnt_menuitem_set_callback(item, clear_scrollback_cb, ggc);
-
 	item = gnt_menuitem_check_new(_("Show Timestamps"));
 	gnt_menuitem_check_set_checked(GNT_MENU_ITEM_CHECK(item),
 		purple_prefs_get_bool(PREF_ROOT "/timestamps"));
@@ -1166,15 +1155,6 @@
 
 /* Xerox */
 static PurpleCmdRet
-clear_command_cb(PurpleConversation *conv,
-                 const char *cmd, char **args, char **error, void *data)
-{
-	purple_conversation_clear_message_history(conv);
-	return PURPLE_CMD_RET_OK;
-}
-
-/* Xerox */
-static PurpleCmdRet
 help_command_cb(PurpleConversation *conv,
                  const char *cmd, char **args, char **error, void *data)
 {
@@ -1318,9 +1298,6 @@
 	purple_cmd_register("debug", "w", PURPLE_CMD_P_DEFAULT,
 	                  PURPLE_CMD_FLAG_CHAT | PURPLE_CMD_FLAG_IM, NULL,
 	                  debug_command_cb, _("debug &lt;option&gt;:  Send various debug information to the current conversation."), NULL);
-	purple_cmd_register("clear", "", PURPLE_CMD_P_DEFAULT,
-	                  PURPLE_CMD_FLAG_CHAT | PURPLE_CMD_FLAG_IM, NULL,
-	                  clear_command_cb, _("clear: Clears the conversation scrollback."), NULL);
 	purple_cmd_register("help", "w", PURPLE_CMD_P_DEFAULT,
 	                  PURPLE_CMD_FLAG_CHAT | PURPLE_CMD_FLAG_IM | PURPLE_CMD_FLAG_ALLOW_WRONG_ARGS, NULL,
 	                  help_command_cb, _("help &lt;command&gt;:  Help on a specific command."), NULL);
diff --git a/libpurple/purpleconversation.h b/libpurple/purpleconversation.h
--- a/libpurple/purpleconversation.h
+++ b/libpurple/purpleconversation.h
@@ -314,27 +314,6 @@
 void purple_conversation_update(PurpleConversation *conv, PurpleConversationUpdateType type);
 
 /**
- * purple_conversation_get_message_history:
- * @conv:   The conversation
- *
- * Retrieve the message history of a conversation.
- *
- * Returns: (element-type PurpleMessage) (transfer none):
- *          A GList of PurpleMessage's. You must not modify the
- *          list or the data within. The list contains the newest message at
- *          the beginning, and the oldest message at the end.
- */
-GList *purple_conversation_get_message_history(PurpleConversation *conv);
-
-/**
- * purple_conversation_clear_message_history:
- * @conv:  The conversation
- *
- * Clear the message history of a conversation.
- */
-void purple_conversation_clear_message_history(PurpleConversation *conv);
-
-/**
  * purple_conversation_send_confirm:
  * @conv:    The conversation.
  * @message: The message to send.
diff --git a/libpurple/purpleconversation.c b/libpurple/purpleconversation.c
--- a/libpurple/purpleconversation.c
+++ b/libpurple/purpleconversation.c
@@ -48,7 +48,6 @@
 	PurpleConversationUiOps *ui_ops;  /* UI-specific operations.           */
 
 	PurpleConnectionFlags features;   /* The supported features            */
-	GList *message_history; /* Message history, as a GList of PurpleMessages */
 } PurpleConversationPrivate;
 
 enum {
@@ -335,8 +334,6 @@
 	purple_signal_emit(purple_conversations_get_handle(),
 	                   "deleting-conversation", conv);
 
-	purple_conversation_clear_message_history(conv);
-
 	if(ops != NULL && ops->destroy_conversation != NULL) {
 		ops->destroy_conversation(conv);
 	}
@@ -592,7 +589,6 @@
 _purple_conversation_write_common(PurpleConversation *conv,
                                   PurpleMessage *pmsg)
 {
-	PurpleConversationPrivate *priv = NULL;
 	PurpleProtocol *protocol = NULL;
 	PurpleConnection *gc = NULL;
 	PurpleAccount *account;
@@ -604,7 +600,6 @@
 	g_return_if_fail(PURPLE_IS_CONVERSATION(conv));
 	g_return_if_fail(pmsg != NULL);
 
-	priv = purple_conversation_get_instance_private(conv);
 	ops = purple_conversation_get_ui_ops(conv);
 
 	account = purple_conversation_get_account(conv);
@@ -691,9 +686,6 @@
 		}
 	}
 
-	g_object_ref(pmsg);
-	priv->message_history = g_list_prepend(priv->message_history, pmsg);
-
 	purple_signal_emit(purple_conversations_get_handle(),
 		(PURPLE_IS_IM_CONVERSATION(conv) ? "wrote-im-msg" : "wrote-chat-msg"),
 		conv, pmsg);
@@ -842,30 +834,3 @@
 
 	return menu;
 }
-
-void
-purple_conversation_clear_message_history(PurpleConversation *conv) {
-	PurpleConversationPrivate *priv = NULL;
-	GList *list;
-
-	g_return_if_fail(PURPLE_IS_CONVERSATION(conv));
-
-	priv = purple_conversation_get_instance_private(conv);
-	list = priv->message_history;
-	g_list_free_full(list, g_object_unref);
-	priv->message_history = NULL;
-
-	purple_signal_emit(purple_conversations_get_handle(),
-	                   "cleared-message-history", conv);
-}
-
-GList *
-purple_conversation_get_message_history(PurpleConversation *conv) {
-	PurpleConversationPrivate *priv = NULL;
-
-	g_return_val_if_fail(PURPLE_IS_CONVERSATION(conv), NULL);
-
-	priv = purple_conversation_get_instance_private(conv);
-
-	return priv->message_history;
-}
diff --git a/pidgin/pidgincommands.c b/pidgin/pidgincommands.c
--- a/pidgin/pidgincommands.c
+++ b/pidgin/pidgincommands.c
@@ -129,37 +129,6 @@
 }
 
 static PurpleCmdRet
-clear_command_cb(PurpleConversation *conv, G_GNUC_UNUSED const char *cmd,
-                 G_GNUC_UNUSED char **args, G_GNUC_UNUSED char **error,
-                 G_GNUC_UNUSED gpointer data)
-{
-	purple_conversation_clear_message_history(conv);
-	return PURPLE_CMD_RET_OK;
-}
-
-static PurpleCmdRet
-clearall_command_cb(G_GNUC_UNUSED PurpleConversation *conv,
-                    G_GNUC_UNUSED const char *cmd, G_GNUC_UNUSED char **args,
-                    G_GNUC_UNUSED char **error, G_GNUC_UNUSED gpointer data)
-{
-	PurpleConversationManager *manager;
-	GList *list;
-
-	manager = purple_conversation_manager_get_default();
-	list = purple_conversation_manager_get_all(manager);
-
-	while(list != NULL) {
-		PurpleConversation *conv = PURPLE_CONVERSATION(list->data);
-
-		purple_conversation_clear_message_history(conv);
-
-		list = g_list_delete_link(list, list);
-	}
-
-	return PURPLE_CMD_RET_OK;
-}
-
-static PurpleCmdRet
 help_command_cb(PurpleConversation *conv, G_GNUC_UNUSED const char *cmd,
                 char **args, G_GNUC_UNUSED char **error,
                 G_GNUC_UNUSED gpointer data)
@@ -214,12 +183,6 @@
 	purple_cmd_register("debug", "w", PURPLE_CMD_P_DEFAULT,
 	                  PURPLE_CMD_FLAG_CHAT | PURPLE_CMD_FLAG_IM, NULL,
 	                  debug_command_cb, _("debug &lt;option&gt;:  Send various debug information to the current conversation."), NULL);
-	purple_cmd_register("clear", "", PURPLE_CMD_P_DEFAULT,
-	                  PURPLE_CMD_FLAG_CHAT | PURPLE_CMD_FLAG_IM, NULL,
-	                  clear_command_cb, _("clear: Clears the conversation scrollback."), NULL);
-	purple_cmd_register("clearall", "", PURPLE_CMD_P_DEFAULT,
-	                  PURPLE_CMD_FLAG_CHAT | PURPLE_CMD_FLAG_IM, NULL,
-	                  clearall_command_cb, _("clearall: Clears all conversation scrollbacks."), NULL);
 	purple_cmd_register("help", "w", PURPLE_CMD_P_DEFAULT,
 	                  PURPLE_CMD_FLAG_CHAT | PURPLE_CMD_FLAG_IM | PURPLE_CMD_FLAG_ALLOW_WRONG_ARGS, NULL,
 	                  help_command_cb, _("help &lt;command&gt;:  Help on a specific command."), NULL);
