From: Sergio Villar Senin Date: Fri, 30 May 2008 08:22:32 +0000 (+0000) Subject: * Show the name of the connection specific SMTP server if it's used in the error... X-Git-Tag: git_migration_finished~1337 X-Git-Url: http://git.maemo.org/git/?p=modest;a=commitdiff_plain;h=99c95d6d66cd2da88f09271b2c6b88af660308a4 * Show the name of the connection specific SMTP server if it's used in the error note pmo-trunk-r4586 --- diff --git a/src/modest-tny-send-queue.c b/src/modest-tny-send-queue.c index bb103ab..ba91145 100644 --- a/src/modest-tny-send-queue.c +++ b/src/modest-tny-send-queue.c @@ -698,12 +698,26 @@ _on_msg_error_happened (TnySendQueue *self, } else { if (err->code == TNY_SERVICE_ERROR_CONNECT) { TnyCamelTransportAccount* transport; + TnyTransportAccount *conn_specific; transport = tny_camel_send_queue_get_transport_account (TNY_CAMEL_SEND_QUEUE (self)); if (transport) { - gchar *message; - message = g_strdup_printf (_("emev_ib_ui_smtp_server_invalid"), - tny_account_get_hostname (TNY_ACCOUNT (transport))); + gchar *message; + ModestTnyAccountStore *acc_store; + const gchar *acc_name; + + acc_store = modest_runtime_get_account_store(); + acc_name = modest_tny_account_get_parent_modest_account_name_for_server_account (TNY_ACCOUNT (transport)); + conn_specific = (TnyTransportAccount *) + modest_tny_account_store_get_transport_account_for_open_connection (acc_store, acc_name); + if (conn_specific) { + message = g_strdup_printf (_("emev_ib_ui_smtp_server_invalid"), + tny_account_get_hostname (TNY_ACCOUNT (conn_specific))); + g_object_unref (conn_specific); + } else { + message = g_strdup_printf (_("emev_ib_ui_smtp_server_invalid"), + tny_account_get_hostname (TNY_ACCOUNT (transport))); + } modest_platform_run_alert_dialog (message, FALSE); g_free (message); g_object_unref (transport);