X-Git-Url: http://git.maemo.org/git/?a=blobdiff_plain;f=src%2Fmodest-tny-platform-factory.c;h=00eba53c1b4e4b26283166dbaf1319b9349c7df5;hb=144144517f2d7ee5e19a7fe16bf48a9448a5cff6;hp=fe936e5c64d174cac1670c0dc4fd55fefceba4cb;hpb=478e7d302a517884151212c58ef3800c4f96e079;p=modest diff --git a/src/modest-tny-platform-factory.c b/src/modest-tny-platform-factory.c index fe936e5..00eba53 100644 --- a/src/modest-tny-platform-factory.c +++ b/src/modest-tny-platform-factory.c @@ -39,6 +39,11 @@ #include "modest-tny-platform-factory.h" #include "modest-tny-account-store.h" +#ifdef MODEST_USE_MOZEMBED +#include +#else +#include +#endif /* 'private'/'protected' functions */ static void modest_tny_platform_factory_class_init (ModestTnyPlatformFactoryClass *klass); @@ -53,8 +58,6 @@ static TnyDevice* modest_tny_platform_factory_new_device (TnyPlatfo static TnyMsgView* modest_tny_platform_factory_new_msg_view (TnyPlatformFactory *self); static TnyMsg* modest_tny_platform_factory_new_msg (TnyPlatformFactory *self); static TnyMimePart* modest_tny_platform_factory_new_mime_part (TnyPlatformFactory *self); -static TnyHeader* modest_tny_platform_factory_new_header (TnyPlatformFactory *self); - /* list my signals */ enum { @@ -162,8 +165,6 @@ tny_platform_factory_init (gpointer g, gpointer iface_data) klass->new_msg_view_func = modest_tny_platform_factory_new_msg_view; klass->new_msg_func = modest_tny_platform_factory_new_msg; klass->new_mime_part_func = modest_tny_platform_factory_new_mime_part; - klass->new_header_func = modest_tny_platform_factory_new_header; - return; } @@ -192,8 +193,12 @@ modest_tny_platform_factory_new_device (TnyPlatformFactory *self) static TnyMsgView* modest_tny_platform_factory_new_msg_view (TnyPlatformFactory *self) { - /* TODO */ - return NULL; + /* Here we'll select one of the implementations available */ +#ifdef MODEST_USE_MOZEMBED + return g_object_new (MODEST_TYPE_MOZEMBED_MSG_VIEW, NULL); +#else + return g_object_new (MODEST_TYPE_GTKHTML_MSG_VIEW, NULL); +#endif } static TnyMsg* @@ -210,8 +215,3 @@ modest_tny_platform_factory_new_mime_part (TnyPlatformFactory *self) } -static TnyHeader* -modest_tny_platform_factory_new_header (TnyPlatformFactory *self) -{ - return tny_camel_header_new (); -}