Matt Rogers wrote:

> On Jun 19, 2009, at 3:28 PM, Stephen Kelly wrote:
> 
>> Hi,
>>
>> Matt Rogers emailed me wondering about how Grantlee relates to
>> Kopete. I really should have talked to you guys about it before, but
>> it was all just ideas stage until recently.
>>
>> Grantlee is a string templating system which uses the syntax and
>> design of the Django template system. It is designed to keep the
>> data being presented separate from the way it is presented.
>>
>> http://www.grantlee.org
>>
>> One thing that this should make easier is theming for applications,
>> taking the structure and appearance of exported data out of the
>> hands of application developers and into the hands of artists and
>> users. I'll probably be porting KMail, KJots and other KDE PIM
>> applications to it in the next few months.
>>
>> I noticed a while ago that Kopete has it's own theming system, and
>> made a note that it's something that can probably be replaced by
>> Grantlee if you guys want that (and not if you don't). The way it
>> would work would probably be similar to the way the dbus-chat
>> example in the git repo works.
>>
>> http://www.grantlee.org/apidox/examples.html
>>
>> To try it out, clone and build grantlee.
>>
>> git clone git://gitorious.org/grantlee/grantlee.git
>> cd grantlee && cmakekde
>>
>> then build the example
>>
>> cd examples/dbus-chat
>> mkdir build
>> cmake ..
>> make
>> ./dbus-chat (multiple times)
>>
>> I realise that the 'theme' names are hardcoded. That's just my lack
>> of time to make it better. Hopefully you can see that it would be
>> easy to write additional themes for it.
>>
>> If you're interested, Kopete could be ported to this system after
>> Grantlee v0.1 is released.
>>
>> Any thoughts?
>>
>> Steve.
> 
> The chat window themes are based on themes created for the Adium IM
> client (www.adiumx.com) and it is becoming sort of the de facto
> standard for instant messengers that have customizable chat windows.

Hi,

I've had a busy week.

I looked at the adiumx site and found some of the themes:

http://www.adiumxtras.com/index.php?a=search&cat_id=5

and downloaded this one to have a look:

http://www.adiumxtras.com/index.php?a=xtras&xtra_id=2160

I didn't look for any documentation on how to create adiumx themes, but I'm 
guessing it does string substitution for %variable% and prefix special commands 
with @, eg, @import. 

> Would it be possible to implement those themes, keeping the syntax,
> and using Grantlee as the backend, so to speak? 

Keeping the syntax of the existing adiumx templates and using Grantlee as a 
backend? No, that's not possible. Do you have a system somewhere for parsing 
those files, doing the substitution, and the import etc? Grantlee is such a 
system, but it wouldn't be able to parse the adium files as they use a 
different syntax.

> We're currently using
> the KHTML DOM API to manipulate all that stuff. Might be nice if we
> could clean that up a little bit. :)

DOM manipulation is something that Grantlee can't currently do. It's mostly 
useful for creating static files. However, it is something that I want to make 
possible in the future at some stage if I can do it cleanly.

> 
> Thanks for the info!

No problem. I might look into the kopete theming code at some stage and see 
what makes it tick, but for now it seems that if you want source compatibility 
with adium themes, Grantlee is not suitable. I'll remove that todo now that 
I've investigated a bit.

If any kopete people are at linux tag or Berlin at all I could meet up and talk 
more about it.

All the best,

Steve.

> --
> Matt


_______________________________________________
kopete-devel mailing list
kopete-devel@kde.org
https://mail.kde.org/mailman/listinfo/kopete-devel

Reply via email to