From c2465889991a2ebc88195dd008e49afdff7023a5 Mon Sep 17 00:00:00 2001 From: David Edmundson Date: Wed, 26 Oct 2016 11:54:02 +0100 Subject: [PATCH] Don't show "Alternatives" menu by default And only enable it in the contextMenuAboutToShow connection. We currently enable/disable the menu in this slot, but we default to it on. This meant other users of actions() that can't correctly emit contextMenuAboutToShow gain an extra entry which might not be relevant. REVIEW: 129263 --- src/plasma/private/applet_p.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/plasma/private/applet_p.cpp b/src/plasma/private/applet_p.cpp index bfb6d2502..ac3d45f3b 100644 --- a/src/plasma/private/applet_p.cpp +++ b/src/plasma/private/applet_p.cpp @@ -189,6 +189,7 @@ void AppletPrivate::init(const QString &_packagePath, const QVariantList &args) if (!q->isContainment()) { QAction *a = new QAction(QIcon::fromTheme(QStringLiteral("preferences-desktop-default-applications")), i18n("Alternatives..."), q); + a->setVisible(false); q->actions()->addAction(QStringLiteral("alternatives"), a); QObject::connect(a, &QAction::triggered,[=] { if (q->containment()) {