From 2f47863c68bb0ac0417eed76f713ced651a4908a Mon Sep 17 00:00:00 2001 From: Peter Penz Date: Wed, 11 Feb 2009 20:45:12 +0000 Subject: - allow the view implementations to attach custom actions to the context menu - let the "details view" show the "[x] Expandable Folders" action in the context menu CCMAIL: faure@kde.org svn path=/trunk/KDE/kdebase/apps/; revision=924867 --- src/dolphinpart.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/dolphinpart.cpp') diff --git a/src/dolphinpart.cpp b/src/dolphinpart.cpp index 41930221d..cd484ed1d 100644 --- a/src/dolphinpart.cpp +++ b/src/dolphinpart.cpp @@ -96,8 +96,8 @@ DolphinPart::DolphinPart(QWidget* parentWidget, QObject* parent, const QVariantL this, SLOT(slotItemTriggered(KFileItem))); connect(m_view, SIGNAL(tabRequested(KUrl)), this, SLOT(createNewWindow(KUrl))); - connect(m_view, SIGNAL(requestContextMenu(KFileItem,KUrl)), - this, SLOT(slotOpenContextMenu(KFileItem,KUrl))); + connect(m_view, SIGNAL(requestContextMenu(KFileItem,KUrl,QList)), + this, SLOT(slotOpenContextMenu(KFileItem,KUrl,QList))); connect(m_view, SIGNAL(selectionChanged(KFileItemList)), m_extension, SIGNAL(selectionInfo(KFileItemList))); connect(m_view, SIGNAL(selectionChanged(KFileItemList)), @@ -335,8 +335,12 @@ void DolphinPart::createNewWindow(const KUrl& url) emit m_extension->createNewWindow(url, args); } -void DolphinPart::slotOpenContextMenu(const KFileItem& _item, const KUrl&) +void DolphinPart::slotOpenContextMenu(const KFileItem& _item, + const KUrl&, + const QList& customActions) { + Q_UNUSED(customActions); // TODO: should be added to the context menu + KParts::BrowserExtension::PopupFlags popupFlags = KParts::BrowserExtension::DefaultPopupItems | KParts::BrowserExtension::ShowProperties | KParts::BrowserExtension::ShowUrlOperations; -- cgit v1.3