From c27e718fbdb3355bb75a92e8773afebb7d9c69a5 Mon Sep 17 00:00:00 2001 From: LostDragonist Date: Thu, 16 Aug 2018 14:32:28 -0500 Subject: Add "enable/disable selected" to mod list context menu --- src/mainwindow.cpp | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) (limited to 'src/mainwindow.cpp') diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index d638e988..e6b454c5 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -3597,13 +3597,19 @@ void MainWindow::on_modList_customContextMenuRequested(const QPoint &pos) menu->addAction(tr("Ignore update"), this, SLOT(ignoreUpdate())); } } + + menu->addSeparator(); + + menu->addAction(tr("Enable selected"), this, SLOT(enableSelectedMods_clicked())); + menu->addAction(tr("Disable selected"), this, SLOT(disableSelectedMods_clicked())); + menu->addSeparator(); menu->addAction(tr("Rename Mod..."), this, SLOT(renameMod_clicked())); menu->addAction(tr("Reinstall Mod"), this, SLOT(reinstallMod_clicked())); - menu->addAction(tr("Remove Mod..."), this, SLOT(removeMod_clicked())); + menu->addAction(tr("Remove Mod..."), this, SLOT(removeMod_clicked())); - menu->addSeparator(); + menu->addSeparator(); if (info->getNexusID() > 0) { switch (info->endorsedState()) { @@ -4183,6 +4189,18 @@ void MainWindow::disableSelectedPlugins_clicked() } +void MainWindow::enableSelectedMods_clicked() +{ + m_OrganizerCore.modList()->enableSelected(ui->modList->selectionModel()); +} + + +void MainWindow::disableSelectedMods_clicked() +{ + m_OrganizerCore.modList()->disableSelected(ui->modList->selectionModel()); +} + + void MainWindow::previewDataFile() { QString fileName = QDir::fromNativeSeparators(m_ContextItem->data(0, Qt::UserRole).toString()); -- cgit v1.3.1