summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSadrul Habib Chowdhury <sadrul@pidgin.im>2010-06-03 02:19:28 +0000
committerSadrul Habib Chowdhury <sadrul@pidgin.im>2010-06-03 02:19:28 +0000
commitd46063e2825491d44f07eac3c120fa20696b5251 (patch)
treeed65f59f93543cbdedaaf9d4f52a881b0c16c604
parent0157f689537730cd35155c26d3ce164811f86481 (diff)
downloadpidgin-d46063e2825491d44f07eac3c120fa20696b5251.tar.gz
Reset 'undo' history when a message is sent.
-rw-r--r--pidgin/gtkconv.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/pidgin/gtkconv.c b/pidgin/gtkconv.c
index 2ed09a63db..c766d58b79 100644
--- a/pidgin/gtkconv.c
+++ b/pidgin/gtkconv.c
@@ -282,6 +282,15 @@ default_formatize(PidginConversation *c)
}
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 @@ send_cb(GtkWidget *widget, PidginConversation *gtkconv)
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 @@ send_cb(GtkWidget *widget, PidginConversation *gtkconv)
g_free(clean);
g_free(buf);
- gtk_imhtml_clear(GTK_IMHTML(gtkconv->entry));
+ conversation_entry_clear(gtkconv);
gtkconv_set_unseen(gtkconv, PIDGIN_UNSEEN_NONE);
}