aboutsummaryrefslogtreecommitdiffstats
path: root/composer
diff options
context:
space:
mode:
Diffstat (limited to 'composer')
-rw-r--r--composer/ChangeLog7
-rw-r--r--composer/e-msg-composer.c8
2 files changed, 13 insertions, 2 deletions
diff --git a/composer/ChangeLog b/composer/ChangeLog
index 37cb27afa9..f279adf966 100644
--- a/composer/ChangeLog
+++ b/composer/ChangeLog
@@ -1,3 +1,10 @@
+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
+
2002-02-12 Jeffrey Stedfast <fejj@ximian.com>
* e-msg-composer.c (e_msg_composer_flush_pending_body): Use
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);