Mercurial > pidgin
changeset 30154:e9f4deddddd8
Reset 'undo' history when a message is sent.
author | Sadrul Habib Chowdhury <imadil@gmail.com> |
---|---|
date | Thu, 03 Jun 2010 02:19:28 +0000 |
parents | f87a1844aff0 |
children | 7a28e9b12038 |
files | pidgin/gtkconv.c |
diffstat | 1 files changed, 11 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/pidgin/gtkconv.c Thu Jun 03 01:22:31 2010 +0000 +++ b/pidgin/gtkconv.c Thu Jun 03 02:19:28 2010 +0000 @@ -282,6 +282,15 @@ } static void +conversation_entry_clear(PidginConversation *gtkconv) +{ + GtkIMHtml *imhtml = GTK_IMHTML(gtkconv->entry); + gtk_source_undo_manager_begin_not_undoable_action(imhtml->undo_manager); + gtk_imhtml_clear(imhtml); + gtk_source_undo_manager_end_not_undoable_action(imhtml->undo_manager); +} + +static void clear_formatting_cb(GtkIMHtml *imhtml, PidginConversation *gtkconv) { default_formatize(gtkconv); @@ -557,7 +566,7 @@ account = purple_conversation_get_account(conv); if (check_for_and_do_command(conv)) { - gtk_imhtml_clear(GTK_IMHTML(gtkconv->entry)); + conversation_entry_clear(gtkconv); return; } @@ -612,7 +621,7 @@ g_free(clean); g_free(buf); - gtk_imhtml_clear(GTK_IMHTML(gtkconv->entry)); + conversation_entry_clear(gtkconv); gtkconv_set_unseen(gtkconv, PIDGIN_UNSEEN_NONE); }