X-Git-Url: http://git.maemo.org/git/?p=modest;a=blobdiff_plain;f=src%2Fmodest-protocol-registry.c;h=9e89763a229b98b80f90b56206ce383585519274;hp=26a6cfc3d3d371aa2d7c40cab5e52d7252aad920;hb=77279a928905bb344342d4d12bc5c0275c1ced27;hpb=8576d94968a6202c4a6b760d00213281baaa6b47 diff --git a/src/modest-protocol-registry.c b/src/modest-protocol-registry.c index 26a6cfc..9e89763 100644 --- a/src/modest-protocol-registry.c +++ b/src/modest-protocol-registry.c @@ -31,6 +31,7 @@ #include #include #include +#include #include #include #include @@ -80,7 +81,7 @@ static void modest_protocol_registry_instance_init (ModestProtocolRegistry *ob 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 { @@ -298,7 +299,7 @@ modest_protocol_registry_get_pair_list_by_tag (ModestProtocolRegistry *self, con { ModestProtocolRegistryPrivate *priv; GHashTable *tag_table; - GSList *result; + GSList *result = NULL; g_return_val_if_fail (MODEST_IS_PROTOCOL_REGISTRY (self), NULL); priv = MODEST_PROTOCOL_REGISTRY_GET_PRIVATE (self); @@ -310,7 +311,7 @@ modest_protocol_registry_get_pair_list_by_tag (ModestProtocolRegistry *self, con g_hash_table_foreach (tag_table, (GHFunc) add_protocol_to_pair_list, &result); - return result; + return result; } static gboolean @@ -395,21 +396,20 @@ modest_protocol_registry_create_tag (ModestProtocolRegistry *self, const gchar * } 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; @@ -438,9 +438,10 @@ modest_protocol_registry_set_to_default (ModestProtocolRegistry *self) 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, @@ -462,7 +463,7 @@ modest_protocol_registry_set_to_default (ModestProtocolRegistry *self) MODEST_PROTOCOL_REGISTRY_STORE_PROTOCOLS, MODEST_PROTOCOL_REGISTRY_REMOTE_STORE_PROTOCOLS, MODEST_PROTOCOL_REGISTRY_HAS_LEAVE_ON_SERVER_PROTOCOLS, - MODEST_PROTOCOL_REGISTRY_STORE_FORBID_MESSAGE_ADD, + MODEST_PROTOCOL_REGISTRY_STORE_FORBID_INCOMING_XFERS, NULL); g_object_unref (protocol);