From 8b9d9af3b26d742addaa5ae7bcafc186b7b5bf34 Mon Sep 17 00:00:00 2001 From: Vivek Jain Date: Fri, 12 Aug 2005 10:58:06 +0000 Subject: first prepare the page and then validate **Fixes #273842 2005-08-12 Vivek Jain * em-account-editor.c : (emae_check_complete) first prepare the page and then validate **Fixes #273842 svn path=/trunk/; revision=30094 --- mail/em-account-editor.c | 68 ++++++++++++++++++++++++------------------------ 1 file changed, 34 insertions(+), 34 deletions(-) (limited to 'mail/em-account-editor.c') diff --git a/mail/em-account-editor.c b/mail/em-account-editor.c index d35255d819..db6daf59bb 100644 --- a/mail/em-account-editor.c +++ b/mail/em-account-editor.c @@ -2414,40 +2414,6 @@ emae_check_complete(EConfig *ec, const char *pageid, void *data) const char *tmp; EAccount *ea; - if (pageid == NULL || !strcmp(pageid, "00.identity")) { - /* TODO: check the account name is set, and unique in the account list */ - ok = (tmp = e_account_get_string(emae->account, E_ACCOUNT_ID_NAME)) - && tmp[0] - && (tmp = e_account_get_string(emae->account, E_ACCOUNT_ID_ADDRESS)) - && is_email(tmp) - && ((tmp = e_account_get_string(emae->account, E_ACCOUNT_ID_REPLY_TO)) == NULL - || tmp[0] == 0 - || is_email(tmp)); - if (!ok) - d(printf("identity incomplete\n")); - } - - if (ok && (pageid == NULL || !strcmp(pageid, "10.receive"))) { - ok = emae_service_complete(emae, &emae->priv->source); - if (!ok) - d(printf("receive page incomplete\n")); - } - - if (ok && (pageid == NULL || !strcmp(pageid, "30.send"))) { - ok = emae_service_complete(emae, &emae->priv->transport); - if (!ok) - d(printf("send page incomplete\n")); - } - - if (ok && (pageid == NULL || !strcmp(pageid, "40.management"))) { - ok = (tmp = e_account_get_string(emae->account, E_ACCOUNT_NAME)) - && tmp[0] - && ((ea = mail_config_get_account_by_name(tmp)) == NULL - || ea == emae->original); - if (!ok) - d(printf("management page incomplete\n")); - } - /* We use the page-check of various pages to 'prepare' or pre-load their values, only in the druid */ if (pageid @@ -2500,6 +2466,40 @@ emae_check_complete(EConfig *ec, const char *pageid, void *data) } } + if (pageid == NULL || !strcmp(pageid, "00.identity")) { + /* TODO: check the account name is set, and unique in the account list */ + ok = (tmp = e_account_get_string(emae->account, E_ACCOUNT_ID_NAME)) + && tmp[0] + && (tmp = e_account_get_string(emae->account, E_ACCOUNT_ID_ADDRESS)) + && is_email(tmp) + && ((tmp = e_account_get_string(emae->account, E_ACCOUNT_ID_REPLY_TO)) == NULL + || tmp[0] == 0 + || is_email(tmp)); + if (!ok) + d(printf("identity incomplete\n")); + } + + if (ok && (pageid == NULL || !strcmp(pageid, "10.receive"))) { + ok = emae_service_complete(emae, &emae->priv->source); + if (!ok) + d(printf("receive page incomplete\n")); + } + + if (ok && (pageid == NULL || !strcmp(pageid, "30.send"))) { + ok = emae_service_complete(emae, &emae->priv->transport); + if (!ok) + d(printf("send page incomplete\n")); + } + + if (ok && (pageid == NULL || !strcmp(pageid, "40.management"))) { + ok = (tmp = e_account_get_string(emae->account, E_ACCOUNT_NAME)) + && tmp[0] + && ((ea = mail_config_get_account_by_name(tmp)) == NULL + || ea == emae->original); + if (!ok) + d(printf("management page incomplete\n")); + } + return ok; } -- cgit v1.2.3