gboolean created_dialog = FALSE;
if (!found || !dialog) {
+ ModestAccountSettings *settings;
dialog = modest_account_settings_dialog_new ();
- modest_account_settings_dialog_set_account_name (dialog, modest_account_name);
+ settings = modest_account_mgr_load_account_settings (priv->account_mgr, modest_account_name);
+ modest_account_settings_dialog_set_account (dialog, settings);
+ g_object_unref (settings);
modest_account_settings_dialog_switch_to_user_info (dialog);
modest_window_mgr_set_modal (modest_runtime_get_window_mgr (), GTK_WINDOW (dialog));
gboolean found = FALSE;
TnyAccount *retval = NULL;
+ g_return_val_if_fail (accounts && TNY_IS_LIST(accounts), NULL);
+
iter = tny_list_create_iterator (accounts);
while (!tny_iterator_is_done (iter) && !found) {
TnyAccount *tmp_account = NULL;
modest_tny_account_store_get_smtp_specific_transport_account_for_open_connection (ModestTnyAccountStore *self,
const gchar *account_name)
{
+ TnyDevice *device;
+
+ g_return_val_if_fail (self && MODEST_IS_TNY_ACCOUNT_STORE(self), NULL);
+ g_return_val_if_fail (account_name, NULL);
+
/* Get the current connection: */
- TnyDevice *device = modest_runtime_get_device ();
+ device = modest_runtime_get_device ();
if (!tny_device_is_online (device))
return NULL;
-
- g_return_val_if_fail (self, NULL);
-
#ifdef MODEST_HAVE_CONIC
g_return_val_if_fail (TNY_IS_MAEMO_CONIC_DEVICE (device), NULL);
self = MODEST_TNY_ACCOUNT_STORE (user_data);
priv = MODEST_TNY_ACCOUNT_STORE_GET_PRIVATE (self);
- if (canceled || err) {
- /* The account was not cancelled */
- } else {
- /* Clear the cache if it's an store account */
- if (TNY_IS_STORE_ACCOUNT (account))
- tny_store_account_delete_cache (TNY_STORE_ACCOUNT (account));
- }
-
/* Remove it from the list of accounts */
if (TNY_IS_STORE_ACCOUNT (account))
tny_list_remove (priv->store_accounts, (GObject *) account);
/* Unref the extra reference added by get_server_account */
g_object_unref (account);
+
+ /* Clear the cache if it's an store account */
+ if (TNY_IS_STORE_ACCOUNT (account))
+ tny_store_account_delete_cache (TNY_STORE_ACCOUNT (account));
}
static void