#include "modest-conf.h"
#include "modest-account-mgr.h"
+#include "modest-identity-mgr.h"
#include "modest-ui.h"
#ifdef HAVE_CONFIG_H
gtk_init (&argc, &argv);
+
+ modest_icon_factory_init ();
+
modest_ui = MODEST_UI(modest_ui_new (modest_conf));
if (!modest_ui) {
g_warning ("failed to initialize ui");
goto cleanup;
}
-
+
{
gboolean ok;
gtk_init (&argc, &argv);
if (modest_conf)
g_object_unref (modest_conf);
+ modest_icon_factory_uninit ();
+
return retval;
}
install_test_account (ModestConf *conf)
{
ModestAccountMgr *acc_mgr;
+ ModestIdentityMgr *id_mgr;
const gchar *acc_name = "test";
g_return_if_fail (conf);
NULL, "imap");
modest_account_mgr_add_server_account (acc_mgr, "mytransport", "localhost", NULL,
NULL, "smtp");
+
}
+ 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_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));
}
-