File manager context menus

David Faure faure at kde.org
Sat Feb 27 16:27:45 GMT 2016


On Sunday 31 August 2014 23:39:49 Frank Reininghaus wrote:
> Hi David,
> 
> 2014-08-22 9:46 GMT+02:00 David Faure:
> > On Sunday 17 August 2014 23:02:24 Frank Reininghaus wrote:
> >> > I have made two patches related to context menus
> >> > (https://git.reviewboard.kde.org/r/115678/ and
> >> > https://git.reviewboard.kde.org/r/115679/) some time ago, to make the
> >> > DolpinContextMenu more independent, so that it can be reused in multiple
> >> > places within Dolphin.
> >> Yes, if we can remove code duplication by sharing the context menu
> >> with others, I agree that using this shared menu also in other places,
> >> like the Folders Panel, is worth considering :-)
> >
> > So what's your preferred approach? Starting from DolphinContextMenu (and
> > extracting it into KIO), or starting from KonqPopupMenu?
> >
> > E.g. do you consider the visual appearance or the API of KonqPopupMenu
> > particularly ugly? Otherwise it seems simpler to start from this one, it's
> > more commonly used.
> 
> yes, I agree that starting from KonqPopupMenu makes sense then!

I have now (finally) taken some time to clean up the KonqPopupMenu API.
It's far from ideal, there is historical baggage in the design, but at least
it no longer depends on KParts::BrowserExtension and no longer uses
strings as the key in the action groups (and the number of ctor args has been
reduced, in favour of setters).

Can you check if the current API would be suitable for dolphin, and let me
know of anything that should be improved, otherwise?

If yes, I can then turn KonqPopupMenu into something like KIO::ContextMenu
and put it in libKIOWidgets.

-- 
David Faure, faure at kde.org, http://www.davidfaure.fr
Working on KDE Frameworks 5





More information about the kfm-devel mailing list