KDevelop4 UI

Alexander Dymo alexander.dymo at gmail.com
Mon Dec 21 17:03:26 UTC 2009

понеділок, 21-гру-2009 16:03:09 David Nolden ви написали:
> I think technically the whole thing is doable, without utter hacks.

Yes, but in kdelibs :) And last time I looked at it, I found a solution.

What we need is one more attribute for kxmlgui menus and toolbars called 
"mergePolicy" with values "MergeAlways (default, old behavior), 

For example, that will allow us to have a toolbar definition like this:

<ToolBar name="mainToolBar" position="Top" noMerge="1" 
  <text>Main Toolbar</text>
  <Action name="file_new" />
  <DefineGroup append="file_operations" name="file_operations"/>
  <DefineGroup append="build_operations" name="build_operations"/>
  <DefineGroup append="run_operations" name="run_operations"/>

Currently this toolbar lets kate part to merge edit/undo actions into it, but 
with MergeOnlyDefinedGroups policy, it will not be allowed to do that.

Another thing that will be likely necessary is exclusion rules:
  <Action name="file_print"/>

PS:  With merge only groups policy it should be possible to allow merging 
several menus into one, like this:

<Menu name="file">
  <Action name="file_new" group="new_merge"/>
<Menu name="edit">
  <Action name="edit_undo" group="undo_merge"/>

<Menu name="tools" mergePolicy="MergeOnlyDefinedGroups">
    <Menu name="file"/>
    <Menu name="edit"/>
  <DefineGroup name="new_merge"/>
  <DefineGroup name="undo_merge"/>

But that's only a sketch. I haven't completely though it out actually.

More information about the KDevelop-devel mailing list