X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/a2c9c05de2dfabbb2bb614390c8e03023dad2bd1..ffff8af851e3a386c44438337779d0ce7ca98a61:/src/views/dolphinview.cpp diff --git a/src/views/dolphinview.cpp b/src/views/dolphinview.cpp index 5f331dc27..d16aa3b09 100644 --- a/src/views/dolphinview.cpp +++ b/src/views/dolphinview.cpp @@ -161,6 +161,10 @@ DolphinView::DolphinView(const QUrl& url, QWidget* parent) : auto *centeringLayout = new QVBoxLayout(m_container); centeringLayout->addWidget(m_placeholderLabel); centeringLayout->setAlignment(m_placeholderLabel, Qt::AlignCenter); + m_placeholderLabel->setContextMenuPolicy(Qt::CustomContextMenu); + connect(m_placeholderLabel, &QWidget::customContextMenuRequested, this, [this](const QPoint& pos){ + slotViewContextMenuRequested(m_placeholderLabel->mapToGlobal(pos)); + }); controller->setSelectionBehavior(KItemListController::MultiSelection); connect(controller, &KItemListController::itemActivated, this, &DolphinView::slotItemActivated); @@ -2264,6 +2268,8 @@ void DolphinView::updatePlaceholderLabel() m_placeholderLabel->setText(i18n("No relevant network resources found")); } else if (m_url.scheme() == QLatin1String("mtp") && m_url.path() == QLatin1String("/")) { m_placeholderLabel->setText(i18n("No MTP-compatible devices found")); + } else if (m_url.scheme() == QLatin1String("afc") && m_url.path() == QLatin1String("/")) { + m_placeholderLabel->setText(i18n("No Apple devices found")); } else if (m_url.scheme() == QLatin1String("bluetooth")) { m_placeholderLabel->setText(i18n("No Bluetooth devices found")); } else {