Compare commits
50 Commits
912dca572a
...
c437e494f4
Author | SHA1 | Date |
---|---|---|
爱编程的叶一笑 | c437e494f4 | |
DavidXanatos | 08a2a2b031 | |
Sebastian G | 664d721b0b | |
love-code-yeyixiao | 8bd2f0710b | |
github-actions[bot] | 024a2c4d67 | |
DavidXanatos | 8517353d75 | |
DavidXanatos | b27b4b5eda | |
DavidXanatos | ee7d48700a | |
DavidXanatos | 2d7820db84 | |
DavidXanatos | ea0e620db4 | |
DavidXanatos | 0b1e750941 | |
DavidXanatos | 8a4b5e82de | |
offhub | 676684776b | |
DavidXanatos | 37ac24da90 | |
DavidXanatos | 1de1d1f57e | |
DavidXanatos | b30b910f11 | |
offhub | 6b6186d6a3 | |
isaak654 | 7adaf857ab | |
DavidXanatos | 356955140b | |
DavidXanatos | dba441136a | |
DavidXanatos | 19528f2a25 | |
DavidXanatos | 6b9f44fcb6 | |
github-actions[bot] | 0492d8bf29 | |
DavidXanatos | f0ee2737ec | |
offhub | 03aa918a47 | |
nkh0472 | fb1ee26174 | |
offhub | 3e3d67e274 | |
Michael | 513659240a | |
Tragic Life | c353f9af42 | |
offhub | f3a94eb589 | |
offhub | 67245a35c1 | |
offhub | 045c66b368 | |
offhub | ee0693e17a | |
offhub | 71dcf9533d | |
isaak654 | ba97a442fc | |
DavidXanatos | d09d17d49b | |
DavidXanatos | ebe0be911f | |
github-actions[bot] | 693da11c95 | |
offhub | fe7aafc4b0 | |
DavidXanatos | 0274074298 | |
DavidXanatos | c40fb91c1c | |
offhub | 585210423b | |
DavidXanatos | c90340a0a5 | |
DavidXanatos | 0c58926ee7 | |
DavidXanatos | cc63194b5f | |
DavidXanatos | e1c46bb269 | |
DavidXanatos | 57f464df65 | |
DavidXanatos | c953a38b5c | |
DavidXanatos | e4f4e8cb07 | |
爱编程的叶一笑 | 9c2e5955e5 |
|
@ -125,5 +125,5 @@ jobs:
|
|||
echo 'tailing->trailing' >> dictionary_code.txt
|
||||
# Only lowercase letters are allowed in --ignore-words-list
|
||||
codespell --dictionary=dictionary.txt --dictionary=dictionary_rare.txt --dictionary=dictionary_code.txt \
|
||||
--ignore-words-list="wil,unknwn,tolen,pevent,doubleclick,parm,parms,etcp,ois,ba,ptd,modell,namesd,stdio,uint,errorstring,ontext,atend,deque,ecounter,nmake,namess,inh,daa,varient,lite,uis,emai,ws,slanguage,woh,tne,typpos,enew,shft,seh,ser,servent,socio-economic,rime" \
|
||||
--ignore-words-list="wil,unknwn,tolen,pevent,doubleclick,parm,parms,etcp,ois,ba,ptd,modell,namesd,stdio,uint,errorstring,ontext,atend,deque,ecounter,nmake,namess,inh,daa,varient,lite,uis,emai,ws,slanguage,woh,tne,typpos,enew,shft,seh,ser,servent,socio-economic,rime,falt,infor" \
|
||||
--skip="./.git,./.github/workflows/codespell.yml,./dictionary*.txt,./Sandboxie/msgs/Text-*-*.txt,./Sandboxie/msgs/report/Report-*.txt,./SandboxiePlus/SandMan/*.ts,./Installer/Languages.iss,./Installer/isl/*.isl,./Sandboxie/common/Detours/Makefile,./Sandboxie/common/Detours/disasm.cpp,./Sandboxie/install/build.bat,./SandboxieTools/ImBox/dc/crypto_fast/xts_fast.c,./Sandboxie/apps/control/TreePropSheet.h,./Sandboxie/apps/control/PropPageFrame.h,./Sandboxie/apps/control/PropPageFrameDefault.h,./SandboxiePlus/SandMan/Troubleshooting/lang_*.json"
|
||||
|
|
29
CHANGELOG.md
29
CHANGELOG.md
|
@ -5,26 +5,47 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
|||
|
||||
|
||||
|
||||
## [1.13.7 / 5.68.7] - 2024-04-
|
||||
|
||||
### Added
|
||||
- added DropAdmin and improved related checkboxes #3851 https://github.com/sandboxie-plus/Sandboxie/pull/3851 (thanks offhub)
|
||||
- added file version info doe SbieDll.dll and SbieSvc.exe to the Plus About dialog
|
||||
|
||||
### Fixed
|
||||
- fixed issue with start agent option [#3844](https://github.com/sandboxie-plus/Sandboxie/pull/3844) (thanks offhub)
|
||||
- fixed issue with Delete V2 introduced in 1.13.5
|
||||
|
||||
|
||||
|
||||
## [1.13.6 / 5.68.6] - 2024-04-
|
||||
## [1.13.6 / 5.68.6] - 2024-04-21
|
||||
|
||||
### Added
|
||||
- added "BlockInterferenceControl=y" option to prevent sandboxed processes from forcing windows on top and moving the mounse pointer (thanks Yeyixiao)
|
||||
- Note: this option may cause issues in games hence do not enable it for gaming boxes.
|
||||
- added support for hardlinks [#3826](https://github.com/sandboxie-plus/Sandboxie/issues/3826)
|
||||
- added support for hard links [#3826](https://github.com/sandboxie-plus/Sandboxie/issues/3826)
|
||||
- added mechanism to terminate stuck sandboxed processes from the driver
|
||||
- added Make the trigger list editable [#3742](https://github.com/sandboxie-plus/Sandboxie/issues/3742)
|
||||
- added Optionally extend the screenshot protection to the UI [#3739](https://github.com/sandboxie-plus/Sandboxie/issues/3739)
|
||||
- added a button to edit local/custom templates [#3738](https://github.com/sandboxie-plus/Sandboxie/issues/3738)
|
||||
- added Permanently Re-sizable or Larger "Run Sandboxed" Window [#3697](https://github.com/sandboxie-plus/Sandboxie/issues/3697)
|
||||
- added Notepad++ template [#3836](https://github.com/sandboxie-plus/Sandboxie/pull/3836)
|
||||
|
||||
### Changed
|
||||
- improved Avast template [#3777](https://github.com/sandboxie-plus/Sandboxie/pull/3777)
|
||||
- renamed a bunch of experimental options and marked them as experimental in the UI
|
||||
- "IsBlockCapture=y" -> "BlockScreenCapture=y"
|
||||
- "IsProtectScreen=>" -> "CoverBoxedWindows=y"
|
||||
|
||||
### Fixed
|
||||
- fixed When I change the BlockDNS and BlockPorts options, the Apply button is not activated [#3807](https://github.com/sandboxie-plus/Sandboxie/issues/3807)
|
||||
- fixed troubleshooting wizard broke with new qt [#3810](https://github.com/sandboxie-plus/Sandboxie/discussions/3810)
|
||||
- fixed troubleshooting wizard broke with new Qt [#3810](https://github.com/sandboxie-plus/Sandboxie/discussions/3810)
|
||||
- fixed Settings dialog now showing the right ram disk letter
|
||||
- fixed issues with updater broke with new qt due to missing SSL support [3810](https://github.com/sandboxie-plus/Sandboxie/discussions/3810)
|
||||
- fixed issues with updater broke with new Qt due to missing SSL support [3810](https://github.com/sandboxie-plus/Sandboxie/discussions/3810)
|
||||
- fixed Enabling "DropAdminRights/FakeAdminRights" adds "BlockInterferePower and ForceProtectionOnMount" to the INI [#3825](https://github.com/sandboxie-plus/Sandboxie/issues/3825)
|
||||
- fixed KeePass "Out of Memory" crash due to "BlockScreenCapture=y" [#3768](https://github.com/sandboxie-plus/Sandboxie/issues/3768)
|
||||
- fixed Sandboxie 1.13.4 with IsBlockCapture=y not working on Windows 7 [#3769](https://github.com/sandboxie-plus/Sandboxie/issues/3769)
|
||||
- fixed explorer.exe issue "FakeAdminRights=y" [#3638](https://github.com/sandboxie-plus/Sandboxie/issues/3638)
|
||||
- fixed Make it possible to disable forced folder warning [#3569](https://github.com/sandboxie-plus/Sandboxie/issues/3569)
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -21,9 +21,22 @@
|
|||
#ifndef _MY_VERSION_H
|
||||
#define _MY_VERSION_H
|
||||
|
||||
#define MY_VERSION_BINARY 5,68,6
|
||||
#define MY_VERSION_STRING "5.68.6"
|
||||
#define MY_ABI_VERSION 0x56800
|
||||
#define STR2(X) #X
|
||||
#define STR(X) STR2(X)
|
||||
|
||||
#define VERSION_MJR 5
|
||||
#define VERSION_MIN 70
|
||||
#define VERSION_REV 0
|
||||
#define VERSION_UPD 0
|
||||
|
||||
#if VERSION_UPD > 0
|
||||
#define MY_VERSION_BINARY VERSION_MJR,VERSION_MIN,VERSION_REV,VERSION_UPD
|
||||
#define MY_VERSION_STRING STR(VERSION_MJR.VERSION_MIN.VERSION_REV.VERSION_UPD)
|
||||
#else
|
||||
#define MY_VERSION_BINARY VERSION_MJR,VERSION_MIN,VERSION_REV
|
||||
#define MY_VERSION_STRING STR(VERSION_MJR.VERSION_MIN.VERSION_REV)
|
||||
#endif
|
||||
#define MY_ABI_VERSION 0x56800
|
||||
|
||||
// These #defines are used by either Resource Compiler or NSIS installer
|
||||
#define SBIE_INSTALLER_PATH "..\\Bin\\"
|
||||
|
|
|
@ -200,6 +200,7 @@ typedef struct _THREAD_DATA {
|
|||
BOOLEAN proc_create_process_capture_image;
|
||||
BOOLEAN proc_create_process_force_elevate;
|
||||
BOOLEAN proc_create_process_as_invoker;
|
||||
BOOLEAN proc_create_process_fake_admin;
|
||||
BOOLEAN proc_image_is_copy;
|
||||
WCHAR *proc_image_path;
|
||||
WCHAR *proc_command_line;
|
||||
|
@ -310,6 +311,8 @@ extern ULONG Dll_Windows;
|
|||
extern PSECURITY_DESCRIPTOR Secure_NormalSD;
|
||||
extern PSECURITY_DESCRIPTOR Secure_EveryoneSD;
|
||||
|
||||
extern BOOLEAN Secure_FakeAdmin;
|
||||
|
||||
extern BOOLEAN Ldr_BoxedImage;
|
||||
|
||||
extern WCHAR *Ldr_ImageTruePath;
|
||||
|
|
|
@ -312,7 +312,7 @@ _FX BOOL Gdi_DeleteDC(HDC hdc)
|
|||
// HDC hdcSrc, int x1, int y1, DWORD rop
|
||||
//) {
|
||||
// int ret = __sys_BitBlt(hdc, x, y, cx, cy, hdcSrc, x1, y1, rop);
|
||||
// /*if (SbieApi_QueryConfBool(NULL, L"IsBlockCapture", FALSE)) {
|
||||
// /*if (Gui_UseBlockCapture) {
|
||||
//
|
||||
// typedef int (*P_GetDeviceCaps)(_In_opt_ HDC hdc, _In_ int index);
|
||||
// P_GetDeviceCaps GetDeviceCaps = Ldr_GetProcAddrNew(DllName_gdi32, "GetDeviceCaps", "GetDeviceCaps"); if (!GetDeviceCaps) return ret;
|
||||
|
@ -337,7 +337,7 @@ _FX BOOL Gdi_DeleteDC(HDC hdc)
|
|||
//)
|
||||
//{
|
||||
// int ret = __sys_StretchBlt(hdcDest, xDest, yDest, wDest, hDest, hdcSrc, xSrc, ySrc, wSrc, hSrc, rop);
|
||||
// /*if (SbieApi_QueryConfBool(NULL, L"IsBlockCapture", FALSE)) {
|
||||
// /*if (Gui_UseBlockCapture) {
|
||||
//
|
||||
// typedef int (*P_GetDeviceCaps)(_In_opt_ HDC hdc, _In_ int index);
|
||||
// P_GetDeviceCaps GetDeviceCaps = Ldr_GetProcAddrNew(DllName_gdi32, "GetDeviceCaps", "GetDeviceCaps"); if (!GetDeviceCaps) return ret;
|
||||
|
@ -922,7 +922,7 @@ _FX BOOLEAN Gdi_Full_Init_impl(HMODULE module, BOOLEAN full)
|
|||
|
||||
InitializeCriticalSection(&Gdi_CritSec);
|
||||
|
||||
Gui_UseBlockCapture = SbieApi_QueryConfBool(NULL, L"IsBlockCapture", FALSE);
|
||||
Gui_UseBlockCapture = SbieApi_QueryConfBool(NULL, L"BlockScreenCapture", FALSE);
|
||||
if (Gui_UseBlockCapture)
|
||||
Gdi_InitDCCache();
|
||||
|
||||
|
@ -1112,7 +1112,6 @@ static CRITICAL_SECTION Gui_DCCache_CritSec;
|
|||
|
||||
typedef struct _DUMMY_DC{
|
||||
|
||||
BOOLEAN bDelete;
|
||||
HBITMAP hBmp;
|
||||
|
||||
} DUMMY_DC;
|
||||
|
@ -1157,13 +1156,6 @@ _FX HDC Gdi_GetDummyDC(HDC dc, HWND hWnd)
|
|||
if (!dummy)
|
||||
dummy = map_insert(&Gui_DCCache, ret, NULL, sizeof(DUMMY_DC));
|
||||
|
||||
//
|
||||
// Note: GetDC GetDCEx GetWindowDC must use ReleaseDC, while CreateDC must use DeleteDC
|
||||
// We set bDelete = TRUE to make Gdi_OnFreeDC delete the DC and return NULL
|
||||
// then Gui_ReleaseDC will not call __sys_ReleaseDC
|
||||
//
|
||||
|
||||
dummy->bDelete = !!hWnd;
|
||||
dummy->hBmp = bmp;
|
||||
|
||||
LeaveCriticalSection(&Gui_DCCache_CritSec);
|
||||
|
@ -1190,10 +1182,8 @@ _FX HDC Gdi_OnFreeDC(HDC dc)
|
|||
|
||||
DeleteObject(dummy->hBmp);
|
||||
|
||||
if (dummy->bDelete) {
|
||||
__sys_DeleteDC(dc);
|
||||
ret = NULL;
|
||||
}
|
||||
__sys_DeleteDC(dc);
|
||||
ret = NULL; // we return NULL to notify the caller that there is nothing left to do
|
||||
|
||||
map_remove(&Gui_DCCache, dc);
|
||||
}
|
||||
|
|
|
@ -372,9 +372,9 @@ _FX BOOLEAN Gui_Init(HMODULE module)
|
|||
|
||||
const UCHAR *ProcName;
|
||||
|
||||
Gui_UseProtectScreen = SbieApi_QueryConfBool(NULL, L"IsProtectScreen", FALSE);
|
||||
Gui_UseProtectScreen = SbieApi_QueryConfBool(NULL, L"CoverBoxedWindows", FALSE);
|
||||
|
||||
Gui_UseBlockCapture = SbieApi_QueryConfBool(NULL, L"IsBlockCapture", FALSE);
|
||||
Gui_UseBlockCapture = SbieApi_QueryConfBool(NULL, L"BlockScreenCapture", FALSE);
|
||||
if (Gui_UseBlockCapture)
|
||||
Gdi_InitDCCache();
|
||||
|
||||
|
|
|
@ -57,7 +57,7 @@
|
|||
#define WM_DDE_LAST (WM_DDE_FIRST+8)
|
||||
|
||||
#define GET_WIN_API(name, lib) \
|
||||
P_##name name = Ldr_GetProcAddrNew(lib, #name, #name); \
|
||||
P_##name name = Ldr_GetProcAddrNew(lib, L#name, #name); \
|
||||
if(!name) return NULL;
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
|
|
@ -193,7 +193,7 @@ _FX BOOLEAN Gui_InitClass(HMODULE module)
|
|||
}
|
||||
}
|
||||
|
||||
Gui_UseProtectScreen = SbieApi_QueryConfBool(NULL, L"IsProtectScreen", FALSE);
|
||||
Gui_UseProtectScreen = SbieApi_QueryConfBool(NULL, L"CoverBoxedWindows", FALSE);
|
||||
|
||||
//
|
||||
// hook functions
|
||||
|
|
|
@ -319,7 +319,9 @@ _FX BOOLEAN Gui_InitMisc(HMODULE module)
|
|||
if (SbieApi_QueryConfBool(NULL, L"UseChangeSpeed", FALSE))
|
||||
{
|
||||
module = current;
|
||||
SBIEDLL_HOOK(Gui_, SetTimer);
|
||||
P_SetTimer SetTimer = Ldr_GetProcAddrNew(DllName_user32, "SetTimer", "SetTimer");
|
||||
if (SetTimer)
|
||||
SBIEDLL_HOOK(Gui_, SetTimer);
|
||||
module = Dll_Kernel32;
|
||||
SBIEDLL_HOOK(Gui_, GetTickCount);
|
||||
P_GetTickCount64 GetTickCount64 = Ldr_GetProcAddrNew(Dll_Kernel32, "GetTickCount64", "GetTickCount64");
|
||||
|
|
|
@ -266,11 +266,13 @@ _FX NTSTATUS Key_MarkDeletedEx_v2(const WCHAR* TruePath, const WCHAR* ValueName)
|
|||
|
||||
NtClose(hPathsFile);
|
||||
|
||||
Key_PathsVersion++;
|
||||
|
||||
File_GetAttributes_internal(KEY_PATH_FILE_NAME, &Key_PathsFileSize, &Key_PathsFileDate, NULL);
|
||||
}
|
||||
}
|
||||
else
|
||||
Key_SavePathTree();
|
||||
Key_SavePathTree();
|
||||
}
|
||||
|
||||
File_ReleaseMutex(hMutex);
|
||||
|
|
|
@ -1335,12 +1335,16 @@ _FX BOOL Proc_CreateProcessInternalW(
|
|||
lpProcessAttributes = NULL;
|
||||
}
|
||||
|
||||
TlsData->proc_create_process_fake_admin = (Secure_FakeAdmin == FALSE && SbieApi_QueryConfBool(NULL, L"FakeAdminRights", FALSE));
|
||||
|
||||
ok = __sys_CreateProcessInternalW(
|
||||
hToken, lpApplicationName, lpCommandLine,
|
||||
lpProcessAttributes, lpThreadAttributes, bInheritHandles,
|
||||
dwCreationFlags, lpEnvironment, lpCurrentDirectory,
|
||||
lpStartupInfo, lpProcessInformation, hNewToken);
|
||||
|
||||
TlsData->proc_create_process_fake_admin = FALSE;
|
||||
|
||||
err = GetLastError();
|
||||
|
||||
goto finish;
|
||||
|
@ -1410,6 +1414,7 @@ _FX BOOL Proc_CreateProcessInternalW(
|
|||
}
|
||||
}
|
||||
|
||||
TlsData->proc_create_process_fake_admin = (Secure_FakeAdmin == FALSE && SbieApi_QueryConfBool(NULL, L"FakeAdminRights", FALSE));
|
||||
|
||||
ok = __sys_CreateProcessInternalW(
|
||||
NULL, lpApplicationName, lpCommandLine,
|
||||
|
@ -1419,6 +1424,7 @@ _FX BOOL Proc_CreateProcessInternalW(
|
|||
|
||||
err = GetLastError();
|
||||
|
||||
TlsData->proc_create_process_fake_admin = FALSE;
|
||||
|
||||
//
|
||||
// restore the original owner pointers in the security descriptors
|
||||
|
|
|
@ -1003,8 +1003,9 @@ _FX NTSTATUS Ldr_NtQueryInformationToken(
|
|||
ULONG TokenInformationLength,
|
||||
ULONG *ReturnLength)
|
||||
{
|
||||
THREAD_DATA *TlsData = Dll_GetTlsData(NULL);
|
||||
|
||||
NTSTATUS status = 0;
|
||||
THREAD_DATA *TlsData = NULL;
|
||||
HANDLE hTokenReal = NULL;
|
||||
BOOLEAN FakeAdmin = FALSE;
|
||||
|
||||
|
@ -1019,7 +1020,7 @@ _FX NTSTATUS Ldr_NtQueryInformationToken(
|
|||
// we also ensure that the token belongs to the current process
|
||||
//
|
||||
|
||||
if (Secure_FakeAdmin && (SbieApi_QueryProcessInfoEx(0, 'ippt', (LONG_PTR)(hTokenReal ? hTokenReal : TokenHandle))))
|
||||
if ((Secure_FakeAdmin || TlsData->proc_create_process_fake_admin) && (SbieApi_QueryProcessInfoEx(0, 'ippt', (LONG_PTR)(hTokenReal ? hTokenReal : TokenHandle))))
|
||||
{
|
||||
FakeAdmin = TRUE;
|
||||
}
|
||||
|
@ -1039,8 +1040,6 @@ _FX NTSTATUS Ldr_NtQueryInformationToken(
|
|||
// we are running as Administrator
|
||||
//
|
||||
|
||||
TlsData = Dll_GetTlsData(NULL);
|
||||
|
||||
if (Secure_Is_IE_NtQueryInformationToken && !TlsData->proc_create_process)
|
||||
{
|
||||
FakeAdmin = TRUE;
|
||||
|
@ -1150,10 +1149,12 @@ NTSTATUS Ldr_NtAccessCheckByType(PSECURITY_DESCRIPTOR SecurityDescriptor, PSID P
|
|||
|
||||
_FX NTSTATUS Ldr_NtAccessCheck(PSECURITY_DESCRIPTOR SecurityDescriptor, HANDLE ClientToken, ACCESS_MASK DesiredAccess, PGENERIC_MAPPING GenericMapping, PPRIVILEGE_SET RequiredPrivilegesBuffer, PULONG BufferLength, PACCESS_MASK GrantedAccess, PNTSTATUS AccessStatus)
|
||||
{
|
||||
THREAD_DATA *TlsData = Dll_GetTlsData(NULL);
|
||||
|
||||
NTSTATUS status = 0;
|
||||
HANDLE hTokenReal = NULL;
|
||||
|
||||
if (Secure_FakeAdmin && SecurityDescriptor) {
|
||||
if ((Secure_FakeAdmin || TlsData->proc_create_process_fake_admin) && SecurityDescriptor) {
|
||||
BOOLEAN Fake = FALSE;
|
||||
|
||||
PSID Group, Owner;
|
||||
|
@ -1352,7 +1353,7 @@ _FX NTSTATUS Secure_RtlQueryElevationFlags(ULONG *Flags)
|
|||
|
||||
BOOLEAN fake = FALSE;
|
||||
|
||||
if (Secure_FakeAdmin)
|
||||
if (Secure_FakeAdmin || TlsData->proc_create_process_fake_admin)
|
||||
{
|
||||
fake = TRUE;
|
||||
}
|
||||
|
@ -1446,7 +1447,9 @@ NTSTATUS Secure_RtlCheckTokenMembershipEx(
|
|||
DWORD flags,
|
||||
PUCHAR isMember)
|
||||
{
|
||||
if (Secure_FakeAdmin && RtlEqualSid(sidToCheck, AdministratorsSid)) {
|
||||
THREAD_DATA *TlsData = Dll_GetTlsData(NULL);
|
||||
|
||||
if ((Secure_FakeAdmin || TlsData->proc_create_process_fake_admin) && RtlEqualSid(sidToCheck, AdministratorsSid)) {
|
||||
if (isMember) *isMember = TRUE;
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
|
|
@ -1034,6 +1034,7 @@ Tmpl.ScanService=edgeupdate
|
|||
# SBIE fix for MS Edge WebView2
|
||||
#ExternalManifestHack=msedgewebview2.exe,y
|
||||
NormalFilePath=msedge.exe,%LocalAppData%\Microsoft\Edge\User Data\Default\Secure Preferences
|
||||
FakeAdminRights=msedge.exe,n
|
||||
|
||||
#
|
||||
# Vivaldi
|
||||
|
@ -3692,6 +3693,13 @@ ClosedKeyPath=<Template_Chromes>,HKEY_CURRENT_USER\Software\Microsoft\Windows\Sh
|
|||
ClosedKeyPath=<Template_Chromes>,HKEY_CURRENT_USER\Software\Microsoft\Windows\Shell\Associations\UrlAssociations\https\UserChoice
|
||||
ProcessGroup=<Template_Chromes>,chrome.exe
|
||||
|
||||
[Template_NotepadPlusPlus_fix]
|
||||
Tmpl.Title=#4342,Notepad++
|
||||
Tmpl.Class=Misc
|
||||
Tmpl.Url=https://github.com/search?q=repo%3Asandboxie-plus%2FSandboxie+NppShell.dll&type=issues
|
||||
Tmpl.ScanScript=if(system.version().major != 11) return false; return system.checkRegKey("\\REGISTRY\\MACHINE\\SOFTWARE\\CLASSES\\CLSID\\{B298D29A-A6ED-11DE-BA8C-A68E55D89593}")
|
||||
ClosedFilePath=explorer.exe,*\contextMenu\NppShell.dll
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -617,16 +617,16 @@ bool InitConsole(bool bCreateIfNeeded)
|
|||
// avoid flashing a bright white window when in dark mode
|
||||
//
|
||||
|
||||
void SafeShow(QWidget* pWidget) {
|
||||
static bool Lock = false;
|
||||
pWidget->setProperty("windowOpacity", 0.0);
|
||||
if (Lock == false) {
|
||||
Lock = true;
|
||||
pWidget->show();
|
||||
QApplication::processEvents(QEventLoop::ExcludeSocketNotifiers);
|
||||
Lock = false;
|
||||
} else
|
||||
pWidget->show();
|
||||
pWidget->setProperty("windowOpacity", 1.0);
|
||||
}
|
||||
//void SafeShow(QWidget* pWidget) {
|
||||
// static bool Lock = false;
|
||||
// pWidget->setProperty("windowOpacity", 0.0);
|
||||
// if (Lock == false) {
|
||||
// Lock = true;
|
||||
// pWidget->show();
|
||||
// QApplication::processEvents(QEventLoop::ExcludeSocketNotifiers);
|
||||
// Lock = false;
|
||||
// } else
|
||||
// pWidget->show();
|
||||
// pWidget->setProperty("windowOpacity", 1.0);
|
||||
//}
|
||||
|
||||
|
|
|
@ -115,7 +115,7 @@ MISCHELPERS_EXPORT void SetPaleteTexture(QPalette& palette, QPalette::ColorRole
|
|||
MISCHELPERS_EXPORT bool InitConsole(bool bCreateIfNeeded = true);
|
||||
#endif
|
||||
|
||||
MISCHELPERS_EXPORT void SafeShow(QWidget* pWidget);
|
||||
//MISCHELPERS_EXPORT void SafeShow(QWidget* pWidget);
|
||||
|
||||
template <typename T>
|
||||
QSet<T> ListToSet(const QList<T>& qList) { return QSet<T>(qList.begin(), qList.end()); }
|
||||
|
|
|
@ -1,22 +1,21 @@
|
|||
#include "stdafx.h"
|
||||
#include "../../MiscHelpers/Common/Settings.h"
|
||||
#include "Settings.h"
|
||||
#include "MultiErrorDialog.h"
|
||||
#include "..\SandMan.h"
|
||||
|
||||
|
||||
CMultiErrorDialog::CMultiErrorDialog(const QString& Message, const QStringList& Errors, QWidget* parent)
|
||||
CMultiErrorDialog::CMultiErrorDialog(const QString& Title, const QString& Message, const QStringList& Errors, QWidget* parent)
|
||||
: QDialog(parent)
|
||||
{
|
||||
this->setWindowTitle(tr("Sandboxie-Plus - Error"));
|
||||
this->setWindowTitle(Title);
|
||||
m_pMainLayout = new QGridLayout(this);
|
||||
|
||||
int Row = 0;
|
||||
m_pMainLayout->addWidget(new QLabel(Message), Row++, 0, 1, 4);
|
||||
|
||||
m_pErrors = new CPanelWidgetEx();
|
||||
m_pErrors->GetTree()->setItemDelegate(new CTreeItemDelegate());
|
||||
//m_pErrors->GetTree()->setItemDelegate(new CTreeItemDelegate());
|
||||
|
||||
m_pErrors->GetTree()->setHeaderLabels(tr("Message").split("|"));
|
||||
//m_pErrors->GetTree()->setHeaderLabels(tr("Message").split("|"));
|
||||
|
||||
m_pErrors->GetView()->setSelectionMode(QAbstractItemView::ExtendedSelection);
|
||||
m_pErrors->GetView()->setSortingEnabled(false);
|
||||
|
@ -31,7 +30,7 @@ CMultiErrorDialog::CMultiErrorDialog(const QString& Message, const QStringList&
|
|||
connect(m_pButtonBox,SIGNAL(accepted()),this,SLOT(accept()));
|
||||
connect(m_pButtonBox,SIGNAL(rejected()),this,SLOT(reject()));
|
||||
|
||||
restoreGeometry(theConf->GetBlob("ErrorWindow/Window_Geometry"));
|
||||
//restoreGeometry(theConf->GetBlob("ErrorWindow/Window_Geometry"));
|
||||
|
||||
|
||||
foreach(const QString& Error, Errors)
|
||||
|
@ -47,5 +46,5 @@ CMultiErrorDialog::CMultiErrorDialog(const QString& Message, const QStringList&
|
|||
|
||||
CMultiErrorDialog::~CMultiErrorDialog()
|
||||
{
|
||||
theConf->SetBlob("ErrorWindow/Window_Geometry", saveGeometry());
|
||||
//theConf->SetBlob("ErrorWindow/Window_Geometry", saveGeometry());
|
||||
}
|
|
@ -1,13 +1,12 @@
|
|||
#pragma once
|
||||
#include "../../MiscHelpers/Common/PanelView.h"
|
||||
#include "../../QSbieAPI/SbieStatus.h"
|
||||
#include "PanelView.h"
|
||||
|
||||
class CMultiErrorDialog : public QDialog
|
||||
class MISCHELPERS_EXPORT CMultiErrorDialog : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
CMultiErrorDialog(const QString& Message, const QStringList& Errors, QWidget* parent = 0);
|
||||
CMultiErrorDialog(const QString& Title, const QString& Message, const QStringList& Errors, QWidget* parent = 0);
|
||||
virtual ~CMultiErrorDialog();
|
||||
|
||||
private:
|
|
@ -35,6 +35,7 @@ HEADERS += ./MiscHelpers.h \
|
|||
./Common/NeonEffect.h \
|
||||
./Common/NetworkAccessManager.h \
|
||||
./Common/MT/ThreadLock.h \
|
||||
./Common/MultiErrorDialog.h \
|
||||
./Archive/Archive.h \
|
||||
./Archive/ArchiveFS.h \
|
||||
./Archive/ArchiveExtractor.h \
|
||||
|
@ -70,6 +71,7 @@ SOURCES += ./MiscHelpers.cpp \
|
|||
./Common/TreeItemModel.cpp \
|
||||
./Common/Xml.cpp \
|
||||
./Common/MT/ThreadLock.cpp \
|
||||
./Common/MultiErrorDialog.cpp \
|
||||
./Archive/Archive.cpp \
|
||||
./Archive/ArchiveFS.cpp \
|
||||
./Archive/ArchiveExtractor.cpp \
|
||||
|
|
|
@ -234,6 +234,7 @@
|
|||
<ClCompile Include="Common\KeyValueInputDialog.cpp" />
|
||||
<ClCompile Include="Common\ListItemModel.cpp" />
|
||||
<ClCompile Include="Common\MT\ThreadLock.cpp" />
|
||||
<ClCompile Include="Common\MultiErrorDialog.cpp" />
|
||||
<ClCompile Include="Common\MultiLineInputDialog.cpp" />
|
||||
<ClCompile Include="Common\OtherFunctions.cpp" />
|
||||
<ClCompile Include="Common\PanelView.cpp" />
|
||||
|
@ -278,6 +279,7 @@
|
|||
<QtMoc Include="Common\ItemChooser.h" />
|
||||
<QtMoc Include="Common\KeyValueInputDialog.h" />
|
||||
<QtMoc Include="Common\ListItemModel.h" />
|
||||
<QtMoc Include="Common\MultiErrorDialog.h" />
|
||||
<QtMoc Include="Common\MultiLineInputDialog.h" />
|
||||
<QtMoc Include="Common\PanelView.h" />
|
||||
<QtMoc Include="Common\ProgressDialog.h" />
|
||||
|
|
|
@ -62,6 +62,9 @@
|
|||
</ClCompile>
|
||||
<ClCompile Include="Common\ListItemModel.cpp">
|
||||
<Filter>Common</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Common\MultiErrorDialog.cpp">
|
||||
<Filter>Common</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Common\MultiLineInputDialog.cpp">
|
||||
<Filter>Common</Filter>
|
||||
|
@ -218,6 +221,9 @@
|
|||
</QtMoc>
|
||||
<QtMoc Include="Common\ListItemModel.h">
|
||||
<Filter>Common</Filter>
|
||||
</QtMoc>
|
||||
<QtMoc Include="Common\MultiErrorDialog.h">
|
||||
<Filter>Common</Filter>
|
||||
</QtMoc>
|
||||
<QtMoc Include="Common\MultiLineInputDialog.h">
|
||||
<Filter>Common</Filter>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>785</width>
|
||||
<height>539</height>
|
||||
<height>557</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
|
@ -45,7 +45,7 @@
|
|||
<enum>QTabWidget::North</enum>
|
||||
</property>
|
||||
<property name="currentIndex">
|
||||
<number>1</number>
|
||||
<number>0</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="tabGeneral">
|
||||
<attribute name="title">
|
||||
|
@ -696,7 +696,7 @@
|
|||
<item row="10" column="1" colspan="2">
|
||||
<widget class="QCheckBox" name="chkProtectPower">
|
||||
<property name="text">
|
||||
<string>Prevent sandboxed processes from interfering with power operations</string>
|
||||
<string>Prevent sandboxed processes from interfering with power operations (Experimental)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
@ -819,21 +819,21 @@
|
|||
</item>
|
||||
<item row="12" column="1" colspan="2">
|
||||
<widget class="QCheckBox" name="chkUserOperation">
|
||||
<property name="statusTip">
|
||||
<string>Prevent move mouse, bring in front, and simmilar operations.</string>
|
||||
<property name="toolTip">
|
||||
<string>Prevent move mouse, bring in front, and similar operations, this is likely to cause issues with games.</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Prevent interference with the unser interface (Experimental, see tooltop)</string>
|
||||
<string>Prevent interference with the user interface (Experimental)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="13" column="1" colspan="2">
|
||||
<widget class="QCheckBox" name="chkBlockCapture">
|
||||
<property name="statusTip">
|
||||
<string>This feature does not block all means of optaining a screen capture only some common once, also it may cause UI glitches</string>
|
||||
<property name="toolTip">
|
||||
<string>This feature does not block all means of obtaining a screen capture, only some common ones.</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Prevent sandboxed processes from capturing window images (Experimental unstable, see tooltip)</string>
|
||||
<string>Prevent sandboxed processes from capturing window images (Experimental, may cause UI glitches)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
@ -4753,9 +4753,100 @@ instead of "*".</string>
|
|||
</property>
|
||||
<item row="0" column="0">
|
||||
<layout class="QGridLayout" name="gridLayout_3">
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_6">
|
||||
<property name="text">
|
||||
<string>Filter Categories</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="4">
|
||||
<widget class="QToolButton" name="btnDelTemplate">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>23</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Remove</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0" rowspan="6" colspan="4">
|
||||
<widget class="QTreeWidget" name="treeTemplates">
|
||||
<property name="selectionMode">
|
||||
<enum>QAbstractItemView::ExtendedSelection</enum>
|
||||
</property>
|
||||
<property name="sortingEnabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Category</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Name</string>
|
||||
</property>
|
||||
</column>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="4">
|
||||
<widget class="QToolButton" name="btnAddTemplate">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>23</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Add Template</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QComboBox" name="cmbCategories"/>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QLabel" name="label_15">
|
||||
<property name="text">
|
||||
<string>Text Filter</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="3">
|
||||
<widget class="QLineEdit" name="txtTemplates"/>
|
||||
</item>
|
||||
<item row="4" column="4">
|
||||
<widget class="QToolButton" name="btnOpenTemplate">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Open Template</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0" colspan="4">
|
||||
<widget class="QLabel" name="label_13">
|
||||
<property name="text">
|
||||
|
@ -4779,83 +4870,18 @@ instead of "*".</string>
|
|||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QLabel" name="label_15">
|
||||
<property name="text">
|
||||
<string>Text Filter</string>
|
||||
<item row="5" column="4">
|
||||
<spacer name="verticalSpacer_42">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="3">
|
||||
<widget class="QLineEdit" name="txtTemplates"/>
|
||||
</item>
|
||||
<item row="2" column="4">
|
||||
<widget class="QToolButton" name="btnAddTemplate">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>23</height>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Add Template</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_6">
|
||||
<property name="text">
|
||||
<string>Filter Categories</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0" rowspan="4" colspan="4">
|
||||
<widget class="QTreeWidget" name="treeTemplates">
|
||||
<property name="selectionMode">
|
||||
<enum>QAbstractItemView::ExtendedSelection</enum>
|
||||
</property>
|
||||
<property name="sortingEnabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Category</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Name</string>
|
||||
</property>
|
||||
</column>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="4">
|
||||
<widget class="QToolButton" name="btnDelTemplate">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>23</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Remove</string>
|
||||
</property>
|
||||
</widget>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>263</width>
|
||||
<width>290</width>
|
||||
<height>430</height>
|
||||
</rect>
|
||||
</property>
|
||||
|
|
|
@ -77,7 +77,7 @@
|
|||
<item>
|
||||
<widget class="QCheckBox" name="chkSuspend">
|
||||
<property name="text">
|
||||
<string>Hotkey for suspending all process</string>
|
||||
<string>Hotkey for suspending all processes:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
@ -1088,20 +1088,64 @@
|
|||
<layout class="QGridLayout" name="gridLayout_32">
|
||||
<item row="0" column="0">
|
||||
<layout class="QGridLayout" name="gridLayout_31">
|
||||
<item row="1" column="2">
|
||||
<widget class="QComboBox" name="cmbDPI"/>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QLabel" name="label_24">
|
||||
<item row="1" column="1">
|
||||
<widget class="QLabel" name="label_23">
|
||||
<property name="text">
|
||||
<string>Font Scaling</string>
|
||||
<string>High DPI Scaling</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="3">
|
||||
<item row="2" column="3">
|
||||
<widget class="QLabel" name="label_13">
|
||||
<property name="text">
|
||||
<string>%</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="1">
|
||||
<widget class="QLabel" name="label_26">
|
||||
<property name="text">
|
||||
<string>External Ini Editor</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="1">
|
||||
<widget class="QLabel" name="label_6">
|
||||
<property name="text">
|
||||
<string>Ini Editor Font</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="2">
|
||||
<widget class="QComboBox" name="cmbFontScale">
|
||||
<property name="editable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="4">
|
||||
<spacer name="horizontalSpacer_20">
|
||||
<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="5" column="3">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||
<item>
|
||||
<widget class="QPushButton" name="btnSelectIniFont">
|
||||
|
@ -1138,8 +1182,11 @@
|
|||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="6" column="2">
|
||||
<spacer name="horizontalSpacer_18">
|
||||
<item row="1" column="2">
|
||||
<widget class="QComboBox" name="cmbDPI"/>
|
||||
</item>
|
||||
<item row="7" column="0">
|
||||
<spacer name="horizontalSpacer_17">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
|
@ -1155,7 +1202,6 @@
|
|||
<widget class="QLabel" name="lblDisplay">
|
||||
<property name="font">
|
||||
<font>
|
||||
<weight>75</weight>
|
||||
<bold>true</bold>
|
||||
<kerning>true</kerning>
|
||||
</font>
|
||||
|
@ -1165,18 +1211,8 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLabel" name="label_23">
|
||||
<property name="text">
|
||||
<string>High DPI Scaling</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="4">
|
||||
<spacer name="horizontalSpacer_20">
|
||||
<item row="7" column="2">
|
||||
<spacer name="horizontalSpacer_18">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
|
@ -1188,28 +1224,7 @@
|
|||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="lblIni">
|
||||
<property name="font">
|
||||
<font>
|
||||
<weight>75</weight>
|
||||
<bold>true</bold>
|
||||
<kerning>true</kerning>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Ini Options</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="3">
|
||||
<widget class="QLabel" name="label_13">
|
||||
<property name="text">
|
||||
<string>%</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="3">
|
||||
<item row="7" column="3">
|
||||
<spacer name="horizontalSpacer_19">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
|
@ -1222,17 +1237,24 @@
|
|||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="QLabel" name="label_6">
|
||||
<item row="2" column="1">
|
||||
<widget class="QLabel" name="label_24">
|
||||
<property name="text">
|
||||
<string>Ini Editor Font</string>
|
||||
<string>Font Scaling</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="1">
|
||||
<item row="5" column="2">
|
||||
<widget class="QLabel" name="lblIniEditFont">
|
||||
<property name="text">
|
||||
<string>#</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="1">
|
||||
<spacer name="verticalSpacer_10">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
|
@ -1245,19 +1267,8 @@
|
|||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="4" column="2">
|
||||
<widget class="QLabel" name="lblIniEditFont">
|
||||
<property name="text">
|
||||
<string>#</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="2">
|
||||
<widget class="QComboBox" name="cmbFontScale">
|
||||
<property name="editable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
<item row="6" column="2" colspan="2">
|
||||
<widget class="QLineEdit" name="txtEditor"/>
|
||||
</item>
|
||||
<item row="1" column="3">
|
||||
<widget class="QLabel" name="label">
|
||||
|
@ -1266,29 +1277,23 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0">
|
||||
<spacer name="horizontalSpacer_17">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="lblIni">
|
||||
<property name="font">
|
||||
<font>
|
||||
<bold>true</bold>
|
||||
<kerning>true</kerning>
|
||||
</font>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="5" column="2" colspan="2">
|
||||
<widget class="QLineEdit" name="txtEditor"/>
|
||||
</item>
|
||||
<item row="5" column="1">
|
||||
<widget class="QLabel" name="label_26">
|
||||
<property name="text">
|
||||
<string>External Ini Editor</string>
|
||||
<string>Ini Options</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1" colspan="4">
|
||||
<widget class="QCheckBox" name="chkHide">
|
||||
<property name="text">
|
||||
<string>Hide SandMan windows from screen capture (UI restart required)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
@ -2523,22 +2528,36 @@ Unlike the preview channel, it does not include untested, potentially breaking,
|
|||
</property>
|
||||
<item row="0" column="0">
|
||||
<layout class="QGridLayout" name="gridLayout_25">
|
||||
<item row="4" column="2">
|
||||
<widget class="QToolButton" name="btnDelTemplate">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLineEdit" name="txtTemplates"/>
|
||||
</item>
|
||||
<item row="3" column="2">
|
||||
<spacer name="verticalSpacer_20">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>23</height>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_18">
|
||||
<property name="text">
|
||||
<string>Remove</string>
|
||||
<string>Text Filter</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0" colspan="2">
|
||||
<widget class="QLabel" name="label_10">
|
||||
<property name="text">
|
||||
<string>This list contains user created custom templates for sandbox options</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
@ -2561,30 +2580,20 @@ Unlike the preview channel, it does not include untested, potentially breaking,
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="2">
|
||||
<spacer name="verticalSpacer_20">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
<item row="4" column="2">
|
||||
<widget class="QToolButton" name="btnOpenTemplate">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_18">
|
||||
<property name="text">
|
||||
<string>Text Filter</string>
|
||||
<string>Open Template</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLineEdit" name="txtTemplates"/>
|
||||
</item>
|
||||
<item row="2" column="0" rowspan="3" colspan="2">
|
||||
<item row="2" column="0" rowspan="5" colspan="2">
|
||||
<widget class="QTreeWidget" name="treeTemplates">
|
||||
<property name="selectionMode">
|
||||
<enum>QAbstractItemView::ExtendedSelection</enum>
|
||||
|
@ -2596,16 +2605,38 @@ Unlike the preview channel, it does not include untested, potentially breaking,
|
|||
</column>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0" colspan="2">
|
||||
<widget class="QLabel" name="label_10">
|
||||
<property name="text">
|
||||
<string>This list contains user created custom templates for sandbox options</string>
|
||||
<item row="6" column="2">
|
||||
<widget class="QToolButton" name="btnDelTemplate">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>23</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Remove</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="2">
|
||||
<spacer name="verticalSpacer_17">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
|
|
|
@ -117,4 +117,56 @@ bool PickWindowsIcon(QWidget* pParent, QString& Path, quint32& Index)
|
|||
BOOL Ret = PickIconDlg((HWND)pParent->window()->winId(), iconPath, MAX_PATH, (int*)&Index);
|
||||
Path = QString::fromWCharArray(iconPath);
|
||||
return !!Ret;
|
||||
}
|
||||
|
||||
void ProtectWindow(void* hWnd)
|
||||
{
|
||||
typedef BOOL(*LPSETWINDOWDISPLAYAFFINITY)(HWND, DWORD);
|
||||
static LPSETWINDOWDISPLAYAFFINITY pSetWindowDisplayAffinity = NULL;
|
||||
if (!pSetWindowDisplayAffinity)
|
||||
pSetWindowDisplayAffinity = (LPSETWINDOWDISPLAYAFFINITY)GetProcAddress(LoadLibraryA("user32.dll"), "SetWindowDisplayAffinity");
|
||||
if (pSetWindowDisplayAffinity)
|
||||
pSetWindowDisplayAffinity((HWND)hWnd, 0x00000011);
|
||||
}
|
||||
|
||||
QString GetProductVersion(const QString &filePath)
|
||||
{
|
||||
QFileInfo check_file(filePath);
|
||||
|
||||
// check if file exists and if yes: Is it really a file and no directory?
|
||||
if (check_file.exists() && check_file.isFile()) {
|
||||
DWORD verHandle = 0;
|
||||
UINT size = 0;
|
||||
LPBYTE lpBuffer = NULL;
|
||||
DWORD verSize = GetFileVersionInfoSize(filePath.toStdWString().c_str(), &verHandle);
|
||||
|
||||
if (verSize != NULL) {
|
||||
LPSTR verData = new char[verSize];
|
||||
|
||||
if (GetFileVersionInfo(filePath.toStdWString().c_str(), verHandle, verSize, verData)) {
|
||||
if (VerQueryValue(verData, L"\\", (VOID FAR* FAR*)&lpBuffer, &size)) {
|
||||
if (size) {
|
||||
VS_FIXEDFILEINFO *verInfo = (VS_FIXEDFILEINFO *)lpBuffer;
|
||||
if (verInfo->dwSignature == 0xfeef04bd) {
|
||||
// Doesn't matter if you are on 32 bit or 64 bit,
|
||||
// DWORD is always 32 bits, so first two revision numbers
|
||||
// come from dwFileVersionMS, last two come from dwFileVersionLS
|
||||
QString Version = QString("%1.%2.%3")
|
||||
.arg((verInfo->dwFileVersionMS >> 16) & 0xffff)
|
||||
.arg((verInfo->dwFileVersionMS >> 0) & 0xffff)
|
||||
.arg((verInfo->dwFileVersionLS >> 16) & 0xffff)
|
||||
//.arg((verInfo->dwFileVersionLS >> 0) & 0xffff)
|
||||
;
|
||||
DWORD Update = (verInfo->dwFileVersionLS >> 0) & 0xffff;
|
||||
if (Update)
|
||||
Version += QString("%1").arg(QChar((char)('a' + (Update - 1))));
|
||||
return Version;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
delete[] verData;
|
||||
}
|
||||
}
|
||||
return QString();
|
||||
}
|
|
@ -4,4 +4,8 @@ QVariantMap ResolveShortcut(const QString& LinkPath);
|
|||
|
||||
QPixmap LoadWindowsIcon(const QString& Path, quint32 Index);
|
||||
|
||||
bool PickWindowsIcon(QWidget* pParent, QString& Path, quint32& Index);
|
||||
bool PickWindowsIcon(QWidget* pParent, QString& Path, quint32& Index);
|
||||
|
||||
void ProtectWindow(void* hWnd);
|
||||
|
||||
QString GetProductVersion(const QString& filePath);
|
|
@ -6,7 +6,7 @@
|
|||
#include "Views/SbieView.h"
|
||||
#include "../MiscHelpers/Common/CheckableMessageBox.h"
|
||||
#include <QWinEventNotifier>
|
||||
#include "./Dialogs/MultiErrorDialog.h"
|
||||
#include "../MiscHelpers/Common/MultiErrorDialog.h"
|
||||
#include "../QSbieAPI/SbieUtils.h"
|
||||
#include "../QSbieAPI/Sandboxie/BoxBorder.h"
|
||||
#include "../QSbieAPI/Sandboxie/SbieTemplates.h"
|
||||
|
@ -119,7 +119,7 @@ CSandMan::CSandMan(QWidget *parent)
|
|||
: QMainWindow(parent)
|
||||
{
|
||||
#if defined(Q_OS_WIN)
|
||||
MainWndHandle = (HWND)QWidget::winId();
|
||||
MainWndHandle = (HWND)winId();
|
||||
|
||||
QApplication::instance()->installNativeEventFilter(new CNativeEventFilter);
|
||||
#endif
|
||||
|
@ -1596,6 +1596,23 @@ bool CSandMan::IsSilentMode()
|
|||
return IsFullScreenMode();
|
||||
}
|
||||
|
||||
void CSandMan::SafeShow(QWidget* pWidget)
|
||||
{
|
||||
if(theConf->GetBool("Options/CoverWindows", false))
|
||||
ProtectWindow((HWND)pWidget->winId());
|
||||
|
||||
static bool Lock = false;
|
||||
pWidget->setProperty("windowOpacity", 0.0);
|
||||
if (Lock == false) {
|
||||
Lock = true;
|
||||
pWidget->show();
|
||||
QApplication::processEvents(QEventLoop::ExcludeSocketNotifiers);
|
||||
Lock = false;
|
||||
} else
|
||||
pWidget->show();
|
||||
pWidget->setProperty("windowOpacity", 1.0);
|
||||
}
|
||||
|
||||
QWidget* g_GUIParent = NULL;
|
||||
|
||||
int CSandMan::SafeExec(QDialog* pDialog)
|
||||
|
@ -3992,8 +4009,8 @@ void CSandMan::CheckResults(QList<SB_STATUS> Results, QWidget* pParent, bool bAs
|
|||
else if (Errors.count() == 1)
|
||||
QMessageBox::warning(pParent ? pParent : this, tr("Sandboxie-Plus - Error"), Errors.first());
|
||||
else if (Errors.count() > 1) {
|
||||
CMultiErrorDialog Dialog(tr("Operation failed for %1 item(s).").arg(Errors.size()), Errors, pParent ? pParent : this);
|
||||
Dialog.exec();
|
||||
CMultiErrorDialog Dialog("Sandboxie-Plus", tr("Operation failed for %1 item(s).").arg(Errors.size()), Errors, pParent ? pParent : this);
|
||||
theGUI->SafeExec(&Dialog);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -4084,16 +4101,18 @@ bool CSandMan::IsWFPEnabled() const
|
|||
return (g_FeatureFlags & CSbieAPI::eSbieFeatureWFP) != 0;
|
||||
}
|
||||
|
||||
QString CSandMan::GetVersion()
|
||||
QString CSandMan::GetVersion(bool bWithUpdates)
|
||||
{
|
||||
QString Version = QString::number(VERSION_MJR) + "." + QString::number(VERSION_MIN) //.rightJustified(2, '0')
|
||||
//#if VERSION_REV > 0 || VERSION_MJR == 0
|
||||
+ "." + QString::number(VERSION_REV)
|
||||
//#endif
|
||||
QString Version = QString::number(VERSION_MJR) + "." + QString::number(VERSION_MIN) + "." + QString::number(VERSION_REV);
|
||||
if (bWithUpdates) {
|
||||
int iUpdate = COnlineUpdater::GetCurrentUpdate();
|
||||
if (iUpdate)
|
||||
Version += QChar('a' + (iUpdate - 1));
|
||||
}
|
||||
#if VERSION_UPD > 0
|
||||
+ QChar('a' + VERSION_UPD - 1)
|
||||
else
|
||||
Version += QChar('a' + VERSION_UPD - 1);
|
||||
#endif
|
||||
;
|
||||
return Version;
|
||||
}
|
||||
|
||||
|
@ -4276,30 +4295,39 @@ void CSandMan::OnAbout()
|
|||
{
|
||||
if (sender() == m_pAbout)
|
||||
{
|
||||
if ((QGuiApplication::queryKeyboardModifiers() & Qt::ControlModifier) != 0){
|
||||
CSupportDialog::CheckSupport();
|
||||
return;
|
||||
}
|
||||
|
||||
QString AboutCaption = tr(
|
||||
"<h3>About Sandboxie-Plus</h3>"
|
||||
"<p>Version %1</p>"
|
||||
"<p>Copyright (c) 2020-2024 by DavidXanatos</p>"
|
||||
).arg(theGUI->GetVersion());
|
||||
"<p>" MY_COPYRIGHT_STRING "</p>"
|
||||
).arg(theGUI->GetVersion(true));
|
||||
|
||||
QString CertInfo;
|
||||
if (!g_Certificate.isEmpty()) {
|
||||
CertInfo = tr("This copy of Sandboxie+ is certified for: %1").arg(GetArguments(g_Certificate, L'\n', L':').value("NAME"));
|
||||
} else {
|
||||
CertInfo = tr("Sandboxie+ is free for personal and non-commercial use.");
|
||||
}
|
||||
if (!g_Certificate.isEmpty())
|
||||
CertInfo = tr("This copy of Sandboxie-Plus is certified for: %1").arg(GetArguments(g_Certificate, L'\n', L':').value("NAME"));
|
||||
else
|
||||
CertInfo = tr("Sandboxie-Plus is free for personal and non-commercial use.");
|
||||
|
||||
QString SbiePath = theAPI->GetSbiePath();
|
||||
|
||||
QString AboutText = tr(
|
||||
"Sandboxie-Plus is an open source continuation of Sandboxie.<br />"
|
||||
"Visit <a href=\"https://sandboxie-plus.com\">sandboxie-plus.com</a> for more information.<br />"
|
||||
"<br />"
|
||||
"%3<br />"
|
||||
"%2<br />"
|
||||
"<br />"
|
||||
"Driver version: %1<br />"
|
||||
"Features: %2<br />"
|
||||
"Features: %3<br />"
|
||||
"<br />"
|
||||
"Installation: %1<br />"
|
||||
"SbieDrv.sys: %4<br /> SbieSvc.exe: %5<br /> SbieDll.dll: %6<br />"
|
||||
"<br />"
|
||||
"Icons from <a href=\"https://icons8.com\">icons8.com</a>"
|
||||
).arg(theAPI->GetVersion()).arg(theAPI->GetFeatureStr()).arg(CertInfo);
|
||||
).arg(SbiePath).arg(CertInfo).arg(theAPI->GetFeatureStr())
|
||||
.arg(GetProductVersion(SbiePath + "\\SbieDrv.sys")).arg(GetProductVersion(SbiePath + "\\SbieSvc.exe")).arg(GetProductVersion(SbiePath + "\\SbieDll.dll"));
|
||||
|
||||
QMessageBox *msgBox = new QMessageBox(this);
|
||||
msgBox->setAttribute(Qt::WA_DeleteOnClose);
|
||||
|
|
|
@ -47,7 +47,7 @@ public:
|
|||
CScriptManager* GetScripts() { return m_SbieScripts; }
|
||||
CAddonManager* GetAddonManager() { return m_AddonManager; }
|
||||
|
||||
static QString GetVersion();
|
||||
static QString GetVersion(bool bWithUpdates = false);
|
||||
static void ShowMessageBox(QWidget* Widget, QMessageBox::Icon Icon, const QString& Message);
|
||||
|
||||
bool IsImDiskReady() const { return m_ImDiskReady; }
|
||||
|
@ -88,6 +88,7 @@ public:
|
|||
QString FormatSbieMessage(quint32 MsgCode, const QStringList& MsgData, QString ProcessName, QString* pLink = NULL);
|
||||
QString MakeSbieMsgLink(quint32 MsgCode, const QStringList& MsgData, QString ProcessName);
|
||||
|
||||
static void SafeShow(QWidget* pWidget);
|
||||
int SafeExec(QDialog* pDialog);
|
||||
|
||||
bool RunSandboxed(const QStringList& Commands, QString BoxName = QString(), const QString& WrkDir = QString());
|
||||
|
|
|
@ -16,7 +16,6 @@ HEADERS += ./stdafx.h \
|
|||
./Views/FileView.h \
|
||||
./Views/TraceView.h \
|
||||
./Views/StackView.h \
|
||||
./Dialogs/MultiErrorDialog.h \
|
||||
./Helpers/FindTool.h \
|
||||
./Helpers/FullScreen.h \
|
||||
./Helpers/WinAdmin.h \
|
||||
|
@ -65,7 +64,6 @@ SOURCES += ./main.cpp \
|
|||
./Views/FileView.cpp \
|
||||
./Views/TraceView.cpp \
|
||||
./Views/StackView.cpp \
|
||||
./Dialogs/MultiErrorDialog.cpp \
|
||||
./Helpers/FindTool.cpp \
|
||||
./Helpers/FullScreen.cpp \
|
||||
./Helpers/WinAdmin.cpp \
|
||||
|
|
|
@ -28,7 +28,7 @@ equals(MY_ARCH, ARM64) {
|
|||
CONFIG(debug, debug|release):!contains(QMAKE_HOST.arch, x86_64):LIBS += -L../Bin/Win32/Debug
|
||||
CONFIG(release, debug|release):!contains(QMAKE_HOST.arch, x86_64):LIBS += -L../Bin/Win32/Release
|
||||
|
||||
LIBS += -lNtdll -lAdvapi32 -lOle32 -lUser32 -lShell32 -lGdi32 -lQSbieAPI -lMiscHelpers -lqtsingleapp -lUGlobalHotkey -lbcrypt
|
||||
LIBS += -lNtdll -lAdvapi32 -lOle32 -lUser32 -lShell32 -lGdi32 -lQSbieAPI -lMiscHelpers -lqtsingleapp -lUGlobalHotkey -lbcrypt -lVersion
|
||||
|
||||
CONFIG(release, debug|release):{
|
||||
QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO
|
||||
|
|
|
@ -287,7 +287,6 @@
|
|||
</ClCompile>
|
||||
<ClCompile Include="BoxJob.cpp" />
|
||||
<ClCompile Include="BoxMonitor.cpp" />
|
||||
<ClCompile Include="Dialogs\MultiErrorDialog.cpp" />
|
||||
<ClCompile Include="Engine\BoxEngine.cpp" />
|
||||
<ClCompile Include="Engine\BoxObject.cpp" />
|
||||
<ClCompile Include="Engine\IniObject.cpp" />
|
||||
|
@ -464,7 +463,6 @@
|
|||
<QtMoc Include="SandMan.h" />
|
||||
<QtMoc Include="Models\SbieModel.h" />
|
||||
<QtMoc Include="Models\TraceModel.h" />
|
||||
<QtMoc Include="Dialogs\MultiErrorDialog.h" />
|
||||
<QtMoc Include="BoxJob.h" />
|
||||
<ClInclude Include="..\version.h" />
|
||||
<QtMoc Include="BoxMonitor.h" />
|
||||
|
|
|
@ -32,9 +32,6 @@
|
|||
<Filter Include="Views">
|
||||
<UniqueIdentifier>{34eca1e5-cd50-4876-9f54-9eec4c393150}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Dialogs">
|
||||
<UniqueIdentifier>{6accf3ae-da17-4c0f-ba83-214e3874b029}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Helpers">
|
||||
<UniqueIdentifier>{20d5954b-be86-4a34-948d-00954dcfd07b}</UniqueIdentifier>
|
||||
</Filter>
|
||||
|
@ -72,9 +69,6 @@
|
|||
<ClCompile Include="Views\SbieView.cpp">
|
||||
<Filter>Views</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Dialogs\MultiErrorDialog.cpp">
|
||||
<Filter>Dialogs</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="SbiePlusAPI.cpp">
|
||||
<Filter>SandMan</Filter>
|
||||
</ClCompile>
|
||||
|
@ -286,9 +280,6 @@
|
|||
<QtMoc Include="Views\SbieView.h">
|
||||
<Filter>Views</Filter>
|
||||
</QtMoc>
|
||||
<QtMoc Include="Dialogs\MultiErrorDialog.h">
|
||||
<Filter>Dialogs</Filter>
|
||||
</QtMoc>
|
||||
<QtMoc Include="SbiePlusAPI.h">
|
||||
<Filter>SandMan</Filter>
|
||||
</QtMoc>
|
||||
|
|
|
@ -1334,7 +1334,7 @@ void CSbieView::OnSandBoxAction(QAction* Action, const QList<CSandBoxPtr>& SandB
|
|||
connect(pSnapshotsWindow, &CSnapshotsWindow::Closed, [this, pBox]() {
|
||||
SnapshotWindows.remove(pBox.data());
|
||||
});
|
||||
SafeShow(pSnapshotsWindow);
|
||||
CSandMan::SafeShow(pSnapshotsWindow);
|
||||
}
|
||||
else {
|
||||
pSnapshotsWindow->setWindowState((pSnapshotsWindow->windowState() & ~Qt::WindowMinimized) | Qt::WindowActive);
|
||||
|
@ -1725,7 +1725,7 @@ void CSbieView::ShowOptions(const CSandBoxPtr& pBox)
|
|||
connect(pBoxEx->m_pOptionsWnd, &COptionsWindow::Closed, [pBoxEx]() {
|
||||
pBoxEx->m_pOptionsWnd = NULL;
|
||||
});
|
||||
SafeShow(pBoxEx->m_pOptionsWnd);
|
||||
CSandMan::SafeShow(pBoxEx->m_pOptionsWnd);
|
||||
}
|
||||
else {
|
||||
pBoxEx->m_pOptionsWnd->setWindowState((pBoxEx->m_pOptionsWnd->windowState() & ~Qt::WindowMinimized) | Qt::WindowActive);
|
||||
|
@ -1749,7 +1749,7 @@ void CSbieView::ShowBrowse(const CSandBoxPtr& pBox)
|
|||
connect(pFileBrowserWindow, &CFileBrowserWindow::Closed, [this, pBox]() {
|
||||
FileBrowserWindows.remove(pBox.data());
|
||||
});
|
||||
SafeShow(pFileBrowserWindow);
|
||||
CSandMan::SafeShow(pFileBrowserWindow);
|
||||
}
|
||||
else {
|
||||
pFileBrowserWindow->setWindowState((pFileBrowserWindow->windowState() & ~Qt::WindowMinimized) | Qt::WindowActive);
|
||||
|
|
|
@ -105,15 +105,13 @@ protected:
|
|||
};
|
||||
|
||||
QMap<quint32, SProgInfo>m_PidMap;
|
||||
bool m_FullRefresh;
|
||||
quint64 m_LastID;
|
||||
int m_LastCount;
|
||||
bool m_bUpdatePending;
|
||||
QVector<CTraceEntryPtr> m_TraceList;
|
||||
QMap<QString, CMonitorEntryPtr> m_MonitorMap;
|
||||
|
||||
protected:
|
||||
bool m_FullRefresh;
|
||||
|
||||
quint32 m_FilterPid;
|
||||
quint32 m_FilterTid;
|
||||
QList<quint32> m_FilterTypes;
|
||||
|
|
|
@ -83,7 +83,7 @@ void COptionsWindow::CreateAdvanced()
|
|||
connect(ui.chkDbgTrace, SIGNAL(clicked(bool)), this, SLOT(OnAdvancedChanged()));
|
||||
connect(ui.chkErrTrace, SIGNAL(clicked(bool)), this, SLOT(OnAdvancedChanged()));
|
||||
|
||||
connect(ui.treeTriggers, SIGNAL(itemChanged(QTreeWidgetItem *, int)), this, SLOT(OnTriggerChanged(QTreeWidgetItem *, int)));
|
||||
connect(ui.treeTriggers, SIGNAL(itemChanged(QTreeWidgetItem *, int)), this, SLOT(OnTriggerChanged()));
|
||||
connect(ui.btnAddAutoRun, SIGNAL(clicked(bool)), this, SLOT(OnAddAutoRun()));
|
||||
connect(ui.btnAddAutoSvc, SIGNAL(clicked(bool)), this, SLOT(OnAddAutoSvc()));
|
||||
connect(ui.btnAddAutoExec, SIGNAL(clicked(bool)), this, SLOT(OnAddAutoExec()));
|
||||
|
@ -238,6 +238,19 @@ void COptionsWindow::LoadAdvanced()
|
|||
foreach(const QString & Value, m_pBox->GetTextList("OnBoxTerminate", m_Template))
|
||||
AddTriggerItem(Value, eTerminateCmd);
|
||||
|
||||
foreach(const QString & Value, m_pBox->GetTextList("StartProgramDisabled", m_Template))
|
||||
AddTriggerItem(Value, eOnStartCmd, true);
|
||||
foreach(const QString & Value, m_pBox->GetTextList("StartServiceDisabled", m_Template))
|
||||
AddTriggerItem(Value, eOnStartSvc, true);
|
||||
foreach(const QString & Value, m_pBox->GetTextList("AutoExecDisabled", m_Template))
|
||||
AddTriggerItem(Value, eAutoExec, true);
|
||||
foreach(const QString & Value, m_pBox->GetTextList("OnFileRecoveryDisabled", m_Template))
|
||||
AddTriggerItem(Value, eRecoveryCheck, true);
|
||||
foreach(const QString & Value, m_pBox->GetTextList("OnBoxDeleteDisabled", m_Template))
|
||||
AddTriggerItem(Value, eDeleteCmd, true);
|
||||
foreach(const QString & Value, m_pBox->GetTextList("OnBoxTerminateDisabled", m_Template))
|
||||
AddTriggerItem(Value, eTerminateCmd, true);
|
||||
|
||||
ShowTriggersTmpl();
|
||||
//
|
||||
|
||||
|
@ -264,9 +277,9 @@ 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"));
|
||||
ui.chkProtectWindow->setChecked(m_pBox->GetBool("CoverBoxedWindows"));
|
||||
QString str = m_pBox->GetText("OpenWinClass", "");
|
||||
ui.chkBlockCapture->setChecked(m_pBox->GetBool("IsBlockCapture") && QString::compare(str, "*") != 0);
|
||||
ui.chkBlockCapture->setChecked(m_pBox->GetBool("BlockScreenCapture") && QString::compare(str, "*") != 0);
|
||||
ui.chkBlockCapture->setCheckable(QString::compare(str, "*") != 0);
|
||||
|
||||
/*ui.chkLockWhenClose->setChecked(m_pBox->GetBool("LockWhenClose", false));
|
||||
|
@ -304,17 +317,17 @@ void COptionsWindow::ShowTriggersTmpl(bool bUpdate)
|
|||
foreach(const QString& Template, m_pBox->GetTemplates())
|
||||
{
|
||||
foreach(const QString & Value, m_pBox->GetTextListTmpl("StartProgram", Template))
|
||||
AddTriggerItem(Value, eOnStartCmd, Template);
|
||||
AddTriggerItem(Value, eOnStartCmd, false, Template);
|
||||
foreach(const QString & Value, m_pBox->GetTextListTmpl("StartService", Template))
|
||||
AddTriggerItem(Value, eOnStartSvc, Template);
|
||||
AddTriggerItem(Value, eOnStartSvc, false, Template);
|
||||
foreach(const QString & Value, m_pBox->GetTextListTmpl("AutoExec", Template))
|
||||
AddTriggerItem(Value, eAutoExec, Template);
|
||||
AddTriggerItem(Value, eAutoExec, false, Template);
|
||||
foreach(const QString & Value, m_pBox->GetTextListTmpl("OnFileRecovery", Template))
|
||||
AddTriggerItem(Value, eRecoveryCheck, Template);
|
||||
AddTriggerItem(Value, eRecoveryCheck, false, Template);
|
||||
foreach(const QString & Value, m_pBox->GetTextListTmpl("OnBoxDelete", Template))
|
||||
AddTriggerItem(Value, eDeleteCmd, Template);
|
||||
AddTriggerItem(Value, eDeleteCmd, false, Template);
|
||||
foreach(const QString & Value, m_pBox->GetTextListTmpl("OnBoxTerminate", Template))
|
||||
AddTriggerItem(Value, eTerminateCmd, Template);
|
||||
AddTriggerItem(Value, eTerminateCmd, false, Template);
|
||||
}
|
||||
}
|
||||
else if (bUpdate)
|
||||
|
@ -428,24 +441,55 @@ void COptionsWindow::SaveAdvanced()
|
|||
QStringList DeleteCommand;
|
||||
QStringList AutoExec;
|
||||
QStringList TerminateCommand;
|
||||
|
||||
QStringList StartProgramDisabled;
|
||||
QStringList StartServiceDisabled;
|
||||
QStringList RecoveryCheckDisabled;
|
||||
QStringList DeleteCommandDisabled;
|
||||
QStringList AutoExecDisabled;
|
||||
QStringList TerminateCommandDisabled;
|
||||
|
||||
for (int i = 0; i < ui.treeTriggers->topLevelItemCount(); i++) {
|
||||
QTreeWidgetItem* pItem = ui.treeTriggers->topLevelItem(i);
|
||||
switch (pItem->data(0, Qt::UserRole).toInt())
|
||||
if (pItem->checkState(0) == Qt::Checked)
|
||||
{
|
||||
case eOnStartCmd: StartProgram.append(pItem->text(2)); break;
|
||||
case eOnStartSvc: StartService.append(pItem->text(2)); break;
|
||||
case eAutoExec: AutoExec.append(pItem->text(2)); break;
|
||||
case eRecoveryCheck: RecoveryCheck.append(pItem->text(2)); break;
|
||||
case eDeleteCmd: DeleteCommand.append(pItem->text(2)); break;
|
||||
case eTerminateCmd: TerminateCommand.append(pItem->text(2)); break;
|
||||
switch (pItem->data(0, Qt::UserRole).toInt())
|
||||
{
|
||||
case eOnStartCmd: StartProgram.append(pItem->text(2)); break;
|
||||
case eOnStartSvc: StartService.append(pItem->text(2)); break;
|
||||
case eAutoExec: AutoExec.append(pItem->text(2)); break;
|
||||
case eRecoveryCheck: RecoveryCheck.append(pItem->text(2)); break;
|
||||
case eDeleteCmd: DeleteCommand.append(pItem->text(2)); break;
|
||||
case eTerminateCmd: TerminateCommand.append(pItem->text(2)); break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (pItem->data(0, Qt::UserRole).toInt())
|
||||
{
|
||||
case eOnStartCmd: StartProgramDisabled.append(pItem->text(2)); break;
|
||||
case eOnStartSvc: StartServiceDisabled.append(pItem->text(2)); break;
|
||||
case eAutoExec: AutoExecDisabled.append(pItem->text(2)); break;
|
||||
case eRecoveryCheck: RecoveryCheckDisabled.append(pItem->text(2)); break;
|
||||
case eDeleteCmd: DeleteCommandDisabled.append(pItem->text(2)); break;
|
||||
case eTerminateCmd: TerminateCommandDisabled.append(pItem->text(2)); break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
WriteTextList("StartProgram", StartProgram);
|
||||
WriteTextList("StartService", StartService);
|
||||
WriteTextList("AutoExec", AutoExec);
|
||||
WriteTextList("OnFileRecovery", RecoveryCheck);
|
||||
WriteTextList("OnBoxDelete", DeleteCommand);
|
||||
WriteTextList("OnBoxTerminate", TerminateCommand);
|
||||
|
||||
WriteTextList("StartProgramDisabled", StartProgramDisabled);
|
||||
WriteTextList("StartServiceDisabled", StartServiceDisabled);
|
||||
WriteTextList("AutoExecDisabled", AutoExecDisabled);
|
||||
WriteTextList("OnFileRecoveryDisabled", RecoveryCheckDisabled);
|
||||
WriteTextList("OnBoxDeleteDisabled", DeleteCommandDisabled);
|
||||
WriteTextList("OnBoxTerminateDisabled", TerminateCommandDisabled);
|
||||
//
|
||||
|
||||
|
||||
|
@ -476,8 +520,8 @@ void COptionsWindow::SaveAdvanced()
|
|||
WriteAdvancedCheck(ui.chkConfidential, "ConfidentialBox", "y", "");
|
||||
WriteAdvancedCheck(ui.chkNotifyProtect, "NotifyBoxProtected", "y", "");
|
||||
|
||||
WriteAdvancedCheck(ui.chkProtectWindow, "IsProtectScreen", "y", "");
|
||||
WriteAdvancedCheck(ui.chkBlockCapture, "IsBlockCapture", "y", "");
|
||||
WriteAdvancedCheck(ui.chkProtectWindow, "CoverBoxedWindows", "y", "");
|
||||
WriteAdvancedCheck(ui.chkBlockCapture, "BlockScreenCapture", "y", "");
|
||||
//WriteAdvancedCheck(ui.chkLockWhenClose, "LockWhenClose", "y", "");
|
||||
|
||||
QStringList Users;
|
||||
|
@ -874,7 +918,7 @@ void COptionsWindow::CloseOptionEdit(QTreeWidgetItem* pItem, bool bSave)
|
|||
//
|
||||
|
||||
// triggers
|
||||
void COptionsWindow::AddTriggerItem(const QString& Value, ETriggerAction Type, const QString& Template)
|
||||
void COptionsWindow::AddTriggerItem(const QString& Value, ETriggerAction Type, bool disabled, const QString& Template)
|
||||
{
|
||||
QTreeWidgetItem* pItem = new QTreeWidgetItem();
|
||||
pItem->setData(0, Qt::UserRole, Template.isEmpty() ? Type : -1);
|
||||
|
@ -906,6 +950,10 @@ void COptionsWindow::AddTriggerItem(const QString& Value, ETriggerAction Type, c
|
|||
}
|
||||
pItem->setText(2, Value);
|
||||
pItem->setFlags(pItem->flags() | Qt::ItemIsEditable);
|
||||
|
||||
if (Template.isEmpty())
|
||||
pItem->setCheckState(0, disabled ? Qt::Unchecked : Qt::Checked);
|
||||
|
||||
ui.treeTriggers->addTopLevelItem(pItem);
|
||||
}
|
||||
|
||||
|
|
|
@ -294,7 +294,7 @@ bool COptionsWindow::CheckForcedItem(const QString& Value, int type)
|
|||
}
|
||||
else
|
||||
{
|
||||
if (Value.left(3).compare(winPath.left(3), Qt::CaseInsensitive) == 0)
|
||||
if (Value.compare(winPath.left(3), Qt::CaseInsensitive) == 0)
|
||||
bDangerous = true; // SystemDrive (C:\)
|
||||
else if (Value.compare(winPath, Qt::CaseInsensitive) == 0)
|
||||
bDangerous = true; // SystemRoot (C:\Windows)
|
||||
|
|
|
@ -286,7 +286,7 @@ void COptionsWindow::LoadGeneral()
|
|||
ui.chkOpenProtectedStorage->setChecked(m_BoxTemplates.contains("OpenProtectedStorage"));
|
||||
ui.chkOpenCredentials->setChecked(!ui.chkOpenCredentials->isEnabled() || m_pBox->GetBool("OpenCredentials", false));
|
||||
ui.chkCloseClipBoard->setChecked(!m_pBox->GetBool("OpenClipboard", true));
|
||||
//ui.chkBlockCapture->setChecked(m_pBox->GetBool("IsBlockCapture", false));
|
||||
//ui.chkBlockCapture->setChecked(m_pBox->GetBool("BlockScreenCapture", false));
|
||||
ui.chkProtectPower->setChecked(m_pBox->GetBool("BlockInterferePower", false));
|
||||
ui.chkVmReadNotify->setChecked(m_pBox->GetBool("NotifyProcessAccessDenied", false));
|
||||
//ui.chkOpenSmartCard->setChecked(m_pBox->GetBool("OpenSmartCard", true));
|
||||
|
@ -426,7 +426,7 @@ void COptionsWindow::SaveGeneral()
|
|||
if (ui.chkOpenCredentials->isEnabled())
|
||||
WriteAdvancedCheck(ui.chkOpenCredentials, "OpenCredentials", "y", "");
|
||||
WriteAdvancedCheck(ui.chkCloseClipBoard, "OpenClipboard", "n", "");
|
||||
//WriteAdvancedCheck(ui.chkBlockCapture, "IsBlockCapture", "y", "");
|
||||
//WriteAdvancedCheck(ui.chkBlockCapture, "BlockScreenCapture", "y", "");
|
||||
WriteAdvancedCheck(ui.chkProtectPower, "BlockInterferePower", "y", "");
|
||||
WriteAdvancedCheck(ui.chkForceProtection, "ForceProtectionOnMount", "y", "");
|
||||
WriteAdvancedCheck(ui.chkUserOperation, "BlockInterferenceControl", "y", "");
|
||||
|
|
|
@ -217,6 +217,13 @@ void COptionsWindow::OnTemplateWizard()
|
|||
}
|
||||
}
|
||||
|
||||
void COptionsWindow::OnOpenTemplate()
|
||||
{
|
||||
QTreeWidgetItem* pItem = ui.treeTemplates->currentItem();
|
||||
if (pItem)
|
||||
OnTemplateDoubleClicked(pItem, 0);
|
||||
}
|
||||
|
||||
void COptionsWindow::OnDelTemplates()
|
||||
{
|
||||
if (QMessageBox("Sandboxie-Plus", tr("Do you really want to delete the selected local template(s)?"), QMessageBox::Question, QMessageBox::Yes, QMessageBox::No | QMessageBox::Default | QMessageBox::Escape, QMessageBox::NoButton, this).exec() != QMessageBox::Yes)
|
||||
|
|
|
@ -543,6 +543,7 @@ COptionsWindow::COptionsWindow(const QSharedPointer<CSbieIni>& pBox, const QStri
|
|||
pTmplBtnMenu->addAction(tr("Add %1 Template").arg(CTemplateWizard::GetTemplateLabel((CTemplateWizard::ETemplateType)i)), this, SLOT(OnTemplateWizard()))->setData(i);
|
||||
ui.btnAddTemplate->setPopupMode(QToolButton::MenuButtonPopup);
|
||||
ui.btnAddTemplate->setMenu(pTmplBtnMenu);
|
||||
connect(ui.btnOpenTemplate, SIGNAL(clicked(bool)), this, SLOT(OnOpenTemplate()));
|
||||
connect(ui.btnDelTemplate, SIGNAL(clicked(bool)), this, SLOT(OnDelTemplates()));
|
||||
connect(ui.chkScreenReaders, SIGNAL(clicked(bool)), this, SLOT(OnScreenReaders()));
|
||||
//
|
||||
|
@ -1080,7 +1081,7 @@ void COptionsWindow::showTab(const QString& Name)
|
|||
else
|
||||
m_pStack->setCurrentWidget(pWidget);
|
||||
|
||||
SafeShow(this);
|
||||
CSandMan::SafeShow(this);
|
||||
}
|
||||
|
||||
void COptionsWindow::SetProgramItem(QString Program, QTreeWidgetItem* pItem, int Column, const QString& Suffix, bool bList)
|
||||
|
|
|
@ -217,6 +217,7 @@ private slots:
|
|||
void OnTemplateDoubleClicked(QTreeWidgetItem* pItem, int Column);
|
||||
void OnAddTemplates();
|
||||
void OnTemplateWizard();
|
||||
void OnOpenTemplate();
|
||||
void OnDelTemplates();
|
||||
void OnFolderChanged();
|
||||
void OnScreenReaders();
|
||||
|
@ -473,7 +474,7 @@ protected:
|
|||
void SaveAdvanced();
|
||||
void UpdateBoxIsolation();
|
||||
void ShowTriggersTmpl(bool bUpdate = false);
|
||||
void AddTriggerItem(const QString& Value, ETriggerAction Type, const QString& Template = QString());
|
||||
void AddTriggerItem(const QString& Value, ETriggerAction Type, bool disabled = false, const QString& Template = QString());
|
||||
void ShowHiddenProcTmpl(bool bUpdate = false);
|
||||
void ShowHostProcTmpl(bool bUpdate = false);
|
||||
void AddHiddenProcEntry(const QString& Name, const QString& Template = QString());
|
||||
|
|
|
@ -104,7 +104,7 @@ void CPopUpWindow::Show()
|
|||
this->move(scrRect.width() - 600 - 20, scrRect.height() - 200 - 50);
|
||||
}
|
||||
|
||||
SafeShow(this);
|
||||
CSandMan::SafeShow(this);
|
||||
}
|
||||
|
||||
void CPopUpWindow::Poke()
|
||||
|
|
|
@ -160,7 +160,7 @@ int CRecoveryWindow::exec()
|
|||
{
|
||||
//QDialog::setWindowModality(Qt::WindowModal);
|
||||
ui.btnDeleteAll->setVisible(true);
|
||||
SafeShow(this);
|
||||
CSandMan::SafeShow(this);
|
||||
return QDialog::exec();
|
||||
}
|
||||
|
||||
|
|
|
@ -27,8 +27,6 @@ CBoxPicker::CBoxPicker(QString DefaultBox, QWidget* parent)
|
|||
pLayout->setContentsMargins(0, 0, 0, 0);
|
||||
pLayout->addWidget(new CFinder(this, this, 0));
|
||||
pLayout->insertWidget(0, m_pTreeBoxes);
|
||||
|
||||
this->setMaximumWidth(300);
|
||||
|
||||
if(DefaultBox.isEmpty() && theAPI->IsConnected())
|
||||
DefaultBox = theAPI->GetGlobalSettings()->GetText("DefaultBox", "DefaultBox");
|
||||
|
@ -197,12 +195,12 @@ CSelectBoxWindow::CSelectBoxWindow(const QStringList& Commands, const QString& B
|
|||
|
||||
m_pBoxPicker->setFocus();
|
||||
|
||||
//restoreGeometry(theConf->GetBlob("SelectBoxWindow/Window_Geometry"));
|
||||
restoreGeometry(theConf->GetBlob("SelectBoxWindow/Window_Geometry"));
|
||||
}
|
||||
|
||||
CSelectBoxWindow::~CSelectBoxWindow()
|
||||
{
|
||||
//theConf->SetBlob("SelectBoxWindow/Window_Geometry", saveGeometry());
|
||||
theConf->SetBlob("SelectBoxWindow/Window_Geometry", saveGeometry());
|
||||
}
|
||||
|
||||
void CSelectBoxWindow::closeEvent(QCloseEvent *e)
|
||||
|
|
|
@ -362,6 +362,8 @@ CSettingsWindow::CSettingsWindow(QWidget* parent)
|
|||
|
||||
connect(ui.cmbFontScale, SIGNAL(currentIndexChanged(int)), this, SLOT(OnChangeGUI()));
|
||||
connect(ui.cmbFontScale, SIGNAL(currentTextChanged(const QString&)), this, SLOT(OnChangeGUI()));
|
||||
connect(ui.chkHide, SIGNAL(stateChanged(int)), this, SLOT(OnOptChanged()));
|
||||
|
||||
|
||||
connect(ui.txtEditor, SIGNAL(textChanged(const QString&)), this, SLOT(OnOptChanged()));
|
||||
m_bRebuildUI = false;
|
||||
|
@ -475,6 +477,7 @@ CSettingsWindow::CSettingsWindow(QWidget* parent)
|
|||
pTmplBtnMenu->addAction(tr("Add %1 Template").arg(CTemplateWizard::GetTemplateLabel((CTemplateWizard::ETemplateType)i)), this, SLOT(OnTemplateWizard()))->setData(i);
|
||||
ui.btnAddTemplate->setPopupMode(QToolButton::MenuButtonPopup);
|
||||
ui.btnAddTemplate->setMenu(pTmplBtnMenu);
|
||||
connect(ui.btnOpenTemplate, SIGNAL(clicked(bool)), this, SLOT(OnOpenTemplate()));
|
||||
connect(ui.btnDelTemplate, SIGNAL(clicked(bool)), this, SLOT(OnDelTemplates()));
|
||||
//
|
||||
|
||||
|
@ -680,7 +683,7 @@ void CSettingsWindow::showTab(const QString& Name, bool bExclusive)
|
|||
}
|
||||
}
|
||||
|
||||
SafeShow(this);
|
||||
CSandMan::SafeShow(this);
|
||||
}
|
||||
|
||||
void CSettingsWindow::closeEvent(QCloseEvent *e)
|
||||
|
@ -872,7 +875,7 @@ void CSettingsWindow::LoadSettings()
|
|||
ui.chkAutoStart->setChecked(IsAutorunEnabled());
|
||||
if (theAPI->IsConnected()) {
|
||||
if (theAPI->GetUserSettings()->GetBool("SbieCtrl_EnableAutoStart", true)) {
|
||||
if (theAPI->GetUserSettings()->GetText("SbieCtrl_AutoStartAgent", "") != "SandMan.exe")
|
||||
if (theAPI->GetUserSettings()->GetText("SbieCtrl_AutoStartAgent", "").left(11) != "SandMan.exe")
|
||||
ui.chkSvcStart->setCheckState(Qt::PartiallyChecked);
|
||||
else
|
||||
ui.chkSvcStart->setChecked(true);
|
||||
|
@ -905,6 +908,8 @@ void CSettingsWindow::LoadSettings()
|
|||
|
||||
//ui.cmbFontScale->setCurrentIndex(ui.cmbFontScale->findData(theConf->GetInt("Options/FontScaling", 100)));
|
||||
ui.cmbFontScale->setCurrentText(QString::number(theConf->GetInt("Options/FontScaling", 100)));
|
||||
ui.chkHide->setChecked(theConf->GetBool("Options/CoverWindows", false));
|
||||
|
||||
|
||||
ui.txtEditor->setText(theConf->GetString("Options/Editor", "notepad.exe"));
|
||||
|
||||
|
@ -1552,6 +1557,8 @@ void CSettingsWindow::SaveSettings()
|
|||
else if (Scaling > 500)
|
||||
Scaling = 500;
|
||||
theConf->SetValue("Options/FontScaling", Scaling);
|
||||
|
||||
theConf->SetValue("Options/CoverWindows", ui.chkHide->isChecked());
|
||||
|
||||
theConf->SetValue("Options/Editor", ui.txtEditor->text());
|
||||
|
||||
|
@ -1560,7 +1567,7 @@ void CSettingsWindow::SaveSettings()
|
|||
if (theAPI->IsConnected()) {
|
||||
if (ui.chkSvcStart->checkState() == Qt::Checked) {
|
||||
theAPI->GetUserSettings()->SetBool("SbieCtrl_EnableAutoStart", true);
|
||||
theAPI->GetUserSettings()->SetText("SbieCtrl_AutoStartAgent", "SandMan.exe");
|
||||
theAPI->GetUserSettings()->SetText("SbieCtrl_AutoStartAgent", "SandMan.exe -autorun");
|
||||
}
|
||||
else if (ui.chkSvcStart->checkState() == Qt::Unchecked)
|
||||
theAPI->GetUserSettings()->SetBool("SbieCtrl_EnableAutoStart", false);
|
||||
|
@ -2233,6 +2240,13 @@ void CSettingsWindow::OnTemplateWizard()
|
|||
}
|
||||
}
|
||||
|
||||
void CSettingsWindow::OnOpenTemplate()
|
||||
{
|
||||
QTreeWidgetItem* pItem = ui.treeTemplates->currentItem();
|
||||
if (pItem)
|
||||
OnTemplateDoubleClicked(pItem, 0);
|
||||
}
|
||||
|
||||
void CSettingsWindow::OnDelTemplates()
|
||||
{
|
||||
if (QMessageBox("Sandboxie-Plus", tr("Do you really want to delete the selected local template(s)?"), QMessageBox::Question, QMessageBox::Yes, QMessageBox::No | QMessageBox::Default | QMessageBox::Escape, QMessageBox::NoButton, this).exec() != QMessageBox::Yes)
|
||||
|
@ -2435,14 +2449,9 @@ void CSettingsWindow::OnUpdateData(const QVariantMap& Data, const QVariantMap& P
|
|||
if (Data.isEmpty() || Data["error"].toBool())
|
||||
return;
|
||||
|
||||
QString Version = QString::number(VERSION_MJR) + "." + QString::number(VERSION_MIN) + "." + QString::number(VERSION_REV);
|
||||
int iUpdate = COnlineUpdater::GetCurrentUpdate();
|
||||
if(iUpdate)
|
||||
Version += QChar('a' + (iUpdate - 1));
|
||||
|
||||
m_UpdateData = Data;
|
||||
QVariantMap Releases = m_UpdateData["releases"].toMap();
|
||||
ui.lblCurrent->setText(tr("%1 (Current)").arg(Version));
|
||||
ui.lblCurrent->setText(tr("%1 (Current)").arg(theGUI->GetVersion(true)));
|
||||
ui.lblStable->setText(CSettingsWindow__MkVersion("stable", Releases));
|
||||
ui.lblPreview->setText(CSettingsWindow__MkVersion("preview", Releases));
|
||||
if(ui.radInsider->isEnabled())
|
||||
|
|
|
@ -120,6 +120,7 @@ private slots:
|
|||
void OnFilterTemplates() { LoadTemplates(); }
|
||||
void OnAddTemplates();
|
||||
void OnTemplateWizard();
|
||||
void OnOpenTemplate();
|
||||
void OnDelTemplates();
|
||||
|
||||
void SetIniEdit(bool bEnable);
|
||||
|
|
|
@ -698,6 +698,7 @@ void CRunPage::OnStateChanged(int state, const QString& Text)
|
|||
QString Name = name;
|
||||
//if(!Name.isEmpty()) pForm->addRow(new QLabel(Name));
|
||||
CBoxPicker* pPicker = new CBoxPicker(value.toString());
|
||||
pPicker->setMaximumWidth(300);
|
||||
pWidget = pPicker;
|
||||
pForm->addRow(Name, pPicker);
|
||||
}
|
||||
|
|
|
@ -102,8 +102,8 @@ SB_STATUS CNewBoxWizard::TryToCreateBox()
|
|||
const QString REMOVE_DEFAULT_ALL = "#RemoveDefaultAll";
|
||||
const QString REMOVE_DEFAULT_RECOVERS = "#RemoveDefaultRecovers";
|
||||
const QString REMOVE_DEFAULT_TEMPLATES = "#RemoveDefaultTemplates";
|
||||
const QString ENABLED_PREFIX = "Enabled=";
|
||||
const QString CFGLVL_PREFIX = "ConfigLevel=";
|
||||
const QString ENABLED_PREFIX = "Enabled";
|
||||
const QString CFGLVL_PREFIX = "ConfigLevel";
|
||||
const QString TMPL_PREFIX = "Tmpl.";
|
||||
const QString BOX_DISABLED_SUFFIX = "Disabled";
|
||||
const QStringList SPECIAL_SETTINGS = { "BorderColor", "BoxIcon", "BoxNameTitle", "ConfigLevel", "CopyLimitKb" };
|
||||
|
@ -148,7 +148,7 @@ SB_STATUS CNewBoxWizard::TryToCreateBox()
|
|||
if (bParts.size() == 2) {
|
||||
QString bKey = bParts[0].trimmed();
|
||||
QString bValue = bParts[1].trimmed();
|
||||
if (!bLine.startsWith(ENABLED_PREFIX) && !bLine.startsWith(CFGLVL_PREFIX)) { // Do not remove Enabled and ConfigLevel
|
||||
if (bKey.compare(ENABLED_PREFIX, Qt::CaseInsensitive) != 0 && bKey.compare(CFGLVL_PREFIX) != 0) { // Do not remove Enabled and ConfigLevel
|
||||
pBox->DelValue(bKey, bValue);
|
||||
}
|
||||
}
|
||||
|
@ -172,7 +172,7 @@ SB_STATUS CNewBoxWizard::TryToCreateBox()
|
|||
QString tKey = tParts[0].trimmed();
|
||||
QString tValue = tParts[1].trimmed();
|
||||
|
||||
if (tKey.startsWith(ENABLED_PREFIX) || tKey.startsWith(TMPL_PREFIX) || tKey.startsWith("#") || tKey.endsWith(BOX_DISABLED_SUFFIX)) {
|
||||
if (tKey.compare(ENABLED_PREFIX, Qt::CaseInsensitive) == 0 || tKey.startsWith(TMPL_PREFIX) || tKey.startsWith("#") || tKey.endsWith(BOX_DISABLED_SUFFIX)) {
|
||||
continue; // Skip lines that start or end with one of these
|
||||
}
|
||||
|
||||
|
@ -252,23 +252,27 @@ SB_STATUS CNewBoxWizard::TryToCreateBox()
|
|||
//pBox->InsertText("ClosedFilePath", "<BlockNetDevices>,InternetAccessDevices");
|
||||
}
|
||||
pBox->SetBool("BlockNetworkFiles", !field("shareAccess").toBool());
|
||||
|
||||
if (field("fakeAdmin").toBool()) {
|
||||
|
||||
bool bHardened = (BoxType == CSandBoxPlus::eHardenedPlus || BoxType == CSandBoxPlus::eHardened);
|
||||
bool bDropAdmin = field("dropAdmin").toBool();
|
||||
if (field("dropAdmin").toBool() && !bHardened)
|
||||
pBox->SetBool("DropAdminRights", true);
|
||||
|
||||
if (field("fakeAdmin").toBool())
|
||||
pBox->SetBool("FakeAdminRights", true);
|
||||
}
|
||||
if(field("msiServer").toBool())
|
||||
|
||||
if(field("msiServer").toBool() && !bDropAdmin && !bHardened)
|
||||
pBox->SetBool("MsiInstallerExemptions", true);
|
||||
|
||||
|
||||
if(field("boxToken").toBool())
|
||||
pBox->SetBool("SandboxieLogon", true);
|
||||
|
||||
|
||||
if(field("imagesProtection").toBool())
|
||||
pBox->SetBool("ProtectHostImages", true);
|
||||
|
||||
|
||||
if (!Password.isEmpty())
|
||||
pBox->ImBoxCreate(ImageSize / 1024, Password);
|
||||
|
||||
|
||||
if (field("boxVersion").toInt() == 1) {
|
||||
if (theConf->GetBool("Options/WarnDeleteV2", true)) {
|
||||
bool State = false;
|
||||
|
@ -741,6 +745,12 @@ CAdvancedPage::CAdvancedPage(QWidget *parent)
|
|||
pAdminLabel->setFont(fnt);
|
||||
layout->addWidget(pAdminLabel, row++, 0);
|
||||
|
||||
m_pDropAdmin = new QCheckBox(tr("Drop rights from Administrators and Power Users groups"));
|
||||
m_pDropAdmin->setChecked(theConf->GetBool("BoxDefaults/DropAdmin", false));
|
||||
layout->addWidget(m_pDropAdmin, row++, 1, 1, 3);
|
||||
connect(m_pDropAdmin, &QCheckBox::stateChanged, this, &CAdvancedPage::OnDropAdminChanged);
|
||||
registerField("dropAdmin", m_pDropAdmin);
|
||||
|
||||
QCheckBox* pFakeAdmin = new QCheckBox(tr("Make applications think they are running elevated"));
|
||||
pFakeAdmin->setChecked(theConf->GetBool("BoxDefaults/FakeAdmin", false));
|
||||
layout->addWidget(pFakeAdmin, row++, 1, 1, 3);
|
||||
|
@ -748,7 +758,8 @@ CAdvancedPage::CAdvancedPage(QWidget *parent)
|
|||
|
||||
m_pMSIServer = new QCheckBox(tr("Allow MSIServer to run with a sandboxed system token"));
|
||||
m_pMSIServer->setToolTip(tr("This option is not recommended for Hardened boxes"));
|
||||
m_pMSIServer->setChecked(theConf->GetBool("BoxDefaults/MsiExemptions", false));
|
||||
if (!theConf->GetBool("BoxDefaults/DropAdmin", false))
|
||||
m_pMSIServer->setChecked(theConf->GetBool("BoxDefaults/MsiExemptions", false));
|
||||
layout->addWidget(m_pMSIServer, row++, 1, 1, 3);
|
||||
registerField("msiServer", m_pMSIServer);
|
||||
|
||||
|
@ -817,8 +828,11 @@ void CAdvancedPage::initializePage()
|
|||
int BoxType = wizard()->field("boxType").toInt();
|
||||
|
||||
bool bHardened = (BoxType == CSandBoxPlus::eHardenedPlus || BoxType == CSandBoxPlus::eHardened);
|
||||
m_pMSIServer->setEnabled(!bHardened);
|
||||
bool bDropAdmin = field("dropAdmin").toBool();
|
||||
m_pMSIServer->setEnabled(!bHardened && !bDropAdmin);
|
||||
m_pShareAccess->setEnabled(!bHardened);
|
||||
m_pDropAdmin->setEnabled(!bHardened);
|
||||
m_pDropAdmin->setChecked(bDropAdmin || bHardened);
|
||||
|
||||
bool bAppBox = (BoxType == CSandBoxPlus::eAppBoxPlus || BoxType == CSandBoxPlus::eAppBox);
|
||||
m_pBoxToken->setEnabled(!bAppBox);
|
||||
|
@ -829,6 +843,18 @@ bool CAdvancedPage::validatePage()
|
|||
return true;
|
||||
}
|
||||
|
||||
void CAdvancedPage::OnDropAdminChanged(int state) {
|
||||
// If m_pDropAdmin is checked, disable m_pMSIServer
|
||||
if (state == Qt::Checked) {
|
||||
m_pMSIServer->setEnabled(false);
|
||||
m_pMSIServer->setChecked(false);
|
||||
}
|
||||
else {
|
||||
// If m_pDropAdmin is unchecked, enable m_pMSIServer
|
||||
m_pMSIServer->setEnabled(true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
// CSummaryPage
|
||||
|
@ -921,6 +947,7 @@ bool CSummaryPage::validatePage()
|
|||
theConf->SetValue("BoxDefaults/BlockNetwork", field("blockNetwork").toInt());
|
||||
theConf->SetValue("BoxDefaults/ShareAccess", field("shareAccess").toBool());
|
||||
|
||||
theConf->SetValue("BoxDefaults/DropAdmin", field("dropAdmin").toBool());
|
||||
theConf->SetValue("BoxDefaults/FakeAdmin", field("fakeAdmin").toBool());
|
||||
theConf->SetValue("BoxDefaults/MsiExemptions", field("msiServer").toBool());
|
||||
|
||||
|
|
|
@ -116,11 +116,13 @@ public:
|
|||
int nextId() const override;
|
||||
void initializePage() override;
|
||||
bool validatePage() override;
|
||||
void OnDropAdminChanged(int state);
|
||||
|
||||
private:
|
||||
QCheckBox* m_pShareAccess;
|
||||
QCheckBox* m_pMSIServer;
|
||||
QCheckBox* m_pBoxToken;
|
||||
QCheckBox* m_pDropAdmin;
|
||||
};
|
||||
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -2,7 +2,7 @@
|
|||
|
||||
#define VERSION_MJR 1
|
||||
#define VERSION_MIN 13
|
||||
#define VERSION_REV 6
|
||||
#define VERSION_REV 7
|
||||
#define VERSION_UPD 0
|
||||
|
||||
#ifndef STR
|
||||
|
|
Loading…
Reference in New Issue