aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/misc/e-mail-signature-editor.c
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2012-10-30 22:26:01 +0800
committerMilan Crha <mcrha@redhat.com>2012-10-30 22:26:01 +0800
commitb02fe0f25bb5608481bb3c7efe116edb0d1a57b5 (patch)
tree6856c723d97a4add121a7b6e434684649ed85f59 /widgets/misc/e-mail-signature-editor.c
parente1807b3155ee48635387efd0b2afd2f98f3b48b7 (diff)
downloadgsoc2013-evolution-b02fe0f25bb5608481bb3c7efe116edb0d1a57b5.tar
gsoc2013-evolution-b02fe0f25bb5608481bb3c7efe116edb0d1a57b5.tar.gz
gsoc2013-evolution-b02fe0f25bb5608481bb3c7efe116edb0d1a57b5.tar.bz2
gsoc2013-evolution-b02fe0f25bb5608481bb3c7efe116edb0d1a57b5.tar.lz
gsoc2013-evolution-b02fe0f25bb5608481bb3c7efe116edb0d1a57b5.tar.xz
gsoc2013-evolution-b02fe0f25bb5608481bb3c7efe116edb0d1a57b5.tar.zst
gsoc2013-evolution-b02fe0f25bb5608481bb3c7efe116edb0d1a57b5.zip
Bug #687155 - Text/plain signatures wrap in an editor
Diffstat (limited to 'widgets/misc/e-mail-signature-editor.c')
-rw-r--r--widgets/misc/e-mail-signature-editor.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/widgets/misc/e-mail-signature-editor.c b/widgets/misc/e-mail-signature-editor.c
index 62149de250..5e5910b013 100644
--- a/widgets/misc/e-mail-signature-editor.c
+++ b/widgets/misc/e-mail-signature-editor.c
@@ -150,13 +150,20 @@ mail_signature_editor_loaded_cb (GObject *object,
gtkhtml_editor_set_html_mode (GTKHTML_EDITOR (editor), is_html);
- if (is_html)
+ if (is_html) {
gtkhtml_editor_insert_html (
GTKHTML_EDITOR (editor), contents);
- else
+ } else {
gtkhtml_editor_insert_text (
GTKHTML_EDITOR (editor), contents);
+ gtkhtml_editor_run_command (GTKHTML_EDITOR (editor), "cursor-position-save");
+ gtkhtml_editor_run_command (GTKHTML_EDITOR (editor), "select-all");
+ gtkhtml_editor_run_command (GTKHTML_EDITOR (editor), "style-pre");
+ gtkhtml_editor_run_command (GTKHTML_EDITOR (editor), "unselect-all");
+ gtkhtml_editor_run_command (GTKHTML_EDITOR (editor), "cursor-position-restore");
+ }
+
g_free (contents);
g_object_unref (editor);