From 238ae1b0834f8400cfdbc99c139c245f4d8e9009 Mon Sep 17 00:00:00 2001 From: Sergio Villar Senin Date: Fri, 5 Jun 2009 12:04:39 +0200 Subject: [PATCH] Fixes NB#120943, remote folders not shown in "New folder" dialog when a local folder is selected as parent --- src/hildon2/modest-platform.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/src/hildon2/modest-platform.c b/src/hildon2/modest-platform.c index c9364d7..41e5381 100644 --- a/src/hildon2/modest-platform.c +++ b/src/hildon2/modest-platform.c @@ -710,11 +710,10 @@ folder_chooser_dialog_run (ModestFolderView *original, MODEST_FOLDER_VIEW (folder_view)); if (TNY_IS_ACCOUNT (current)) { - /* If the current account is the local folders account - then it's because we're creating a new folder from - folders view (we force the local account to be the - default location for new folders */ - if (modest_tny_account_is_virtual_local_folders (TNY_ACCOUNT (current))) + /* Local folders and MMC account are always shown + along with the currently visible server account */ + if (modest_tny_account_is_virtual_local_folders (TNY_ACCOUNT (current)) || + modest_tny_account_is_memory_card_account (TNY_ACCOUNT (current))) visible_id = g_strdup (modest_folder_view_get_account_id_of_visible_server_account (MODEST_FOLDER_VIEW (original))); else @@ -723,7 +722,13 @@ folder_chooser_dialog_run (ModestFolderView *original, TnyAccount *account; account = tny_folder_get_account (TNY_FOLDER (current)); if (account) { - visible_id = g_strdup (tny_account_get_id (account)); + if (modest_tny_account_is_virtual_local_folders (TNY_ACCOUNT (account)) || + modest_tny_account_is_memory_card_account (TNY_ACCOUNT (account))) { + visible_id = + g_strdup (modest_folder_view_get_account_id_of_visible_server_account (MODEST_FOLDER_VIEW (original))); + } else { + visible_id = g_strdup (tny_account_get_id (account)); + } g_object_unref (account); } } else { -- 1.7.9.5