The G_TYPE_INSTANCE_GET_PRIVATE() macro is deprecated, which generates
a compiler warning since `glib_encoded_version` variable had been
set to the 2.66 version in the main CMakeLists.txt file.
This could be reproduced for example when forwarding an HTML message
and having Evolution set to format text in Plain Text. In such case
a "lose formatting" question is shown and when choosing to not lose
it, the content shows an HTML variant, but the format combo still
shows "Plain Text", which means the sent message will be plain text,
despite editing in HTML.
This allows to save JavaScript plugins, files with .js extension,
into `$PREFIX/share/evolution/webkit/preview-plugins/` or into
`~/.local/share/evolution/preview-plugins/` for the message preview
and into `$PREFIX/share/evolution/webkit/webkit-editor-plugins/` or
into `~/.local/share/evolution/webkit-editor-plugins/` for
the WebKit composer.
The plugin is an object, which contains two members:
* `name` - a string with a name of the plugin
* `setup(doc)` - a setup function
The argument of the `setup` function is a `document`, which can
be either the main document or an iframe document. The function
can be called multiple times for the same document.
The preview plugin registers itself by calling `Evo.RegisterPlugin(plugin_instance)`.
The WebKit editor plugin registers itself by calling `EvoEditor.RegisterPlugin(plugin_instance)`.
The parent class may not have defined a method, which EWebKitEditor
expects to have defined (and assigned), thus check for the existence
and call it only if it's set.
Related to https://bugs.webkit.org/show_bug.cgi?id=216828
Evolution used to force some minimum font size in the code, but it
was removed to be able to properly show <small>, <xsmall> and such
texts in the web views. Unfortunately, it also means that if the sender
keeps such small font it can be hard to read to the recipient, thus
let's add the option, thus the user can set it up to his/her needs.
Define DISABLE_WEBKIT_SANDBOX=1 environment variable before running
evolution to disable WebKitGTK sandbox usage. That would be usable
in cases when the sandbox refuses to run, which can happen and which
had been noticed on terminal with this output:
terminate called after throwing an instance of 'std::system_error'
what(): Operation not permitted
This showed when opening a message composer.
In case the search and the replace words are similar (like changing
capitals or such and searching case insensitively), the search can
repeat indefinitely for replace all. This makes the Replace-all
use only search from the top of the document to the bottom, without
wrap around, thus it'll stop at the end of the document on its own.
All the previews (in Mail, Contacts, Memos and Tasks) stop using
deprecated WebKitGTK+ DOM API through a WebExtension (and its D-Bus
API) and start using the JavaScriptCore API (and JavaScript as such).
This allows to lightweight the WebExtension for the EWebView
significantly, including drop of the D-Bus API of it, fully relying
on the Inter-Process-Communication of WebKitGTK+ itself.