KDE TechBase
  • User page
  • Discussion
  • Edit
  • History
KDE TechBase is a Wiki - You can help! Please contribute! Questions?
Please ask development related questions in the KDE Community Forum.

User:Kleag/Excluding some menu entries from a KPart

< User:Kleag
Warning
noframe

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" );


Note
noframe
It seems that you can put only one ActionList in a menu. This should be verified.


Retrieved from "http://techbase.kde.org/User:Kleag/Excluding_some_menu_entries_from_a_KPart"
Category: Improve

Navigation

  • Home
  • Help
  • Recent changes

Sections

  • Getting started
  • Development
  • Schedules
  • Policies
  • Contribute
  • Projects

Toolbox

  • What links here
  • Related changes
  • Special pages
  • Printable version
  • Permanent link

Personal tools

  • 38.107.191.95
  • Talk for this IP
  • Log in / create account
  • Login with OpenID
Creative Commons License SA 3.0 as well as the GNU Free Documentation License 1.2
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal