X-Git-Url: http://git.maemo.org/git/?a=blobdiff_plain;f=src%2Fmodest-tny-platform-factory.c;h=dad5e4b5129830a7a9b281458ad5d26481cce761;hb=38c9c20c5e0fbe81dcb67e4cda31f7bb4ed597b1;hp=1ca0853ae74095b05ef4ba58067f985ee9ded1ee;hpb=31bb0518a45f4ca59a30a650475d3a3f9ff87610;p=modest diff --git a/src/modest-tny-platform-factory.c b/src/modest-tny-platform-factory.c index 1ca0853..dad5e4b 100644 --- a/src/modest-tny-platform-factory.c +++ b/src/modest-tny-platform-factory.c @@ -31,17 +31,12 @@ #include #include +#include + #include #include #include -/* MODES_PLATFORM_ID: 1 ==> gtk, 2==> maemo */ -#if MODEST_PLATFORM_ID==1 -#include -#elif MODEST_PLATFORM_ID==2 -#include -#endif - #include "modest-tny-platform-factory.h" #include "modest-tny-account-store.h" @@ -58,8 +53,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 { @@ -167,8 +160,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; } @@ -184,20 +175,14 @@ static TnyAccountStore * modest_tny_platform_factory_new_account_store (TnyPlatformFactory *self) { return TNY_ACCOUNT_STORE(modest_tny_account_store_new - (modest_runtime_get_account_mgr())); + (modest_runtime_get_account_mgr(), + modest_runtime_get_device())); } static TnyDevice * modest_tny_platform_factory_new_device (TnyPlatformFactory *self) { -/* MODES_PLATFORM_ID: 1 ==> gtk, 2==> maemo */ -#if MODEST_PLATFORM_ID==1 - return TNY_DEVICE (tny_gnome_device_new ()); -#elif MODEST_PLATFORM_ID==2 - return TNY_DEVICE (tny_maemo_device_new ()); -#else - g_return_val_if_reached (NULL); -#endif /* MODEST_PLATFORM */ + return modest_platform_get_new_device (); } static TnyMsgView* @@ -221,8 +206,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 (); -}