Extendable context menu for KDirOperator

Andreas Pakulat apaku at gmx.de
Fri Jun 27 23:27:27 BST 2008


Hi,

I think it would be good if KDirOperator allowed to extend the context
menu it shows. This would allow applications using the widget to plug
special actions into the menu, based on the file that the menu is
invoked on. For example KDevelop could offer version control actions for
version controlled files.

The attached patch adds a new signal which is emitted just before the
menu is actually shown. The signal carries both the current file item
and also the menu thats going to be shown. This way one can connect to
the signal and then extend the menu before its shown with additional
actions.

Of course this is 4.2 material, still any comments are welcome.

Andreas

-- 
You will live a long, healthy, happy life and make bags of money.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kdelibs_kfile_extendable_contextmenu.diff
Type: text/x-diff
Size: 1093 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20080628/c10470b3/attachment.diff>


More information about the kde-core-devel mailing list