From 3dd39413ed6c4ee2bd23498a76858c980c15aa7c Mon Sep 17 00:00:00 2001 From: "Dirk-Jan C. Binnema" Date: Tue, 8 Jan 2008 09:17:25 +0000 Subject: [PATCH] * improve the debug output a bit pmo-trunk-r3988 --- src/modest-mail-operation.c | 6 +++++- src/modest-tny-account-store.c | 7 +++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/modest-mail-operation.c b/src/modest-mail-operation.c index 7e95429..36b32f2 100644 --- a/src/modest-mail-operation.c +++ b/src/modest-mail-operation.c @@ -3026,6 +3026,10 @@ modest_mail_operation_to_string (ModestMailOperation *self) g_return_val_if_fail (self, NULL); priv = MODEST_MAIL_OPERATION_GET_PRIVATE(self); + + /* new operations don't have anything interesting */ + if (priv->op_type == MODEST_MAIL_OPERATION_TYPE_UNKNOWN) + return g_strdup_printf ("%p ", self); switch (priv->op_type) { case MODEST_MAIL_OPERATION_TYPE_SEND: type= "SEND"; break; @@ -3048,7 +3052,7 @@ modest_mail_operation_to_string (ModestMailOperation *self) } account_id = priv->account ? tny_account_get_id (priv->account) : ""; - + return g_strdup_printf ("%p \"%s\" (%s) [%s] {%d/%d} '%s'", self, account_id,type, status, priv->done, priv->total, priv->error && priv->error->message ? priv->error->message : ""); diff --git a/src/modest-tny-account-store.c b/src/modest-tny-account-store.c index 4a4c4d1..54f7e17 100644 --- a/src/modest-tny-account-store.c +++ b/src/modest-tny-account-store.c @@ -614,7 +614,7 @@ get_password (TnyAccount *account, const gchar * prompt_not_used, gboolean *canc g_return_val_if_fail (account, NULL); MODEST_DEBUG_BLOCK( - g_debug ("DEBUG: modest: %s: prompt (not shown) = %s\n", __FUNCTION__, prompt_not_used); + g_debug ("%s: prompt (not shown) = %s\n", __FUNCTION__, prompt_not_used); ); /* Initialize the output parameter: */ @@ -647,7 +647,7 @@ get_password (TnyAccount *account, const gchar * prompt_not_used, gboolean *canc NULL, (gpointer*)&pwd_ptr); MODEST_DEBUG_BLOCK( - g_debug ("DEBUG: modest: %s: Already asked = %d\n", __FUNCTION__, already_asked); + g_debug ("%s: Already asked = %d\n", __FUNCTION__, already_asked); ); /* If the password is not already there, try ModestConf */ @@ -666,7 +666,7 @@ get_password (TnyAccount *account, const gchar * prompt_not_used, gboolean *canc const gboolean settings_have_password = modest_account_mgr_get_server_account_has_password (priv->account_mgr, server_account_name); MODEST_DEBUG_BLOCK( - printf ("DEBUG: modest: %s: settings_have_password=%d\n", + printf ("%s: settings_have_password=%d\n", __FUNCTION__, settings_have_password); ); if (settings_have_password) { @@ -763,7 +763,6 @@ modest_tny_account_store_forget_already_asked (ModestTnyAccountStore *self, TnyA static void forget_password (TnyAccount *account) { - printf ("DEBUG: %s\n", __FUNCTION__); ModestTnyAccountStore *self; ModestTnyAccountStorePrivate *priv; const TnyAccountStore *account_store; -- 1.7.9.5