https://bugs.kde.org/show_bug.cgi?id=369523

Jonathan Marten <j...@keelhaul.me.uk> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |fa...@kde.org

--- Comment #2 from Jonathan Marten <j...@keelhaul.me.uk> ---
Note that Dolphin as a file manager doesn't have this problem.

What seems to be happening in Konqueror is that
DolphinPart::updatePasteAction() is being called once when the directory being
viewed changes, from KonqMainWindow::openView().  When this calls
DolphinView::pasteInfo() to obtain the text and enable state of the action, its
rootItem() - which is equivalent to the rootItem() of the KDirLister for the
directory - is a null item which means that KIO::pasteActionText() returns the
state as disabled.

In Dolphin the corresponding function, DolphinMainWindow::updatePasteAction(),
is called twice.  The first is from DolphinView::setURL(), and this time the
rootItem() is null as before and the action would be disabled.  However,
DolphinMainWindow::updatePasteAction() is then called a second time from
DolphinView::slotDirectoryLoadingCompleted(), by which time the rootItem() is
not null and the action is enabled.

I've not yet been able to find a way to connect this second call back to
Konqueror, without it having to have specific knowledge of and a dependency on
the DolphinPart.  One solution that I have found is to check the up-to-date
paste state, in KonqMainWindow::slotPopupMenu(), as the popup menu is about to
be displayed.  This gives a correctly enabled and working paste action in all
cases... on the popup menu alone, but not for the menu bar Edit menu.  That
would also have to be done in a similar way.

Adding dfaure to CC of this bug, in case he may have any insights.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to