The problem was that we were manipulating with the selection before the
WebKit Editor call (and we hit again problems with selections in
WebKit). So as a fix we reworked how the new line is inserted when the
enter is pressed on empty line in quoted content (and completely avoid
the WebKit Editor call there).
Namely "Use the same fonts as other applications", "Standard Font",
"Fixed Width Font", "Highlight quotations with color", "Automatically
insert emoticon images" and "Check spelling while I type". Also remove
unneded properties from EWebView.
We have to manually move the selection after the element with empty
line. Afterwards WebKit creates the new line in the quoted content
correctly, but it duplicates the node with empty line, so we have to
remove it.
Previously, the whole blockquote that was created after the newly
inserted line was wrapped and quoted. Now just the first block is
processed. Also rewrap the content as when enter was pressed in the
middle of the paragraph the line ends wouldn't match the character
count for word wrap.
The icons at the search bar, to search forward, backward and stop
searching were too large, which didn't look good. This makes them
smaller, though even here can be seen a little gap around
the images in the buttons which might not be there ideally.
The e_day_view_show_popup_menu() can be called with event_num = -1,
which is when the mouse doesn't hover above any event. The function
tooltip_get_view_event() claims a runtime warning in this case, thus
avoid it by properly testing the passed-in value.
It used focused or unfocused selected color, but the EDayView itself
is not focused at all, it's main_item->parent.canvas instead. Instead
of trying to hunt for this (and updates when the focused widget changes)
just use the same selected color unconditionally, just the way the other
views do it.
Save the end node that we are using to mark the end of the paragraph
into the right place to avoid the busy loop.
Use e_html_editor_selection_save/restore to avoid lose of selection.
Temporarily remove the HTML input event listener from the body element to avoid
unwanted modification of the clipboard content. In callback we are
selecting all the content in composer (badically Ctrl + A) that's
modifying the clipboard content.
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.
There are some cases that we want to avoid the call of the callback
(performance reasons and the avoidance of the unwanted modifications of
the composer content).