On 10/06/12 00:03, Thomas Lübking wrote:
Please state whether this is for technical (strict MVC) or visual reasons. In the latter case, it's also possible to have the splitter appear like a giant itemview (with separate scrollers and custom headers) - no problem.
Fair enough. I prefer the MVC approach. The most important argument IMHO is that there will be many places where "a tree of all folders from multiple accounts" should be used. It might be easier to do this without MVC in this particular case, but having a proper model will save time later on (and it's also the raison d'être for introducing MVC in the first place).
Examples of where the unified model will be used: - this view - popup menu for copying/moving messages without drag-and-drop - a future dialog for managing folder subscriptions - settings: the "sent folder"
In the meantime, let's test trojitás attachement abilities. Attached are two small patches to a) markup plain text messages (*bold*, /italic/, _underline_ and http://url a href support) b) replytext extension (marks the quote by "> " and prepends a header)
Ah, this is a great feature, thanks for doing this. I've always wanted to introduce full support for format=flowed [1], and this is closely related.
I've applied these two patches to try them and these are the issues which I was able to identify when "replying" to your message:
- *bold*, /italic/ and _underline_ formatting is lost when replying (they appear as "bold, italic and underline" in the response, without any extra formatting) - TB renders them as "<b>*bold*</b>" (ie. including the star, underscore or a slash) while Trojita shows them as "<b>bold</b>". I like TB's way more. - the "On Freitag, 5. Oktober 2012 00:39:26 CEST Jan Kundrát wrote:" is not quoted in the response - there's an extra newline between the added "on ..., ... wrote" and the quoted message
I haven't tested replying to HTML e-mails. What I would like to have in the end is a full-blown formatter which renders HTML mails with <blockquote>-style citations in the same manner as the old-school plaintext stuff, supports some fancy features like interactive collapsing of big quotations by mouse clicks etc etc -- but that's for future and not a blocker. I haven't spent much time thinking about this, but I think that always transforming the text/plain input data into HTML (including the <blockquote> stuff with appropriate styling) is the way to go. It's going to be tricky as it will likely require QWebView::selectedHtml() which got introduced in Qt 4.8, and a fallback for earlier Qt versions, and will also involve a lot of HTML parsing. Handling of the format=flowed will also likely cause a few interesting interactions.
One thing which is badly missing are unit tests for this feature -- there *will* be more bugs in this, and I'd like to make sure that I don't introduce any regressions when tweaking the regexps in future. I'd also like to use the same code in the Harmattan version of Trojita, which means that the code should be moved into some common utility library. I'm not sure where.
I'm not particularly happy for the loadFinished -> slotMarkupPlainText connection, but I accept that this might be the most elegant way of adding a formatter without writing a ton of boilerplate code.
There was also a compile warning because you've used "class Envelope" instead of "struct Envelope". I've changed my "complex structs" into proper classes; it's weird to call them structs.
Thanks for the patch, it adds a valuable feature which I like. I would like the implementation to change a bit, but in the meanwhile, it's in. I'll likely not touch it this weekend, so feel free to hack on it if you wish.
Cheers, Jan [1] http://tools.ietf.org/html/rfc3676 -- Trojita, a fast e-mail client -- http://trojita.flaska.net/
