aboutsummaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorDan Vrátil <dvratil@redhat.com>2012-07-27 18:12:39 +0800
committerDan Vrátil <dvratil@redhat.com>2012-07-27 18:13:20 +0800
commit440e43d2894fdd517cc91302d4364b082e7d1d8b (patch)
tree7c39a2b70fe8bdef99ed1cce3c7b2e6d2406d0cc /modules
parente03d9fbc7efba1a0239f85a8cf7339bbad6b1c7d (diff)
downloadgsoc2013-evolution-440e43d2894fdd517cc91302d4364b082e7d1d8b.tar.gz
gsoc2013-evolution-440e43d2894fdd517cc91302d4364b082e7d1d8b.tar.zst
gsoc2013-evolution-440e43d2894fdd517cc91302d4364b082e7d1d8b.zip
Bug #679404 - Read colors for message preview from Gtk theme
Diffstat (limited to 'modules')
-rw-r--r--modules/itip-formatter/e-mail-formatter-itip.c2
-rw-r--r--modules/itip-formatter/itip-view.c13
-rw-r--r--modules/itip-formatter/itip-view.h4
3 files changed, 9 insertions, 10 deletions
diff --git a/modules/itip-formatter/e-mail-formatter-itip.c b/modules/itip-formatter/e-mail-formatter-itip.c
index bf64a96f67..c129c89150 100644
--- a/modules/itip-formatter/e-mail-formatter-itip.c
+++ b/modules/itip-formatter/e-mail-formatter-itip.c
@@ -85,7 +85,7 @@ emfe_itip_format (EMailFormatterExtension *extension,
} else if (context->mode == E_MAIL_FORMATTER_MODE_RAW) {
buffer = g_string_sized_new (2048);
- itip_view_write (buffer);
+ itip_view_write (formatter, buffer);
} else {
gchar *uri;
diff --git a/modules/itip-formatter/itip-view.c b/modules/itip-formatter/itip-view.c
index 8e651f0ec9..bc54c65139 100644
--- a/modules/itip-formatter/itip-view.c
+++ b/modules/itip-formatter/itip-view.c
@@ -1416,15 +1416,12 @@ itip_view_set_extension_name (ItipView *view,
}
void
-itip_view_write (GString *buffer)
+itip_view_write (EMailFormatter *formatter,
+ GString *buffer)
{
- g_string_append (buffer,
- "<html>\n"
- "<head>\n"
- "<title>ITIP</title>\n"
- "<link type=\"text/css\" rel=\"stylesheet\" href=\"evo-file://" EVOLUTION_PRIVDATADIR "/theme/webview.css\" />\n"
- "</head>\n"
- "<body>\n");
+ gchar *header = e_mail_formatter_get_html_header (formatter);
+ g_string_append (buffer, header);
+ g_free (header);
g_string_append_printf (buffer,
"<img src=\"gtk-stock://%s?size=%d\" class=\"itip icon\" />\n",
diff --git a/modules/itip-formatter/itip-view.h b/modules/itip-formatter/itip-view.h
index 60b8b1d4ba..90558e7408 100644
--- a/modules/itip-formatter/itip-view.h
+++ b/modules/itip-formatter/itip-view.h
@@ -30,6 +30,7 @@
#include <webkit/webkitdom.h>
#include <libecal/libecal.h>
#include <libedataserver/libedataserver.h>
+#include <em-format/e-mail-formatter.h>
G_BEGIN_DECLS
@@ -100,7 +101,8 @@ ItipView * itip_view_new (EMailPartItip *puri,
ESourceRegistry *registry);
void itip_view_init_view (ItipView *view);
-void itip_view_write (GString *buffer);
+void itip_view_write (EMailFormatter *formatter,
+ GString *buffer);
void itip_view_write_for_printing (ItipView *view,
GString *buffer);