* Migrated to the new tinymail API
[modest] / src / modest-mail-operation.c
index e84c8d9..79a3d7e 100644 (file)
@@ -1289,10 +1289,17 @@ static void
 update_account_send_mail (UpdateAccountInfo *info)
 {
        TnyTransportAccount *transport_account = NULL;
+       ModestTnyAccountStore *account_store;
+
+       account_store = modest_runtime_get_account_store ();
+
+       /* We don't try to send messages while sending mails is blocked */
+       if (modest_tny_account_store_is_send_mail_blocked (account_store))
+               return;
 
        /* Get the transport account */
        transport_account = (TnyTransportAccount *)
-               modest_tny_account_store_get_transport_account_for_open_connection (modest_runtime_get_account_store(),
+               modest_tny_account_store_get_transport_account_for_open_connection (account_store,
                                                                                    info->account_name);
 
        if (transport_account) {
@@ -1650,7 +1657,7 @@ recurse_folders_async_cb (TnyFolderStore *folder_store,
                                /* Add pending call */
                                info->pending_calls++;
                                
-                               tny_folder_store_get_folders_async (folder, folders, NULL,
+                               tny_folder_store_get_folders_async (folder, folders, NULL, FALSE,
                                                                    recurse_folders_async_cb, 
                                                                    NULL, info);
                                g_object_unref (folders);
@@ -1801,7 +1808,7 @@ modest_mail_operation_update_account (ModestMailOperation *self,
        /* Get all folders and continue in the callback */ 
        folders = tny_simple_list_new ();
        tny_folder_store_get_folders_async (TNY_FOLDER_STORE (priv->account),
-                                           folders, NULL,
+                                           folders, NULL, FALSE,
                                            recurse_folders_async_cb, 
                                            NULL, info);
        g_object_unref (folders);