diff options
| author | Jonathan Feenstra <26406078+JonathanFeenstra@users.noreply.github.com> | 2026-01-03 15:48:06 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-01-03 15:48:06 +0100 |
| commit | e5ac1cc82d832f0515364fdb3f02f03bdea8870e (patch) | |
| tree | 16c7499b254b75380fc9248be6a749cddf15dd04 /src/editexecutablesdialog.cpp | |
| parent | d5bd9603c6ce4117cf98508616c72b702a760440 (diff) | |
Add executable setting to minimize MO2 to the system tray while running (#2313)
Diffstat (limited to 'src/editexecutablesdialog.cpp')
| -rw-r--r-- | src/editexecutablesdialog.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/editexecutablesdialog.cpp b/src/editexecutablesdialog.cpp index 8a01b9f0..f4a602c3 100644 --- a/src/editexecutablesdialog.cpp +++ b/src/editexecutablesdialog.cpp @@ -118,6 +118,9 @@ EditExecutablesDialog::EditExecutablesDialog(OrganizerCore& oc, int sel, connect(ui->useApplicationIcon, &QCheckBox::toggled, [&] { save(); }); + connect(ui->minimizeToSystemTray, &QCheckBox::toggled, [&] { + save(); + }); connect(ui->hide, &QCheckBox::toggled, [&] { save(); }); @@ -382,6 +385,8 @@ void EditExecutablesDialog::clearEdits() ui->configureLibraries->setEnabled(false); ui->useApplicationIcon->setEnabled(false); ui->useApplicationIcon->setChecked(false); + ui->minimizeToSystemTray->setEnabled(false); + ui->minimizeToSystemTray->setChecked(false); ui->hide->setEnabled(false); ui->hide->setChecked(false); @@ -398,6 +403,7 @@ void EditExecutablesDialog::setEdits(const Executable& e) ui->steamAppID->setEnabled(!e.steamAppID().isEmpty()); ui->steamAppID->setText(e.steamAppID()); ui->useApplicationIcon->setChecked(e.usesOwnIcon()); + ui->minimizeToSystemTray->setChecked(e.minimizeToSystemTray()); ui->hide->setChecked(e.hide()); m_lastGoodTitle = e.title(); @@ -443,6 +449,7 @@ void EditExecutablesDialog::setEdits(const Executable& e) ui->useApplicationIcon->setEnabled(true); ui->createFilesInMod->setEnabled(true); ui->forceLoadLibraries->setEnabled(true); + ui->minimizeToSystemTray->setEnabled(true); ui->hide->setEnabled(true); } @@ -503,6 +510,12 @@ void EditExecutablesDialog::save() e->flags(e->flags() & (~Executable::UseApplicationIcon)); } + if (ui->minimizeToSystemTray->isChecked()) { + e->flags(e->flags() | Executable::MinimizeToSystemTray); + } else { + e->flags(e->flags() & (~Executable::MinimizeToSystemTray)); + } + if (ui->hide->isChecked()) { e->flags(e->flags() | Executable::Hide); } else { |
