diff --git a/SandboxiePlus/SandMan/Wizards/SetupWizard.cpp b/SandboxiePlus/SandMan/Wizards/SetupWizard.cpp index 1cd263c5..1c4f4dc6 100644 --- a/SandboxiePlus/SandMan/Wizards/SetupWizard.cpp +++ b/SandboxiePlus/SandMan/Wizards/SetupWizard.cpp @@ -500,10 +500,7 @@ int CUIPage::nextId() const ////////////////////////////////////////////////////////////////////////////////////////// // CShellPage // -void CShellPage::OnEditOnlyAdmin() { - if (this->m_pEditOnlyAdmin->isChecked()) - QMessageBox::warning(this, tr("Warning"), tr("When this option is set, Sandbox Manager with normal user permissions will not be able to modify the configuration, which may result in a lock. You need to open the Sandbox Manager main window, click \"Sandbox (s)\" in the system menu, and then click \"Restart as Admin\" in the pop - up context menu to gain control of the configuration."),QMessageBox::Yes,QMessageBox::YesAll); -} + CShellPage::CShellPage(QWidget *parent) : QWizardPage(parent) { @@ -536,6 +533,16 @@ CShellPage::CShellPage(QWidget *parent) setLayout(layout); } +void CShellPage::OnEditOnlyAdmin() +{ + if (m_pEditOnlyAdmin->isChecked()) { + if (QMessageBox::warning(this, tr("Warning"), tr("When this option is set, Sandbox Manager with normal user permissions will not be able to modify the configuration, which may result in a lock. " + "You need to open the Sandbox Manager main window, click \"Sandbox (s)\" in the system menu, and then click \"Restart as Admin\" in the pop - up context menu to gain control of the configuration."), + QMessageBox::Ok, QMessageBox::Cancel) == QMessageBox::Cancel) + m_pEditOnlyAdmin->setChecked(false); + } +} + int CShellPage::nextId() const { //return CSetupWizard::Page_WFP; diff --git a/SandboxiePlus/SandMan/Wizards/SetupWizard.h b/SandboxiePlus/SandMan/Wizards/SetupWizard.h index 9f77e9c5..b3125f24 100644 --- a/SandboxiePlus/SandMan/Wizards/SetupWizard.h +++ b/SandboxiePlus/SandMan/Wizards/SetupWizard.h @@ -111,11 +111,13 @@ class CShellPage : public QWizardPage Q_OBJECT public: - void OnEditOnlyAdmin(); CShellPage(QWidget *parent = nullptr); int nextId() const override; +private slots: + void OnEditOnlyAdmin(); + private: QCheckBox *m_pAutoStart; QCheckBox *m_pContecxtMenu;