This commit implements a new handling of image attachments. We follow
the standard of mime, adding the image attachment in a multipart/related
with the body. These together form the complete body of the message.
This fixes NB#64463.
* src/widgets/modest-msg-edit-window.h:
* Add attribute images to the MsgData.
* src/widgets/modest-attachments-view.c:
* We only add attachments from message if it's not a
multipart/related (as they would be attached images and they
shouldn't be represented in attachments view).
* src/modest-tny-msg.[ch]:
* (modest_formatter_create_message): now it accepts a new
parameter "has_images", to create the proper structure of
image attachments (including the multipart/related).
* /modest_tny_msg_new_html_plain): now it receives also a
list of image mime parts. It adds them properly to the
message using the new add_images() method.
* (add_attachment). Now it allows adding attachments as children
of an arbitrary part. This is required to add image
attachments to multipart/related. It also accepts a new
parameter "add_inline" to set the disposition as attachment or
inline depending on the parameter used.
* (add_images): this new method searches the multipart/related
mime part, and adds a list of image mime parts to it.
* src/modest-ui-actions.c:
* Add images parameter to save to drafts and send new mail
actions.
* src/maemo/modest-msg-edit-window.c:
* Now we maintain an internal list of images in body buffer,
separated from the list of attachments.
* (replace_with_attachments): renamed to replace_with_images
as it's intended to replace image replacers with attached
images in priv->images list.
* New method (get_related_images): searches the
multipart/related mime part, and obtains all the image
children it has. Then it adds the images to the priv->images
list.
* Now last_cid is updated using the images and attachments list.
* (modest_msg_edit_window_get_msg_data): now we also obtain the
list of images attached (unless a image is in priv->image and
not refernced in the buffer).
* src/modest-formatter.[ch]:
* Added internal method find_body_parent (), to refactor the
work to find the part where body should be attached to.
* (modest_formatter_create_message): now it takes into account
the new attribute has_images to create the proper mime part
multipart/related.
* src/modest-mail-operation.[ch]:
* (modest_mail_operation_create_message): now we pass the images
list to the lower layers.
pmo-trunk-r3438