From 92fc8170d07ed579d31098da356f46757d6aa7f7 Mon Sep 17 00:00:00 2001 From: Murray Cumming Date: Thu, 10 May 2007 15:21:47 +0000 Subject: [PATCH] 2007-05-10 Murray Cumming * src/modest-tny-account-store.c: (modest_tny_account_store_alert): Show a more friendly error dialog now that we expect (from the tinymail documentation) to get the UNKNOWN_ALERT error. Add explanatory comments. pmo-trunk-r1825 --- ChangeLog2 | 6 ++++++ src/modest-tny-account-store.c | 14 ++++++++------ 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/ChangeLog2 b/ChangeLog2 index 166f489..24e266f 100644 --- a/ChangeLog2 +++ b/ChangeLog2 @@ -1,5 +1,11 @@ 2007-05-10 Murray Cumming + * src/modest-tny-account-store.c: (modest_tny_account_store_alert): + Show a more friendly error dialog now that we expect (from the tinymail + documentation) to get the UNKNOWN_ALERT error. Add explanatory comments. + +2007-05-10 Murray Cumming + * src/maemo/modest-main-window.c: (on_account_update): Check that account_name is not NULL, to prevent a crash at startup that I am seeing on the N800. I do wonder why it is NULL. diff --git a/src/modest-tny-account-store.c b/src/modest-tny-account-store.c index 23ef0f6..8c7191d 100644 --- a/src/modest-tny-account-store.c +++ b/src/modest-tny-account-store.c @@ -646,12 +646,14 @@ modest_tny_account_store_alert (TnyAccountStore *self, TnyAlertType type, switch (error->code) { case TNY_ACCOUNT_ERROR_TRY_CONNECT: - prompt = _("Modest account not yet fully configured"); - break; - case TNY_ACCOUNT_STORE_ERROR_UNKNOWN_ALERT: - g_warning("%s: TNY_ACCOUNT_STORE_ERROR_UNKNOWN_ALERT: message=%s", - __FUNCTION__, error->message); - prompt = _("Unknown Tinymail error (TNY_ACCOUNT_STORE_ERROR_UNKNOWN_ALERT)"); + /* The tinymail camel implementation just sends us this for almost + * everything, so we have to guess at the cause. + * It could be a wrong password, or inability to resolve a hostname, + * or lack of network, or something entirely different: */ + case TNY_ACCOUNT_STORE_ERROR_UNKNOWN_ALERT: + g_debug ("%s: Handling GError domain=%d, code=%d, message=%s", + __FUNCTION__, error->domain, error->code, error->message); + prompt = _("Modest account not yet fully configured."); break; default: g_warning ("%s: Unhandled GError code: %d, message=%s", -- 1.7.9.5