UI: Programs: Warn for "Apply same rules to child processes" option

This commit is contained in:
Nodir Temirkhodjaev 2024-07-24 11:59:40 +05:00
parent cb7de53135
commit 343ed036a1
2 changed files with 10 additions and 0 deletions

View File

@ -564,6 +564,8 @@ void ProgramEditDialog::setupChildOptions()
m_cbApplyChild->setIcon(
GuiUtil::overlayIcon(":/icons/application_double.png", ":/icons/tick.png"));
connect(m_cbApplyChild, &QCheckBox::clicked, this, &ProgramEditDialog::warnRestartNeededOption);
// Kill Child
m_cbKillChild = new QCheckBox();
m_cbKillChild->setIcon(IconCache::icon(":/icons/scull.png"));
@ -895,3 +897,10 @@ void ProgramEditDialog::warnDangerousOption() const
"Be careful when killing a system services or other important programs!\n"
"It can cause a Windows malfunction or totally unusable."));
}
void ProgramEditDialog::warnRestartNeededOption() const
{
IoC<WindowManager>()->showErrorBox(
tr("Attention: This option only affects new processes!\n\n"
"Please restart the running program to take effect of this option."));
}

View File

@ -107,6 +107,7 @@ private:
void editRuleDialog(int ruleId);
void warnDangerousOption() const;
void warnRestartNeededOption() const;
private:
ProgramsController *m_ctrl = nullptr;