X-Git-Url: http://git.maemo.org/git/?p=modest;a=blobdiff_plain;f=src%2Fmodest-main.c;h=77327c0e56371d9ddc03f25fdba9711b8f95656d;hp=a2cbc781a670f11f9273f90cda8ee0307179a23d;hb=5cf98f0ac9cf7c47935ae5339de689eb63e79cb7;hpb=5fc7538688f5e00d27fca03b79744e86a072bb1a diff --git a/src/modest-main.c b/src/modest-main.c index a2cbc78..77327c0 100644 --- a/src/modest-main.c +++ b/src/modest-main.c @@ -3,6 +3,7 @@ #include "modest-conf.h" #include "modest-account-mgr.h" +#include "modest-identity-mgr.h" #include "modest-ui.h" #ifdef HAVE_CONFIG_H @@ -152,6 +153,7 @@ static void install_test_account (ModestConf *conf) { ModestAccountMgr *acc_mgr; + ModestIdentityMgr *id_mgr; const gchar *acc_name = "test"; g_return_if_fail (conf); @@ -177,13 +179,18 @@ install_test_account (ModestConf *conf) NULL, "smtp"); } - if (modest_account_mgr_identity_exists(acc_mgr, "myidentity", NULL)) { - if (!modest_account_mgr_remove_identity(acc_mgr, "myidentity", NULL)) { + id_mgr = MODEST_IDENTITY_MGR(modest_identity_mgr_new (conf)); + if (modest_identity_mgr_identity_exists(id_mgr, "myidentity", NULL)) { + if (!modest_identity_mgr_remove_identity(id_mgr, "myidentity", NULL)) { g_warning ("could not delete existing identity"); } } - if (!modest_account_mgr_add_identity (acc_mgr, "myidentity", "user@localhost", - "", "", FALSE, NULL, FALSE )) - g_warning ("failed to add test account"); + if (!modest_identity_mgr_add_identity (id_mgr, + MODEST_IDENTITY_DEFAULT_IDENTITY, + "user@localhost", + "", "", FALSE, NULL, FALSE )) + g_warning ("failed to add test identity"); + g_object_unref (G_OBJECT(acc_mgr)); + g_object_unref (G_OBJECT(id_mgr)); }