aboutsummaryrefslogtreecommitdiffstats
path: root/composer/e-msg-composer.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2009-04-29 09:38:15 +0800
committerMatthew Barnes <mbarnes@redhat.com>2009-04-29 09:38:15 +0800
commit9192f0dc883acfaff0fbe3f6a7f8e49672546a02 (patch)
tree2184176417efab7fc754de058d5739bec0468fc1 /composer/e-msg-composer.c
parent0b04c6cfd743afcf5a4e6a195a120776074cb2a7 (diff)
parentc868ace2e93942aef027085353bff2bd736584b3 (diff)
downloadgsoc2013-evolution-9192f0dc883acfaff0fbe3f6a7f8e49672546a02.tar
gsoc2013-evolution-9192f0dc883acfaff0fbe3f6a7f8e49672546a02.tar.gz
gsoc2013-evolution-9192f0dc883acfaff0fbe3f6a7f8e49672546a02.tar.bz2
gsoc2013-evolution-9192f0dc883acfaff0fbe3f6a7f8e49672546a02.tar.lz
gsoc2013-evolution-9192f0dc883acfaff0fbe3f6a7f8e49672546a02.tar.xz
gsoc2013-evolution-9192f0dc883acfaff0fbe3f6a7f8e49672546a02.tar.zst
gsoc2013-evolution-9192f0dc883acfaff0fbe3f6a7f8e49672546a02.zip
Merge branch 'master' into kill-bonobo
Conflicts: a11y/widgets/Makefile.am a11y/widgets/ea-widgets.c a11y/widgets/ea-widgets.h addressbook/gui/component/addressbook-component.c calendar/gui/Makefile.am calendar/gui/calendar-component.c calendar/gui/dialogs/comp-editor.c calendar/gui/dialogs/event-editor.c calendar/gui/dialogs/memo-editor.c calendar/gui/dialogs/task-editor.c calendar/gui/memos-component.c calendar/gui/tasks-component.c composer/e-composer-private.c composer/e-msg-composer.c configure.in e-util/e-plugin-ui.c e-util/e-plugin-ui.h mail/ChangeLog mail/Makefile.am mail/e-mail-attachment-bar.c mail/em-format-html-display.c mail/em-format-html-display.h mail/em-format-html.h mail/em-format.h mail/em-popup.c mail/mail-component.c plugins/external-editor/external-editor.c widgets/misc/Makefile.am widgets/misc/e-attachment-paned.c widgets/misc/e-attachment-view.c widgets/misc/e-attachment.c
Diffstat (limited to 'composer/e-msg-composer.c')
-rw-r--r--composer/e-msg-composer.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c
index d1a6abb222..c1379d21aa 100644
--- a/composer/e-msg-composer.c
+++ b/composer/e-msg-composer.c
@@ -1109,12 +1109,13 @@ get_signature_html (EMsgComposer *composer)
"<!--+GtkHTML:<DATA class=\"ClueFlow\" key=\"signature_name\" value=\"uid:%s\">-->"
"<TABLE WIDTH=\"100%%\" CELLSPACING=\"0\" CELLPADDING=\"0\"><TR><TD><BR>"
"%s%s%s%s"
- "</TD></TR></TABLE>",
+ "%s</TD></TR></TABLE>",
encoded_uid ? encoded_uid : "",
format_html ? "" : "<PRE>\n",
format_html || (!strncmp ("-- \n", text, 4) || strstr (text, "\n-- \n")) ? "" : "-- \n",
text,
- format_html ? "" : "</PRE>\n");
+ format_html ? "" : "</PRE>\n",
+ is_top_signature () ? "<BR>" : "");
g_free (text);
g_free (encoded_uid);
text = html;
@@ -3861,6 +3862,7 @@ e_msg_composer_show_sig_file (EMsgComposer *composer)
GtkhtmlEditor *editor;
GtkHTML *html;
gchar *html_text;
+ gboolean top_signature;
g_return_if_fail (E_IS_MSG_COMPOSER (composer));
@@ -3887,6 +3889,8 @@ e_msg_composer_show_sig_file (EMsgComposer *composer)
}
gtkhtml_editor_run_command (editor, "unblock-selection");
+ top_signature = is_top_signature ();
+
html_text = get_signature_html (composer);
if (html_text) {
gtkhtml_editor_run_command (editor, "insert-paragraph");
@@ -3900,6 +3904,10 @@ e_msg_composer_show_sig_file (EMsgComposer *composer)
gtkhtml_editor_run_command (editor, "style-normal");
gtkhtml_editor_insert_html (editor, html_text);
g_free (html_text);
+ } else if (top_signature) {
+ /* insert paragraph after the signature ClueFlow things */
+ gtkhtml_editor_run_command (editor, "cursor-forward");
+ gtkhtml_editor_run_command (editor, "insert-paragraph");
}
gtkhtml_editor_undo_end (editor);