diff options
| author | LostDragonist <lost.dragonist@gmail.com> | 2018-11-29 08:17:28 -0600 |
|---|---|---|
| committer | LostDragonist <lost.dragonist@gmail.com> | 2018-11-29 14:11:09 -0600 |
| commit | 2212ad6f1c0bbaff7025cdb7227023661e399596 (patch) | |
| tree | 800fd33340a8aed14bd11ab9605398fe9c07284c /src/settingsdialog.cpp | |
| parent | 6142872620983a2bdd352d4e9e391ddb11c40305 (diff) | |
Add executable blacklisting
Diffstat (limited to 'src/settingsdialog.cpp')
| -rw-r--r-- | src/settingsdialog.cpp | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/settingsdialog.cpp b/src/settingsdialog.cpp index de18a850..e1c4b10d 100644 --- a/src/settingsdialog.cpp +++ b/src/settingsdialog.cpp @@ -34,6 +34,7 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>. #include <QMessageBox> #include <QShortcut> #include <QColorDialog> +#include <QInputDialog> #define WIN32_LEAN_AND_MEAN #include <Windows.h> @@ -115,6 +116,32 @@ void SettingsDialog::on_categoriesBtn_clicked() } } +void SettingsDialog::on_execBlacklistBtn_clicked() +{ + bool ok = false; + QString result = QInputDialog::getMultiLineText( + this, + tr("Executables Blacklist"), + tr("Enter one executable per line to be blacklisted from the virtual file system.\n" + "Mods and other virtualized files will not be visible to these executables and\n" + "any executables launched by them.\n\n" + "Example:\n" + " Chrome.exe\n" + " Firefox.exe"), + m_ExecutableBlacklist.split(";").join("\n"), + &ok + ); + if (ok) { + QStringList blacklist; + for (auto exec : result.split("\n")) { + if (exec.trimmed().endsWith(".exe", Qt::CaseInsensitive)) { + blacklist << exec.trimmed(); + } + } + m_ExecutableBlacklist = blacklist.join(";"); + } +} + void SettingsDialog::on_bsaDateBtn_clicked() { IPluginGame const *game |
