diff options
author | Radek Doulik <rodo@ximian.com> | 2002-02-15 07:01:57 +0800 |
---|---|---|
committer | Radek Doulik <rodo@src.gnome.org> | 2002-02-15 07:01:57 +0800 |
commit | 2cbdc27d35f742c208fd7ce264ab9574fea4d824 (patch) | |
tree | 8a84e47953f8b11132cb192593f38804775026bc /composer/e-msg-composer.c | |
parent | e2fb2c92b5bc2cbce7e6b9294e55c9e23a8cc019 (diff) | |
download | gsoc2013-evolution-2cbdc27d35f742c208fd7ce264ab9574fea4d824.tar.gz gsoc2013-evolution-2cbdc27d35f742c208fd7ce264ab9574fea4d824.tar.zst gsoc2013-evolution-2cbdc27d35f742c208fd7ce264ab9574fea4d824.zip |
don't insert paragraph here, also delete paragraph where signature was
2002-02-14 Radek Doulik <rodo@ximian.com>
* e-msg-composer.c (delete_old_signature): don't insert paragraph
here, also delete paragraph where signature was
(e_msg_composer_show_sig_file): test if we are in empty document
and if so, insert new paragraph for signature
svn path=/trunk/; revision=15729
Diffstat (limited to 'composer/e-msg-composer.c')
-rw-r--r-- | composer/e-msg-composer.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c index 265538c872..e540f4579f 100644 --- a/composer/e-msg-composer.c +++ b/composer/e-msg-composer.c @@ -3416,8 +3416,8 @@ delete_old_signature (EMsgComposer *composer) /* if (!rv) break; */ GNOME_GtkHTML_Editor_Engine_setParagraphData (composer->editor_engine, "signature", "0", &ev); - } else - GNOME_GtkHTML_Editor_Engine_runCommand (composer->editor_engine, "insert-paragraph", &ev); + GNOME_GtkHTML_Editor_Engine_runCommand (composer->editor_engine, "delete-back", &ev); + } CORBA_exception_free (&ev); } @@ -3449,6 +3449,10 @@ e_msg_composer_show_sig_file (EMsgComposer *composer) if (html) { if (!GNOME_GtkHTML_Editor_Engine_isParagraphEmpty (composer->editor_engine, &ev)) GNOME_GtkHTML_Editor_Engine_runCommand (composer->editor_engine, "insert-paragraph", &ev); + if (!GNOME_GtkHTML_Editor_Engine_runCommand (composer->editor_engine, "cursor-backward", &ev)) + GNOME_GtkHTML_Editor_Engine_runCommand (composer->editor_engine, "insert-paragraph", &ev); + else + GNOME_GtkHTML_Editor_Engine_runCommand (composer->editor_engine, "cursor-forward", &ev); /* printf ("insert %s\n", html); */ GNOME_GtkHTML_Editor_Engine_setParagraphData (composer->editor_engine, "orig", "0", &ev); GNOME_GtkHTML_Editor_Engine_runCommand (composer->editor_engine, "indent-zero", &ev); |