[prev in list] [next in list] [prev in thread] [next in thread]
List: kdevelop-devel
Subject: Re: KDevelop4 UI
From: Alexander Dymo <alexander.dymo () gmail ! com>
Date: 2009-12-21 17:03:26
Message-ID: 200912211903.26777.alexander.dymo () gmail ! com
[Download RAW message or body]
понеділок, 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.
--
KDevelop-devel mailing list
KDevelop-devel@kdevelop.org
https://barney.cs.uni-potsdam.de/mailman/listinfo/kdevelop-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic