2007-05-14 Murray Cumming <murrayc@murrayc.com>
authorMurray Cumming <murrayc@murrayc.com>
Mon, 14 May 2007 12:35:29 +0000 (12:35 +0000)
committerMurray Cumming <murrayc@murrayc.com>
Mon, 14 May 2007 12:35:29 +0000 (12:35 +0000)
* src/modest-tny-account-store.c: (modest_tny_account_store_alert):
Show the detailed internal camel error message when an error happens
during the configuration, so that our testers can give us more clues.
For instance, in projects.maemo.org bug NB#56910 .

pmo-trunk-r1851

ChangeLog2
src/modest-tny-account-store.c
src/modest-tny-account.c

index fa51b9c..0b619b8 100644 (file)
@@ -1,5 +1,12 @@
 2007-05-14  Murray Cumming  <murrayc@murrayc.com>
 
+       * src/modest-tny-account-store.c: (modest_tny_account_store_alert):
+       Show the detailed internal camel error message when an error happens 
+       during the configuration, so that our testers can give us more clues.
+       For instance, in projects.maemo.org bug NB#56910 .
+
+2007-05-14  Murray Cumming  <murrayc@murrayc.com>
+
        * src/modest-tny-account.c:
        (modest_tny_account_new_from_server_account): Adapt to changed tinymail API: 
        change tny_account_set_mech() to tny_account_set_secure_auth_mech().
index 8c7191d..5e3ebbb 100644 (file)
@@ -641,8 +641,8 @@ modest_tny_account_store_alert (TnyAccountStore *self, TnyAlertType type,
        /* printf("DEBUG: %s: error->message=%s\n", __FUNCTION__, error->message); */
        
 
-       
-       const gchar *prompt = NULL;
+       /* const gchar *prompt = NULL; */
+       gchar *prompt = NULL;
        switch (error->code)
        {
                case TNY_ACCOUNT_ERROR_TRY_CONNECT:
@@ -653,7 +653,12 @@ modest_tny_account_store_alert (TnyAccountStore *self, TnyAlertType type,
                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.");
+                       
+                       /* TODO: Remove the internal error message for the real release.
+                        * This is just so the testers can give us more information: */
+                       /* prompt = _("Modest account not yet fully configured."); */
+                       prompt = g_strdup_printf(_("Modest account not yet fully configured. Error=%s"), 
+                               error->message);
                        break;
                default:
                        g_warning ("%s: Unhandled GError code: %d, message=%s", 
@@ -695,6 +700,9 @@ modest_tny_account_store_alert (TnyAccountStore *self, TnyAlertType type,
                retval = TRUE;
 
        gtk_widget_destroy (dialog);
+       
+       /* TODO: Don't free this when we no longer strdup the message for testers. */
+       g_free (prompt);
 
        return retval;
 }
index 41fed31..8776762 100644 (file)
@@ -226,8 +226,8 @@ modest_tny_account_new_from_server_account (ModestAccountMgr *account_mgr,
                        auth_mech_name = MODEST_ACCOUNT_AUTH_CRAMMD5;
                        
                default:
-                       g_warning ("%s: Unhandled secure authentication setting for "
-                               "account=%s", __FUNCTION__, account_data->account_name);
+                       g_warning ("%s: Unhandled secure authentication setting %d for "
+                               "account=%s", __FUNCTION__, account_data->secure_auth, account_data->account_name);
                        break;
                }