summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog.API2
-rw-r--r--finch/gntconv.c23
-rw-r--r--libpurple/purpleconversation.c35
-rw-r--r--libpurple/purpleconversation.h21
-rw-r--r--pidgin/pidgincommands.c37
5 files changed, 2 insertions, 116 deletions
diff --git a/ChangeLog.API b/ChangeLog.API
index 9ce88f15bb..31c91202cc 100644
--- a/ChangeLog.API
+++ b/ChangeLog.API
@@ -479,9 +479,11 @@ version 3.0.0 (??/??/????):
* 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
index 0cd09d45fa..ff8bb1fc8b 100644
--- a/finch/gntconv.c
+++ b/finch/gntconv.c
@@ -461,13 +461,6 @@ conv_updated(PurpleConversation *conv, PurpleConversationUpdateType type)
}
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 @@ gg_create_menu(FinchConv *ggc)
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 @@ debug_command_cb(PurpleConversation *conv,
/* 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 @@ finch_conversation_init(void)
purple_cmd_register("debug", "w", PURPLE_CMD_P_DEFAULT,
PURPLE_CMD_FLAG_CHAT | PURPLE_CMD_FLAG_IM, NULL,
debug_command_cb, _("debug <option>: 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 <command>: Help on a specific command."), NULL);
diff --git a/libpurple/purpleconversation.c b/libpurple/purpleconversation.c
index 4aecb2f407..9221760859 100644
--- a/libpurple/purpleconversation.c
+++ b/libpurple/purpleconversation.c
@@ -48,7 +48,6 @@ typedef struct {
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_conversation_finalize(GObject *object) {
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 @@ void
_purple_conversation_write_common(PurpleConversation *conv,
PurpleMessage *pmsg)
{
- PurpleConversationPrivate *priv = NULL;
PurpleProtocol *protocol = NULL;
PurpleConnection *gc = NULL;
PurpleAccount *account;
@@ -604,7 +600,6 @@ _purple_conversation_write_common(PurpleConversation *conv,
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 @@ _purple_conversation_write_common(PurpleConversation *conv,
}
}
- 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 @@ purple_conversation_get_extended_menu(PurpleConversation *conv) {
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/libpurple/purpleconversation.h b/libpurple/purpleconversation.h
index 358a776c66..2cfd4a80fe 100644
--- a/libpurple/purpleconversation.h
+++ b/libpurple/purpleconversation.h
@@ -314,27 +314,6 @@ gboolean purple_conversation_has_focus(PurpleConversation *conv);
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/pidgin/pidgincommands.c b/pidgin/pidgincommands.c
index 92e3e53649..a9d7e62676 100644
--- a/pidgin/pidgincommands.c
+++ b/pidgin/pidgincommands.c
@@ -129,37 +129,6 @@ debug_command_cb(PurpleConversation *conv, G_GNUC_UNUSED const char *cmd,
}
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 @@ pidgin_commands_init(void) {
purple_cmd_register("debug", "w", PURPLE_CMD_P_DEFAULT,
PURPLE_CMD_FLAG_CHAT | PURPLE_CMD_FLAG_IM, NULL,
debug_command_cb, _("debug <option>: 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 <command>: Help on a specific command."), NULL);