From 6eb14fb4f58ebcf5cf38f6d68842c0a1e167a187 Mon Sep 17 00:00:00 2001 From: Johnny Jacob Date: Mon, 25 Feb 2008 04:05:19 +0000 Subject: Reverting commit for #371011 svn path=/trunk/; revision=35083 --- composer/e-msg-composer.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'composer/e-msg-composer.c') diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c index ae82e9b262..5d1dbe23ab 100644 --- a/composer/e-msg-composer.c +++ b/composer/e-msg-composer.c @@ -5419,14 +5419,16 @@ e_msg_composer_show_sig_file (EMsgComposer *composer) GNOME_GtkHTML_Editor_Engine_freeze (p->eeditor_engine, &ev); GNOME_GtkHTML_Editor_Engine_runCommand (p->eeditor_engine, "cursor-position-save", &ev); GNOME_GtkHTML_Editor_Engine_undoBegin (p->eeditor_engine, "Set signature", "Reset signature", &ev); + delete_old_signature (composer); html = get_signature_html (composer); if (html) { GNOME_GtkHTML_Editor_Engine_runCommand (p->eeditor_engine, "insert-paragraph", &ev); - GNOME_GtkHTML_Editor_Engine_runCommand (p->eeditor_engine, "cursor-backward", &ev); - GNOME_GtkHTML_Editor_Engine_runCommand (p->eeditor_engine, "insert-paragraph", &ev); - - /* printf ("insert %s\n", html); */ + if (!GNOME_GtkHTML_Editor_Engine_runCommand (p->eeditor_engine, "cursor-backward", &ev)) + GNOME_GtkHTML_Editor_Engine_runCommand (p->eeditor_engine, "insert-paragraph", &ev); + else + GNOME_GtkHTML_Editor_Engine_runCommand (p->eeditor_engine, "cursor-forward", &ev); + /* printf ("insert %s\n", html); */ GNOME_GtkHTML_Editor_Engine_setParagraphData (p->eeditor_engine, "orig", "0", &ev); GNOME_GtkHTML_Editor_Engine_runCommand (p->eeditor_engine, "indent-zero", &ev); GNOME_GtkHTML_Editor_Engine_runCommand (p->eeditor_engine, "style-normal", &ev); -- cgit