]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/views/dolphinview.cpp
GIT_SILENT Sync po/docbooks with svn
[dolphin.git] / src / views / dolphinview.cpp
index 5f331dc270a879f3f3fc669e0ce6630a35f037d5..d16aa3b09207631afe265b7d429ccba98dd39aea 100644 (file)
@@ -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 {