# HG changeset patch # User Sadrul Habib Chowdhury # Date 1275531568 0 # Node ID e9f4deddddd83616bf7054187de71ee9f471c54c # Parent f87a1844aff005d5f44e3f803c8cdaf25c5a9108 Reset 'undo' history when a message is sent. diff -r f87a1844aff0 -r e9f4deddddd8 pidgin/gtkconv.c --- 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); }