Embedding Dolphin's KPart

Andreas Pakulat apaku at gmx.de
Tue Jun 3 19:08:50 UTC 2008


starting a new thread as this is about the technical problems when we
embed that kpart.

First of all: We need to provide navigation ourself, that is dolphin
doesn't expose its breadcrumb widget or anything else of that, it only
exposes the actual view and a couple of actions.

And thats also the issue that currently exists: The actionCollection()
is meant to be used with a menu/toolbar in a KXmlGuiWindow. So there are
far too many actions in there and we can't simply use that for the
Toolview toolbar. I can see two ways of fixing that:

a) limiting the number by code, i.e. using the actions objectName to
determine which ones we want

b) use the action collection as is and actually merge the KPart's GUI
with the toolview window. This needs some more API, but would allow to
use a xmlgui rcfile to adjust the toolbar items we want to see.

Last but not least we might have to think about wether some of those
actions would need to go into our own menu or should be put into a
context menu.

And that brings us to the last technical problem of embedding: For some
reason I don't get a context menu on the view, besides the dolphin kpart
listening to a signal of its DolphinView class for context menu
activation. I do get the context menu from the toolview though, so maybe
there's an event-filter that we have that eats the context menu event...

The attached patch allows for anybody to test this, it uses dolphin
kpart if it exists and falls back to the existing implementation if not.
It also adds all actions to the toolbar to make the view at least
somewhat useful.


You need more time; and you probably always will.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: use_dolphinpart.diff
Type: text/x-diff
Size: 2028 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20080603/ec163867/attachment.bin>

More information about the KDevelop-devel mailing list