From d73789ffb936127d7e0b2ddfb7bc60683df683c5 Mon Sep 17 00:00:00 2001 From: Jose Dapena Paz Date: Tue, 28 Oct 2008 17:19:40 +0000 Subject: [PATCH] Committed again the trunk commit 6008, as tinymail has again integrated the new get_folders api. pmo-trunk-r6178 --- src/dbus_api/modest-dbus-callbacks.c | 1 + src/modest-mail-operation.c | 4 ++-- src/modest-search.c | 4 ++-- src/modest-tny-account-store.c | 4 ++-- src/modest-tny-account.c | 6 +++--- src/modest-tny-folder.c | 2 +- src/modest-tny-local-folders-account.c | 11 ++++++++--- 7 files changed, 19 insertions(+), 13 deletions(-) diff --git a/src/dbus_api/modest-dbus-callbacks.c b/src/dbus_api/modest-dbus-callbacks.c index 9832c3c..0289eb6 100644 --- a/src/dbus_api/modest-dbus-callbacks.c +++ b/src/dbus_api/modest-dbus-callbacks.c @@ -1673,6 +1673,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); diff --git a/src/modest-mail-operation.c b/src/modest-mail-operation.c index 8707d0e..79a3d7e 100644 --- a/src/modest-mail-operation.c +++ b/src/modest-mail-operation.c @@ -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); diff --git a/src/modest-search.c b/src/modest-search.c index 6146a8b..841fa52 100644 --- a/src/modest-search.c +++ b/src/modest-search.c @@ -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); } diff --git a/src/modest-tny-account-store.c b/src/modest-tny-account-store.c index f1b221e..5ed3484 100644 --- a/src/modest-tny-account-store.c +++ b/src/modest-tny-account-store.c @@ -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)) { diff --git a/src/modest-tny-account.c b/src/modest-tny-account.c index 63e87ec..ab7149e 100644 --- a/src/modest-tny-account.c +++ b/src/modest-tny-account.c @@ -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); diff --git a/src/modest-tny-folder.c b/src/modest-tny-folder.c index 57e865a..87f6921 100644 --- a/src/modest-tny-folder.c +++ b/src/modest-tny-folder.c @@ -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); diff --git a/src/modest-tny-local-folders-account.c b/src/modest-tny-local-folders-account.c index e16597e..d9e6c2a 100644 --- a/src/modest-tny-local-folders-account.c +++ b/src/modest-tny-local-folders-account.c @@ -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); -- 1.7.9.5