User:Kleag/Excluding some menu entries from a KPart

This section needs improvements: Please help us to

cleanup confusing sections and fix sections which contain a todo

some elements should be verified and/or completed

In some cases, you don't want to show up to the user all the actions defined by a KPart.

To do that, the developer of the part should have put some of th.e actions in ActionLists. You can then unplug these actions at runtime.

E.g. if the part xxxui.rc file looks like

  * <kpartgui name="xxx_part" version="1">
  * <MenuBar>
  *   <Menu name="file">
  *     ...  
  *     <ActionList name="xxx_file_actionlist">
  *     ...  
  *     </ActionList>
  *     ...  
  *   </Menu>
  *   ...
  * </MenuBar>
  * </kpartgui>

then, you can call in your application's code:

  unplugActionList( "xxx_file_actionlist" );
It seems that you can put only one ActionList in a menu. This should be verified.

This page was last edited on 2 March 2008, at 17:53. Content is available under Creative Commons License SA 4.0 unless otherwise noted.