diff --git a/src/plasma/containment.cpp b/src/plasma/containment.cpp --- a/src/plasma/containment.cpp +++ b/src/plasma/containment.cpp @@ -122,7 +122,12 @@ QAction *configAction = actions()->action(QStringLiteral("configure")); if (configAction) { - configAction->setText(i18nc("%1 is the name of the applet", "Configure %1...", title())); + if (d->type == Types::PanelContainment || d->type == Types::CustomPanelContainment) { + configAction->setText(i18nc("%1 is the name of the applet", "Edit %1...", title())); + configAction->setIcon(QIcon::fromTheme(QStringLiteral("document-edit"))); + } else { + configAction->setText(i18nc("%1 is the name of the applet", "Configure %1...", title())); + } } QAction *appletBrowserAction = actions()->action(QStringLiteral("add widgets")); diff --git a/src/plasma/corona.cpp b/src/plasma/corona.cpp --- a/src/plasma/corona.cpp +++ b/src/plasma/corona.cpp @@ -367,8 +367,8 @@ bool unlocked = d->immutability == Types::Mutable; action->setText(unlocked ? i18n("Lock Widgets") : i18n("Unlock Widgets")); action->setIcon(QIcon::fromTheme(unlocked ? QStringLiteral("object-locked") : QStringLiteral("object-unlocked"))); - action->setEnabled(true); - action->setVisible(true); + action->setEnabled(!unlocked); + action->setVisible(!unlocked); } } @@ -443,6 +443,8 @@ lockAction->setData(Plasma::Types::ControlAction); lockAction->setShortcut(QKeySequence(QStringLiteral("alt+d, l"))); lockAction->setShortcutContext(Qt::ApplicationShortcut); + bool unlocked = immutability == Types::Mutable; + lockAction->setVisible(!unlocked); //fake containment/applet actions KActionCollection *containmentActions = AppletPrivate::defaultActions(q); //containment has to start with applet stuff diff --git a/src/scriptengines/qml/plasmoid/containmentinterface.cpp b/src/scriptengines/qml/plasmoid/containmentinterface.cpp --- a/src/scriptengines/qml/plasmoid/containmentinterface.cpp +++ b/src/scriptengines/qml/plasmoid/containmentinterface.cpp @@ -1131,34 +1131,9 @@ } } - QMenu *containmentMenu = new QMenu(i18nc("%1 is the name of the containment", "%1 Options", m_containment->title()), desktopMenu); if (m_containment->containmentType() != Plasma::Types::DesktopContainment) { - addContainmentActions(containmentMenu, event); - } - - if (!containmentMenu->isEmpty()) { - int enabled = 0; - //count number of real actions - QListIterator actionsIt(containmentMenu->actions()); - while (enabled < 3 && actionsIt.hasNext()) { - QAction *action = actionsIt.next(); - if (action->isVisible() && !action->isSeparator()) { - ++enabled; - } - } - - if (enabled) { - //if there is only one, don't create a submenu - if (enabled < 2) { - foreach (QAction *action, containmentMenu->actions()) { - if (action->isVisible() && !action->isSeparator()) { - desktopMenu->addAction(action); - } - } - } else { - desktopMenu->addMenu(containmentMenu); - } - } + desktopMenu->addSeparator(); + addContainmentActions(desktopMenu, event); } if (m_containment->immutability() == Plasma::Types::Mutable &&