Merge pull request #3656 from love-code-yeyixiao/master

add "restart as admin" feature
This commit is contained in:
DavidXanatos 2024-03-02 11:14:23 +01:00 committed by GitHub
commit 45ed7b91dc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 481 additions and 409 deletions

View File

@ -1608,6 +1608,28 @@ _FX LRESULT Gui_WindowProcW(
return lResult;
}
_FX VOID ProtectScreen(HWND hWnd) {
WCHAR buffer[BOXNAME_COUNT] = { L"\0" };
SbieApi_QueryProcess(GetCurrentProcess(), buffer, 0, 0, 0);
if (SbieApi_QueryConfBool(buffer, L"IsProtectScreen", FALSE)) {
OSVERSIONINFOEX os;
os.dwOSVersionInfoSize = sizeof(os);
if (GetVersionEx(&os))
{
if (os.dwMajorVersion == 6) {
HMODULE hDll = GetModuleHandleW(L"user32.dll");
if (hDll != NULL && hDll != INVALID_HANDLE_VALUE) {
typedef BOOL(*LPSETWINDOWDISPLAYAFFINITY)(HWND, DWORD);
LPSETWINDOWDISPLAYAFFINITY swda =(LPSETWINDOWDISPLAYAFFINITY) GetProcAddress(hDll, "SetWindowDisplayAffinity");
if (swda) {
swda(hWnd, 0x00000001);
}
}
}
}
}
}
//---------------------------------------------------------------------------
// Gui_WindowProcA
@ -1629,6 +1651,8 @@ _FX LRESULT Gui_WindowProcA(
if (uMsg == WM_SETTEXT && Gui_ShouldCreateTitle(hWnd))
new_lParam = (LPARAM)Gui_CreateTitleA((UCHAR *)lParam);
if (uMsg == WM_CREATE)
ProtectScreen(hWnd);
else
new_lParam = lParam;
@ -2702,3 +2726,4 @@ _FX BOOLEAN ComDlg32_Init(HMODULE module)
return TRUE;
}

View File

