-
-
-static void
-install_basic_conf_settings (ModestConf *conf)
-{
- g_return_if_fail (conf);
-
- /* main window size */
- modest_conf_set_int (conf, MODEST_CONF_MAIN_WINDOW_WIDTH,
- MODEST_CONF_MAIN_WINDOW_WIDTH_DEFAULT, NULL);
- modest_conf_set_int (conf, MODEST_CONF_MAIN_WINDOW_HEIGHT,
- MODEST_CONF_MAIN_WINDOW_HEIGHT_DEFAULT, NULL);
-
- /* edit window size */
- modest_conf_set_int (conf, MODEST_CONF_EDIT_WINDOW_WIDTH,
- MODEST_CONF_EDIT_WINDOW_WIDTH_DEFAULT, NULL);
- modest_conf_set_int (conf, MODEST_CONF_EDIT_WINDOW_HEIGHT,
- MODEST_CONF_EDIT_WINDOW_HEIGHT_DEFAULT, NULL);
-
- g_print ("modest: returned to factory settings\n");
-}
-
-
-static void
-install_test_account (ModestConf *conf)
-{
- ModestAccountMgr *acc_mgr;
- ModestIdentityMgr *id_mgr;
- const gchar *acc_name = "test";
- g_return_if_fail (conf);
-
- acc_mgr = MODEST_ACCOUNT_MGR(modest_account_mgr_new (conf));
- if (!acc_mgr) {
- g_warning ("failed to instantiate account mgr");
- return;
- }
-
- if (modest_account_mgr_account_exists (acc_mgr, acc_name, NULL)) {
- if (!modest_account_mgr_remove_account(acc_mgr, acc_name, NULL)) {
- g_warning ("could not delete existing account");
- }
- }
-
- if (!modest_account_mgr_add_account (acc_mgr, acc_name, "mystore", "mytransport", NULL))
- g_warning ("failed to add test account");
- else
- {
- modest_account_mgr_add_server_account (acc_mgr, "mystore", "localhost", "djcb",
- 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,
- "Default User",
- "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));
-}