* Migrated to the new tinymail API
authorSergio Villar Senin <svillar@igalia.com>
Fri, 10 Oct 2008 17:39:14 +0000 (17:39 +0000)
committerSergio Villar Senin <svillar@igalia.com>
Fri, 10 Oct 2008 17:39:14 +0000 (17:39 +0000)
pmo-trunk-r6008

src/dbus_api/modest-dbus-callbacks.c
src/modest-mail-operation.c
src/modest-search.c
src/modest-tny-account-store.c
src/modest-tny-account.c
src/modest-tny-folder.c
src/modest-tny-local-folders-account.c

index 6e1f505..ee7d3bd 100644 (file)
@@ -1657,6 +1657,7 @@ add_folders_to_list (TnyFolderStore *folder_store, GList** list)
        tny_folder_store_get_folders (folder_store,
                                      all_folders,
                                      NULL /* query */,
+                                     FALSE,
                                      NULL /* error */);
 
        TnyIterator *iter = tny_list_create_iterator (all_folders);
index 8707d0e..79a3d7e 100644 (file)
@@ -1657,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);
@@ -1808,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);
index 6146a8b..841fa52 100644 (file)
@@ -612,7 +612,7 @@ modest_search_account_get_folders_cb (TnyFolderStore *self,
                        TnyList *children = tny_simple_list_new ();
                        helper->pending_calls++;
                        tny_folder_store_get_folders_async (TNY_FOLDER_STORE (folder), children, NULL, 
-                                                           modest_search_account_get_folders_cb, 
+                                                           FALSE, modest_search_account_get_folders_cb, 
                                                            NULL, helper);
                }
 
@@ -654,7 +654,7 @@ _search_account (TnyAccount *account,
 
        /* Get folders */
        tny_folder_store_get_folders_async (TNY_FOLDER_STORE (account), folders, NULL, 
-                                           modest_search_account_get_folders_cb, 
+                                           FALSE, modest_search_account_get_folders_cb, 
                                            NULL, helper);
 }
 
index f1b221e..5ed3484 100644 (file)
@@ -1650,7 +1650,7 @@ add_outbox_from_transport_account_to_global_outbox (ModestTnyAccountStore *self,
        info = g_slice_new0 (AddOutboxInfo);
        info->account_store = self;
        info->transport_account = g_object_ref (transport_account);
-       tny_folder_store_get_folders_async (TNY_FOLDER_STORE (account_outbox), folders, NULL, 
+       tny_folder_store_get_folders_async (TNY_FOLDER_STORE (account_outbox), folders, NULL, FALSE, 
                                            add_outbox_from_transport_account_to_global_outbox_get_folders_cb, NULL, (gpointer) info);
        g_object_unref (account_outbox);
 }
@@ -2068,7 +2068,7 @@ modest_tny_account_store_find_msg_in_outboxes (ModestTnyAccountStore *self,
                TnyAccount *account = TNY_ACCOUNT (tny_iterator_get_current (acc_iter));
                TnyIterator *folders_iter = NULL;
 
-               tny_folder_store_get_folders (TNY_FOLDER_STORE (account), folders, NULL, NULL);
+               tny_folder_store_get_folders (TNY_FOLDER_STORE (account), folders, NULL, FALSE, NULL);
                folders_iter = tny_list_create_iterator (folders);
 
                while (msg == NULL && !tny_iterator_is_done (folders_iter)) {
index 63e87ec..ab7149e 100644 (file)
@@ -117,7 +117,7 @@ modest_tny_account_get_special_folder (TnyAccount *account,
        /* There is no need to do this _async, as these are local folders. */
        /* TODO: However, this seems to fail sometimes when the network is busy, 
         * returning an empty list. murrayc. */ 
-       tny_folder_store_get_folders (TNY_FOLDER_STORE (local_account), folders, NULL, &error);
+       tny_folder_store_get_folders (TNY_FOLDER_STORE (local_account), folders, NULL, FALSE, &error);
        if (error) {
                g_warning ("%s: tny_folder_store_get_folders() failed:%s\n", __FUNCTION__, error->message);
                g_error_free (error);
@@ -903,7 +903,7 @@ recurse_folders_async_cb (TnyFolderStore *folder_store,
                if (!TNY_IS_MERGE_FOLDER (folder) && 
                    (TNY_IS_FOLDER (folder) && 
                     tny_folder_get_folder_type (TNY_FOLDER (folder)) != TNY_FOLDER_TYPE_OUTBOX))
-                       tny_folder_store_get_folders_async (folder, folders, NULL,
+                       tny_folder_store_get_folders_async (folder, folders, NULL, FALSE,
                                                            recurse_folders_async_cb, 
                                                            NULL, helper);
                g_object_unref (folders);
@@ -953,7 +953,7 @@ modest_tny_folder_store_get_folder_stats (TnyFolderStore *self,
 
        folders = tny_simple_list_new ();
        tny_folder_store_get_folders_async (TNY_FOLDER_STORE (self),
-                                           folders, NULL,
+                                           folders, NULL, FALSE,
                                            recurse_folders_async_cb, 
                                            NULL, helper);
        g_object_unref (folders);
index 57e865a..87f6921 100644 (file)
@@ -418,7 +418,7 @@ modest_tny_folder_has_subfolder_with_name (TnyFolderStore *parent,
        
        /* Get direct subfolders */
        subfolders = tny_simple_list_new ();
-       tny_folder_store_get_folders (parent, subfolders, NULL, &err);
+       tny_folder_store_get_folders (parent, subfolders, NULL, FALSE, &err);
 
        /* Check names */
        iter = tny_list_create_iterator (subfolders);
index e16597e..d9e6c2a 100644 (file)
@@ -57,7 +57,8 @@ struct _ModestTnyLocalFoldersAccountPrivate
 
 static void         get_folders    (TnyFolderStore *self, 
                                    TnyList *list, 
-                                   TnyFolderStoreQuery *query, 
+                                   TnyFolderStoreQuery *query,
+                                   gboolean refresh, 
                                    GError **err);
 
 static TnyFolder*   create_folder  (TnyFolderStore *self, 
@@ -154,14 +155,18 @@ modest_tny_local_folders_account_query_passes (TnyFolderStoreQuery *query, TnyFo
 }
 
 static void
-get_folders (TnyFolderStore *self, TnyList *list, TnyFolderStoreQuery *query, GError **err)
+get_folders (TnyFolderStore *self, 
+            TnyList *list, 
+            TnyFolderStoreQuery *query, 
+            gboolean refresh, 
+            GError **err)
 {
        TnyCamelStoreAccountClass *parent_class;
        ModestTnyLocalFoldersAccountPrivate *priv;
 
        /* Call the base class implementation: */
        parent_class = g_type_class_peek_parent (MODEST_TNY_LOCAL_FOLDERS_ACCOUNT_GET_CLASS (self));
-       parent_class->get_folders (self, list, query, err);
+       parent_class->get_folders (self, list, query, refresh, err);
        
        /* Add our extra folder only if it passes the query */
        priv = TNY_LOCAL_FOLDERS_ACCOUNT_GET_PRIVATE (self);