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/dolphinview.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/dolphinview.cpp')
| -rw-r--r-- | src/dolphinview.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/dolphinview.cpp b/src/dolphinview.cpp index fdf93a1da..4fc3248c8 100644 --- a/src/dolphinview.cpp +++ b/src/dolphinview.cpp @@ -117,8 +117,8 @@ DolphinView::DolphinView(QWidget* parent, connect(m_controller, SIGNAL(requestUrlChange(const KUrl&)), this, SLOT(slotRequestUrlChange(const KUrl&))); - connect(m_controller, SIGNAL(requestContextMenu(const QPoint&)), - this, SLOT(openContextMenu(const QPoint&))); + connect(m_controller, SIGNAL(requestContextMenu(const QPoint&, const QList<QAction*>&)), + this, SLOT(openContextMenu(const QPoint&, const QList<QAction*>&))); connect(m_controller, SIGNAL(urlsDropped(const KFileItem&, const KUrl&, QDropEvent*)), this, SLOT(dropUrls(const KFileItem&, const KUrl&, QDropEvent*))); connect(m_controller, SIGNAL(sortingChanged(DolphinView::Sorting)), @@ -911,7 +911,8 @@ void DolphinView::emitSelectionChangedSignal() emit selectionChanged(DolphinView::selectedItems()); } -void DolphinView::openContextMenu(const QPoint& pos) +void DolphinView::openContextMenu(const QPoint& pos, + const QList<QAction*>& customActions) { KFileItem item; if (isColumnViewActive()) { @@ -929,7 +930,7 @@ void DolphinView::openContextMenu(const QPoint& pos) } m_isContextMenuOpen = true; // TODO: workaround for Qt-issue 207192 - emit requestContextMenu(item, url()); + emit requestContextMenu(item, url(), customActions); m_isContextMenuOpen = false; } |
