| Summary: | Context menu on e-mail address should offer "Copy e-mail address" | ||
|---|---|---|---|
| Product: | [Applications] trojita | Reporter: | Robert Kratky <kratky> |
| Component: | Desktop GUI | Assignee: | Trojita default assignee <trojita-bugs> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | pali.rohar |
| Priority: | NOR | ||
| Version First Reported In: | unspecified | ||
| Target Milestone: | --- | ||
| Platform: | Other | ||
| OS: | Linux | ||
| Latest Commit: | https://commits.kde.org/trojita/434f677d4909e751ef59d2c8b5e2899b05eae022 | Version Fixed/Implemented In: | |
| Sentry Crash Report: | |||
|
Description
Robert Kratky
2017-01-09 18:34:16 UTC
(In reply to Robert Kratky from comment #0) > mailto:joe@example.com?X-Trojita-DisplayName=Joe Now when I see this link, it should be changed to "mailto:?To=Joe%20%3Cjoe@example.com%3E" as X-Trojita-DisplayName means to create new email with header X-Trojita-DisplayName -- which is incorrect. (In reply to Pali Rohár from comment #1) > Now when I see this link, it should be changed to > "mailto:?To=Joe%20%3Cjoe@example.com%3E" as X-Trojita-DisplayName means to > create new email with header X-Trojita-DisplayName -- which is incorrect. These links should never leave Trojita, so it's up to us to construct them in whatever way we like. Robert is right in that this particular item should be changed to only copy the raw e-mail address. (In reply to Jan Kundrát from comment #2) > (In reply to Pali Rohár from comment #1) > > Now when I see this link, it should be changed to > > "mailto:?To=Joe%20%3Cjoe@example.com%3E" as X-Trojita-DisplayName means to > > create new email with header X-Trojita-DisplayName -- which is incorrect. > > These links should never leave Trojita, so it's up to us to construct them > in whatever way we like. Yes. But now when Trojita supports mailto uris correctly, there is no need to use custom mailto headers which indicate display name and standard mailto: way can be used... A series of patches which implement this is available at https://gerrit.vesnicky.cesnet.cz/r/#/q/status:open+project:trojita+branch:master+topic:mailto-bug-374830 . Feedback is welcome And so are patches which deprecate our X-Trojita-DisplayName, Pali :). Git commit d42deaec263c1a0cd00d0391f0b75b48c3471b0d by Jan Kundrát. Committed on 05/02/2017 at 14:37. Pushed by gerrit into branch 'master'. GUI: Extracting e-mail addresses from a message body Right now, we delegate link copying to WebKit, which means that it will use URLs like "mailto:foo@example.org". That is suboptimal from the user's point of view; they typically just "want to have that e-mail address". This patch ensures that we do this fancy thing when the URL is really a simple one -- pointing to exactly one recipient. As a fallback option, all other cases are handled by the existing code which just copies the URL as-is. Please note that this does not fix the issue that the linked bugreport complained about -- the header widget with e-mail addresses is a QLabel, so we will have to do a slightly different dance for that. Change-Id: I930f4eecd291af643c736701849d4c92fc8fc43d M +18 -3 src/Gui/SimplePartWidget.cpp M +1 -0 src/Gui/SimplePartWidget.h https://commits.kde.org/trojita/d42deaec263c1a0cd00d0391f0b75b48c3471b0d Git commit 434f677d4909e751ef59d2c8b5e2899b05eae022 by Jan Kundrát. Committed on 06/02/2017 at 11:29. Pushed by gerrit into branch 'master'. GUI: Clipboard copying of e-mail addresses from the header view Previously, the context menu offered some options for accessing the QLabel (this class is actually just a pretty QLabel)'s text, for selecting all of it, and copying stuff. The most important, IMHO, is to have access to the actual e-mail address (as requested by the associated bugreport), and to the human readable text for the sake of completeness. The code is still a tad inconsistent because the List-Post header for indicating an active mailing list does not currently use the OneEnvelopeAddress class. Mailing list addresses will therefore remain unaffected by this patch; their copy action is still going to copy a complete mailto: URL. Change-Id: I4e515045d0241e4c1064389aa777f58e72c7c999 M +26 -2 src/Gui/OneEnvelopeAddress.cpp M +2 -0 src/Gui/OneEnvelopeAddress.h https://commits.kde.org/trojita/434f677d4909e751ef59d2c8b5e2899b05eae022 |