@ -45,7 +45,7 @@
<enum>QTabWidget::North</enum>
</property>
<property name="currentIndex">
<number>10</number>
<number>1</number>
</property>
<widget class="QWidget" name="tabGeneral">
<attribute name="title">
@ -1004,7 +1004,7 @@
<item row="0" column="0">
<widget class="QTabWidget" name="tabsSecurity">
<property name="currentIndex">
<number>0</number>
<number>2</number>
</property>
<widget class="QWidget" name="tabHarden">
<attribute name="title">
@ -1346,176 +1346,179 @@
<attribute name="title">
<string>Box Protection</string>
</attribute>
<layout class="QGridLayout" name="gridLayout_83">
<item row="0" column="0">
<layout class="QGridLayout" name="gridLayout_82">
<item row="1" column="2">
<spacer name="horizontalSpacer_19">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="7" column="3">
<widget class="QPushButton" name="btnHostProcessDeny">
<property name="text">
<string>Deny Process</string>
</property>
</widget>
</item>
<item row="8" column="3">
<spacer name="verticalSpacer_31">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item row="10" column="3">
<widget class="QPushButton" name="btnDelHostProcess">
<property name="text">
<string>Remove</string>
</property>
</widget>
</item>
<item row="11" column="0" colspan="4">
<widget class="QCheckBox" name="chkNotifyProtect">
<property name="text">
<string>Issue message 1318/1317 when a host process tries to access a sandboxed process/the box root</string>
</property>
</widget>
</item>
<item row="6" column="0" rowspan="5" colspan="3">
<widget class="QTreeWidget" name="treeHostProc">
<property name="sortingEnabled">
<bool>true</bool>
</property>
<column>
<property name="text">
<string>Process</string>
</property>
</column>
<column>
<property name="text">
<string>Action</string>
</property>
</column>
<column>
<property name="text">
<string/>
</property>
</column>
</widget>
</item>
<item row="4" column="3">
<spacer name="verticalSpacer_40">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item row="9" column="3">
<widget class="QCheckBox" name="chkShowHostProcTmpl">
<property name="text">
<string>Show Templates</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="lblBoxProtection">
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
<kerning>true</kerning>
</font>
</property>
<property name="toolTip">
<string>Protect the sandbox integrity itself</string>
</property>
<property name="text">
<string>Box Protection</string>
</property>
</widget>
</item>
<item row="0" column="0" colspan="4">
<widget class="QLabel" name="label_52">
<property name="text">
<string>Sandboxie-Plus is able to create confidential sandboxes that provide robust protection against unauthorized surveillance or tampering by host processes. By utilizing an encrypted sandbox image, this feature delivers the highest level of operational confidentiality, ensuring the safety and integrity of sandboxed processes.</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="6" column="3">
<widget class="QPushButton" name="btnHostProcessAllow">
<property name="text">
<string>Allow Process</string>
</property>
</widget>
</item>
<item row="5" column="0" colspan="3">
<widget class="QLabel" name="label_5">
<property name="text">
<string>Protect processes in this box from being accessed by specified unsandboxed host processes.</string>
</property>
<property name="wordWrap">
<bool>false</bool>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QLabel" name="label_47">
<property name="minimumSize">
<size>
<width>20</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>20</width>
<height>16777215</height>
</size>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="3" column="2" colspan="2">
<widget class="QCheckBox" name="chkLessConfidential">
<property name="text">
<string>Allow useful Windows processes access to protected processes</string>
</property>
</widget>
</item>
<item row="2" column="1" colspan="3">
<widget class="QCheckBox" name="chkConfidential">
<property name="text">
<string>Protect processes within this box from host processes</string>
</property>
</widget>
</item>
</layout>
<layout class="QGridLayout" name="gridLayout_15">
<item row="0" column="0" colspan="4">
<widget class="QLabel" name="label_52">
<property name="text">
<string>Sandboxie-Plus is able to create confidential sandboxes that provide robust protection against unauthorized surveillance or tampering by host processes. By utilizing an encrypted sandbox image, this feature delivers the highest level of operational confidentiality, ensuring the safety and integrity of sandboxed processes.</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="2" column="1" colspan="2">
<widget class="QCheckBox" name="chkConfidential">
<property name="text">
<string>Protect processes within this box from host processes</string>
</property>
</widget>
</item>
<item row="7" column="3">
<widget class="QPushButton" name="btnHostProcessDeny">
<property name="text">
<string>Deny Process</string>
</property>
</widget>
</item>
<item row="11" column="0" colspan="3">
<widget class="QCheckBox" name="chkNotifyProtect">
<property name="text">
<string>Issue message 1318/1317 when a host process tries to access a sandboxed process/the box root</string>
</property>
</widget>
</item>
<item row="3" column="2">
<widget class="QCheckBox" name="chkLessConfidential">
<property name="text">
<string>Allow useful Windows processes access to protected processes</string>
</property>
</widget>
</item>
<item row="1" column="2">
<spacer name="horizontalSpacer_19">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>471</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="4" column="3">
<spacer name="verticalSpacer_40">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item row="8" column="3">
<spacer name="verticalSpacer_31">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>76</height>
</size>
</property>
</spacer>
</item>
<item row="10" column="3">
<widget class="QPushButton" name="btnDelHostProcess">
<property name="text">
<string>Remove</string>
</property>
</widget>
</item>
<item row="6" column="3">
<widget class="QPushButton" name="btnHostProcessAllow">
<property name="text">
<string>Allow Process</string>
</property>
</widget>
</item>
<item row="5" column="0" colspan="3">
<widget class="QLabel" name="label_5">
<property name="text">
<string>Protect processes in this box from being accessed by specified unsandboxed host processes.</string>
</property>
<property name="wordWrap">
<bool>false</bool>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QLabel" name="label_47">
<property name="minimumSize">
<size>
<width>20</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>20</width>
<height>16777215</height>
</size>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="9" column="3">
<widget class="QCheckBox" name="chkShowHostProcTmpl">
<property name="text">
<string>Show Templates</string>
</property>
</widget>
</item>
<item row="6" column="0" rowspan="5" colspan="3">
<widget class="QTreeWidget" name="treeHostProc">
<property name="sortingEnabled">
<bool>true</bool>
</property>
<column>
<property name="text">
<string>Process</string>
</property>
</column>
<column>
<property name="text">
<string>Action</string>
</property>
</column>
<column>
<property name="text">
<string/>
</property>
</column>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="lblBoxProtection">
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
<kerning>true</kerning>
</font>
</property>
<property name="toolTip">
<string>Protect the sandbox integrity itself</string>
</property>
<property name="text">
<string>Box Protection</string>
</property>
</widget>
</item>
<item row="4" column="1" colspan="2">
<widget class="QCheckBox" name="chkProtectWindow">
<property name="text">
<string>Prevents getting an image of the window in the sandbox.</string>
</property>
</widget>
</item>
</layout>
</widget>
@ -4505,7 +4508,7 @@ instead of &quot;*&quot;.</string>
<rect>
<x>0</x>
<y>0</y>
<width>92</width>
<width>75</width>
<height>16</height>
</rect>
</property>

