enabled state in the context menu for read only files/folders (also
archives).
BUG: 294013
FIXED-IN: 4.11
REVIEW: 111160
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());
}
}
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*>());
}