* update for tinymail changes
[modest] / src / modest-mail-operation.c
index 9e1cec7..c902b66 100644 (file)
@@ -37,6 +37,7 @@
 #include <tny-folder-store-query.h>
 #include <tny-camel-stream.h>
 #include <tny-simple-list.h>
+#include <tny-send-queue.h>
 #include <camel/camel-stream-mem.h>
 #include <glib/gi18n.h>
 #include <modest-tny-account.h>
@@ -204,8 +205,6 @@ modest_mail_operation_send_mail (ModestMailOperation *self,
        
        g_return_if_fail (MODEST_IS_MAIL_OPERATION (self));
        g_return_if_fail (TNY_IS_TRANSPORT_ACCOUNT (transport_account));
-
-       g_message ("modest: send mail");
        
        send_queue = TNY_SEND_QUEUE (modest_runtime_get_send_queue (transport_account));
        if (!TNY_IS_SEND_QUEUE(send_queue))
@@ -314,9 +313,7 @@ create_reply_forward_mail (TnyMsg *msg, const gchar *from, gboolean is_reply, gu
        g_object_unref (G_OBJECT(body));
        
        /* Fill the header */
-       new_header = TNY_HEADER (tny_platform_factory_new_header
-                                (modest_runtime_get_platform_factory()));
-       tny_msg_set_header (new_msg, new_header);
+       new_header = tny_msg_get_header (new_msg);      
        tny_header_set_from (new_header, from);
        tny_header_set_replyto (new_header, from);
 
@@ -534,11 +531,16 @@ modest_mail_operation_update_account (ModestMailOperation *self,
 
        /* Get subscribed folders & refresh them */
        folders = TNY_LIST (tny_simple_list_new ());
-       query = tny_folder_store_query_new ();
-       tny_folder_store_query_add_item (query, NULL, TNY_FOLDER_STORE_QUERY_OPTION_SUBSCRIBED);
+       query = NULL; //tny_folder_store_query_new ();
+
+       /* FIXME: is this needed? */
+       tny_device_force_online (TNY_DEVICE(modest_runtime_get_device()));
+       
+       /* FIXME: let query be NULL: do it for all */ 
+       //tny_folder_store_query_add_item (query, NULL, TNY_FOLDER_STORE_QUERY_OPTION_SUBSCRIBED);
        tny_folder_store_get_folders_async (TNY_FOLDER_STORE (store_account),
                                            folders, update_folders_cb, query, self);
-       g_object_unref (query); /* FIXME */
+       //g_object_unref (query); /* FIXME */
        
        return TRUE;
 }