X-Git-Url: http://git.maemo.org/git/?a=blobdiff_plain;f=src%2Fmodest-search.c;h=477638f4c79239ca73268b83e3fb12dac7b25d64;hb=df58ac68d388fbf2e8b9b6185a486bdf140b6642;hp=6e624d357e06fceaf990f0744b309167240f6da8;hpb=7691addfd0661f493672b2fab5274ca28612707d;p=modest diff --git a/src/modest-search.c b/src/modest-search.c index 6e624d3..477638f 100644 --- a/src/modest-search.c +++ b/src/modest-search.c @@ -43,6 +43,8 @@ #include #include #include +#include +#include #include @@ -52,6 +54,7 @@ #include "modest-tny-account.h" #include "modest-search.h" #include "modest-runtime.h" +#include "modest-platform.h" static gchar * g_strdup_or_null (const gchar *str) @@ -65,7 +68,6 @@ g_strdup_or_null (const gchar *str) return string; } - static GList* add_hit (GList *list, TnyHeader *header, TnyFolder *folder) { @@ -588,6 +590,13 @@ modest_search_all_accounts (ModestSearch *search) if (account) { /* g_debug ("DEBUG: %s: Searching account %s", __FUNCTION__, tny_account_get_name (account)); */ + + /* Give the account time to go online if necessary, + * for instance if this is immediately after startup, + * after D-Bus activation: */ + modest_platform_check_and_wait_for_account_is_online (account); + + /* Search: */ res = modest_search_account (account, search); if (res != NULL) {