Mercurial > pidgin
changeset 18298:468c2d760bf3
merge of '0c6d125066d754b13d41953911c8ea86f0289ec4'
and 'bc1e79e2ceda5e8b0b01d5cef92e7eade132e518'
author | Sadrul Habib Chowdhury <imadil@gmail.com> |
---|---|
date | Tue, 26 Jun 2007 19:46:26 +0000 |
parents | 95731e366df2 (current diff) 65cd831b39cd (diff) |
children | ba67200a69d1 |
files | |
diffstat | 1 files changed, 19 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/pidgin/gtkconv.c Tue Jun 26 01:06:31 2007 +0000 +++ b/pidgin/gtkconv.c Tue Jun 26 19:46:26 2007 +0000 @@ -347,15 +347,28 @@ } } -static PurpleCmdRet -clear_command_cb(PurpleConversation *conv, - const char *cmd, char **args, char **error, void *data) +static void clear_conversation_scrollback(PurpleConversation *conv) { PidginConversation *gtkconv = NULL; gtkconv = PIDGIN_CONVERSATION(conv); gtk_imhtml_clear(GTK_IMHTML(gtkconv->imhtml)); +} + +static PurpleCmdRet +clear_command_cb(PurpleConversation *conv, + const char *cmd, char **args, char **error, void *data) +{ + clear_conversation_scrollback(conv); + return PURPLE_CMD_STATUS_OK; +} + +static PurpleCmdRet +clearall_command_cb(PurpleConversation *conv, + const char *cmd, char **args, char **error, void *data) +{ + purple_conversation_foreach(clear_conversation_scrollback); return PURPLE_CMD_STATUS_OK; } @@ -7202,6 +7215,9 @@ 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, _("clear: 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);