#include <modest-account-protocol.h>
#include <modest-defs.h>
#include <modest-protocol-registry.h>
+#include <modest-transport-account-decorator.h>
#include <tny-camel-pop-store-account.h>
#include <tny-camel-imap-store-account.h>
#include <tny-camel-store-account.h>
static GHashTable * modest_protocol_registry_create_tag (ModestProtocolRegistry *obj, const gchar *tag);
/* translation handlers */
-static gchar * translation_is_userdata (gpointer userdata, ...);
+static gchar * translation_is_userdata (gpointer userdata, va_list args);
typedef struct _ModestProtocolRegistryPrivate ModestProtocolRegistryPrivate;
struct _ModestProtocolRegistryPrivate {
}
static gchar *
-translation_is_userdata (gpointer userdata, ...)
+translation_is_userdata (gpointer userdata, va_list args)
{
- va_list args, dest;
+ va_list dest;
gchar *result;
- va_start(args, userdata);
- va_copy (dest, args);
- result = g_strdup_printf (_(userdata), dest);
- va_end (args);
+ G_VA_COPY (dest, args);
+ result = g_strdup_vprintf (_(userdata), dest);
+ va_end (dest);
return result;
}
static gchar *
-translation_is_userdata_no_param (gpointer userdata, ...)
+translation_is_userdata_no_param (gpointer userdata, va_list args)
{
gchar *result;
protocol = modest_account_protocol_new ("smtp", N_("SMTP Server"),
25, 465,
- TNY_TYPE_CAMEL_TRANSPORT_ACCOUNT);
+ MODEST_TYPE_TRANSPORT_ACCOUNT_DECORATOR);
smtp_protocol_type_id = modest_protocol_get_type_id (protocol);
modest_protocol_set_translation (protocol, MODEST_PROTOCOL_TRANSLATION_CONNECT_ERROR, translation_is_userdata, "emev_ib_ui_smtp_server_invalid", NULL);
+ modest_protocol_set_translation (protocol, MODEST_PROTOCOL_TRANSLATION_ACCOUNT_CONNECTION_ERROR, translation_is_userdata, "emev_ib_ui_smtp_server_invalid", NULL);
modest_protocol_set_translation (protocol, MODEST_PROTOCOL_TRANSLATION_AUTH_ERROR, translation_is_userdata, "emev_ni_ui_smtp_authentication_fail_error", NULL);
modest_protocol_registry_add (self, protocol, 2,
MODEST_PROTOCOL_REGISTRY_TRANSPORT_STORE_PROTOCOLS,