diff options
author | Matthew Barnes <mbarnes@src.gnome.org> | 2009-02-01 02:02:22 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@src.gnome.org> | 2009-02-01 02:02:22 +0800 |
commit | cd5ff486fb02451645f8b4b39608edca2da5e4a2 (patch) | |
tree | 5aff2bff0e48bc3333ff1fc3fdb619c4c34fdbd2 /mail/em-composer-utils.c | |
parent | 70fce0bbb0712dc70a15c481c0b65d68a98a4ff7 (diff) | |
download | gsoc2013-evolution-cd5ff486fb02451645f8b4b39608edca2da5e4a2.tar.gz gsoc2013-evolution-cd5ff486fb02451645f8b4b39608edca2da5e4a2.tar.zst gsoc2013-evolution-cd5ff486fb02451645f8b4b39608edca2da5e4a2.zip |
Let the mailer handle composer printing.
Start roughing in the mailer search bar.
svn path=/branches/kill-bonobo/; revision=37199
Diffstat (limited to 'mail/em-composer-utils.c')
-rw-r--r-- | mail/em-composer-utils.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/mail/em-composer-utils.c b/mail/em-composer-utils.c index 205a894d37..065cd325df 100644 --- a/mail/em-composer-utils.c +++ b/mail/em-composer-utils.c @@ -46,6 +46,7 @@ #include "composer/e-msg-composer.h" #include "composer/e-composer-autosave.h" #include "em-format-html.h" +#include "em-format-html-print.h" #include "em-format-quote.h" #include "em-event.h" @@ -642,6 +643,20 @@ em_utils_composer_save_draft_cb (EMsgComposer *composer) camel_object_unref (msg); } +static void +em_utils_composer_print_cb (EMsgComposer *composer, + GtkPrintOperationAction action) +{ + CamelMimeMessage *message; + EMFormatHTMLPrint *efhp; + + message = e_msg_composer_get_message_print (composer, 1); + + efhp = em_format_html_print_new (NULL, action); + em_format_html_print_raw_message (efhp, message); + g_object_unref (efhp); +} + /* Composing messages... */ static EMsgComposer * @@ -2542,6 +2557,10 @@ em_configure_new_composer (EMsgComposer *composer) composer, "save-draft", G_CALLBACK (em_utils_composer_save_draft_cb), NULL); + g_signal_connect ( + composer, "print", + G_CALLBACK (em_utils_composer_print_cb), NULL); + /* Supply the composer with a folder tree model. */ table = e_msg_composer_get_header_table (composer); model = e_mail_shell_module_get_folder_tree_model (mail_shell_module); |