mirror of
https://invent.kde.org/system/dolphin
synced 2024-09-19 16:31:21 +00:00
Update the "Move to Trash" action's and the "Delete" action's
enabled state in the context menu for read only files/folders (also archives). BUG: 294013 FIXED-IN: 4.11 REVIEW: 111160
This commit is contained in:
parent
4e80918a44
commit
4cd231838d
|
@ -53,8 +53,9 @@ void DolphinRemoveAction::update()
|
|||
setText(i18nc("@action:inmenu", "&Move to Trash"));
|
||||
}
|
||||
|
||||
if (m_action) {
|
||||
if (m_action) {
|
||||
setIcon(m_action->icon());
|
||||
setShortcuts(m_action->shortcuts());
|
||||
setEnabled(m_action->isEnabled());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -850,6 +850,12 @@ void DolphinView::slotItemMiddleClicked(int index)
|
|||
|
||||
void DolphinView::slotItemContextMenuRequested(int index, const QPointF& pos)
|
||||
{
|
||||
// Force emit of a selection changed signal before we request the
|
||||
// context menu, to update the edit-actions first. (See Bug 294013)
|
||||
if (m_selectionChangedTimer->isActive()) {
|
||||
emitSelectionChangedSignal();
|
||||
}
|
||||
|
||||
const KFileItem item = m_model->fileItem(index);
|
||||
emit requestContextMenu(pos.toPoint(), item, url(), QList<QAction*>());
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue