X-Git-Url: http://git.maemo.org/git/?p=modest;a=blobdiff_plain;f=src%2Fmodest-formatter.c;h=7a2332911872b7207a7dd75f47889ec1cc773cb2;hp=0375b1824b4070e9a277f6b83b3a9f6da216166d;hb=b09daad954384d34091b51a04eda7fd3a57a5f22;hpb=798cf1721f8140485800ba24fd20c58159de1c3b;ds=sidebyside diff --git a/src/modest-formatter.c b/src/modest-formatter.c index 0375b18..7a23329 100644 --- a/src/modest-formatter.c +++ b/src/modest-formatter.c @@ -33,10 +33,10 @@ #include #include #include -#include #include #include "modest-formatter.h" #include "modest-text-utils.h" +#include "modest-tny-platform-factory.h" typedef struct _ModestFormatterPrivate ModestFormatterPrivate; struct _ModestFormatterPrivate { @@ -128,6 +128,7 @@ modest_formatter_do (ModestFormatter *self, TnyMsg *new_msg; gchar *body_text = NULL, *txt = NULL; ModestFormatterPrivate *priv; + TnyPlatformFactory *fact; g_return_val_if_fail (self, NULL); g_return_val_if_fail (body, NULL); @@ -135,7 +136,8 @@ modest_formatter_do (ModestFormatter *self, g_return_val_if_fail (func, NULL); /* Build new part */ - new_msg = TNY_MSG (tny_camel_msg_new ()); + fact = modest_tny_platform_factory_get_instance (); + new_msg = tny_platform_factory_new_msg (fact); body_text = extract_text (self, body); txt = (gchar *) func (self, (const gchar*) body_text, header); priv = MODEST_FORMATTER_GET_PRIVATE (self); @@ -173,11 +175,13 @@ modest_formatter_attach (ModestFormatter *self, TnyMimePart *body, TnyHeader *he gchar *attach_text = NULL; TnyMimePart *body_part = NULL, *attach_part = NULL; ModestFormatterPrivate *priv; + TnyPlatformFactory *fact; + fact = modest_tny_platform_factory_get_instance (); /* Build new part */ - new_msg = TNY_MSG (tny_camel_msg_new ()); - body_part = TNY_MIME_PART (tny_camel_mime_part_new (camel_mime_part_new())); - attach_part = TNY_MIME_PART (tny_camel_mime_part_new (camel_mime_part_new())); + new_msg = tny_platform_factory_new_msg (fact); + body_part = tny_platform_factory_new_mime_part (fact); + attach_part = tny_platform_factory_new_mime_part (fact); /* Create the two parts */ priv = MODEST_FORMATTER_GET_PRIVATE (self);