From: Jose Dapena Paz Date: Thu, 2 Aug 2007 06:41:08 +0000 (+0000) Subject: * src/modest-ui-actions.c: X-Git-Tag: git_migration_finished~2654 X-Git-Url: http://git.maemo.org/git/?p=modest;a=commitdiff_plain;h=8376cf7ef539a483f17fc1e4d88a5ac91acaa24a * src/modest-ui-actions.c: * (modest_ui_actions_xfer_messages_from_move_to): now we show an information banner on trying to move messages to a pop folder as this is not allowed (fixes NB#63285). pmo-trunk-r2904 --- diff --git a/src/modest-ui-actions.c b/src/modest-ui-actions.c index 163c146..e0cb74f 100644 --- a/src/modest-ui-actions.c +++ b/src/modest-ui-actions.c @@ -3659,6 +3659,9 @@ modest_ui_actions_xfer_messages_from_move_to (TnyFolderStore *dst_folder, { TnyList *headers = NULL; gint response = 0; + TnyAccount *dst_account = NULL; + const gchar *proto_str = NULL; + gboolean dst_is_pop = FALSE; if (!TNY_IS_FOLDER (dst_folder)) { modest_platform_information_banner (GTK_WIDGET (win), @@ -3667,9 +3670,25 @@ modest_ui_actions_xfer_messages_from_move_to (TnyFolderStore *dst_folder, return; } + dst_account = tny_folder_get_account (TNY_FOLDER (dst_folder)); + proto_str = tny_account_get_proto (dst_account); + dst_is_pop = (modest_protocol_info_get_transport_store_protocol (proto_str) == + MODEST_PROTOCOL_STORE_POP); + g_object_unref (dst_account); + /* Get selected headers */ headers = get_selected_headers (MODEST_WINDOW (win)); + if (dst_is_pop) { + modest_platform_information_banner (GTK_WIDGET (win), + NULL, + ngettext("mail_in_ui_folder_move_target_error", + "mail_in_ui_folder_move_targets_error", + tny_list_get_length (headers))); + g_object_unref (headers); + return; + } + /* Ask for user confirmation */ response = msgs_move_to_confirmation (GTK_WINDOW (win), TNY_FOLDER (dst_folder),