From: Jose Dapena Paz Date: Mon, 28 Apr 2008 08:41:57 +0000 (+0000) Subject: * src/modest-mail-operation.[ch]: X-Git-Tag: git_migration_finished~1409 X-Git-Url: http://git.maemo.org/git/?p=modest;a=commitdiff_plain;h=d68cbedf16d65a87c290ecee24bb18fe9a1eb359 * src/modest-mail-operation.[ch]: * Now modest_mail_operation_get_msg gets a boolean parameter to enable/disable progress bar status feedback. * src/modest-ui-actions.c: * On opening a message for removing attachments, don't show progress bar (fixes NB#83892). * Adapt to modest_mail_operation_get_msg to new API. * src/maemo/modest-msg-view-window.c: * Adapt to modest_mail_operation_get_msg to new API. pmo-trunk-r4485 --- diff --git a/src/maemo/modest-msg-view-window.c b/src/maemo/modest-msg-view-window.c index 9e3bcc8..bbd215d 100644 --- a/src/maemo/modest-msg-view-window.c +++ b/src/maemo/modest-msg-view-window.c @@ -1646,7 +1646,7 @@ message_reader_performer (gboolean canceled, NULL, NULL); modest_mail_operation_queue_add (modest_runtime_get_mail_operation_queue (), mail_op); - modest_mail_operation_get_msg (mail_op, info->header, view_msg_cb, info->row_reference); + modest_mail_operation_get_msg (mail_op, info->header, TRUE, view_msg_cb, info->row_reference); g_object_unref (mail_op); /* Update dimming rules */ diff --git a/src/modest-mail-operation.c b/src/modest-mail-operation.c index 3f0f98a..ffa5c29 100644 --- a/src/modest-mail-operation.c +++ b/src/modest-mail-operation.c @@ -2200,6 +2200,7 @@ modest_mail_operation_rename_folder (ModestMailOperation *self, void modest_mail_operation_get_msg (ModestMailOperation *self, TnyHeader *header, + gboolean progress_feedback, GetMsgAsyncUserCallback user_callback, gpointer user_data) { @@ -2221,10 +2222,14 @@ modest_mail_operation_get_msg (ModestMailOperation *self, priv->account = modest_tny_folder_get_account (TNY_FOLDER(folder)); /* Check for cached messages */ - if (tny_header_get_flags (header) & TNY_HEADER_FLAG_CACHED) - priv->op_type = MODEST_MAIL_OPERATION_TYPE_OPEN; - else - priv->op_type = MODEST_MAIL_OPERATION_TYPE_RECEIVE; + if (progress_feedback) { + if (tny_header_get_flags (header) & TNY_HEADER_FLAG_CACHED) + priv->op_type = MODEST_MAIL_OPERATION_TYPE_OPEN; + else + priv->op_type = MODEST_MAIL_OPERATION_TYPE_RECEIVE; + } else { + priv->op_type = MODEST_MAIL_OPERATION_TYPE_UNKNOWN; + } /* Create the helper */ helper = g_slice_new0 (GetMsgInfo); diff --git a/src/modest-mail-operation.h b/src/modest-mail-operation.h index 1e44cf5..7c43ac0 100644 --- a/src/modest-mail-operation.h +++ b/src/modest-mail-operation.h @@ -592,6 +592,7 @@ void modest_mail_operation_remove_msgs (ModestMailOperation *self, * modest_mail_operation_get_msg: * @self: a #ModestMailOperation * @header_list: the #TnyHeader of the message to get + * @progress_feedback: a #gboolean. If %TRUE, we'll get progress bar feedback. * @user_callback: a #GetMsgAsyncUserCallback function to call after tinymail callback execution. * @user_data: generic user data which will be passed to @user_callback function. * @@ -600,7 +601,8 @@ void modest_mail_operation_remove_msgs (ModestMailOperation *self, * #ModestMailOperation should be added to #ModestMailOperationQueue **/ void modest_mail_operation_get_msg (ModestMailOperation *self, - TnyHeader *header, + TnyHeader *header, + gboolean progress_feedback, GetMsgAsyncUserCallback user_callback, gpointer user_data); /** diff --git a/src/modest-ui-actions.c b/src/modest-ui-actions.c index 9e8cd82..a5eb995 100644 --- a/src/modest-ui-actions.c +++ b/src/modest-ui-actions.c @@ -1702,6 +1702,7 @@ reply_forward (ReplyForwardAction action, ModestWindow *win) modest_mail_operation_get_msg (mail_op, header, + TRUE, reply_forward_cb, rf_helper); /* Clean */ @@ -4863,7 +4864,7 @@ modest_ui_actions_on_main_window_remove_attachments (GtkAction *action, modest_ui_actions_disk_operations_error_handler, NULL, NULL); modest_mail_operation_queue_add (modest_runtime_get_mail_operation_queue (), mail_op); - modest_mail_operation_get_msg (mail_op, header, open_msg_for_purge_cb, win); + modest_mail_operation_get_msg (mail_op, header, FALSE, open_msg_for_purge_cb, win); g_object_unref (mail_op); }