diff options
author | Milan Crha <mcrha@redhat.com> | 2012-10-30 22:26:42 +0800 |
---|---|---|
committer | Milan Crha <mcrha@redhat.com> | 2012-10-30 22:26:42 +0800 |
commit | b3a630123dd0cfe02347f1baabe6485dbe84ccd8 (patch) | |
tree | 1c13430f8b44e8063dc2c8fdc11a562cd43998e4 | |
parent | 095ffc8565ee663fccd8b21f090de8e4361e9c4e (diff) | |
download | gsoc2013-evolution-b3a630123dd0cfe02347f1baabe6485dbe84ccd8.tar.gz gsoc2013-evolution-b3a630123dd0cfe02347f1baabe6485dbe84ccd8.tar.zst gsoc2013-evolution-b3a630123dd0cfe02347f1baabe6485dbe84ccd8.zip |
Bug #687155 - Text/plain signatures wrap in an editor
-rw-r--r-- | widgets/misc/e-mail-signature-editor.c | 11 | ||||
-rw-r--r-- | widgets/misc/e-mail-signature-manager.c | 3 |
2 files changed, 11 insertions, 3 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); diff --git a/widgets/misc/e-mail-signature-manager.c b/widgets/misc/e-mail-signature-manager.c index 425fbca33a..56237541dd 100644 --- a/widgets/misc/e-mail-signature-manager.c +++ b/widgets/misc/e-mail-signature-manager.c @@ -391,10 +391,11 @@ mail_signature_manager_constructed (GObject *object) container = widget; widget = e_mail_signature_preview_new (registry); - gtk_widget_set_size_request (widget, -1, PREVIEW_HEIGHT); gtk_container_add (GTK_CONTAINER (container), widget); manager->priv->preview = widget; /* not referenced */ gtk_widget_show (widget); + + gtk_paned_set_position (GTK_PANED (manager), PREVIEW_HEIGHT); } static void |