[Kde-pim] PIM/KDE Grantlee plugins

Volker Krause vkrause at kde.org
Sat Sep 26 09:47:35 BST 2015


On Sunday 20 September 2015 23:48:10 Daniel Vrátil wrote:
> Hola guys,
> 
> I've spend some time during past few days playing with IncidenceFormtter in
> KCalUtils to use Grantlee templates instead of assembling the HTML in-place,
> which I find ineffective and horrible to read/extend/maintain. Yes, I could
> just add 10 lines of code to make it show comments in todos which I need
> for Phabricator, but this was more fun :)
> 
> So far I have successfully created templates for todos, events, journals and
> free/busy reports, the ITIP preview is still to be done, but there I
> probably need to co-ordinate with Sandro who's working on the
> ObjecTreeParser refactoring. I submitted the first part of the port as
> review for further comments and discussion
> (https://git.reviewboard.kde.org/r/125331/). I think it's better to do this
> in smaller steps, the ITIP formatter still works, so we can port it at any
> later time (I also suspect it will be much more work).

Nice :)

> Anyway, in order to use Grantlee effectively I had to write custom Grantlee
> localizer that uses i18n() instead of tr(), and a plugin that provides
> custom tag for inserting icons - e.g. {% icon dialog-ok small %} that
> generates <img src="/usr/share/icons/.../dialog-ok.png" width="16"
> height="16" /> using KIconTheme::iconPath().
> 
> Since the longterm plan is to use the template system in the new OTP as well
> as in other places, this code should IMO be moved to some shared place -
> something like pimutils, pimcommon, libkdepim, I don't know :) But it
> should be outside kdepim.git so that we can use it from kcalutils and other
> places too. Do you guys have an idea where we could put this? Or should we
> already look into splitting some of the library that Laurent has been
> working on in kdepim.git into it's own repository and put the code there
> (if that's the plan).

Not yet another PIM dumping ground library please :) Let's name/structure 
libraries based on what domain they deal with, not who happens to use them.

This sounds like generic Grantlee/KF5 integration code, not PIM specific, 
right? So how about KF5GrantleeIntegration?

regards,
Volker
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 173 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20150926/8ea673d3/attachment.sig>
-------------- next part --------------
_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/


More information about the kde-pim mailing list