Follow-up fix that fixes the leak of two strings introduced with
previous fix to this bug. Also unref all the used objects from various
lists that WebKit returns after they are used.
This fixes the following bugs:
- DnD inside the view was still copying things not moving them
- Prevent WebKit to insert the URI inside the view when DnD'ing some
file inside the view
- DnD'ed inline image was inserted on the caret position and not on the
position we dropped it.
Also unset internal flag to 'set_signature_from_message', to make sure
that the user's changes in the signature combo will be reflected from
the beginning, not for the second and more tries.
Just to make sure that all data had been written, while the later
can finish successfully without actually write all the data it was
requested to write.
The thing is that when we were sending the message through Outbox
Evolution generates one message that is used for sending and another one
for saving to Outbox. But while creating the first message the images
inside the view are processed to cid images, so for the second message
they were not there. To avoid that we will restore the images in the
view right after we get the HTML version of view's content.
Remove the unwanted block with initial caret position (above
credentials) when the 'Start typing at the bottom on replying' is not
selected. Leave it there just when the 'Keep signature above the
original message on replying' option is set.
A simple Evolution run and move between all views means creation of
more than 100 GSettings objects, with only a bit more than 10 schemas.
Reusing the objects should have a positive impact on a performance too.
Don't insert the unnecessary new line into the body and always move the
caret to the beginning the of body. Also rename the is_from_draft
variable in composer to is_message_from_draft.
Add a special header to the newly created message from the selection
text and later mark the flag in EHTMLEditorView to avoid showing the
dialog for loosing the formatting. Do something similar for messages
from drafts to avoid searching for string inside the message's source.
When saving the draft don't lose the active selection in the web view.
Also restore the selection when the draft is again opened. Also fix the
situations when the spell check was not activated when the composer was
opened.
We have to treat the pasting into the normal and the quoted
content separately. We have to also correctly process the new lines on
the beginning/end of the pasted content to avoid their lose.
Code paths for HTML content and plain text content are different. When
we will try to load plain text content as a HTML content we will lose
the new line characters. In the opposite case when HTML content is load
as a plain text at least the whole structure is lost.