┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/panels/places/placespanel.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/panels/places/placespanel.cpp b/src/panels/places/placespanel.cpp
index 8a8fa8a7d..7b4900f7c 100644
--- a/src/panels/places/placespanel.cpp
+++ b/src/panels/places/placespanel.cpp
@@ -45,6 +45,7 @@
#include <KIconLoader>
#include <KLocalizedString>
#include <KMountPoint>
+#include <KPropertiesDialog>
#include <QGraphicsSceneDragDropEvent>
#include <QIcon>
@@ -214,6 +215,10 @@ void PlacesPanel::slotItemContextMenuRequested(int index, const QPointF& pos)
QAction* openInNewWindowAction = menu.addAction(QIcon::fromTheme(QStringLiteral("window-new")), i18nc("@item:inmenu", "Open in New Window"));
QAction* openInNewTabAction = menu.addAction(QIcon::fromTheme(QStringLiteral("tab-new")), i18nc("@item:inmenu", "Open in New Tab"));
+ QAction* propertiesAction = nullptr;
+ if (item->url().isLocalFile()) {
+ propertiesAction = menu.addAction(QIcon::fromTheme(QStringLiteral("document-properties")), i18nc("@action:inmenu", "Properties"));
+ }
if (!isDevice && !isTrash) {
menu.addSeparator();
}
@@ -265,6 +270,10 @@ void PlacesPanel::slotItemContextMenuRequested(int index, const QPointF& pos)
m_model->requestTearDown(index);
} else if (action == ejectAction) {
m_model->requestEject(index);
+ } else if (action == propertiesAction) {
+ KPropertiesDialog* dialog = new KPropertiesDialog(item->url(), this);
+ dialog->setAttribute(Qt::WA_DeleteOnClose);
+ dialog->show();
}
}
}