* Removed the message sending information banner here.
* Now we allocate the send queue handler only when we really
send the message.
* Removed notify end in send new mail cb, as this should be done
in send mail handlers. Added also to send mail operation
branch where we don't attach to the send queue.
* src/modest-ui-actions.c:
* Added mail sending information banner.
pmo-trunk-r3794
{
TnySendQueue *send_queue = NULL;
ModestMailOperationPrivate *priv;
{
TnySendQueue *send_queue = NULL;
ModestMailOperationPrivate *priv;
- SendMsgInfo *info = g_slice_new0 (SendMsgInfo);
g_return_if_fail (MODEST_IS_MAIL_OPERATION (self));
g_return_if_fail (TNY_IS_TRANSPORT_ACCOUNT (transport_account));
g_return_if_fail (MODEST_IS_MAIL_OPERATION (self));
g_return_if_fail (TNY_IS_TRANSPORT_ACCOUNT (transport_account));
MODEST_MAIL_OPERATION_ERROR_ITEM_NOT_FOUND,
"modest: could not find send queue for account\n");
priv->status = MODEST_MAIL_OPERATION_STATUS_FAILED;
MODEST_MAIL_OPERATION_ERROR_ITEM_NOT_FOUND,
"modest: could not find send queue for account\n");
priv->status = MODEST_MAIL_OPERATION_STATUS_FAILED;
+ modest_mail_operation_notify_end (self);
} else {
/* Add the msg to the queue */
} else {
/* Add the msg to the queue */
- priv->status = MODEST_MAIL_OPERATION_STATUS_SUCCESS;
- }
+ priv->status = MODEST_MAIL_OPERATION_STATUS_IN_PROGRESS;
- if (priv->status == MODEST_MAIL_OPERATION_STATUS_SUCCESS)
- modest_platform_information_banner (NULL, NULL, _("mcen_ib_outbox_waiting_to_be_sent"));
+ info = g_slice_new0 (SendMsgInfo);
- info->mail_op = g_object_ref (self);
- info->msg = g_object_ref (msg);
- info->msg_sent_handler = g_signal_connect (G_OBJECT (send_queue), "msg-sent",
- G_CALLBACK (send_mail_msg_sent_handler), info);
- info->error_happened_handler = g_signal_connect (G_OBJECT (send_queue), "error-happened",
- G_CALLBACK (send_mail_error_happened_handler), info);
+ info->mail_op = g_object_ref (self);
+ info->msg = g_object_ref (msg);
+ info->msg_sent_handler = g_signal_connect (G_OBJECT (send_queue), "msg-sent",
+ G_CALLBACK (send_mail_msg_sent_handler), info);
+ info->error_happened_handler = g_signal_connect (G_OBJECT (send_queue), "error-happened",
+ G_CALLBACK (send_mail_error_happened_handler), info);
+ }
if (info->transport_account)
g_object_unref (info->transport_account);
g_slice_free (SendNewMailInfo, info);
if (info->transport_account)
g_object_unref (info->transport_account);
g_slice_free (SendNewMailInfo, info);
- modest_mail_operation_notify_end (self);
data->attachments,
data->images,
data->priority_flags);
data->attachments,
data->images,
data->priority_flags);
+
+ if (modest_mail_operation_get_status (mail_operation) == MODEST_MAIL_OPERATION_STATUS_IN_PROGRESS)
+ modest_platform_information_banner (NULL, NULL, _("mcen_ib_outbox_waiting_to_be_sent"));
+
/* Free data: */
g_free (from);
/* Free data: */
g_free (from);