From: Sergio Villar Senin Date: Thu, 11 Jun 2009 09:14:44 +0000 (+0200) Subject: Fixes NB#121968, unable to move local folder to GMail root folder X-Git-Tag: 3.0.17-rc13~12 X-Git-Url: http://git.maemo.org/git/?p=modest;a=commitdiff_plain;h=57fb485a6a6b019a9eb4ea4f8bc465dd4fdbfc47 Fixes NB#121968, unable to move local folder to GMail root folder --- diff --git a/src/hildon2/modest-platform.c b/src/hildon2/modest-platform.c index 7a451b5..e47bf1f 100644 --- a/src/hildon2/modest-platform.c +++ b/src/hildon2/modest-platform.c @@ -2949,7 +2949,14 @@ on_move_to_dialog_action_clicked (GtkButton *selection, selected = modest_folder_view_get_selected (MODEST_FOLDER_VIEW (folder_view)); if (selected) { - gtk_dialog_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK); + /* It's not possible to select root folders as + targets unless they're the local account or + the memory card account */ + if ((TNY_IS_FOLDER (selected) && !TNY_IS_MERGE_FOLDER (selected)) || + (TNY_IS_ACCOUNT (selected) && + (modest_tny_account_is_virtual_local_folders (TNY_ACCOUNT (selected)) || + modest_tny_account_is_memory_card_account (TNY_ACCOUNT (selected))))) + gtk_dialog_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK); g_object_unref (selected); } }