From 43b2df9077db98475af6ab613cf7eaf301f84879 Mon Sep 17 00:00:00 2001 From: LostDragonist Date: Thu, 16 Aug 2018 13:55:32 -0500 Subject: Add "enable/disable selected" to plugin list context menu --- src/mainwindow.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'src/mainwindow.cpp') diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index e22fe07f..d638e988 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -4170,6 +4170,19 @@ void MainWindow::unhideFile() } } + +void MainWindow::enableSelectedPlugins_clicked() +{ + m_OrganizerCore.pluginList()->enableSelected(ui->espList->selectionModel()); +} + + +void MainWindow::disableSelectedPlugins_clicked() +{ + m_OrganizerCore.pluginList()->disableSelected(ui->espList->selectionModel()); +} + + void MainWindow::previewDataFile() { QString fileName = QDir::fromNativeSeparators(m_ContextItem->data(0, Qt::UserRole).toString()); @@ -4761,6 +4774,11 @@ void MainWindow::on_espList_customContextMenuRequested(const QPoint &pos) m_ContextRow = m_PluginListSortProxy->mapToSource(ui->espList->indexAt(pos)).row(); QMenu menu; + menu.addAction(tr("Enable selected"), this, SLOT(enableSelectedPlugins_clicked())); + menu.addAction(tr("Disable selected"), this, SLOT(disableSelectedPlugins_clicked())); + + menu.addSeparator(); + menu.addAction(tr("Enable all"), m_OrganizerCore.pluginList(), SLOT(enableAll())); menu.addAction(tr("Disable all"), m_OrganizerCore.pluginList(), SLOT(disableAll())); -- cgit v1.3.1