Changeset View
Changeset View
Standalone View
Standalone View
containmentactions/contextmenu/menu.cpp
Show First 20 Lines • Show All 90 Lines • ▼ Show 20 Line(s) | 90 | while (it.hasNext()) { | |||
---|---|---|---|---|---|
91 | it.next(); | 91 | it.next(); | ||
92 | m_actions.insert(it.key(), config.readEntry(it.key(), it.value())); | 92 | m_actions.insert(it.key(), config.readEntry(it.key(), it.value())); | ||
93 | } | 93 | } | ||
94 | 94 | | |||
95 | // everything below should only happen once, so check for it | 95 | // everything below should only happen once, so check for it | ||
96 | if (!m_runCommandAction) { | 96 | if (!m_runCommandAction) { | ||
97 | m_runCommandAction = new QAction(i18nc("plasma_containmentactions_contextmenu", "Show KRunner"), this); | 97 | m_runCommandAction = new QAction(i18nc("plasma_containmentactions_contextmenu", "Show KRunner"), this); | ||
98 | m_runCommandAction->setIcon(QIcon::fromTheme(QStringLiteral("plasma-search"))); | 98 | m_runCommandAction->setIcon(QIcon::fromTheme(QStringLiteral("plasma-search"))); | ||
99 | m_runCommandAction->setShortcut(KGlobalAccel::self()->globalShortcut(QStringLiteral("krunner"), QStringLiteral("run command")).value(0)); | 99 | m_runCommandAction->setShortcut(KGlobalAccel::self()->globalShortcut(QStringLiteral("krunner.desktop"), QStringLiteral("_launch")).value(0)); | ||
100 | connect(m_runCommandAction, &QAction::triggered, this, &ContextMenu::runCommand); | 100 | connect(m_runCommandAction, &QAction::triggered, this, &ContextMenu::runCommand); | ||
101 | 101 | | |||
102 | m_lockScreenAction = new QAction(i18nc("plasma_containmentactions_contextmenu", "Lock Screen"), this); | 102 | m_lockScreenAction = new QAction(i18nc("plasma_containmentactions_contextmenu", "Lock Screen"), this); | ||
103 | m_lockScreenAction->setIcon(QIcon::fromTheme(QStringLiteral("system-lock-screen"))); | 103 | m_lockScreenAction->setIcon(QIcon::fromTheme(QStringLiteral("system-lock-screen"))); | ||
104 | m_lockScreenAction->setShortcut(KGlobalAccel::self()->globalShortcut(QStringLiteral("ksmserver"), QStringLiteral("Lock Session")).value(0)); | 104 | m_lockScreenAction->setShortcut(KGlobalAccel::self()->globalShortcut(QStringLiteral("ksmserver"), QStringLiteral("Lock Session")).value(0)); | ||
105 | connect(m_lockScreenAction, &QAction::triggered, this, &ContextMenu::lockScreen); | 105 | connect(m_lockScreenAction, &QAction::triggered, this, &ContextMenu::lockScreen); | ||
106 | 106 | | |||
107 | m_logoutAction = new QAction(i18nc("plasma_containmentactions_contextmenu", "Leave..."), this); | 107 | m_logoutAction = new QAction(i18nc("plasma_containmentactions_contextmenu", "Leave..."), this); | ||
▲ Show 20 Lines • Show All 208 Lines • Show Last 20 Lines |