View File

@ -65,43 +65,6 @@
<string>General Options</string>
</attribute>
<layout class="QGridLayout" name="gridLayout_8">
<item row="0" column="0">
<widget class="QLabel" name="lblGeneral">
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
<kerning>true</kerning>
</font>
</property>
<property name="text">
<string>SandMan Options</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_19">
<property name="text">
<string>UI Language:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QComboBox" name="uiLang"/>
</item>
<item row="2" column="1">
<widget class="QCheckBox" name="chkSandboxUrls">
<property name="text">
<string>Open urls from this ui sandboxed</string>
</property>
<property name="tristate">
<bool>true</bool>
</property>
</widget>
</item>
<item row="3" column="1" colspan="2">
<widget class="QCheckBox" name="chkMonitorSize">
<property name="text">
@ -109,48 +72,6 @@
</property>
</widget>
</item>
<item row="4" column="1" colspan="2">
<layout class="QHBoxLayout" name="horizontalLayout_3">
<item>
<widget class="QCheckBox" name="chkPanic">
<property name="text">
<string>Hotkey for terminating all boxed processes:</string>
</property>
</widget>
</item>
<item>
<widget class="QKeySequenceEdit" name="keyPanic"/>
</item>
</layout>
</item>
<item row="5" column="1" colspan="2">
<layout class="QHBoxLayout" name="horizontalLayout_5">
<item>
<widget class="QCheckBox" name="chkTop">
<property name="text">
<string>Hotkey for bringing sandman to the top:</string>
</property>
</widget>
</item>
<item>
<widget class="QKeySequenceEdit" name="keyTop"/>
</item>
</layout>
</item>
<item row="6" column="1" colspan="2">
<layout class="QHBoxLayout" name="horizontalLayout_6">
<item>
<widget class="QCheckBox" name="chkPauseForce">
<property name="text">
<string>Hotkey for suspending process/folder forcing:</string>
</property>
</widget>
</item>
<item>
<widget class="QKeySequenceEdit" name="keyPauseForce"/>
</item>
</layout>
</item>
<item row="7" column="1" colspan="2">
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
@ -165,13 +86,90 @@
</item>
</layout>
</item>
<item row="8" column="1" colspan="2">
<widget class="QCheckBox" name="chkAsyncBoxOps">
<item row="13" column="1">
<spacer name="verticalSpacer_4">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>84</height>
</size>
</property>
</spacer>
</item>
<item row="13" column="2">
<spacer name="horizontalSpacer_8">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>195</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="12" column="3" rowspan="2">
<spacer name="horizontalSpacer_14">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="4" column="1" colspan="2">
<layout class="QHBoxLayout" name="horizontalLayout_3">
<item>
<widget class="QCheckBox" name="chkPanic">
<property name="text">
<string>Hotkey for terminating all boxed processes:</string>
</property>
</widget>
</item>
<item>
<widget class="QKeySequenceEdit" name="keyPanic"/>
</item>
</layout>
</item>
<item row="1" column="1">
<widget class="QComboBox" name="uiLang"/>
</item>
<item row="0" column="0">
<widget class="QLabel" name="lblGeneral">
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
<kerning>true</kerning>
</font>
</property>
<property name="text">
<string>Run box operations asynchronously whenever possible (like content deletion)</string>
<string>SandMan Options</string>
</property>
</widget>
</item>
<item row="5" column="1" colspan="2">
<layout class="QHBoxLayout" name="horizontalLayout_5">
<item>
<widget class="QCheckBox" name="chkTop">
<property name="text">
<string>Hotkey for bringing sandman to the top:</string>
</property>
</widget>
</item>
<item>
<widget class="QKeySequenceEdit" name="keyTop"/>
</item>
</layout>
</item>
<item row="9" column="0">
<widget class="QLabel" name="lblRecovery">
<property name="font">
@ -186,59 +184,75 @@
</property>
</widget>
</item>
<item row="10" column="1" colspan="2">
<widget class="QCheckBox" name="chkShowRecovery">
<item row="2" column="1">
<widget class="QCheckBox" name="chkSandboxUrls">
<property name="text">
<string>Show file recovery window when emptying sandboxes</string>
<string>Open urls from this ui sandboxed</string>
</property>
<property name="tristate">
<bool>true</bool>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_19">
<property name="text">
<string>UI Language:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="6" column="1" colspan="2">
<layout class="QHBoxLayout" name="horizontalLayout_6">
<item>
<widget class="QCheckBox" name="chkPauseForce">
<property name="text">
<string>Hotkey for suspending process/folder forcing:</string>
</property>
</widget>
</item>
<item>
<widget class="QKeySequenceEdit" name="keyPauseForce"/>
</item>
</layout>
</item>
<item row="11" column="1">
<widget class="QCheckBox" name="chkRecoveryTop">
<layout class="QVBoxLayout" name="verticalLayout_3">
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QCheckBox" name="chkShowRecovery">
<property name="text">
<string>Show file recovery window when emptying sandboxes</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="chkCheckDelete">
<property name="text">
<string>Check sandboxes' auto-delete status when Sandman starts</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="chkRecoveryTop">
<property name="text">
<string>Show the Recovery Window as Always on Top</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="8" column="1" colspan="2">
<widget class="QCheckBox" name="chkAsyncBoxOps">
<property name="text">
<string>Show the Recovery Window as Always on Top</string>
<string>Run box operations asynchronously whenever possible (like content deletion)</string>
</property>
</widget>
</item>
<item row="11" column="3" rowspan="2">
<spacer name="horizontalSpacer_14">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="12" column="1">
<spacer name="verticalSpacer_4">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>84</height>
</size>
</property>
</spacer>
</item>
<item row="12" column="2">
<spacer name="horizontalSpacer_8">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>195</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<widget class="QWidget" name="tab_4">

