Trying to locate source code for toolbar actions?

Jean-Baptiste Mardelle jb at kdenlive.org
Fri Aug 18 08:41:01 UTC 2017


On 17.08.2017 19:46, Jesse DuBord wrote:
> I'm looking through the source code and trying to locate where the 
> actions are for the Main and Extra toolbars (see attached image). Can 
> anyone give me a lead?
>

Hi Jesse,

You can first have a look at the src/kdenliveui.rc file. It lists most 
of the actions and creates the menu structure. For example, you can see 
the extratoolbar (at the end of kdenliveui.rc) contains an action 
called: project_render_button

You can then make a search in the sources to fine that 
"project_render_button" string (it is in mainwindow.cpp).

For the maintoolbar, actions are automatically added by KDE. If you want 
to have a custom toolbar, you must edit the kdenliveui.rc file, and add 
for example:

   <ToolBar name="mainToolBar" noMerge="1">
     <Action name="themes_menu" />
   </ToolBar>


This will change the main toolbar to only contain the "themes_menu" 
action. To make it work, you must increment the version tag at the top 
of the file currently something like:

<kpartgui name="kdenlive" version="149" translationDomain="kdenlive">

so you must put "150" instead. And last, it is recommanded to remove the 
custom toolbar settings:

rm ~/.local/share/kxmlgui5/kdenlive/kdenliveui.rc

Once you have done all that, recompile and install and the main toolbar 
should only show the actions you put in the kdenliveui.rc file

Hope it helps, regards
jb





More information about the kdenlive mailing list