* big commit, mainly cleanups:
[modest] / src / modest-tny-platform-factory.c
index 1ca0853..ded4a91 100644 (file)
 #include <tny-camel-mime-part.h>
 #include <tny-camel-msg.h>
 
-/* MODES_PLATFORM_ID: 1 ==> gtk, 2==> maemo */
-#if MODEST_PLATFORM_ID==1   
-#include <tny-gnome-device.h>
-#elif MODEST_PLATFORM_ID==2
-#include <tny-maemo-device.h>
-#endif
-
 #include "modest-tny-platform-factory.h"
 #include "modest-tny-account-store.h"
 
@@ -184,20 +177,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*