Skip to content

Commit

Permalink
1.12.0a
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidXanatos committed Oct 26, 2023
1 parent 342d7ae commit 241fc20
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 10 deletions.
12 changes: 8 additions & 4 deletions SandboxiePlus/SandMan/SandMan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2819,10 +2819,10 @@ void CSandMan::SaveMessageLog(QIODevice* pFile)
pFile->write((Msg.TimeStamp.toString("hh:mm:ss.zzz") + "\t" + FormatSbieMessage(Msg.MsgCode, Msg.MsgData, Msg.ProcessName)).toLatin1() + "\n");
}

bool CSandMan::CheckCertificate(QWidget* pWidget, bool bAdvanced)
bool CSandMan::CheckCertificate(QWidget* pWidget, int iType)
{
QString Message;
if (bAdvanced)
if (iType == 1)
{
if (CERT_IS_LEVEL(g_CertInfo, eCertAdvanced))
return true;
Expand All @@ -2838,8 +2838,12 @@ bool CSandMan::CheckCertificate(QWidget* pWidget, bool bAdvanced)
if (g_CertInfo.active)
return true;

Message = tr("The selected feature set is only available to project supporters. Processes started in a box with this feature set enabled without a supporter certificate will be terminated after 5 minutes.<br />"
"<a href=\"https://sandboxie-plus.com/go.php?to=sbie-get-cert\">Become a project supporter</a>, and receive a <a href=\"https://sandboxie-plus.com/go.php?to=sbie-cert\">supporter certificate</a>");
if(iType == 2)
Message = tr("The selected feature set is only available to project supporters.<br />"
"<a href=\"https://sandboxie-plus.com/go.php?to=sbie-get-cert\">Become a project supporter</a>, and receive a <a href=\"https://sandboxie-plus.com/go.php?to=sbie-cert\">supporter certificate</a>");
else
Message = tr("The selected feature set is only available to project supporters. Processes started in a box with this feature set enabled without a supporter certificate will be terminated after 5 minutes.<br />"
"<a href=\"https://sandboxie-plus.com/go.php?to=sbie-get-cert\">Become a project supporter</a>, and receive a <a href=\"https://sandboxie-plus.com/go.php?to=sbie-cert\">supporter certificate</a>");
}

QMessageBox msgBox(pWidget);
Expand Down
2 changes: 1 addition & 1 deletion SandboxiePlus/SandMan/SandMan.h
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ class CSandMan : public QMainWindow
QIcon IconAddOverlay(const QIcon& Icon, const QString& Name, int Size = 24);
QString GetBoxDescription(int boxType);

bool CheckCertificate(QWidget* pWidget, bool bAdvanced = false);
bool CheckCertificate(QWidget* pWidget, int iType = 0);

bool IsAlwaysOnTop() const;

Expand Down
2 changes: 1 addition & 1 deletion SandboxiePlus/SandMan/Windows/OptionsGeneral.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1114,7 +1114,7 @@ void COptionsWindow::OnDiskChanged()
{
if (sender() == ui.chkEncrypt) {
if (ui.chkEncrypt->isChecked())
theGUI->CheckCertificate(this, true);
theGUI->CheckCertificate(this, 1);
}

if (ui.chkRamBox->isChecked()) {
Expand Down
11 changes: 7 additions & 4 deletions SandboxiePlus/SandMan/Windows/SettingsWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1110,7 +1110,7 @@ void CSettingsWindow::OnRamDiskChange()
{
if (sender() == ui.chkRamDisk) {
if (ui.chkRamDisk->isChecked())
theGUI->CheckCertificate(this);
theGUI->CheckCertificate(this, 2);
}

if (ui.chkRamDisk->isChecked() && ui.txtRamLimit->text().isEmpty())
Expand All @@ -1133,11 +1133,14 @@ void CSettingsWindow::OnVolumeChanged()
{
if (sender() == ui.chkSandboxUsb) {
if (ui.chkSandboxUsb->isChecked())
theGUI->CheckCertificate(this);
theGUI->CheckCertificate(this, 2);
}

ui.cmbUsbSandbox->setEnabled(ui.chkSandboxUsb->isChecked());
ui.treeVolumes->setEnabled(ui.chkSandboxUsb->isChecked());
ui.cmbUsbSandbox->setEnabled(ui.chkSandboxUsb->isChecked() && g_CertInfo.active);
ui.treeVolumes->setEnabled(ui.chkSandboxUsb->isChecked() && g_CertInfo.active);

if (!g_CertInfo.active)
return;

m_VolumeChanged = true;
OnOptChanged();
Expand Down

0 comments on commit 241fc20

Please sign in to comment.