diff --git a/containmentactions/contextmenu/menu.cpp b/containmentactions/contextmenu/menu.cpp --- a/containmentactions/contextmenu/menu.cpp +++ b/containmentactions/contextmenu/menu.cpp @@ -65,7 +65,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()); @@ -75,18 +75,22 @@ } }); - 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); 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")); connect(m_switchLayoutsMenu, &QMenu::aboutToShow, this, &Menu::populateLayouts); connect(m_switchLayoutsMenu, &QMenu::triggered, this, &Menu::switchToLayout); + + connect(this->containment(), &Plasma::Containment::userConfiguringChanged, this, [&](bool configuring){ + m_configureAction->setVisible(!configuring); + }); } @@ -123,6 +127,10 @@ m_layoutsAction->setVisible(false); } + // setConfigureActionText + const int viewType = this->containment()->config().readEntry("viewType", static_cast(Latte::Types::DockView)); + m_configureAction->setText(i18nc("view settings window", viewType == Latte::Types::DockView ? "Dock &Settings..." : "Panel &Settings...")); + return actions; }