summaryrefslogtreecommitdiff
path: root/src/pluginlistcontextmenu.cpp
diff options
context:
space:
mode:
authorMikaël Capelle <capelle.mikael@gmail.com>2020-12-31 23:03:03 +0100
committerMikaël Capelle <capelle.mikael@gmail.com>2021-01-02 15:38:18 +0100
commit399ff3fcf7920adec128d30f3c97a7636a6f10be (patch)
treee69ae1ae362cfc2aef2c91231b712db0b6c890b5 /src/pluginlistcontextmenu.cpp
parent91081315cf7b654f5defe855dea3dc1f71b0962c (diff)
Minor clean for plugin list.
Diffstat (limited to 'src/pluginlistcontextmenu.cpp')
-rw-r--r--src/pluginlistcontextmenu.cpp16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/pluginlistcontextmenu.cpp b/src/pluginlistcontextmenu.cpp
index 787e5c0c..e6afd996 100644
--- a/src/pluginlistcontextmenu.cpp
+++ b/src/pluginlistcontextmenu.cpp
@@ -27,8 +27,20 @@ PluginListContextMenu::PluginListContextMenu(
addSeparator();
- addAction(tr("Enable all"), m_core.pluginList(), &PluginList::enableAll);
- addAction(tr("Disable all"), m_core.pluginList(), &PluginList::disableAll);
+ addAction(tr("Enable all"), [=]() {
+ if (QMessageBox::question(
+ m_view->topLevelWidget(), tr("Confirm"), tr("Really enable all plugins?"),
+ QMessageBox::Yes | QMessageBox::No) == QMessageBox::Yes) {
+ m_core.pluginList()->setEnabledAll(true);
+ }
+ });
+ addAction(tr("Disable all"), [=]() {
+ if (QMessageBox::question(
+ m_view->topLevelWidget(), tr("Confirm"), tr("Really disable all plugins?"),
+ QMessageBox::Yes | QMessageBox::No) == QMessageBox::Yes) {
+ m_core.pluginList()->setEnabledAll(false);
+ }
+ });
addSeparator();