improve mailto uri handling and support webk2gtk 4.0 and 4.1 #748
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
fixes #608, fixes #744
closes #745
I would be happy about comments on the mailto handling, which is described below.
mailto uri handling
@larskotthoff How do your problems trying to fix #608 relate to the approach taken here?
This introduces consistent mailto uri handling, supporting passing a body and all headers that can be given as agruments to EditMessage, namely, To, From, Cc, Bcc and Subject. Other headers are not dropped but prepended to the email body with a note.
Positional (i.e., non-option) commandline arguments are now interpreted as
--mailto
options.Multiple
--mailto
options on the commandline are now supported, and are merged into one mailto argument before being passed to EditMessage.A consequence is that libsoup is not used any more, enabling compatibility with webkit2gtk-4.1 while maintaining compatibility with gio (glib) 2.16, and thus building on older and current distros. Whereas supporting old distros is not necessary, it comes at very low cost: The only feature of newer gio that is used in Use GUri instead of libsoup-2.4 and use webkit2gtk-4.1 #745 is the extraction of the path (To:) part and the query from the uri. But this is simply removing the scheme (
mailto:
) and splitting at?
.webkit2gtk 4.0 and 4.1
This is from 7ac8805 by @oreo639, but only the part that is necessary after 4c76a4c.
Version 4.1 is used by default. If this is unavailable, 4.0 is the fallback.