modest-tny-platform-factory.h \
modest-tny-send-queue.c \
modest-tny-send-queue.h \
+ modest-transport-account-decorator.c \
+ modest-transport-account-decorator.h \
modest-stream-text-to-html.c \
modest-stream-text-to-html.h \
modest-ui-actions.c \
gtk_window_set_transient_for (GTK_WINDOW (self->specific_window), GTK_WINDOW (self));
gtk_window_set_modal (GTK_WINDOW (self->specific_window), TRUE);
gtk_widget_show (self->specific_window);
+ self->modified = TRUE;
}
static void
#include "modest-maemo-utils.h"
#include <glib/gi18n.h>
+#include <string.h>
G_DEFINE_TYPE (ModestConnectionSpecificSmtpWindow, modest_connection_specific_smtp_window,
GTK_TYPE_DIALOG);
gchar *id = NULL;
gchar *connection_name = NULL;
gchar *server_account_name = NULL;
+ gchar *server_name = NULL;
ModestServerAccountData *data = NULL;
gtk_tree_model_get (priv->model, &iter,
MODEL_COL_ID, &id,
MODEL_COL_NAME, &connection_name,
+ MODEL_COL_SERVER_NAME, &server_name,
MODEL_COL_SERVER_ACCOUNT_NAME, &server_account_name,
MODEL_COL_SERVER_ACCOUNT_DATA, &data,
-1);
MODEST_PROTOCOL_TRANSPORT_SMTP,
data->security,
data->secure_auth);
+ if (success) {
+ TnyAccount *account = TNY_ACCOUNT (modest_tny_account_store_new_connection_specific_transport_account
+ (modest_runtime_get_account_store (),
+ server_account_name));
+ if (account)
+ g_object_unref (account);
+ }
/* associate the specific server account with this connection for this account: */
success = success && modest_account_mgr_set_connection_specific_smtp (
modest_account_mgr_set_server_account_port (priv->account_manager, server_account_name, data->port);
}
- } else if (connection_name) {
+ } else if (connection_name && server_name &&
+ !strcmp (server_name, _("mcen_ia_optionalsmtp_notdefined"))) {
modest_account_mgr_remove_connection_specific_smtp (priv->account_manager,
connection_name);
gtk_list_store_set (GTK_LIST_STORE (priv->model), &iter,
g_free (connection_name);
g_free (id);
g_free (server_account_name);
+ g_free (server_name);
if (!success)
return FALSE;
result = FALSE;
} else {
/* The server account is in the item after the connection name: */
- GSList *list_connection = g_slist_append (list, (gpointer)connection_name);
- list_connection = g_slist_append (list_connection, (gpointer)server_account_name);
+ list = g_slist_append (list, (gpointer)connection_name);
+ list = g_slist_append (list, (gpointer)server_account_name);
/* Reset the changed list: */
- modest_conf_set_list (conf, MODEST_CONF_CONNECTION_SPECIFIC_SMTP_LIST, list_connection,
+ modest_conf_set_list (conf, MODEST_CONF_CONNECTION_SPECIFIC_SMTP_LIST, list,
MODEST_CONF_VALUE_STRING, &err);
if (err) {
g_printerr ("modest: %s: error setting list: %s.\n", __FUNCTION__, err->message);
/* Add the security settings: */
modest_account_mgr_set_server_account_security (self, name, security);
-
+
cleanup:
if (!ok) {
g_printerr ("modest: failed to add server account\n");
* alernating between a connection name, followed by a corresponding server account name.
* That's not pretty, but it's nicer than dealing with escaping of a = separator if
* putting them both in one string. */
-#define MODEST_CONF_CONNECTION_SPECIFIC_SMTP_LIST "/specific_smtp" /* one list used for all accounts. */
+#define MODEST_CONF_CONNECTION_SPECIFIC_SMTP_LIST MODEST_CONF_NAMESPACE "/specific_smtp" /* one list used for all accounts. */
#define MODEST_ACCOUNT_USE_CONNECTION_SPECIFIC_SMTP "use_specific_smtp" /* boolean */
/* server account keys */
it will return NULL because there is no outbox folder for
this specific transport accounts, and it's a must that the
send queue returns an outbox */
- if (FALSE)
+ if (TRUE)
/* Add connection-specific transport accounts */
add_connection_specific_transport_accounts (MODEST_TNY_ACCOUNT_STORE(obj));
return retval;
}
-static TnyAccount*
-get_smtp_specific_transport_account_for_open_connection (ModestTnyAccountStore *self,
- const gchar *account_name)
+TnyAccount*
+modest_tny_account_store_get_smtp_specific_transport_account_for_open_connection (ModestTnyAccountStore *self,
+ const gchar *account_name)
{
/* Get the current connection: */
TnyDevice *device = modest_runtime_get_device ();
/* Get the connection-specific transport acccount, if any: */
/* Note: This gives us a reference: */
TnyAccount *account =
- get_smtp_specific_transport_account_for_open_connection (self, account_name);
+ modest_tny_account_store_get_smtp_specific_transport_account_for_open_connection (self, account_name);
/* If there is no connection-specific transport account (the common case),
* just get the regular transport account: */
}
}
+TnyTransportAccount *
+modest_tny_account_store_new_connection_specific_transport_account (ModestTnyAccountStore *self,
+ const gchar *name)
+{
+ ModestTnyAccountStorePrivate *priv = NULL;
+ TnyAccount * tny_account = NULL;
+
+ priv = MODEST_TNY_ACCOUNT_STORE_GET_PRIVATE(self);
+
+ /* Add the account: */
+ tny_account =
+ modest_tny_account_new_from_server_account_name (priv->account_mgr,
+ priv->session,
+ name,
+ get_password,
+ forget_password);
+ if (tny_account) {
+ g_object_set_data (G_OBJECT(tny_account),
+ "account_store",
+ (gpointer)self);
+
+ tny_list_append (priv->transport_accounts, G_OBJECT (tny_account));
+ add_outbox_from_transport_account_to_global_outbox (self,
+ name,
+ tny_account);
+
+ } else
+ g_printerr ("modest: failed to create smtp-specific account for %s\n",
+ name);
+
+ return TNY_TRANSPORT_ACCOUNT (tny_account);
+}
+
+
static void
add_connection_specific_transport_accounts (ModestTnyAccountStore *self)
{
iter = g_slist_next (iter);
if (iter) {
const gchar* transport_account_name = (const gchar*) (iter->data);
- if (transport_account_name) {
- TnyAccount * tny_account = NULL;
- /* Add the account: */
- tny_account =
- modest_tny_account_new_from_server_account_name (priv->account_mgr,
- priv->session,
- transport_account_name);
- if (tny_account) {
- g_object_set_data (G_OBJECT(tny_account),
- "account_store",
- (gpointer)self);
-
- tny_list_append (priv->transport_accounts, G_OBJECT (tny_account));
- g_object_unref (tny_account);
- } else
- g_printerr ("modest: failed to create smtp-specific account for %s\n",
- transport_account_name);
- }
+ TnyTransportAccount * account = NULL;
+ account = modest_tny_account_store_new_connection_specific_transport_account (
+ self, transport_account_name);
+ if (account)
+ g_object_unref (account);
}
iter = g_slist_next (iter);
}
TnyAccount* modest_tny_account_store_get_transport_account_for_open_connection (ModestTnyAccountStore *self,
const gchar *account_name);
+TnyAccount* modest_tny_account_store_get_smtp_specific_transport_account_for_open_connection (ModestTnyAccountStore *self,
+ const gchar *account_name);
+
/**
* tny_account_store_get_session
* @self: a TnyAccountStore instance
modest_tny_account_store_get_transport_account_from_outbox_header(ModestTnyAccountStore *self,
TnyHeader *header);
+/**
+ * modest_tny_account_store_new_connection_specific_transport_account:
+ * @self: a #ModestTnyAccountStore
+ * @name: the name of the connection specific smtp transport account
+ *
+ * Creates a connection specific transport account and put it in the merged outbox
+ *
+ * Returns: the new #TnyTransportAccount
+ */
+TnyTransportAccount *
+modest_tny_account_store_new_connection_specific_transport_account (ModestTnyAccountStore *self,
+ const gchar *name);
+
G_END_DECLS
#endif /* __MODEST_TNY_ACCOUNT_STORE_H__ */
#include <tny-simple-list.h>
#include <modest-tny-folder.h>
#include <modest-tny-outbox-account.h>
+#include <modest-transport-account-decorator.h>
#include <modest-account-mgr-helpers.h>
#include <modest-init.h>
#include <tny-camel-transport-account.h>
#include <hildon/hildon-file-system-info.h>
#endif
+/* we need these dummy functions, or tinymail will complain */
+static gchar * get_pass_dummy (TnyAccount *account, const gchar *prompt, gboolean *cancel);
+static void forget_pass_dummy (TnyAccount *account);
+
TnyFolder *
modest_tny_account_get_special_folder (TnyAccount *account,
TnyFolderType special_type)
switch (account_data->proto) {
case MODEST_PROTOCOL_TRANSPORT_SENDMAIL:
case MODEST_PROTOCOL_TRANSPORT_SMTP:
- tny_account = TNY_ACCOUNT(tny_camel_transport_account_new ()); break;
+ tny_account = TNY_ACCOUNT (modest_transport_account_decorator_new ()); break;
case MODEST_PROTOCOL_STORE_POP:
tny_account = TNY_ACCOUNT(tny_camel_pop_store_account_new ()); break;
case MODEST_PROTOCOL_STORE_IMAP:
TnyAccount*
modest_tny_account_new_from_server_account_name (ModestAccountMgr *account_mgr,
TnySessionCamel *session,
- const gchar *server_account_name)
+ const gchar *server_account_name,
+ TnyGetPassFunc get_pass_func,
+ TnyForgetPassFunc forget_pass_func)
{
ModestServerAccountData *account_data;
TnyAccount *tny_account;
if (!account_data)
return NULL;
- tny_account = create_tny_account (account_mgr, session, account_data);
+ tny_account = TNY_ACCOUNT (tny_camel_transport_account_new ());
+
+ if (tny_account) {
+ const gchar* proto_name = NULL;
+ tny_account_set_id (tny_account, account_data->account_name);
+ tny_camel_account_set_session (TNY_CAMEL_ACCOUNT (tny_account), session);
+ proto_name = modest_protocol_info_get_transport_store_protocol_name(account_data->proto);
+ tny_account_set_proto (tny_account, proto_name);
+ modest_tny_account_set_parent_modest_account_name_for_server_account (tny_account, server_account_name);
+ }
+
if (!tny_account)
g_warning ("%s: failed to create tny_account", __FUNCTION__);
else if (!update_tny_account (tny_account, account_mgr, account_data))
g_warning ("%s: failed to initialize tny_account", __FUNCTION__);
+ else {
+ tny_account_set_forget_pass_func (tny_account,
+ forget_pass_func ? forget_pass_func : forget_pass_dummy);
+ tny_account_set_pass_func (tny_account,
+ get_pass_func ? get_pass_func: get_pass_dummy);
+ }
modest_account_mgr_free_server_account_data (account_mgr, account_data);
TnyAccount*
modest_tny_account_new_from_server_account_name (ModestAccountMgr *account_mgr,
TnySessionCamel *session,
- const gchar* server_account_name);
+ const gchar* server_account_name,
+ TnyGetPassFunc get_pass_func,
+ TnyForgetPassFunc forget_pass_func);
#if 0
/**
--- /dev/null
+/* Copyright (c) 2006, Nokia Corporation
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of the Nokia Corporation nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+ * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+ * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
+ * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+
+#include <modest-transport-account-decorator.h>
+#include <modest-tny-account-store.h>
+#include <modest-tny-account.h>
+#include <modest-runtime.h>
+#include <tny-simple-list.h>
+#include <tny-iterator.h>
+#include <tny-folder.h>
+#include <modest-marshal.h>
+#include <string.h> /* strcmp */
+
+/* 'private'/'protected' functions */
+static void modest_transport_account_decorator_class_init (ModestTransportAccountDecoratorClass *klass);
+static void modest_transport_account_decorator_finalize (GObject *obj);
+static void modest_transport_account_decorator_instance_init (GTypeInstance *instance, gpointer g_class);
+static void modest_transport_account_decorator_send (TnyTransportAccount *self, TnyMsg *msg, GError **err);
+
+/* list my signals */
+/* enum { */
+/* /\* MY_SIGNAL_1, *\/ */
+/* /\* MY_SIGNAL_2, *\/ */
+/* LAST_SIGNAL */
+/* }; */
+
+/* typedef struct _ModestTransportAccountDecoratorPrivate ModestTransportAccountDecoratorPrivate; */
+/* struct _ModestTransportAccountDecoratorPrivate { */
+/* }; */
+
+/* #define MODEST_TRANSPORT_ACCOUNT_DECORATOR_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE((o), \ */
+/* MODEST_TYPE_TRANSPORT_ACCOUNT_DECORATOR, \ */
+/* ModestTransportAccountDecoratorPrivate)) */
+
+/* globals */
+static TnyCamelTransportAccountClass *parent_class = NULL;
+
+/* uncomment the following if you have defined any signals */
+/* static guint signals[LAST_SIGNAL] = {0}; */
+
+/*
+ * this thread actually tries to send all the mails in the outbox and keeps
+ * track of their state.
+ */
+static void
+modest_transport_account_decorator_send (TnyTransportAccount *self, TnyMsg *msg, GError **err)
+{
+ TnyTransportAccount *connection_specific_account = NULL;
+/* ModestTransportAccountDecoratorPrivate *priv = MODEST_TRANSPORT_ACCOUNT_DECORATOR_GET_PRIVATE (self); */
+ ModestTnyAccountStore *store = modest_runtime_get_account_store ();
+ const gchar *account_name;
+
+ account_name = modest_tny_account_get_parent_modest_account_name_for_server_account (TNY_ACCOUNT (self));
+ if (account_name) {
+ connection_specific_account = TNY_TRANSPORT_ACCOUNT
+ (modest_tny_account_store_get_smtp_specific_transport_account_for_open_connection (store, account_name));
+ }
+
+ if (connection_specific_account) {
+ tny_transport_account_send (connection_specific_account, msg, err);
+ } else {
+ TNY_CAMEL_TRANSPORT_ACCOUNT_CLASS(parent_class)->send_func (self, msg, err);
+ }
+}
+
+static void
+modest_transport_account_decorator_class_init (ModestTransportAccountDecoratorClass *klass)
+{
+ GObjectClass *gobject_class;
+ TnyCamelTransportAccountClass *transport_class;
+
+ gobject_class = (GObjectClass*) klass;
+ transport_class = (TnyCamelTransportAccountClass *) klass;
+
+ parent_class = g_type_class_peek_parent (klass);
+ gobject_class->finalize = modest_transport_account_decorator_finalize;
+
+ transport_class->send_func = modest_transport_account_decorator_send;
+
+/* g_type_class_add_private (gobject_class, sizeof(ModestTransportAccountDecoratorPrivate)); */
+}
+
+static void
+modest_transport_account_decorator_instance_init (GTypeInstance *instance, gpointer g_class)
+{
+/* ModestTransportAccountDecoratorPrivate *priv; */
+
+/* priv = MODEST_TRANSPORT_ACCOUNT_DECORATOR_GET_PRIVATE (instance); */
+}
+
+static void
+modest_transport_account_decorator_finalize (GObject *obj)
+{
+/* ModestTransportAccountDecoratorPrivate *priv; */
+
+/* priv = MODEST_TRANSPORT_ACCOUNT_DECORATOR_GET_PRIVATE (obj); */
+
+ G_OBJECT_CLASS(parent_class)->finalize (obj);
+}
+
+ModestTransportAccountDecorator*
+modest_transport_account_decorator_new (void)
+{
+ ModestTransportAccountDecorator *self;
+/* ModestTransportAccountDecoratorPrivate *priv; */
+
+ self = MODEST_TRANSPORT_ACCOUNT_DECORATOR(g_object_new(MODEST_TYPE_TRANSPORT_ACCOUNT_DECORATOR, NULL));
+/* priv = MODEST_TRANSPORT_ACCOUNT_DECORATOR_GET_PRIVATE (self); */
+
+ return self;
+}
+
+GType
+modest_transport_account_decorator_get_type (void)
+{
+ static GType my_type = 0;
+
+ if (my_type == 0) {
+ static const GTypeInfo my_info = {
+ sizeof(ModestTransportAccountDecoratorClass),
+ NULL, /* base init */
+ NULL, /* base finalize */
+ (GClassInitFunc) modest_transport_account_decorator_class_init,
+ NULL, /* class finalize */
+ NULL, /* class data */
+ sizeof(ModestTransportAccountDecorator),
+ 0, /* n_preallocs */
+ (GInstanceInitFunc) modest_transport_account_decorator_instance_init,
+ NULL
+ };
+
+ my_type = g_type_register_static (TNY_TYPE_CAMEL_TRANSPORT_ACCOUNT,
+ "ModestTransportAccountDecorator",
+ &my_info, 0);
+ }
+ return my_type;
+}
+
--- /dev/null
+/* Copyright (c) 2007, Nokia Corporation
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of the Nokia Corporation nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+ * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+ * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
+ * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <glib.h>
+#include <glib-object.h>
+#include <tny-send-queue.h>
+#include <tny-msg.h>
+#include <tny-camel-transport-account.h>
+
+#ifndef __MODEST_TRANSPORT_ACCOUNT_DECORATOR_H__
+#define __MODEST_TRANSPORT_ACCOUNT_DECORATOR_H__
+
+G_BEGIN_DECLS
+
+/* convenience macros */
+#define MODEST_TYPE_TRANSPORT_ACCOUNT_DECORATOR (modest_transport_account_decorator_get_type())
+#define MODEST_TRANSPORT_ACCOUNT_DECORATOR(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),MODEST_TYPE_TRANSPORT_ACCOUNT_DECORATOR,ModestTransportAccountDecorator))
+#define MODEST_TRANSPORT_ACCOUNT_DECORATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),MODEST_TYPE_TRANSPORT_ACCOUNT_DECORATOR,TransportAccountDecorator))
+#define MODEST_IS_TRANSPORT_ACCOUNT_DECORATOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),MODEST_TYPE_TRANSPORT_ACCOUNT_DECORATOR))
+#define MODEST_IS_TRANSPORT_ACCOUNT_DECORATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),MODEST_TYPE_TRANSPORT_ACCOUNT_DECORATOR))
+#define MODEST_TRANSPORT_ACCOUNT_DECORATOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj),MODEST_TYPE_TRANSPORT_ACCOUNT_DECORATOR,ModestTransportAccountDecoratorClass))
+
+typedef struct _ModestTransportAccountDecorator ModestTransportAccountDecorator;
+typedef struct _ModestTransportAccountDecoratorClass ModestTransportAccountDecoratorClass;
+
+struct _ModestTransportAccountDecorator {
+ TnyCamelTransportAccount parent;
+};
+
+struct _ModestTransportAccountDecoratorClass {
+ TnyCamelTransportAccountClass parent_class;
+
+};
+
+/**
+ * modest_transport_account_decorator_get_type:
+ *
+ * get the #GType for #ModestTransportAccountDecorator
+ *
+ * Returns: the #GType
+ */
+GType modest_transport_account_decorator_get_type (void) G_GNUC_CONST;
+
+
+/**
+ * modest_transport_account_decorator_new:
+ * @account: a valid transport account
+ *
+ * create a new #ModestTransportAccountDecorator decorating @account
+ *
+ * Returns: a new #ModestTransportAccountDecorator instance, or NULL in case
+ * of any error
+ */
+ModestTransportAccountDecorator* modest_transport_account_decorator_new (void);
+
+G_END_DECLS
+
+#endif /* __MODEST_TRANSPORT_ACCOUNT_DECORATOR_H__ */
+
void
modest_ui_actions_on_send (GtkWidget *widget, ModestMsgEditWindow *edit_window)
{
+ TnyTransportAccount *transport_account = NULL;
+
g_return_if_fail (MODEST_IS_MSG_EDIT_WINDOW(edit_window));
if (!modest_msg_edit_window_check_names (edit_window, TRUE))
}
/* Get the currently-active transport account for this modest account: */
- TnyTransportAccount *transport_account =
- TNY_TRANSPORT_ACCOUNT(modest_tny_account_store_get_transport_account_for_open_connection
- (modest_runtime_get_account_store(),
- account_name));
+/* TnyTransportAccount *transport_account = */
+/* TNY_TRANSPORT_ACCOUNT(modest_tny_account_store_get_transport_account_for_open_connection */
+/* (modest_runtime_get_account_store(), */
+/* account_name)); */
+ if (strcmp (account_name, MODEST_LOCAL_FOLDERS_ACCOUNT_ID) != 0) {
+ transport_account = TNY_TRANSPORT_ACCOUNT(modest_tny_account_store_get_server_account
+ (modest_runtime_get_account_store(),
+ account_name, TNY_ACCOUNT_TYPE_TRANSPORT));
+ }
+
if (!transport_account) {
/* Run account setup wizard */
if (!modest_ui_actions_run_account_setup_wizard(MODEST_WINDOW(edit_window)))