View File

@ -507,6 +507,7 @@ void CSandMan::CreateMenus(bool bAdvanced)
m_pNewBox = m_pMenuFile->addAction(CSandMan::GetIcon("NewBox"), tr("Create New Box"), this, SLOT(OnSandBoxAction()));
m_pNewGroup = m_pMenuFile->addAction(CSandMan::GetIcon("Group"), tr("Create Box Group"), this, SLOT(OnSandBoxAction()));
m_pImportBox = m_pMenuFile->addAction(CSandMan::GetIcon("UnPackBox"), tr("Import Box"), this, SLOT(OnSandBoxAction()));
m_pImportBox->setEnabled(CArchive::IsInit());
m_pMenuFile->addSeparator();
m_pRunBoxed = m_pMenuFile->addAction(CSandMan::GetIcon("Run"), tr("Run Sandboxed"), this, SLOT(OnSandBoxAction()));
@ -537,6 +538,7 @@ void CSandMan::CreateMenus(bool bAdvanced)
}
m_pMenuFile->addSeparator();
m_pRestart = m_pMenuFile->addAction(CSandMan::GetIcon("Exit"), tr("Restart As Admin"), this, SLOT(OnRestartAsAdmin()));
m_pExit = m_pMenuFile->addAction(CSandMan::GetIcon("Exit"), tr("Exit"), this, SLOT(OnExit()));
@ -691,7 +693,7 @@ void CSandMan::CreateOldMenus()
m_pSetupWizard = NULL;
//m_pUpdateCore = NULL;
}
m_pRestart = m_pMenuFile->addAction(CSandMan::GetIcon("Exit"), tr("Restart As Admin"), this, SLOT(OnRestartAsAdmin()));
m_pExit = m_pMenuFile->addAction(CSandMan::GetIcon("Exit"), tr("Exit"), this, SLOT(OnExit()));
m_pMenuView = m_pMenuBar->addMenu(tr("&View"));
@ -862,6 +864,7 @@ QList<ToolBarAction> CSandMan::GetAvailableToolBarActions()
ToolBarAction{ "CheckForUpdates", m_pUpdate },
ToolBarAction{ "About", m_pAbout },
ToolBarAction{ "", nullptr }, // separator
ToolBarAction{ "RestartAsAdmin", m_pRestart },
ToolBarAction{ "Exit", m_pExit },
ToolBarAction{ "", nullptr }, // separator
ToolBarAction{ "Contribute", m_pContribution }
@ -1296,7 +1299,20 @@ void CSandMan::CheckForUpdates(bool bManual)
}
#include "SandManTray.cpp"
void CSandMan::OnRestartAsAdmin() {
theAPI->Disconnect();
WCHAR buf[255] = { 0 };
GetModuleFileNameW(NULL, buf, 255);
SHELLEXECUTEINFO se;
memset(&se, 0, sizeof(SHELLEXECUTEINFO));
se.cbSize = sizeof(SHELLEXECUTEINFO);
se.lpVerb = L"runas";
se.lpFile = buf;
se.nShow = SW_HIDE;
se.fMask = 0;
ShellExecuteEx(&se);
OnExit();
}
void CSandMan::OnExit()
{
m_bExit = true;
@ -2661,8 +2677,11 @@ void CSandMan::OnHotKey(size_t id)
case HK_SUSPEND:
{
for (auto each : theAPI->GetAllBoxes())
each->SetSuspendedAll(TRUE);
for (auto each : theAPI->GetAllBoxes().toStdMap()) {
each.second->SetSuspendedAll(TRUE);
}
break;
}

View File

@ -279,6 +279,8 @@ private slots:
void CheckForUpdates(bool bManual = true);
void OnRestartAsAdmin();
void OnExit();
void OnHelp();
void OnAbout();
@ -366,6 +368,7 @@ private:
QHBoxLayout* m_pMenuLayout;
QMenu* m_pMenuFile;
QAction* m_pRestart;
QAction* m_pRunBoxed;
QAction* m_pNewBox;
QAction* m_pNewGroup;

View File

@ -104,6 +104,7 @@ void COptionsWindow::CreateAdvanced()
connect(ui.chkShowHostProcTmpl, SIGNAL(clicked(bool)), this, SLOT(OnShowHostProcTmpl()));
connect(ui.chkConfidential, SIGNAL(clicked(bool)), this, SLOT(OnConfidentialChanged()));
connect(ui.chkLessConfidential, SIGNAL(clicked(bool)), this, SLOT(OnLessConfidentialChanged()));
connect(ui.chkProtectWindow, SIGNAL(clicked(bool)), this, SLOT(OnAdvancedChanged()));
connect(ui.chkNotifyProtect, SIGNAL(clicked(bool)), this, SLOT(OnAdvancedChanged()));
connect(ui.treeInjectDll, SIGNAL(itemChanged(QTreeWidgetItem *, int)), this, SLOT(OnToggleInjectDll(QTreeWidgetItem *, int)));
@ -262,6 +263,7 @@ void COptionsWindow::LoadAdvanced()
ui.chkLessConfidential->setChecked(m_BoxTemplates.contains("LessConfidentialBox"));
ui.chkNotifyProtect->setChecked(m_pBox->GetBool("NotifyBoxProtected", false));
ui.chkProtectWindow->setChecked(m_pBox->GetBool("IsProtectScreen"));
QStringList Users = m_pBox->GetText("Enabled").split(",");
ui.lstUsers->clear();
@ -465,6 +467,8 @@ void COptionsWindow::SaveAdvanced()
WriteAdvancedCheck(ui.chkConfidential, "ConfidentialBox", "y", "");
WriteAdvancedCheck(ui.chkNotifyProtect, "NotifyBoxProtected", "y", "");
WriteAdvancedCheck(ui.chkProtectWindow, "IsProtectScreen", "y", "n");
QStringList Users;
for (int i = 0; i < ui.lstUsers->count(); i++)
Users.append(ui.lstUsers->item(i)->text());

View File

@ -313,6 +313,7 @@ CSettingsWindow::CSettingsWindow(QWidget* parent)
connect(ui.chkNotifyRecovery, SIGNAL(stateChanged(int)), this, SLOT(OnOptChanged()));
connect(ui.chkShowRecovery, SIGNAL(stateChanged(int)), this, SLOT(OnOptChanged()));
connect(ui.chkCheckDelete, SIGNAL(stateChanged(int)), this, SLOT(OnOptChanged()));
connect(ui.chkRecoveryTop, SIGNAL(stateChanged(int)), this, SLOT(OnOptChanged()));
//
@ -908,6 +909,7 @@ void CSettingsWindow::LoadSettings()
ui.chkSandboxUrls->setCheckState(CSettingsWindow__Int2Chk(theConf->GetInt("Options/OpenUrlsSandboxed", 2)));
ui.chkShowRecovery->setChecked(theConf->GetBool("Options/ShowRecovery", false));
ui.chkCheckDelete->setChecked(!theConf->GetBool("Options/CleanUpOnStart", false));
ui.chkNotifyRecovery->setChecked(!theConf->GetBool("Options/InstantRecovery", true));
ui.chkRecoveryTop->setChecked(theConf->GetBool("Options/RecoveryOnTop", true));
ui.chkAsyncBoxOps->setChecked(theConf->GetBool("Options/UseAsyncBoxOps", false));
@ -1558,6 +1560,8 @@ void CSettingsWindow::SaveSettings()
theConf->SetValue("Options/EnableSuspendKey", ui.chkSuspend->isChecked());
theConf->SetValue("Options/SuspendKeySequence", ui.keySuspend->keySequence().toString());
theConf->SetValue("Options/CleanUpOnStart", !ui.chkCheckDelete->isChecked());
theConf->SetValue("Options/WatchBoxSize", ui.chkMonitorSize->isChecked());
theConf->SetValue("Options/WatchIni", ui.chkWatchConfig->isChecked());