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),
MergeOnlyDefinedGroups"
For example, that will allow us to have a toolbar definition like this:
<ToolBar name="mainToolBar" position="Top" noMerge="1"
mergePolicy="MergeOnlyDefinedGroups">
<text>Main Toolbar</text>
<Action name="file_new" />
<Separator/>
<DefineGroup append="file_operations" name="file_operations"/>
<Separator/>
<DefineGroup append="build_operations" name="build_operations"/>
<Separator/>
<DefineGroup append="run_operations" name="run_operations"/>
</ToolBar>
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:
<Exclude>
<Action name="file_print"/>
</Exclude>
PS: With merge only groups policy it should be possible to allow merging
several menus into one, like this:
partui.rc
<Menu name="file">
<Action name="file_new" group="new_merge"/>
</Menu>
<Menu name="edit">
<Action name="edit_undo" group="undo_merge"/>
</Menu>
applicationui.rc
<Menu name="tools" mergePolicy="MergeOnlyDefinedGroups">
<AlsoMerge>
<Menu name="file"/>
<Menu name="edit"/>
</AlsoMerge>
<DefineGroup name="new_merge"/>
<DefineGroup name="undo_merge"/>
</Menu>
But that's only a sketch. I haven't completely though it out actually.
More information about the KDevelop-devel
mailing list