Elements to control merging
← Older revision
Revision as of 16:43, 29 June 2010
Line 140:
Line 140: Often times the above principles of merging are not good enough. Fortunately, there are several ways to control the details of merging. Often times the above principles of merging are not good enough. Fortunately, there are several ways to control the details of merging. −=== MergeLocal / Merge ===+=== <Merge> ===−{{improve|I'm not sure the info in the Merge/MergeLocal-subchapter is correct. Use with care, and please correct and expand}}+The <Merge>-tag is the most basic element to control merging. It means that any actions from child clients will be inserted at this point, instead of at the end of the respective container. This is useful especially, if you want to make sure that one or more actions always remain at the end of a menu/toolbar. To achieve this, simply use a ui.rc-file like this:−==== <MergeLocal> ====+ +<code xml> + <Menu name="my_menu"><text>&Cool stuff</text> + <Action name="first_action"/> + <Merge/> + <Action name="last_action"/> + </Menu> +</code> + +=== <MergeLocal> === This can only be used in the KDE global [http://websvn.kde.org/trunk/KDE/kdelibs/kdeui/xmlgui/ui_standards.rc?view=markup ui_standards.rc]-file. It defines points where other entries can be merged in. It can be used both with a ''name''-attribute, or without (in the latter case it acts as a catch-all merge place). This can only be used in the KDE global [http://websvn.kde.org/trunk/KDE/kdelibs/kdeui/xmlgui/ui_standards.rc?view=markup ui_standards.rc]-file. It defines points where other entries can be merged in. It can be used both with a ''name''-attribute, or without (in the latter case it acts as a catch-all merge place). Line 170:
Line 179: If you want to achieve the same result from a part or plugin, you can add a ''<DefineGroup>'' section in your main window's rc file that has the desired ''append'' attribute. Then, in your part/plugin rc file you create the Action with a ''group'' attribute. If you want to achieve the same result from a part or plugin, you can add a ''<DefineGroup>'' section in your main window's rc file that has the desired ''append'' attribute. Then, in your part/plugin rc file you create the Action with a ''group'' attribute.− −==== <Merge> ==== −<Merge> is the counterpart to <MergeLocal> and defines what is to be merged into a <MergeLocal>-point. TODO: Is this correct, examples, with/without names? === DefineGroup === === DefineGroup === - Full Post
No comments:
Post a Comment