diff options
| author | Peter Penz <[email protected]> | 2009-02-11 20:45:12 +0000 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2009-02-11 20:45:12 +0000 |
| commit | 2f47863c68bb0ac0417eed76f713ced651a4908a (patch) | |
| tree | 4deffd5657f8f39c02623d9a873e894b3a9ec8c0 /src/dolphinpart.cpp | |
| parent | 5cec8a2dd95d6ccbc0d425c449df70cd645e3d29 (diff) | |
- 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: [email protected]
svn path=/trunk/KDE/kdebase/apps/; revision=924867
Diffstat (limited to 'src/dolphinpart.cpp')
| -rw-r--r-- | src/dolphinpart.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
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<QAction*>)), + this, SLOT(slotOpenContextMenu(KFileItem,KUrl,QList<QAction*>))); 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<QAction*>& 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; |
