X-Git-Url: http://git.maemo.org/git/?a=blobdiff_plain;f=src%2Fgnome%2Fmodest-platform.c;h=52f69eae83a3865478c263d773b3c5b79ecde7a0;hb=beae686e790fa6f231fbfeee19795330f0443a3a;hp=ba6a5367b1844eaf8712c7a777186f68baebcab7;hpb=6d59df29bb4fc60a58c172c029dfbb3db3a2f580;p=modest diff --git a/src/gnome/modest-platform.c b/src/gnome/modest-platform.c index ba6a536..52f69ea 100644 --- a/src/gnome/modest-platform.c +++ b/src/gnome/modest-platform.c @@ -276,17 +276,21 @@ modest_platform_connect_if_remote_and_perform (GtkWindow *parent_window, gpointer user_data) { TnyAccount *account = NULL; - - if (!folder_store) { + + if (!folder_store || + (TNY_IS_MERGE_FOLDER (folder_store) && + (tny_folder_get_folder_type (TNY_FOLDER(folder_store)) == TNY_FOLDER_TYPE_OUTBOX))) { + /* We promise to instantly perform the callback, so ... */ if (callback) { - callback (FALSE, NULL, parent_window, NULL, user_data); - } - return; - - /* Original comment: Maybe it is something local. */ - /* PVH's comment: maybe we should KNOW this in stead of assuming? */ - + GError *error = NULL; + g_set_error (&error, TNY_ERROR_DOMAIN, TNY_SERVICE_ERROR_UNKNOWN, + "Unable to move or not found folder"); + callback (FALSE, error, parent_window, NULL, user_data); + g_error_free (error); + } + return; + } else if (TNY_IS_FOLDER (folder_store)) { /* Get the folder's parent account: */ account = tny_folder_get_account(TNY_FOLDER (folder_store)); @@ -298,7 +302,7 @@ modest_platform_connect_if_remote_and_perform (GtkWindow *parent_window, if (tny_account_get_account_type (account) == TNY_ACCOUNT_TYPE_STORE) { if (!TNY_IS_CAMEL_POP_STORE_ACCOUNT (account) && !TNY_IS_CAMEL_IMAP_STORE_ACCOUNT (account)) { - + /* This IS a local account like a maildir account, which does not require * a connection. (original comment had a vague assumption in its language * usage. There's no assuming needed, this IS what it IS: a local account), */