diff --git a/containmentactions/contextmenu/menu.cpp b/containmentactions/contextmenu/menu.cpp --- a/containmentactions/contextmenu/menu.cpp +++ b/containmentactions/contextmenu/menu.cpp @@ -67,7 +67,7 @@ qDebug() << "Action Trigerred !!!"; }); - m_addWidgetsAction = new QAction(QIcon::fromTheme("add"), i18n("Add Widgets..."), this); + m_addWidgetsAction = new QAction(QIcon::fromTheme("add"), i18n("&Add Widgets..."), this); m_addWidgetsAction->setStatusTip(i18n("Show Plasma Widget Explorer")); connect(m_addWidgetsAction, &QAction::triggered, [ = ]() { QDBusInterface iface("org.kde.plasmashell", "/PlasmaShell", "", QDBusConnection::sessionBus()); @@ -77,13 +77,19 @@ } }); - m_configureAction = new QAction(QIcon::fromTheme("configure"), i18nc("view settings window", "View Settings..."), this); - m_configureAction->setShortcut(QKeySequence()); + m_configureAction = new QAction(QIcon::fromTheme("configure"), i18nc("view settings window", "View &Settings..."), this); connect(m_configureAction, &QAction::triggered, this, &Menu::requestConfiguration); + connect(this->containment(), &Plasma::Containment::userConfiguringChanged, this, [&](bool configuring){ + m_configureAction->setVisible(!configuring); + // because sometimes it's disabled unexpectedly + // we should enable it + m_configureAction->setEnabled(true); + }); + m_switchLayoutsMenu = new QMenu; m_layoutsAction = m_switchLayoutsMenu->menuAction(); - m_layoutsAction->setText(i18n("Layouts")); + m_layoutsAction->setText(i18n("&Layouts")); m_layoutsAction->setIcon(QIcon::fromTheme("user-identity")); m_layoutsAction->setStatusTip(i18n("Switch to another layout")); @@ -132,6 +138,9 @@ viewType = static_cast((m_data[2]).toInt()); } + const QString configureActionText = (viewType == Latte::Types::DockView) ? i18nc("dock settings window", "Dock &Settings...") : i18nc("panel settings window", "Panel &Settings..."); + m_configureAction->setText(configureActionText); + return actions; }