AW: KMail development advice

Leonard Marquitan marquitan1 at freenet.de
Thu Aug 18 12:08:19 BST 2016


Hi Dan,

thanks for your response and the short explanations.
I'll explain a simple task that I tried to accomplish which will help me
working on larger parts once I know how it is to be approached:
I chose the kmcomposerui for first tries because it seems rather
straightforward and well-structured. I want to add a basic element to the
toolbar contents. The most basic one I found was a separator. So I open
kmcomposerui.rc, bump the version number (from 435 to 436) and add
<Separator/> at any spot between two actions. Then I rebuild the project. I
guessed that those were the most basic steps I could do to perform any ui
changes. However, the new separator was nowhere to be seen. So I believe
there's something I'm not getting right.
Can you explain why this approach is not working?

Thank you
Leonard


-----Ursprüngliche Nachricht-----
Von: Daniel Vrátil [mailto:dvratil at kde.org] 
Gesendet: Montag, 15. August 2016 21:31
An: kde-pim at kde.org
Cc: Leonard Marquitan <marquitan1 at freenet.de>
Betreff: Re: KMail development advice

On Friday, August 12, 2016 10:41:36 AM CEST Leonard Marquitan wrote:
> Greetings All,

Hi Leonard,
> 
> 
> I'm new to KDE development but for my university I was given the task 
> to try and look into KMail and its ui, so as I struggle through the 
> process of editing some toolbars or adding new windows I thought it 
> would be best to ask here for some advice.

Don't worry, KMail is a huge beast, everyone struggles with it :-)

> 
> I built the whole kdepim project with QtCreator and looked briefly 
> into everything and from the resources on the internet I get that the 
> ui is defined via [name]ui.rc files.

Right, *ui.rc files defines only menus and toolbars and even then there is
quite a lot of stuf "injected" from C++.

> However, editing those rc files (e.g. the
> kmcomposerui.rc) didn't do a thing after rebuilding. I saw that some 
> ui is defined directly in the cpp files, but all my modification 
> attempts were disappointing.

When editing *ui.rc files, you have to bump the "version" number at the very
top, otherwise KXmlUi won't pick up the updated file.

There are also multiple identical ui.rc files that are used in different
contexts, so maybe you did not edit the right one.

> 
> Is there anyone willing to provide me with some basic knowledge about 
> the structure of the ui and the steps that are necessary for my aims?
>

Sure, feel free to ask here on the mailing list or stop by on #kontact IRC
channel.

The UI of KMail is very complex and as you probably found its split over
multitude of files as well as several different repositories, so it's hard
to give you any specific advice. Can you be more specific about what you
want to work on? It will make it easier for us to point you in the right
place.

> Thank you in advance, I hope you can tolerate my inexperience.

No worries, thanks for your interest in Kontact!

Dan

> 
> Leonard


--
--
Daniel Vrátil
www.dvratil.cz | dvratil at kde.org
IRC: dvratil on Freenode (#kde, #kontact, #akonadi, #fedora-kde)




More information about the kde-pim mailing list