Extend the purpose of GrantleeTheme library and refresh the KMail/Kontact "Introduction" pages theme
Review Request #125577 - Created Oct. 9, 2015 and submitted
So, this tiny patch does two things (it can be split when committed, but for discussion I think it's better to have it as one):
1) it repurposes GrantleeTheme to be able to not just manage Grantlee theme packs, but also to render them. I basically forked some of the logic from the Grantlee template management code I wrote for KCalUtils (once GrantleeTheme is split out of kdepim, I'll make KCalUtils use it). This is useful because the way we use Grantlee is very repetitive (Engine, Loader -> load plugins -> render), so wrapping that into GrantleeTheme::Theme looks like a good idea, it hides the ugliness of the theme/template path lookup.
2) it creates new Grantlee templates for the "Introduction" pages for KMail and Kontact (Help -> Introduction), as well as the "Retrieving folder contents ..." page and similar info views shown in KMail. We do it using the extended GrantleeTheme functionality. See the attached screenshots - if this ain't superfancy, I don't know what is...:)
PS: Akregator has the same infopage too, but it's not using MessageViewer for obvious reasons, so the way there would be to copy the create Akregator's own Grantlee theme and make Akregator use GrantleeTheme as well. Let's do it once the underlaying stuff is in.
Yes, works. The only problem seems to be that sometimes QtWebKit is ridiculously slow rendering the background wallpaper, so you can see it slowly render, as if you were downloading it via 56k modem - but I guess there's not much we can do about it.
- backported Volker's kcalutils patch
- addressed Volker's comments
- fixed migration of Viewer settings
- added simple unit-test for GrantleeTheme::Theme
- some small improvements here and there
Revision 3 (+1437 -489)