Merge pull request #13 from sandboxie-plus/master

Update fork
This commit is contained in:
Sebastian G 2021-01-27 17:27:19 +01:00 committed by GitHub
commit 3a1d4ee4fa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
48 changed files with 6626 additions and 3518 deletions

View File

@ -22,6 +22,22 @@ jobs:
- name: Build Sandboxie
run: msbuild /t:build Sandboxie\Sandbox.sln /p:Configuration="SbieRelease" /p:Platform=${{ matrix.platform }}
- name: Cache Qt
id: cache-qt
uses: actions/cache@v1
with:
path: ../Qt
key: ${{ runner.os }}-QtCache
- name: Install Qt
uses: jurplel/install-qt-action@v2
with:
version: '5.15.1'
cached: ${{ steps.cache-qt.outputs.cache-hit }}
- name: Build Sandboxie-Plus
run: msbuild /t:build SandboxiePlus\SandboxiePlus.sln /p:Configuration="Release" /p:Platform=${{ matrix.platform }}
- name: Upload Sandboxie
uses: actions/upload-artifact@v2
with:

View File

@ -4,38 +4,63 @@ This project adheres to [Semantic Versioning](http://semver.org/).
## [0.6.0 / 5.46.5] - 2021-01-25
### Added
- added comfirmation prompts to terminate all commands
- added window title to boxed process info
- added winspy based sandboxed window finder
- added option to view disabled boxes and double click on box to enable it
### Changed
- reset columns now resized them to fit the content, also "Reset Columns" can now be localized
- modal windows are now centered to the parent
- improved new box window
### Fixed
- fixed issues with window modality
- fixed issues when main window was set to be always on top
- fixed an driver issue with windows 10 insider build 21286
- fixed issues with snapshot dialog
- fixed an issue when writing to a path that aready exist in the napshot but not outside
## [0.5.5 / 5.46.4] - 2021-01-17
### Added
- added "SandboxService=..." to force selected services to be started in the sandbox
- added template cleanup functionality to plus UI
- allow internet prompt now also allow internet access pemanently
- added template clean-up functionality to plus UI
- added internet prompt to now also allow internet access permanently
- added browse button for box root folder in the SandMan UI
- added explorer info message
- added option to keep the sandman UI always on top
- added drag and drop file on to sandman exe to open/run it sandboxed
- allow drag and drop file onto Sandman.exe to run it sandboxed
- added start SandMan UI when a sandboxed application starts
- recovery window can now list all files
- added file cunter to recovery window
- when "NoAddProcessToJob=y" is specified chrome and alike now can fully use the job system
-- Note: "NoAddProcessToJob=y" reduces the box isolation, but the affected functions are mostly covered by UIPI anyways
- added obtimized default column widths to tha sbie view
- added file counter to recovery window
- when "NoAddProcessToJob=y" is specified, Chrome and related browsers now can fully use the job system
-- Note: "NoAddProcessToJob=y" reduces the box isolation, but the affected functions are mostly covered by UIPI anyway
- added optimized default column widths to Sbie view
### Changed
- updated templates (thanks isaak654)
- when trying to take a snapshot of an empty sandbox a proper error message is displayed
- new layout for the recovery window
- sbie view sorting is now case insensitive
- Sbie view sorting is now case insensitive
### Fixed
- fixed issue child window closing terminating application when main was hidden
- fixed issues with non modal windows
- fixed issues connecting in portable mode to driver
- fixed issues connecting to driver in portable mode
- fixed minor issues with snapshot window
- fixed missing error message when atempting to create an aleady existing sandbox
- fixed issue allowing to save setting when a sandbox was alrady deleted
- fixed missing error message when attempting to create an already existing sandbox
- fixed issue allowing to save setting when a sandbox was already deleted
- fixed issues with disabled items in dark mode
- fixed some dialogs not closing on esc
- fixed some dialogues not closing when pressing Esc
- fixed tab stops on many windows
@ -333,7 +358,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
- the software compatibility list in the SandMan UI now shows the proper template names
- fixed use of freed memory in the driver
- replaced swprintf with snwprintf to prevent potential buffer overflow in SbieDll.dll
- fixed bad list performance with resource log and api log in SandMan UI
- fixed bad list performance with resource log and API log in SandMan UI
@ -372,7 +397,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
### Fixed
- fixed thread handle leak in SbieSvc and other components
- msedge.exe is now categorized as a chromium derivate
- msedge.exe is now categorized as a Chromium derivate
- fixed Chrome 86+ compatibility bug with Chrome's own sandbox

View File

@ -20,6 +20,7 @@ Open Source release
- stephtr - CI and Certification
- TechLord / Team-IRA - Reversing
- isaak654 - UI fixes and Templates
- typpos - UI improvement sugestions
- cricri-pingouin - UI fixes
- Valinwolf - UI / Icons
- mpheath - help with inno setup
@ -30,6 +31,7 @@ Open Source release
- bastik-1001 - DE
- JNylson - PT
- lufog - RU
- xorcan -RT
More volunteers welcome ;)

View File

@ -21,8 +21,8 @@
#ifndef _MY_VERSION_H
#define _MY_VERSION_H
#define MY_VERSION_BINARY 5,46,4
#define MY_VERSION_STRING "5.46.4"
#define MY_VERSION_BINARY 5,46,5
#define MY_VERSION_STRING "5.46.5"
#define MY_VERSION_COMPAT "5.46.0" // this refers to the driver ABI compatibility
// These #defines are used by either Resource Compiler, or by NSIC installer

View File

@ -2339,7 +2339,7 @@ _FX NTSTATUS File_NtCreateFileImpl(
BOOLEAN IsEmptyCopyFile;
BOOLEAN AlreadyReparsed;
UCHAR HaveTrueFile;
BOOLEAN HaveSnapshotFile;
BOOLEAN HaveSnapshotFile, HaveSnapshotParent;
//char *pPtr = NULL;
//if (wcsstr(Dll_ImageName, L"chrome.exe") != 0) {
@ -2607,6 +2607,7 @@ ReparseLoop:
__leave;
HaveSnapshotFile = FALSE;
HaveSnapshotParent = FALSE;
if (File_Snapshot != NULL) {
@ -2738,6 +2739,27 @@ ReparseLoop:
else
HaveCopyParent = FALSE;
//
// check if the parent folder exists in a snapshot
//
if (! HaveCopyParent) {
WCHAR* TargetName = wcsrchr(CopyPath, L'\\');
*TargetName = L'\0';
WCHAR* TmplPath = CopyPath;
File_FindSnapshotPath(&TmplPath);
if (TmplPath != CopyPath) {
HaveSnapshotParent = TRUE;
}
*TargetName = L'\\';
}
//
// we need to check if the true path exists
//
@ -2763,7 +2785,7 @@ ReparseLoop:
status = STATUS_ACCESS_DENIED;
} else {
FileType = 0;
if (depth == 1 || HaveCopyParent)
if (depth == 1 || HaveCopyParent || HaveSnapshotParent)
status = STATUS_OBJECT_NAME_NOT_FOUND;
else
status = STATUS_OBJECT_PATH_NOT_FOUND;
@ -2986,7 +3008,7 @@ ReparseLoop:
DesiredAccess, CreateDisposition, CreateOptions, FileType);
if (status == STATUS_OBJECT_NAME_NOT_FOUND &&
(! HaveCopyParent) && (! HaveTrueParent)) {
(! HaveCopyParent) && (! HaveSnapshotParent) && (! HaveTrueParent)) {
//
// special case: File_CheckCreateParameters returns
@ -3072,7 +3094,7 @@ ReparseLoop:
if (! HaveCopyParent) {
if (HaveTrueParent) {
if (HaveTrueParent || HaveSnapshotParent) {
status = File_CreatePath(TruePath, CopyPath);

View File

@ -340,6 +340,9 @@ _FX ULONG RpcRt_RpcBindingFromStringBindingW(
return RPC_S_INVALID_ARG;
}
WCHAR wstrPortName[DYNAMIC_PORT_NAME_CHARS];
memset(wstrPortName, 0, sizeof(wstrPortName));
if (_wcsicmp(StringBinding, _old) == 0) {
ULONG_PTR pWinSpool = (ULONG_PTR)GetModuleHandle(L"winspool.drv");
@ -351,13 +354,9 @@ _FX ULONG RpcRt_RpcBindingFromStringBindingW(
if (pwszTempPortName) {
WCHAR wstrPortName[DYNAMIC_PORT_NAME_CHARS];
memset(wstrPortName, 0, sizeof(wstrPortName));
wcscpy(wstrPortName, L"ncalrpc:[");
wcscpy(wstrPortName + 9, pwszTempPortName);
wcscat(wstrPortName, _old + 9);
return __sys_RpcBindingFromStringBindingW(wstrPortName, OutBinding);
}
}
}
@ -373,21 +372,17 @@ _FX ULONG RpcRt_RpcBindingFromStringBindingW(
WCHAR* pwszTempPortName = GetDynamicLpcPortName(WPAD_PORT);
if (pwszTempPortName)
{
WCHAR wstrPortName[DYNAMIC_PORT_NAME_CHARS];
memset(wstrPortName, 0, sizeof(wstrPortName));
if (pwszTempPortName) {
wcscpy(wstrPortName, L"ncalrpc:[");
wcscpy(wstrPortName + 9, pwszTempPortName);
wcscat(wstrPortName, L"]");
return __sys_RpcBindingFromStringBindingW(wstrPortName, OutBinding);
}
}
}
RPC_STATUS status;
status = __sys_RpcBindingFromStringBindingW(StringBinding, OutBinding);
status = __sys_RpcBindingFromStringBindingW(*wstrPortName ? wstrPortName : StringBinding, OutBinding);
// If there are any IpcTrace options set, then output this debug string
WCHAR wsTraceOptions[4];
if (SbieApi_QueryConf(NULL, L"IpcTrace", 0, wsTraceOptions, sizeof(wsTraceOptions)) == STATUS_SUCCESS && wsTraceOptions[0] != L'\0')
@ -395,8 +390,8 @@ _FX ULONG RpcRt_RpcBindingFromStringBindingW(
WCHAR msg[512];
//Sbie_snwprintf(msg, 512, L"SBIE p=%06d t=%06d RpcBindingFromStringBindingW StringBinding = '%s', BindingHandle = 0x%X, status = 0x%X\n", GetCurrentProcessId(), GetCurrentThreadId(),
Sbie_snwprintf(msg, 512, L"StringBinding = '%s', BindingHandle = 0x%X, status = 0x%08X",
StringBinding, OutBinding, status);
Sbie_snwprintf(msg, 512, L"StringBinding = '%s', wstrPortName = '%s', BindingHandle = 0x%X, status = 0x%08X",
StringBinding, wstrPortName, OutBinding, status);
//OutputDebugString(msg);
SbieApi_MonitorPut2(MONITOR_IPC | MONITOR_TRACE, msg, FALSE);

View File

@ -600,19 +600,22 @@ _FX NTSTATUS Thread_MyImpersonateClient(
else if (Driver_OsVersion == DRIVER_WINDOWS_81)
ImpersonationInfo_offset = 0x650;
else if (Driver_OsBuild < 14316)
ImpersonationInfo_offset = 0x658;
else if (Driver_OsBuild < 15031)
ImpersonationInfo_offset = 0x660;
else if (Driver_OsBuild < 18312)
ImpersonationInfo_offset = 0x668;
else if (Driver_OsBuild <= 18363)
ImpersonationInfo_offset = 0x678;
else if (Driver_OsBuild < 18980)
ImpersonationInfo_offset = 0x688;
else if (Driver_OsBuild >= 18980)
ImpersonationInfo_offset = 0x4a8;
else if (Driver_OsVersion == DRIVER_WINDOWS_10) {
if (Driver_OsBuild < 14316)
ImpersonationInfo_offset = 0x658;
else if (Driver_OsBuild < 15031)
ImpersonationInfo_offset = 0x660;
else if (Driver_OsBuild < 18312)
ImpersonationInfo_offset = 0x668;
else if (Driver_OsBuild <= 18363)
ImpersonationInfo_offset = 0x678;
else if (Driver_OsBuild < 18980)
ImpersonationInfo_offset = 0x688;
else if (Driver_OsBuild < 21286)
ImpersonationInfo_offset = 0x4a8;
else
ImpersonationInfo_offset = 0x4f8;
}
#else ! _WIN64
if (Driver_OsVersion == DRIVER_WINDOWS_XP)
@ -634,18 +637,16 @@ _FX NTSTATUS Thread_MyImpersonateClient(
ImpersonationInfo_offset = 0x380;
else if (Driver_OsVersion == DRIVER_WINDOWS_10) {
if (Driver_OsBuild < 14965) {
if (Driver_OsBuild < 14965)
ImpersonationInfo_offset = 0x390;
}
else if (Driver_OsBuild <= 18309) {
else if (Driver_OsBuild <= 18309)
ImpersonationInfo_offset = 0x398;
}
else if (Driver_OsBuild < 18980) {
else if (Driver_OsBuild < 18980)
ImpersonationInfo_offset = 0x3A0;
}
else {
else if (Driver_OsBuild < 21286)
ImpersonationInfo_offset = 0x2c8;
}
else
ImpersonationInfo_offset = 0x2f0;
}
//
// on Windows XP (which is supported only in a 32-bit)
@ -709,9 +710,23 @@ _FX NTSTATUS Thread_MyImpersonateClient(
}
}
if (! ImpersonationInfo_offset) {
if (!ImpersonationInfo_offset) {
status = STATUS_ACCESS_DENIED;
Log_Status(MSG_1222, 0x62, STATUS_UNKNOWN_REVISION);
/*__try {
for (int i = 0; i < 0x0a00; i++)
{
ULONG_PTR* ImpersonationInfo = (ULONG_PTR*)((ULONG_PTR)ThreadObject + i);
if ((*ImpersonationInfo & ~7) == (ULONG_PTR)TokenObject)
{
WCHAR str[64];
swprintf(str, L"BAM! found: %d", i);
Session_MonitorPut(MONITOR_OTHER, str, PsGetCurrentProcessId());
}
}
} __except (EXCEPTION_EXECUTE_HANDLER) {}*/
}
}

View File

@ -27,6 +27,7 @@
#include "api.h"
#include "util.h"
#include "common/my_version.h"
#include "session.h"
//---------------------------------------------------------------------------
@ -818,6 +819,11 @@ _FX void *Token_Restrict(
TOKEN_USER *user;
void *NewTokenObject = NULL;
/*if (Conf_Get_Boolean(proc->box->name, L"CreateToken", 0, FALSE))
{
}*/
// OpenToken BEGIN
if (Conf_Get_Boolean(proc->box->name, L"OpenToken", 0, FALSE) || Conf_Get_Boolean(proc->box->name, L"UnrestrictedToken", 0, FALSE)) {

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1,6 +1,8 @@
#include "stdafx.h"
#include "TreeItemModel.h"
QString QTreeViewEx::m_ResetColumns = "Reset Columns";
#define FIRST_COLUMN 0
bool CTreeItemModel::m_DarkMode = false;

View File

@ -223,6 +223,8 @@ public:
emit ColumnChanged(column, !hide);
}
static QString m_ResetColumns;
signals:
void ColumnChanged(int column, bool visible);
void ResetColumns();
@ -240,8 +242,10 @@ public slots:
void OnResetColumns()
{
QAbstractItemModel* pModel = model();
for (int i = 0; i < pModel->columnCount(); i++)
for (int i = 0; i < pModel->columnCount(); i++) {
SetColumnHidden(i, false);
QTreeView::resizeColumnToContents(i);
}
}
private slots:
@ -267,7 +271,7 @@ private slots:
if (m_ColumnReset)
{
m_pMenu->addSeparator();
QAction* pAction = m_pMenu->addAction(tr("Reset columns"));
QAction* pAction = m_pMenu->addAction(m_ResetColumns);
if(m_ColumnReset == 1)
connect(pAction, SIGNAL(triggered()), this, SLOT(OnResetColumns()));
else

View File

@ -1,6 +1,7 @@
#pragma once
#include "../mischelpers_global.h"
#include "TreeViewEx.h"
class MISCHELPERS_EXPORT QTreeWidgetEx: public QTreeWidget
{
@ -53,8 +54,10 @@ signals:
public slots:
void OnResetColumns()
{
for (int i = 0; i < columnCount(); i++)
for (int i = 0; i < columnCount(); i++) {
setColumnHidden(i, false);
QTreeView::resizeColumnToContents(i);
}
}
private slots:
@ -75,7 +78,7 @@ private slots:
if (m_ColumnReset)
{
m_pMenu->addSeparator();
QAction* pAction = m_pMenu->addAction(tr("Reset columns"));
QAction* pAction = m_pMenu->addAction(QTreeViewEx::m_ResetColumns);
if(m_ColumnReset == 1)
connect(pAction, SIGNAL(triggered()), this, SLOT(OnResetColumns()));
else

View File

@ -37,6 +37,8 @@ CSandBox::CSandBox(const QString& BoxName, class CSbieAPI* pAPI) : CSbieIni(BoxN
{
//m = new SSandBox;
m_IsEnabled = true;
m_ActiveProcessCount = 0;
// when loading a sandbox that is not initialized, initialize it

View File

@ -56,6 +56,8 @@ public:
virtual void CloseBox() {}
virtual bool IsEnabled() { return m_IsEnabled; }
virtual bool IsEmpty();
virtual SB_PROGRESS CleanBox();
virtual SB_STATUS RenameBox(const QString& NewName);
@ -81,7 +83,9 @@ protected:
QString m_FilePath;
QString m_RegPath;
QString m_IpcPath;
bool m_IsEnabled;
QMap<quint32, CBoxedProcessPtr> m_ProcessList;
int m_ActiveProcessCount;

View File

@ -927,7 +927,8 @@ SB_STATUS CSbieAPI::ReloadBoxes()
QString BoxName = SbieIniGet(QString(), QString(), (i | CONF_GET_NO_EXPAND));
if (BoxName.isNull())
break;
if (!IsBoxEnabled(BoxName))
bool bIsEnabled;
if (!IsBox(BoxName, bIsEnabled))
continue;
CSandBoxPtr pBox = OldSandBoxes.take(BoxName.toLower());
@ -938,6 +939,7 @@ SB_STATUS CSbieAPI::ReloadBoxes()
}
UpdateBoxPaths(pBox);
pBox->m_IsEnabled = bIsEnabled;
pBox->UpdateDetails();
}
@ -1602,7 +1604,7 @@ SB_STATUS CSbieAPI::ReloadConfig(quint32 SessionId)
return SB_OK;
}
bool CSbieAPI::IsBoxEnabled(const QString& BoxName)
bool CSbieAPI::IsBox(const QString& BoxName, bool& bIsEnabled)
{
wstring box_name = BoxName.toStdWString();
@ -1613,7 +1615,9 @@ bool CSbieAPI::IsBoxEnabled(const QString& BoxName)
args->func_code = API_IS_BOX_ENABLED;
args->box_name.val = (WCHAR*)box_name.c_str();
return NT_SUCCESS(m->IoControl(parms));
NTSTATUS status = m->IoControl(parms);
bIsEnabled = NT_SUCCESS(status);
return bIsEnabled || status == STATUS_ACCOUNT_RESTRICTION;
}
bool CSbieAPI::IsConfigLocked()

View File

@ -137,7 +137,7 @@ public:
virtual SB_STATUS ReloadConfig(quint32 SessionId = -1);
virtual QString SbieIniGet(const QString& Section, const QString& Setting, quint32 Index = 0, qint32* ErrCode = NULL);
virtual SB_STATUS SbieIniSet(const QString& Section, const QString& Setting, const QString& Value, ESetMode Mode = eIniUpdate);
virtual bool IsBoxEnabled(const QString& BoxName);
virtual bool IsBox(const QString& BoxName, bool& bIsEnabled);
virtual CSbieIni* GetGlobalSettings() const { return m_pGlobalSection; }
virtual CSbieIni* GetUserSettings() const { return m_pUserSection; }
virtual bool IsConfigLocked();

View File

@ -6,12 +6,12 @@
<rect>
<x>0</x>
<y>0</y>
<width>372</width>
<height>274</height>
<width>333</width>
<height>263</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
@ -24,8 +24,8 @@
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>16777215</height>
<width>500</width>
<height>263</height>
</size>
</property>
<property name="windowTitle">
@ -34,26 +34,6 @@
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<layout class="QGridLayout" name="gridLayout">
<item row="6" column="2" colspan="4">
<widget class="QComboBox" name="cmbTemplates"/>
</item>
<item row="8" column="2" colspan="4">
<widget class="QComboBox" name="cmbBoxes"/>
</item>
<item row="1" column="0" colspan="3">
<widget class="QLabel" name="label">
<property name="text">
<string>Enter a name for the new box:</string>
</property>
</widget>
</item>
<item row="10" column="0" colspan="7">
<widget class="QDialogButtonBox" name="buttonBox">
<property name="standardButtons">
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
</property>
</widget>
</item>
<item row="5" column="1" colspan="4">
<widget class="QRadioButton" name="radTemplate">
<property name="text">
@ -61,26 +41,6 @@
</property>
</widget>
</item>
<item row="7" column="1" colspan="4">
<widget class="QRadioButton" name="radCopy">
<property name="text">
<string>Copy options from an existing box:</string>
</property>
</widget>
</item>
<item row="9" column="2">
<spacer name="verticalSpacer">
<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="4" column="0" colspan="4">
<widget class="QLabel" name="label_2">
<property name="text">
@ -95,6 +55,9 @@
</property>
</widget>
</item>
<item row="6" column="2" colspan="4">
<widget class="QComboBox" name="cmbTemplates"/>
</item>
<item row="0" column="5" colspan="2">
<spacer name="horizontalSpacer_3">
<property name="orientation">
@ -121,10 +84,86 @@
</property>
</spacer>
</item>
<item row="7" column="1" colspan="4">
<widget class="QRadioButton" name="radCopy">
<property name="text">
<string>Copy options from an existing box:</string>
</property>
</widget>
</item>
<item row="9" column="2">
<spacer name="verticalSpacer">
<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="1" column="0" colspan="3">
<widget class="QLabel" name="label">
<property name="text">
<string>Sandbox Name:</string>
</property>
</widget>
</item>
<item row="8" column="2" colspan="4">
<widget class="QComboBox" name="cmbBoxes"/>
</item>
<item row="10" column="0" colspan="7">
<widget class="QDialogButtonBox" name="buttonBox">
<property name="standardButtons">
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
</property>
</widget>
</item>
<item row="6" column="0">
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="6" column="1">
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
</layout>
</widget>
<tabstops>
<tabstop>txtName</tabstop>
<tabstop>radTemplate</tabstop>
<tabstop>cmbTemplates</tabstop>
<tabstop>radCopy</tabstop>
<tabstop>cmbBoxes</tabstop>
</tabstops>
<resources/>
<connections/>
</ui>

View File

@ -99,7 +99,7 @@ QList<QVariant> CSbieModel::MakeBoxPath(const QVariant& Name, const QMap<QString
return Path;
}
QList<QVariant> CSbieModel::Sync(const QMap<QString, CSandBoxPtr>& BoxList, const QMap<QString, QStringList>& Groups)
QList<QVariant> CSbieModel::Sync(const QMap<QString, CSandBoxPtr>& BoxList, const QMap<QString, QStringList>& Groups, bool ShowHidden)
{
QList<QVariant> Added;
QMap<QList<QVariant>, QList<STreeNode*> > New;
@ -161,6 +161,9 @@ QList<QVariant> CSbieModel::Sync(const QMap<QString, CSandBoxPtr>& BoxList, cons
CSandBoxPlus* pBoxEx = qobject_cast<CSandBoxPlus*>(pBox.data());
if (!ShowHidden && !pBoxEx->IsEnabled())
continue;
int Col = 0;
bool State = false;
int Changed = 0;
@ -186,6 +189,12 @@ QList<QVariant> CSbieModel::Sync(const QMap<QString, CSandBoxPtr>& BoxList, cons
Changed = 1; // set change for first column
}
if (pNode->IsGray != !pBoxEx->IsEnabled())
{
pNode->IsGray = !pBoxEx->IsEnabled();
Changed = 2; // set change for all columns
}
for(int section = 0; section < columnCount(); section++)
{
if (!m_Columns.contains(section))
@ -306,7 +315,7 @@ bool CSbieModel::Sync(const CSandBoxPtr& pBox, const QList<QVariant>& Path, cons
case eName: Value = pProcess->GetProcessName(); break;
case eProcessId: Value = pProcess->GetProcessId(); break;
case eStatus: Value = pProcess->GetStatusStr(); break;
//case eTitle: break; // todo
case eTitle: Value = theAPI->GetProcessTitle(pProcess->GetProcessId()); break;
//case eLogCount: break; // todo Value = pProcess->GetResourceLog().count(); break;
case eTimeStamp: Value = pProcess->GetTimeStamp(); break;
//case ePath: Value = pProcess->GetFileName(); break;
@ -415,7 +424,7 @@ QVariant CSbieModel::headerData(int section, Qt::Orientation orientation, int ro
case eName: return tr("Name");
case eProcessId: return tr("Process ID");
case eStatus: return tr("Status");
//case eTitle: return tr("Title");
case eTitle: return tr("Title");
//case eLogCount: return tr("Log Count");
case eTimeStamp: return tr("Start Time");
case ePath: return tr("Path / Command Line");

View File

@ -12,7 +12,7 @@ public:
CSbieModel(QObject *parent = 0);
~CSbieModel();
QList<QVariant> Sync(const QMap<QString, CSandBoxPtr>& BoxList, const QMap<QString, QStringList>& Groups = QMap<QString, QStringList>());
QList<QVariant> Sync(const QMap<QString, CSandBoxPtr>& BoxList, const QMap<QString, QStringList>& Groups = QMap<QString, QStringList>(), bool ShowHidden = false);
CSandBoxPtr GetSandBox(const QModelIndex &index) const;
CBoxedProcessPtr GetProcess(const QModelIndex &index) const;
@ -33,8 +33,8 @@ public:
{
eName = 0,
eProcessId,
eTitle,
eStatus,
//eTitle,
//eLogCount,
eTimeStamp,
ePath,

View File

@ -45,6 +45,7 @@
<file>Actions/Stop.png</file>
<file>SandMan2N.png</file>
<file>SandManN.png</file>
<file>Actions/finder.png</file>
</qresource>
<qresource prefix="/Boxes">
<file alias="Empty3">Boxes/sandbox-b-empty.png</file>

View File

@ -17,7 +17,7 @@ LANGUAGE LANG_GERMAN, SUBLANG_GERMAN_AUSTRIAN
// Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems.
IDI_ICON1 ICON ".\\Resources\\SandMan.ico"
IDI_ICON1 ICON "./resources/SandMan.ico"
#ifdef APSTUDIO_INVOKED
@ -44,6 +44,23 @@ END
#endif // APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Bitmap
//
FINDER_FULL BITMAP "./resources/finder-full.bmp"
FINDER_EMPTY BITMAP "./resources/finder-empty.bmp"
/////////////////////////////////////////////////////////////////////////////
//
// Cursor
//
FINDER_CURSOR CURSOR "./resources/finder.cur"
/////////////////////////////////////////////////////////////////////////////
//

View File

@ -13,3 +13,4 @@
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif

View File

@ -124,6 +124,7 @@ CSandMan::CSandMan(QWidget *parent)
m_bConnectPending = false;
m_bStopPending = false;
QTreeViewEx::m_ResetColumns = tr("Reset Columns");
CPanelView::m_CopyCell = tr("Copy Cell");
CPanelView::m_CopyRow = tr("Copy Row");
CPanelView::m_CopyPanel = tr("Copy Panel");
@ -252,9 +253,6 @@ CSandMan::CSandMan(QWidget *parent)
pAction->setChecked(pAction->data().toBool() == bAdvanced);
SetViewMode(bAdvanced);
bool bAlwaysOnTop = theConf->GetBool("Options/AlwaysOnTop", false);
m_pWndTopMost->setChecked(bAlwaysOnTop);
this->setWindowFlag(Qt::WindowStaysOnTopHint, bAlwaysOnTop);
m_pKeepTerminated->setChecked(theConf->GetBool("Options/KeepTerminated"));
@ -262,9 +260,14 @@ CSandMan::CSandMan(QWidget *parent)
m_pProgressDialog->setWindowModality(Qt::ApplicationModal);
connect(m_pProgressDialog, SIGNAL(Cancel()), this, SLOT(OnCancelAsync()));
m_pPopUpWindow = new CPopUpWindow(this);
m_pPopUpWindow = new CPopUpWindow();
connect(m_pPopUpWindow, SIGNAL(RecoveryRequested(const QString&)), this, SLOT(OpenRecovery(const QString&)));
bool bAlwaysOnTop = theConf->GetBool("Options/AlwaysOnTop", false);
m_pWndTopMost->setChecked(bAlwaysOnTop);
this->setWindowFlag(Qt::WindowStaysOnTopHint, bAlwaysOnTop);
m_pPopUpWindow->setWindowFlag(Qt::WindowStaysOnTopHint, bAlwaysOnTop);
if (!bAutoRun)
show();
@ -286,6 +289,9 @@ CSandMan::CSandMan(QWidget *parent)
CSandMan::~CSandMan()
{
m_pPopUpWindow->close();
delete m_pPopUpWindow;
if(m_pEnableMonitoring->isChecked())
theAPI->EnableMonitor(false);
@ -348,6 +354,7 @@ void CSandMan::CreateMenus()
m_pNew = m_pMenuFile->addAction(CSandMan::GetIcon("NewBox"), tr("Create New Box"), this, SLOT(OnNewBox()));
m_pMenuFile->addSeparator();
m_pEmptyAll = m_pMenuFile->addAction(CSandMan::GetIcon("EmptyAll"), tr("Terminate All Processes"), this, SLOT(OnEmptyAll()));
m_pWndFinder = m_pMenuFile->addAction(CSandMan::GetIcon("finder"), tr("Window Finder"), this, SLOT(OnWndFinder()));
m_pDisableForce = m_pMenuFile->addAction(tr("Disable Forced Programs"), this, SLOT(OnDisableForce()));
m_pDisableForce->setCheckable(true);
m_pMenuFile->addSeparator();
@ -386,6 +393,9 @@ void CSandMan::CreateMenus()
m_iMenuViewPos = m_pMenuView->actions().count();
m_pMenuView->addSeparator();
m_pShowHidden = m_pMenuView->addAction(tr("Show Hidden Boxes"));
m_pShowHidden->setCheckable(true);
m_pCleanUpMenu = m_pMenuView->addMenu(CSandMan::GetIcon("Clean"), tr("Clean Up"));
m_pCleanUpProcesses = m_pCleanUpMenu->addAction(tr("Cleanup Processes"), this, SLOT(OnCleanUp()));
m_pCleanUpMenu->addSeparator();
@ -584,7 +594,7 @@ void CSandMan::dragEnterEvent(QDragEnterEvent* e)
void CSandMan::dropEvent(QDropEvent* e)
{
bool ok;
QString box = QInputDialog::getItem(this, "Sandboxie-Plus", tr("Sellect box:"), theAPI->GetAllBoxes().keys(), 0, false, &ok);
QString box = QInputDialog::getItem(this, "Sandboxie-Plus", tr("Select box:"), theAPI->GetAllBoxes().keys(), 0, false, &ok);
if (!ok || box.isEmpty())
return;
@ -636,6 +646,8 @@ void CSandMan::timerEvent(QTimerEvent* pEvent)
if (!isVisible() || windowState().testFlag(Qt::WindowMinimized))
return;
theAPI->UpdateWindowMap();
m_pBoxView->Refresh();
OnSelectionChanged();
@ -689,7 +701,7 @@ void CSandMan::timerEvent(QTimerEvent* pEvent)
if (CleanupTemplates == -1)
{
bool State = false;
CleanupTemplates = CCheckableMessageBox::question(this, "Sandboxie-Plus", tr("Some compatybility templates (%1) are missing, probably deleted, do you want to remove them from all boxes?")
CleanupTemplates = CCheckableMessageBox::question(this, "Sandboxie-Plus", tr("Some compatibility templates (%1) are missing, probably deleted, do you want to remove them from all boxes?")
.arg(m_MissingTemplates.join(", "))
, tr("Don't show this message again."), &State, QDialogButtonBox::Yes | QDialogButtonBox::No, QDialogButtonBox::Yes, QMessageBox::Information) == QDialogButtonBox::Yes ? 1 : 0;
@ -722,7 +734,7 @@ void CSandMan::OnBoxClosed(const QString& BoxName)
if (!pBox->GetBool("NeverDelete", false) && pBox->GetBool("AutoDelete", false) && !pBox->IsEmpty())
{
CRecoveryWindow* pRecoveryWindow = new CRecoveryWindow(pBox, this);
CRecoveryWindow* pRecoveryWindow = new CRecoveryWindow(pBox);
if (pRecoveryWindow->FindFiles() == 0)
delete pRecoveryWindow;
else if (pRecoveryWindow->exec() != 1)
@ -797,7 +809,7 @@ void CSandMan::OnStatusChanged()
{
if (m_SbieTemplates->RunCheck())
{
CSettingsWindow* pSettingsWindow = new CSettingsWindow(this);
CSettingsWindow* pSettingsWindow = new CSettingsWindow();
//connect(pSettingsWindow, SIGNAL(OptionsChanged()), this, SLOT(UpdateSettings()));
pSettingsWindow->showCompat();
}
@ -939,7 +951,7 @@ void CSandMan::OpenRecovery(const QString& BoxName)
if (!pBox)
return;
CRecoveryWindow* pRecoveryWindow = new CRecoveryWindow(pBox, this);
CRecoveryWindow* pRecoveryWindow = new CRecoveryWindow(pBox);
pRecoveryWindow->FindFiles();
pRecoveryWindow->show();
}
@ -1050,12 +1062,30 @@ void CSandMan::OnNotAuthorized(bool bLoginRequired, bool& bRetry)
void CSandMan::OnNewBox()
{
CNewBoxWindow NewBoxWindow;
NewBoxWindow.exec();
CNewBoxWindow NewBoxWindow(this);
bool bAlwaysOnTop = theConf->GetBool("Options/AlwaysOnTop", false);
NewBoxWindow.setWindowFlag(Qt::WindowStaysOnTopHint, bAlwaysOnTop);
if (NewBoxWindow.exec() == 1)
{
theAPI->ReloadBoxes();
m_pBoxView->Refresh();
m_pBoxView->SelectBox(NewBoxWindow.m_Name);
}
}
void CSandMan::OnEmptyAll()
{
if (theConf->GetInt("Options/TerminateAll", -1) == -1)
{
bool State = false;
if(CCheckableMessageBox::question(this, "Sandboxie-Plus", tr("Do you want to terminate all processes in all sandboxes?")
, tr("Terminate all without asking"), &State, QDialogButtonBox::Yes | QDialogButtonBox::No, QDialogButtonBox::Yes, QMessageBox::Information) != QDialogButtonBox::Yes);
return;
if (State)
theConf->SetValue("Options/TerminateAll", 1);
}
theAPI->TerminateAll();
}
@ -1208,6 +1238,7 @@ void CSandMan::OnAlwaysTop()
theConf->SetValue("Options/AlwaysOnTop", bAlwaysOnTop);
this->setWindowFlag(Qt::WindowStaysOnTopHint, bAlwaysOnTop);
this->show(); // why is this needed?
m_pPopUpWindow->setWindowFlag(Qt::WindowStaysOnTopHint, bAlwaysOnTop);
}
void CSandMan::SetViewMode(bool bAdvanced)
@ -1274,7 +1305,7 @@ void CSandMan::OnSettings()
static CSettingsWindow* pSettingsWindow = NULL;
if (pSettingsWindow == NULL)
{
pSettingsWindow = new CSettingsWindow(this);
pSettingsWindow = new CSettingsWindow();
connect(pSettingsWindow, SIGNAL(OptionsChanged()), this, SLOT(UpdateSettings()));
connect(pSettingsWindow, &CSettingsWindow::Closed, [this]() {
pSettingsWindow = NULL;
@ -1298,7 +1329,7 @@ void CSandMan::UpdateSettings()
void CSandMan::OnResetMsgs()
{
auto Ret = QMessageBox("Sandboxie-Plus", tr("Do you also want to reset hidden message boxes (yes), or only all log messages (no)?"),
QMessageBox::Question, QMessageBox::Yes | QMessageBox::Default, QMessageBox::No, QMessageBox::Cancel | QMessageBox::Escape).exec();
QMessageBox::Question, QMessageBox::Yes | QMessageBox::Default, QMessageBox::No, QMessageBox::Cancel | QMessageBox::Escape, this).exec();
if (Ret == QMessageBox::Cancel)
return;
@ -1319,6 +1350,7 @@ void CSandMan::OnResetMsgs()
theConf->SetValue("Options/OpenUrlsSandboxed", 2);
theConf->SetValue("Options/AutoCleanupTemplates", -1);
theConf->SetValue("Options/TerminateAll", -1);
}
theAPI->GetUserSettings()->UpdateTextList("SbieCtrl_HideMessage", QStringList(), true);
@ -1832,7 +1864,7 @@ void CSandMan::OnUpdateDownload()
QString Message = tr("<p>New Sandboxie-Plus has been downloaded to the following location:</p><p><a href=\"%2\">%1</a></p><p>Do you want to begin the installation? If any programs are running sandboxed, they will be terminated.</p>")
.arg(FilePath).arg("File:///" + TempDir);
if (QMessageBox("Sandboxie-Plus", Message, QMessageBox::Information, QMessageBox::Yes | QMessageBox::Default, QMessageBox::No | QMessageBox::Escape, QMessageBox::NoButton).exec() == QMessageBox::Yes)
if (QMessageBox("Sandboxie-Plus", Message, QMessageBox::Information, QMessageBox::Yes | QMessageBox::Default, QMessageBox::No | QMessageBox::Escape, QMessageBox::NoButton, this).exec() == QMessageBox::Yes)
QProcess::startDetached(FilePath);
}
@ -1949,6 +1981,173 @@ void CSandMan::LoadLanguage()
m_LanguageId = 1033; // default to English
}
//////////////////////////////////////////////////////////////////////////////////////////
// WinSpy based window finder
//
#include <windows.h>
#include "Helpers/FindTool.h"
#define IDD_FINDER_TOOL 111
#define ID_FINDER_TARGET 112
#define ID_FINDER_EXPLAIN 113
#define ID_FINDER_RESULT 114
UINT CALLBACK FindProc(HWND hwndTool, UINT uCode, HWND hwnd)
{
ULONG pid;
if (uCode == WFN_END)
GetWindowThreadProcessId(hwnd, &pid);
else
pid = 0;
hwndTool = GetParent(hwndTool);
if (pid && pid != GetCurrentProcessId())
{
RECT rc;
GetWindowRect(hwndTool, &rc);
if (rc.bottom - rc.top <= 150)
SetWindowPos(hwndTool, NULL, 0, 0, rc.right - rc.left, rc.bottom - rc.top + 70, SWP_SHOWWINDOW | SWP_NOMOVE);
CBoxedProcessPtr pProcess = theAPI->GetProcessById(pid);
if (!pProcess.isNull())
{
wstring result = CSandMan::tr("The selected window is running as part of program %1 in sandbox %2").arg(pProcess->GetProcessName()).arg(pProcess->GetBoxName()).toStdWString();
SetWindowText(GetDlgItem(hwndTool, ID_FINDER_RESULT), result.c_str());
//::ShowWindow(GetDlgItem(hwndTool, ID_FINDER_YES_BOXED), SW_SHOW);
}
else
{
wstring result = CSandMan::tr("The selected window is not running as part of any sandboxed program.").toStdWString();
SetWindowText(GetDlgItem(hwndTool, ID_FINDER_RESULT), result.c_str());
//::ShowWindow(GetDlgItem(hwndTool, ID_FINDER_NOT_BOXED), SW_SHOW);
}
::ShowWindow(GetDlgItem(hwndTool, ID_FINDER_RESULT), SW_SHOW);
}
else
{
RECT rc;
GetWindowRect(hwndTool, &rc);
if (rc.bottom - rc.top > 150)
SetWindowPos(hwndTool, NULL, 0, 0, rc.right - rc.left, rc.bottom - rc.top - 70, SWP_SHOWWINDOW | SWP_NOMOVE);
//::ShowWindow(GetDlgItem(hwndTool, ID_FINDER_YES_BOXED), SW_HIDE);
//::ShowWindow(GetDlgItem(hwndTool, ID_FINDER_NOT_BOXED), SW_HIDE);
::ShowWindow(GetDlgItem(hwndTool, ID_FINDER_RESULT), SW_HIDE);
}
return 0;
}
// hwnd: All window processes are passed the handle of the window
// that they belong to in hwnd.
// msg: Current message (e.g., WM_*) from the OS.
// wParam: First message parameter, note that these are more or less
// integers, but they are really just "data chunks" that
// you are expected to memcpy as raw data to float, etc.
// lParam: Second message parameter, same deal as above.
LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
switch (msg)
{
case WM_CREATE:
{
wstring info = CSandMan::tr("Drag the Finder Tool over a window to select it, then release the mouse to check if the window is sandboxed.").toStdWString();
CreateWindow(L"Static", L"", SS_BITMAP | SS_NOTIFY | WS_VISIBLE | WS_CHILD, 10, 10, 32, 32, hwnd, (HMENU)ID_FINDER_TARGET, NULL, NULL);
CreateWindow(L"Static", info.c_str(), WS_VISIBLE | WS_CHILD, 60, 10, 180, 50, hwnd, (HMENU)ID_FINDER_EXPLAIN, NULL, NULL);
CreateWindow(L"Static", L"", WS_CHILD, 60, 70, 180, 50, hwnd, (HMENU)ID_FINDER_RESULT, NULL, NULL);
MakeFinderTool(GetDlgItem(hwnd, ID_FINDER_TARGET), FindProc);
break;
}
case WM_CLOSE:
//DestroyWindow(hwnd);
PostQuitMessage(0);
break;
}
return DefWindowProc(hwnd, msg, wParam, lParam);
}
DWORD WINAPI FinderThreadFunc(LPVOID lpParam)
{
MSG msg;
WNDCLASS mainWindowClass = { 0 };
HINSTANCE hInstance = NULL;
// You can set the main window name to anything, but
// typically you should prefix custom window classes
// with something that makes it unique.
mainWindowClass.lpszClassName = TEXT("SBp.WndFinder");
mainWindowClass.hInstance = hInstance;
mainWindowClass.hbrBackground = GetSysColorBrush(COLOR_3DFACE);
mainWindowClass.lpfnWndProc = WndProc;
mainWindowClass.hCursor = LoadCursor(0, IDC_ARROW);
RegisterClass(&mainWindowClass);
// Notes:
// - The classname identifies the TYPE of the window. Not a C type.
// This is a (TCHAR*) ID that Windows uses internally.
// - The window name is really just the window text, this is
// commonly used for captions, including the title
// bar of the window itself.
// - parentHandle is considered the "owner" of this
// window. MessageBoxes can use HWND_MESSAGE to
// free them of any window.
// - menuHandle: hMenu specifies the child-window identifier,
// an integer value used by a dialog box
// control to notify its parent about events.
// The application determines the child-window
// identifier; it must be unique for all
// child windows with the same parent window.
HWND hwnd = CreateWindow(mainWindowClass.lpszClassName, CSandMan::tr("Sandboxie-Plus - Window Finder").toStdWString().c_str()
, WS_SYSMENU | WS_CAPTION | WS_VISIBLE, CW_USEDEFAULT, CW_USEDEFAULT, 275, 100, NULL, 0, hInstance, NULL);
HFONT hFont = CreateFont(13, 0, 0, 0, FW_DONTCARE, FALSE, FALSE, FALSE, ANSI_CHARSET, OUT_TT_PRECIS, CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, DEFAULT_PITCH | FF_DONTCARE, TEXT("Tahoma"));
SendMessage(GetDlgItem(hwnd, ID_FINDER_EXPLAIN), WM_SETFONT, (WPARAM)hFont, TRUE);
SendMessage(GetDlgItem(hwnd, ID_FINDER_RESULT), WM_SETFONT, (WPARAM)hFont, TRUE);
while (GetMessage(&msg, NULL, 0, 0))
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
DeleteObject(hFont);
return (int)msg.wParam;
}
void CSandMan::OnWndFinder()
{
m_pWndFinder->setEnabled(false);
HANDLE hThread = CreateThread(NULL, 0, FinderThreadFunc, NULL, 0, NULL);
QWinEventNotifier* finishedNotifier = new QWinEventNotifier(hThread);
finishedNotifier->setEnabled(true);
connect(finishedNotifier, &QWinEventNotifier::activated, this, [finishedNotifier, this, hThread]() {
CloseHandle(hThread);
m_pWndFinder->setEnabled(true);
finishedNotifier->setEnabled(false);
finishedNotifier->deleteLater();
});
}
//////////////////////////////////////////////////////////////////////////////////////////
//
/*

View File

@ -13,8 +13,8 @@
#include "Windows/PopUpWindow.h"
#define VERSION_MJR 0
#define VERSION_MIN 5
#define VERSION_REV 5
#define VERSION_MIN 6
#define VERSION_REV 0
#define VERSION_UPD 0
@ -48,6 +48,8 @@ public:
bool IsFullyPortable();
bool IsShowHidden() { return m_pShowHidden->isChecked(); }
protected:
SB_STATUS ConnectSbie();
SB_STATUS ConnectSbieImpl();
@ -115,6 +117,7 @@ private slots:
void OnNewBox();
void OnEmptyAll();
void OnWndFinder();
void OnDisableForce();
void OnDisableForce2();
void OnMaintenance();
@ -175,6 +178,7 @@ private:
QMenu* m_pMenuFile;
QAction* m_pNew;
QAction* m_pEmptyAll;
QAction* m_pWndFinder;
QAction* m_pDisableForce;
QAction* m_pDisableForce2;
QMenu* m_pMaintenance;
@ -194,6 +198,7 @@ private:
QMenu* m_pMenuView;
QActionGroup* m_pViewMode;
QAction* m_pShowHidden;
QAction* m_pWndTopMost;
int m_iMenuViewPos;
QMenu* m_pCleanUpMenu;

View File

@ -197,7 +197,9 @@
<ItemGroup>
<ClCompile Include="ApiLog.cpp" />
<ClCompile Include="Dialogs\MultiErrorDialog.cpp" />
<ClCompile Include="Helpers\FindTool.cpp" />
<ClCompile Include="Helpers\WinAdmin.cpp" />
<ClCompile Include="Helpers\WindowFromPointEx.cpp" />
<ClCompile Include="main.cpp" />
<ClCompile Include="Models\ApiMonModel.cpp" />
<ClCompile Include="Models\ResMonModel.cpp" />
@ -232,6 +234,7 @@
<QtMoc Include="ApiLog.h" />
<QtMoc Include="Dialogs\MultiErrorDialog.h" />
<QtMoc Include="Models\ApiMonModel.h" />
<ClInclude Include="Helpers\FindTool.h" />
<ClInclude Include="Helpers\WinAdmin.h" />
<ClInclude Include="Resources\resource.h" />
<QtMoc Include="SbiePlusAPI.h" />
@ -244,6 +247,8 @@
<ResourceCompile Include="Resources\SandMan.rc" />
</ItemGroup>
<ItemGroup>
<Image Include="Resources\finder-empty.bmp" />
<Image Include="Resources\finder-full.bmp" />
<Image Include="Resources\SandMan.ico" />
</ItemGroup>
<ItemGroup>
@ -255,9 +260,11 @@
<QtUic Include="Forms\SnapshotsWindow.ui" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\finder.cur" />
<None Include="sandman_de.ts" />
<None Include="sandman_pt.ts" />
<None Include="sandman_ru.ts" />
<None Include="sandman_tr.ts" />
<None Include="sandman_zh.ts" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />

View File

@ -99,6 +99,12 @@
<ClCompile Include="Windows\NewBoxWindow.cpp">
<Filter>Windows</Filter>
</ClCompile>
<ClCompile Include="Helpers\FindTool.cpp">
<Filter>Helpers</Filter>
</ClCompile>
<ClCompile Include="Helpers\WindowFromPointEx.cpp">
<Filter>Helpers</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="stdafx.h">
@ -110,6 +116,9 @@
<ClInclude Include="Helpers\WinAdmin.h">
<Filter>Helpers</Filter>
</ClInclude>
<ClInclude Include="Helpers\FindTool.h">
<Filter>Helpers</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<QtMoc Include="SandMan.h">
@ -169,6 +178,12 @@
<Image Include="Resources\SandMan.ico">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Resources\finder-empty.bmp">
<Filter>Resource Files</Filter>
</Image>
<Image Include="Resources\finder-full.bmp">
<Filter>Resource Files</Filter>
</Image>
</ItemGroup>
<ItemGroup>
<QtUic Include="Forms\SettingsWindow.ui">
@ -203,5 +218,11 @@
<None Include="sandman_zh.ts">
<Filter>Translation Files</Filter>
</None>
<None Include="Resources\finder.cur">
<Filter>Resource Files</Filter>
</None>
<None Include="sandman_tr.ts">
<Filter>Translation Files</Filter>
</None>
</ItemGroup>
</Project>

View File

@ -1,7 +1,7 @@
#include "stdafx.h"
#include "SbiePlusAPI.h"
#include "..\MiscHelpers\Common\Common.h"
#include <windows.h>
CSbiePlusAPI::CSbiePlusAPI(QObject* parent) : CSbieAPI(parent)
{
@ -31,6 +31,40 @@ CBoxedProcessPtr CSbiePlusAPI::OnProcessBoxed(quint32 ProcessId, const QString&
return pProcess;
}
BOOL CALLBACK CSbiePlusAPI__WindowEnum(HWND hwnd, LPARAM lParam)
{
if (GetParent(hwnd) || GetWindow(hwnd, GW_OWNER))
return TRUE;
ULONG style = GetWindowLong(hwnd, GWL_STYLE);
if ((style & (WS_CAPTION | WS_SYSMENU)) != (WS_CAPTION | WS_SYSMENU))
return TRUE;
if (!IsWindowVisible(hwnd))
return TRUE;
/*
if ((style & WS_OVERLAPPEDWINDOW) != WS_OVERLAPPEDWINDOW &&
(style & WS_POPUPWINDOW) != WS_POPUPWINDOW)
return TRUE;
*/
ULONG pid;
GetWindowThreadProcessId(hwnd, &pid);
QMultiMap<quint32, QString>& m_WindowMap = *((QMultiMap<quint32, QString>*)(lParam));
WCHAR title[256];
GetWindowTextW(hwnd, title, 256);
m_WindowMap.insert(pid, QString::fromWCharArray(title));
return TRUE;
}
void CSbiePlusAPI::UpdateWindowMap()
{
m_WindowMap.clear();
EnumWindows(CSbiePlusAPI__WindowEnum, (LPARAM)&m_WindowMap);
}
///////////////////////////////////////////////////////////////////////////////
// CSandBoxPlus
//
@ -93,6 +127,9 @@ void CSandBoxPlus::CloseBox()
QString CSandBoxPlus::GetStatusStr() const
{
if (!m_IsEnabled)
return tr("Disabled");
QStringList Status;
if (m_iUnsecureDebugging == 1)

View File

@ -10,12 +10,17 @@ public:
CSbiePlusAPI(QObject* parent);
virtual ~CSbiePlusAPI();
virtual void UpdateWindowMap();
virtual QString GetProcessTitle(quint32 pid) { return m_WindowMap.value(pid); }
protected:
virtual CSandBox* NewSandBox(const QString& BoxName, class CSbieAPI* pAPI);
virtual CBoxedProcess* NewBoxedProcess(quint32 ProcessId, class CSandBox* pBox);
virtual CBoxedProcessPtr OnProcessBoxed(quint32 ProcessId, const QString& Path, const QString& Box, quint32 ParentId);
QMultiMap<quint32, QString> m_WindowMap;
};
///////////////////////////////////////////////////////////////////////////////

View File

@ -152,7 +152,7 @@ void CSbieView::Clear()
void CSbieView::Refresh()
{
QList<QVariant> Added = m_pSbieModel->Sync(theAPI->GetAllBoxes(), m_Groups);
QList<QVariant> Added = m_pSbieModel->Sync(theAPI->GetAllBoxes(), m_Groups, theGUI->IsShowHidden());
if (m_pSbieModel->IsTree())
{
@ -219,7 +219,9 @@ void CSbieView::OnMenu(const QPoint& Point)
else
{
pBox = m_pSbieModel->GetSandBox(ModelIndex);
if (pBox)
if (!pBox->IsEnabled())
iSandBoxeCount = -1;
if (pBox && iSandBoxeCount != -1)
iSandBoxeCount++;
}
}
@ -230,7 +232,7 @@ void CSbieView::OnMenu(const QPoint& Point)
m_pDelGroupe->setVisible(!Rows.isEmpty() && iSandBoxeCount == 0 && iProcessCount == 0);
for (int i = m_iMenuTop; i < m_iMenuBox; i++)
MenuActions[i]->setVisible(iSandBoxeCount > 0 && iProcessCount == 0);
MenuActions[i]->setVisible(iSandBoxeCount != 0 && iProcessCount == 0);
m_pMenuRun->setEnabled(iSandBoxeCount == 1);
MenuActions[m_iMoveTo]->setVisible(!Rows.isEmpty() && iProcessCount == 0);
@ -248,11 +250,12 @@ void CSbieView::OnMenu(const QPoint& Point)
m_pMenuPresetsShares->setChecked(pBox && pBox.objectCast<CSandBoxPlus>()->HasSharesAccess());
m_pMenuPresetsNoAdmin->setChecked(pBox && pBox.objectCast<CSandBoxPlus>()->IsDropRights());
m_pMenuExplore->setEnabled(iSandBoxeCount == 1);
m_pMenuOptions->setEnabled(iSandBoxeCount == 1);
m_pMenuSnapshots->setEnabled(iSandBoxeCount == 1);
for (int i = m_iMenuBox; i < m_iMenuProc; i++)
MenuActions[i]->setVisible(iProcessCount > 0 && iSandBoxeCount == 0);
MenuActions[i]->setVisible(iProcessCount != 0 && iSandBoxeCount == 0);
m_pMenuLinkTo->setEnabled(iProcessCount == 1);
@ -353,7 +356,7 @@ void CSbieView::UpdateGroupMenu()
QAction* pAction = m_pMenuMoveTo->addAction(Group.isEmpty() ? tr("[None]") : Group, this, SLOT(OnGroupAction()));
pAction->setData(Group);
}
m_pMenuMoveTo->setEnabled(m_pMenuMoveTo->actions().count() > 0);
m_pMenuMoveTo->setEnabled(m_Groups.keys().count() > 1);
}
QString CSbieView__SerializeGroup(QMap<QString, QStringList>& m_Groups, const QString& Parent = "")
@ -389,7 +392,7 @@ void CSbieView::OnGroupAction()
}
else if (Action == m_pDelGroupe)
{
if (QMessageBox("Sandboxie-Plus", tr("Do you really want to remove the selected group(s)?"), QMessageBox::Question, QMessageBox::Yes, QMessageBox::No | QMessageBox::Default | QMessageBox::Escape, QMessageBox::NoButton).exec() != QMessageBox::Yes)
if (QMessageBox("Sandboxie-Plus", tr("Do you really want to remove the selected group(s)?"), QMessageBox::Question, QMessageBox::Yes, QMessageBox::No | QMessageBox::Default | QMessageBox::Escape, QMessageBox::NoButton, this).exec() != QMessageBox::Yes)
return;
foreach(const QModelIndex& Index, m_pSbieTree->selectedRows())
@ -513,8 +516,18 @@ void CSbieView::OnSandBoxAction()
}
else if (Action == m_pMenuSnapshots)
{
CSnapshotsWindow* pSnapshotsWindow = new CSnapshotsWindow(SandBoxes.first(), this);
pSnapshotsWindow->show();
CSandBoxPtr pBox = SandBoxes.first();
static QMap<void*, CSnapshotsWindow*> SnapshotWindows;
if (!SnapshotWindows.contains(pBox.data()))
{
CSnapshotsWindow* pSnapshotsWindow = new CSnapshotsWindow(SandBoxes.first(), this);
SnapshotWindows.insert(pBox.data(), pSnapshotsWindow);
connect(pSnapshotsWindow, &CSnapshotsWindow::Closed, [this, pBox]() {
SnapshotWindows.remove(pBox.data());
});
pSnapshotsWindow->show();
}
}
else if (Action == m_pMenuRename)
{
@ -526,7 +539,7 @@ void CSbieView::OnSandBoxAction()
}
else if (Action == m_pMenuRemove)
{
if (QMessageBox("Sandboxie-Plus", tr("Do you really want to remove the selected sandbox(es)?"), QMessageBox::Warning, QMessageBox::Yes, QMessageBox::No | QMessageBox::Default | QMessageBox::Escape, QMessageBox::NoButton).exec() != QMessageBox::Yes)
if (QMessageBox("Sandboxie-Plus", tr("Do you really want to remove the selected sandbox(es)?"), QMessageBox::Warning, QMessageBox::Yes, QMessageBox::No | QMessageBox::Default | QMessageBox::Escape, QMessageBox::NoButton, this).exec() != QMessageBox::Yes)
return;
foreach(const CSandBoxPtr& pBox, SandBoxes)
@ -541,21 +554,21 @@ void CSbieView::OnSandBoxAction()
if (SandBoxes.count() == 1)
{
if (SandBoxes.first()->IsEmpty()) {
QMessageBox("Sandboxie-Plus", tr("This Sandbox is already empty."), QMessageBox::Information, QMessageBox::Ok, QMessageBox::NoButton, QMessageBox::NoButton).exec();
QMessageBox("Sandboxie-Plus", tr("This Sandbox is already empty."), QMessageBox::Information, QMessageBox::Ok, QMessageBox::NoButton, QMessageBox::NoButton, this).exec();
return;
}
if (theConf->GetBool("Options/ShowRecovery", false))
{
CRecoveryWindow* pRecoveryWindow = new CRecoveryWindow(SandBoxes.first(), this);
CRecoveryWindow* pRecoveryWindow = new CRecoveryWindow(SandBoxes.first());
pRecoveryWindow->FindFiles();
if (pRecoveryWindow->exec() != 1)
return;
}
else if(QMessageBox("Sandboxie-Plus", tr("Do you want to delete the content of the selected sandbox?"), QMessageBox::Question, QMessageBox::Yes, QMessageBox::No | QMessageBox::Default | QMessageBox::Escape, QMessageBox::NoButton).exec() != QMessageBox::Yes)
else if(QMessageBox("Sandboxie-Plus", tr("Do you want to delete the content of the selected sandbox?"), QMessageBox::Question, QMessageBox::Yes, QMessageBox::No | QMessageBox::Default | QMessageBox::Escape, QMessageBox::NoButton, this).exec() != QMessageBox::Yes)
return;
}
else if (QMessageBox("Sandboxie-Plus", tr("Do you really want to delete the content of multiple sandboxes?"), QMessageBox::Warning, QMessageBox::Yes, QMessageBox::No | QMessageBox::Default | QMessageBox::Escape, QMessageBox::NoButton).exec() != QMessageBox::Yes)
else if (QMessageBox("Sandboxie-Plus", tr("Do you really want to delete the content of multiple sandboxes?"), QMessageBox::Warning, QMessageBox::Yes, QMessageBox::No | QMessageBox::Default | QMessageBox::Escape, QMessageBox::NoButton, this).exec() != QMessageBox::Yes)
return;
foreach(const CSandBoxPtr & pBox, SandBoxes)
@ -569,6 +582,9 @@ void CSbieView::OnSandBoxAction()
}
else if (Action == m_pMenuEmptyBox)
{
if (QMessageBox("Sandboxie-Plus", tr("Do you want to terminate all processes in the selected sandbox(es)?"), QMessageBox::Question, QMessageBox::Yes, QMessageBox::No | QMessageBox::Default | QMessageBox::Escape, QMessageBox::NoButton, this).exec() != QMessageBox::Yes)
return;
foreach(const CSandBoxPtr& pBox, SandBoxes)
Results.append(pBox->TerminateAll());
}
@ -630,7 +646,7 @@ void CSbieView::OnProcessAction()
if (Action == m_pMenuTerminate || Action == m_pMenuBlackList)
{
if (QMessageBox("Sandboxie-Plus", tr("Do you want to %1 the selected process(es)").arg(((QAction*)sender())->text().toLower())
, QMessageBox::Question, QMessageBox::Yes | QMessageBox::Default, QMessageBox::No | QMessageBox::Escape, QMessageBox::NoButton).exec() != QMessageBox::Yes)
, QMessageBox::Question, QMessageBox::Yes | QMessageBox::Default, QMessageBox::No | QMessageBox::Escape, QMessageBox::NoButton, this).exec() != QMessageBox::Yes)
return;
}
@ -686,7 +702,7 @@ void CSbieView::OnProcessAction()
{
if (!pProcess.objectCast<CSbieProcess>()->GetBox()->IsINetBlocked())
{
if (QMessageBox("Sandboxie-Plus", tr("This box does not have Internet restrictions in place, do you want to enable them?"), QMessageBox::Question, QMessageBox::Yes, QMessageBox::No | QMessageBox::Default | QMessageBox::Escape, QMessageBox::NoButton).exec() != QMessageBox::Yes)
if (QMessageBox("Sandboxie-Plus", tr("This box does not have Internet restrictions in place, do you want to enable them?"), QMessageBox::Question, QMessageBox::Yes, QMessageBox::No | QMessageBox::Default | QMessageBox::Escape, QMessageBox::NoButton, this).exec() != QMessageBox::Yes)
return;
pProcess.objectCast<CSbieProcess>()->GetBox()->SetINetBlock(true);
}
@ -714,10 +730,17 @@ void CSbieView::OnDoubleClicked(const QModelIndex& index)
if (pBox.isNull())
return;
if (!pBox->IsEnabled())
{
if (QMessageBox("Sandboxie-Plus", tr("This sandbox is disabled, do you want to enable it?"), QMessageBox::Question, QMessageBox::Yes, QMessageBox::No | QMessageBox::Default | QMessageBox::Escape, QMessageBox::NoButton, this).exec() != QMessageBox::Yes)
return;
pBox->SetText("Enabled", "y");
}
static QMap<void*, COptionsWindow*> OptionsWindows;
if (!OptionsWindows.contains(pBox.data()))
{
COptionsWindow* pOptionsWindow = new COptionsWindow(pBox, pBox->GetName(), this);
COptionsWindow* pOptionsWindow = new COptionsWindow(pBox, pBox->GetName());
OptionsWindows.insert(pBox.data(), pOptionsWindow);
connect(pOptionsWindow, &COptionsWindow::Closed, [this, pBox]() {
OptionsWindows.remove(pBox.data());
@ -835,3 +858,18 @@ void CSbieView::UpdateRunMenu(const CSandBoxPtr& pBox)
pAction->setData(NameCmd.second);
}
}
void CSbieView::SelectBox(const QString& Name)
{
QModelIndex Index = m_pSbieModel->FindIndex(Name);
QModelIndex ModelIndex = m_pSortProxy->mapFromSource(Index);
QModelIndex ModelL = m_pSortProxy->index(ModelIndex.row(), 0, ModelIndex.parent());
QModelIndex ModelR = m_pSortProxy->index(ModelIndex.row(), m_pSortProxy->columnCount() - 1, ModelIndex.parent());
QItemSelection SelectedItems;
SelectedItems.append(QItemSelectionRange(ModelL, ModelR));
m_pSbieTree->scrollTo(ModelL);
m_pSbieTree->selectionModel()->select(SelectedItems, QItemSelectionModel::ClearAndSelect);
}

View File

@ -17,6 +17,8 @@ public:
//virtual void UpdateRunMenu();
virtual void SelectBox(const QString& Name);
signals:
void RecoveryRequested(const QString& BoxName);

View File

@ -7,19 +7,42 @@
CNewBoxWindow::CNewBoxWindow(QWidget *parent)
: QDialog(parent)
{
this->setWindowTitle(tr("Sandboxie-Plus - Create New Box"));
Qt::WindowFlags flags = windowFlags();
flags |= Qt::CustomizeWindowHint;
//flags &= ~Qt::WindowContextHelpButtonHint;
//flags &= ~Qt::WindowSystemMenuHint;
//flags &= ~Qt::WindowMinMaxButtonsHint;
//flags |= Qt::WindowMinimizeButtonHint;
//flags &= ~Qt::WindowCloseButtonHint;
flags &= ~Qt::WindowContextHelpButtonHint;
//flags &= ~Qt::WindowSystemMenuHint;
setWindowFlags(flags);
ui.setupUi(this);
connect(ui.buttonBox, SIGNAL(accepted()), SLOT(CreateBox()));
connect(ui.buttonBox, SIGNAL(rejected()), SLOT(reject()));
ui.txtName->setText(tr("New Box"));
QMap<QString, CSandBoxPtr> Boxes = theAPI->GetAllBoxes();
for (int i=0;; i++) {
QString NewName = tr("New Box");
if (i > 0) NewName.append(" " + QString::number(i));
if (Boxes.contains(NewName.toLower().replace(" ", "_")))
continue;
ui.txtName->setText(NewName);
break;
}
ui.cmbTemplates->addItem(tr("Hardened"));
ui.cmbTemplates->addItem(tr("Default"));
ui.cmbTemplates->setCurrentIndex(eDefault);
ui.cmbTemplates->addItem(tr("Legacy (old sbie behaviour)"));
ui.cmbTemplates->addItem(tr("Legacy Sandboxie Behaviour"));
ui.cmbBoxes->addItems(theAPI->GetAllBoxes().keys());
foreach(const CSandBoxPtr& pBox, Boxes)
ui.cmbBoxes->addItem(pBox->GetName());
connect(ui.radTemplate, SIGNAL(toggled(bool)), this, SLOT(OnPreset()));
connect(ui.radCopy, SIGNAL(toggled(bool)), this, SLOT(OnPreset()));
@ -27,12 +50,12 @@ CNewBoxWindow::CNewBoxWindow(QWidget *parent)
ui.txtName->setFocus();
restoreGeometry(theConf->GetBlob("NewBoxWindow/Window_Geometry"));
//restoreGeometry(theConf->GetBlob("NewBoxWindow/Window_Geometry"));
}
CNewBoxWindow::~CNewBoxWindow()
{
theConf->SetBlob("NewBoxWindow/Window_Geometry", saveGeometry());
//theConf->SetBlob("NewBoxWindow/Window_Geometry", saveGeometry());
}
void CNewBoxWindow::OnPreset()
@ -43,14 +66,14 @@ void CNewBoxWindow::OnPreset()
void CNewBoxWindow::CreateBox()
{
QString Name = ui.txtName->text();
Name.replace(" ", "_");
m_Name = ui.txtName->text();
m_Name.replace(" ", "_");
SB_STATUS Status = theAPI->CreateBox(Name);
SB_STATUS Status = theAPI->CreateBox(m_Name);
if (!Status.IsError())
{
CSandBoxPtr pBox = theAPI->GetBoxByName(Name);
CSandBoxPtr pBox = theAPI->GetBoxByName(m_Name);
if (ui.radCopy->isChecked())
{
@ -64,7 +87,7 @@ void CNewBoxWindow::CreateBox()
{
for (QList<QPair<QString, QString>>::iterator I = Settings.begin(); I != Settings.end(); ++I)
{
Status = theAPI->SbieIniSet(Name, I->first, I->second, CSbieAPI::eIniInsert);
Status = theAPI->SbieIniSet(m_Name, I->first, I->second, CSbieAPI::eIniInsert);
if (Status.IsError())
break;
}

View File

@ -12,6 +12,8 @@ public:
CNewBoxWindow(QWidget *parent = Q_NULLPTR);
~CNewBoxWindow();
QString m_Name;
private slots:
void CreateBox();

View File

@ -53,6 +53,18 @@ COptionsWindow::COptionsWindow(const QSharedPointer<CSbieIni>& pBox, const QStri
if (!pBoxPlus.isNull())
m_Programs = pBoxPlus->GetRecentPrograms();
Qt::WindowFlags flags = windowFlags();
flags |= Qt::CustomizeWindowHint;
//flags &= ~Qt::WindowContextHelpButtonHint;
//flags &= ~Qt::WindowSystemMenuHint;
//flags &= ~Qt::WindowMinMaxButtonsHint;
flags |= Qt::WindowMinimizeButtonHint;
//flags &= ~Qt::WindowCloseButtonHint;
setWindowFlags(flags);
bool bAlwaysOnTop = theConf->GetBool("Options/AlwaysOnTop", false);
this->setWindowFlag(Qt::WindowStaysOnTopHint, bAlwaysOnTop);
ui.setupUi(this);
this->setWindowTitle(tr("Sandboxie Plus - '%1' Options").arg(Name));
@ -720,7 +732,7 @@ void COptionsWindow::reject()
|| m_AdvancedChanged)
{
if (QMessageBox("Sandboxie-Plus", tr("Some changes haven't been saved yet, do you really want to close this options window?")
, QMessageBox::Warning, QMessageBox::Yes | QMessageBox::Default, QMessageBox::No | QMessageBox::Escape, QMessageBox::NoButton).exec() != QMessageBox::Yes)
, QMessageBox::Warning, QMessageBox::Yes | QMessageBox::Default, QMessageBox::No | QMessageBox::Escape, QMessageBox::NoButton, this).exec() != QMessageBox::Yes)
return;
}
@ -2130,7 +2142,7 @@ void COptionsWindow::OnTemplateDoubleClicked(QTreeWidgetItem* pItem, int Column)
{
QSharedPointer<CSbieIni> pTemplate = QSharedPointer<CSbieIni>(new CSbieIni(pItem->data(1, Qt::UserRole).toString(), m_pBox->GetAPI()));
COptionsWindow* pOptionsWindow = new COptionsWindow(pTemplate, pItem->text(1), this);
COptionsWindow* pOptionsWindow = new COptionsWindow(pTemplate, pItem->text(1));
pOptionsWindow->show();
}

View File

@ -177,7 +177,7 @@ void CPopUpWindow::OnHideMessage()
CPopUpMessage* pEntry = qobject_cast<CPopUpMessage*>(sender());
if (QMessageBox("Sandboxie-Plus", theAPI->GetSbieMsgStr(3647, theGUI->m_LanguageId).arg(pEntry->GetMsgId()).arg("")
, QMessageBox::Question, QMessageBox::Yes | QMessageBox::Default, QMessageBox::No | QMessageBox::Escape, QMessageBox::NoButton).exec() != QMessageBox::Yes)
, QMessageBox::Question, QMessageBox::Yes | QMessageBox::Default, QMessageBox::No | QMessageBox::Escape, QMessageBox::NoButton, this).exec() != QMessageBox::Yes)
return;
m_HiddenMessages.insert(pEntry->GetMsgId(), pEntry->GetMsgData(1));

View File

@ -10,6 +10,18 @@
CRecoveryWindow::CRecoveryWindow(const CSandBoxPtr& pBox, QWidget *parent)
: QDialog(parent)
{
Qt::WindowFlags flags = windowFlags();
flags |= Qt::CustomizeWindowHint;
//flags &= ~Qt::WindowContextHelpButtonHint;
//flags &= ~Qt::WindowSystemMenuHint;
//flags &= ~Qt::WindowMinMaxButtonsHint;
flags |= Qt::WindowMinimizeButtonHint;
//flags &= ~Qt::WindowCloseButtonHint;
setWindowFlags(flags);
bool bAlwaysOnTop = theConf->GetBool("Options/AlwaysOnTop", false);
this->setWindowFlag(Qt::WindowStaysOnTopHint, bAlwaysOnTop);
ui.setupUi(this);
this->setWindowTitle(tr("%1 - File Recovery").arg(pBox->GetName()));

View File

@ -13,6 +13,18 @@ CSettingsWindow::CSettingsWindow(QWidget *parent)
ui.setupUi(this);
this->setWindowTitle(tr("Sandboxie Plus - Settings"));
Qt::WindowFlags flags = windowFlags();
flags |= Qt::CustomizeWindowHint;
//flags &= ~Qt::WindowContextHelpButtonHint;
//flags &= ~Qt::WindowSystemMenuHint;
//flags &= ~Qt::WindowMinMaxButtonsHint;
flags |= Qt::WindowMinimizeButtonHint;
//flags &= ~Qt::WindowCloseButtonHint;
setWindowFlags(flags);
bool bAlwaysOnTop = theConf->GetBool("Options/AlwaysOnTop", false);
this->setWindowFlag(Qt::WindowStaysOnTopHint, bAlwaysOnTop);
ui.tabs->setCurrentIndex(0);
ui.uiLang->addItem("International English", "");

View File

@ -8,6 +8,18 @@
CSnapshotsWindow::CSnapshotsWindow(const CSandBoxPtr& pBox, QWidget *parent)
: QDialog(parent)
{
Qt::WindowFlags flags = windowFlags();
flags |= Qt::CustomizeWindowHint;
//flags &= ~Qt::WindowContextHelpButtonHint;
//flags &= ~Qt::WindowSystemMenuHint;
//flags &= ~Qt::WindowMinMaxButtonsHint;
flags |= Qt::WindowMinimizeButtonHint;
//flags &= ~Qt::WindowCloseButtonHint;
setWindowFlags(flags);
bool bAlwaysOnTop = theConf->GetBool("Options/AlwaysOnTop", false);
this->setWindowFlag(Qt::WindowStaysOnTopHint, bAlwaysOnTop);
ui.setupUi(this);
this->setWindowTitle(tr("%1 - Snapshots").arg(pBox->GetName()));
@ -55,11 +67,7 @@ CSnapshotsWindow::CSnapshotsWindow(const CSandBoxPtr& pBox, QWidget *parent)
for (int i = 0; i < m_pSnapshotModel->columnCount(); i++)
m_pSnapshotModel->SetColumnEnabled(i, true);
UpdateSnapshots();
QModelIndex CurIndex = m_pSnapshotModel->FindIndex(m_CurSnapshot);
if (CurIndex.isValid()) {
ui.treeSnapshots->selectionModel()->select(CurIndex, QItemSelectionModel::ClearAndSelect);
}
UpdateSnapshots(true);
}
CSnapshotsWindow::~CSnapshotsWindow()
@ -69,10 +77,11 @@ CSnapshotsWindow::~CSnapshotsWindow()
void CSnapshotsWindow::closeEvent(QCloseEvent *e)
{
emit Closed();
this->deleteLater();
}
void CSnapshotsWindow::UpdateSnapshots()
void CSnapshotsWindow::UpdateSnapshots(bool AndSelect)
{
m_SnapshotMap.clear();
QList<SBoxSnapshot> SnapshotList = m_pBox->GetSnapshots(&m_CurSnapshot);
@ -90,13 +99,25 @@ void CSnapshotsWindow::UpdateSnapshots()
}
m_pSnapshotModel->Sync(m_SnapshotMap);
ui.treeSnapshots->expandAll();
if (AndSelect)
{
QModelIndex CurIndex = m_pSnapshotModel->FindIndex(m_CurSnapshot);
if (CurIndex.isValid()) {
ui.treeSnapshots->selectionModel()->select(CurIndex, QItemSelectionModel::ClearAndSelect);
UpdateSnapshot(CurIndex);
}
}
}
void CSnapshotsWindow::UpdateSnapshot(const QModelIndex& Index)
{
ui.groupBox->setEnabled(true);
ui.btnSelect->setEnabled(true);
ui.btnRemove->setEnabled(true);
if (Index.isValid())
{
ui.groupBox->setEnabled(true);
ui.btnSelect->setEnabled(true);
ui.btnRemove->setEnabled(true);
}
//QModelIndex Index = ui.treeSnapshots->currentIndex();
//QModelIndex ModelIndex = m_pSortProxy->mapToSource(Index);
@ -141,6 +162,8 @@ void CSnapshotsWindow::OnTakeSnapshot()
return;
HandleResult(m_pBox->TakeSnapshot(Value));
UpdateSnapshots(true);
}
void CSnapshotsWindow::OnSelectSnapshot()
@ -150,7 +173,7 @@ void CSnapshotsWindow::OnSelectSnapshot()
//QVariant ID = m_pSnapshotModel->GetItemID(ModelIndex);
QVariant ID = m_pSnapshotModel->GetItemID(Index);
if (QMessageBox("Sandboxie-Plus", tr("Do you really want to switch the active snapshot? Doing so will delete the current state!"), QMessageBox::Question, QMessageBox::Yes, QMessageBox::No | QMessageBox::Default | QMessageBox::Escape, QMessageBox::NoButton).exec() != QMessageBox::Yes)
if (QMessageBox("Sandboxie-Plus", tr("Do you really want to switch the active snapshot? Doing so will delete the current state!"), QMessageBox::Question, QMessageBox::Yes, QMessageBox::No | QMessageBox::Default | QMessageBox::Escape, QMessageBox::NoButton, this).exec() != QMessageBox::Yes)
return;
HandleResult(m_pBox->SelectSnapshot(ID.toString()));
@ -163,9 +186,13 @@ void CSnapshotsWindow::OnRemoveSnapshot()
//QVariant ID = m_pSnapshotModel->GetItemID(ModelIndex);
QVariant ID = m_pSnapshotModel->GetItemID(Index);
if (QMessageBox("Sandboxie-Plus", tr("Do you really want to delete the selected snapshot?"), QMessageBox::Question, QMessageBox::Yes, QMessageBox::No | QMessageBox::Default | QMessageBox::Escape, QMessageBox::NoButton).exec() != QMessageBox::Yes)
if (QMessageBox("Sandboxie-Plus", tr("Do you really want to delete the selected snapshot?"), QMessageBox::Question, QMessageBox::Yes, QMessageBox::No | QMessageBox::Default | QMessageBox::Escape, QMessageBox::NoButton, this).exec() != QMessageBox::Yes)
return;
ui.groupBox->setEnabled(false);
ui.btnSelect->setEnabled(false);
ui.btnRemove->setEnabled(false);
HandleResult(m_pBox->RemoveSnapshot(ID.toString()));
}

View File

@ -16,8 +16,11 @@ public:
virtual void accept() {}
virtual void reject() { this->close(); }
signals:
void Closed();
private slots:
void UpdateSnapshots();
void UpdateSnapshots(bool AndSelect = false);
void UpdateSnapshot(const QModelIndex& Index);
void SaveInfo();

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -43,7 +43,15 @@
</message>
<message>
<source>Legacy (old sbie behaviour)</source>
<translation>Устаревшее (старое поведение sbie)</translation>
<translation type="vanished">Устаревшее (старое поведение sbie)</translation>
</message>
<message>
<source>Sandboxie-Plus - Create New Box</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Legacy Sandboxie Behaviour</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
@ -219,15 +227,15 @@
</message>
<message>
<source>This sandbox has been deleted hence configuration can not be saved.</source>
<translation type="unfinished"></translation>
<translation>Эта песочница была удалена, поэтому сохранить конфигурацию невозможно.</translation>
</message>
<message>
<source>Some changes haven&apos;t been saved yet, do you really want to close this options window?</source>
<translation type="unfinished"></translation>
<translation>Некоторые изменения еще не были сохранены, вы действительно хотите закрыть окно параметров?</translation>
</message>
<message>
<source>Executables (*.exe *.cmd);;All files (*.*)</source>
<translation type="unfinished"></translation>
<translation>Исполняемые файлы (*.exe *.cmd);;Все файлы (*.*)</translation>
</message>
</context>
<context>
@ -296,7 +304,7 @@
</message>
<message>
<source>Yes and add to allowed programs</source>
<translation type="unfinished"></translation>
<translation>Да и добавить в разрешенные программы</translation>
</message>
</context>
<context>
@ -445,11 +453,11 @@ Full path: %4</source>
</message>
<message>
<source>One or more selected files are located on a network share, and must be recovered to a local drive, please select a folder to recover all selected files to.</source>
<translation type="unfinished"></translation>
<translation>Один или несколько выбранных файлов находятся в общей сетевой папке и должны быть восстановлены на локальный диск. Выберите папку для восстановления всех выбранных файлов.</translation>
</message>
<message>
<source>There are %1 files and %2 folders in the sandbox, occupying %3 bytes of disk space.</source>
<translation type="unfinished"></translation>
<translation>В песочнице %1 файлов и %2 папок, которые занимают %3 байт дискового пространства.</translation>
</message>
</context>
<context>
@ -513,6 +521,10 @@ Full path: %4</source>
<source>Reduced Isolation</source>
<translation>Сниженная изоляция</translation>
</message>
<message>
<source>Disabled</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>CSandMan</name>
@ -1042,26 +1054,70 @@ Please download the latest release and set it up with the Sandboxie.ini as instr
</message>
<message>
<source>Always on Top</source>
<translation type="unfinished"></translation>
<translation>Поверх всех окон</translation>
</message>
<message>
<source>Sellect box:</source>
<translation type="unfinished"></translation>
<translation type="vanished">Выберите песочницу:</translation>
</message>
<message>
<source>Some compatybility templates (%1) are missing, probably deleted, do you want to remove them from all boxes?</source>
<translation type="unfinished"></translation>
<translation type="vanished">Некоторые шаблоны совместимости (%1) отсутствуют, вероятно, удалены. Удалить их из всех песочниц?</translation>
</message>
<message>
<source>Cleaned up removed templates...</source>
<translation type="unfinished"></translation>
<translation>Убраны удаленные шаблоны...</translation>
</message>
<message>
<source>Can not create snapshot of an empty sandbox</source>
<translation type="unfinished"></translation>
<translation>Невозможно создать снимок пустой песочницы</translation>
</message>
<message>
<source>A sandbox with that name already exists</source>
<translation>Песочница с таким именем уже существует</translation>
</message>
<message>
<source>Reset Columns</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Window Finder</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Show Hidden Boxes</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Select box:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Some compatibility templates (%1) are missing, probably deleted, do you want to remove them from all boxes?</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Do you want to terminate all processes in all sandboxes?</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Terminate all without asking</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The selected window is running as part of program %1 in sandbox %2</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The selected window is not running as part of any sandboxed program.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Drag the Finder Tool over a window to select it, then release the mouse to check if the window is sandboxed.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Sandboxie-Plus - Window Finder</source>
<translation type="unfinished"></translation>
</message>
</context>
@ -1091,6 +1147,10 @@ Please download the latest release and set it up with the Sandboxie.ini as instr
<source>Path / Command Line</source>
<translation>Путь / Командная строка</translation>
</message>
<message>
<source>Title</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>CSbieProcess</name>
@ -1119,10 +1179,6 @@ Please download the latest release and set it up with the Sandboxie.ini as instr
<translation>Опции:
</translation>
</message>
<message>
<source>Do you really want to delete the content of the selected sandbox(es)?</source>
<translation type="vanished">Вы действительно хотите удалить содержимое выбранных песочниц?</translation>
</message>
<message>
<source>Drop Admin Rights</source>
<translation>Отбросить права администратора</translation>
@ -1300,18 +1356,26 @@ Please download the latest release and set it up with the Sandboxie.ini as instr
</message>
<message>
<source>Don&apos;t show this message again.</source>
<translation type="unfinished">Больше не показывать это сообщение.</translation>
<translation>Больше не показывать это сообщение.</translation>
</message>
<message>
<source>This Sandbox is already empty.</source>
<translation type="unfinished"></translation>
<translation>Эта песочница уже пуста.</translation>
</message>
<message>
<source>Do you want to delete the content of the selected sandbox?</source>
<translation type="unfinished"></translation>
<translation>Вы хотите удалить содержимое выбранной песочницы?</translation>
</message>
<message>
<source>Do you really want to delete the content of multiple sandboxes?</source>
<translation>Вы действительно хотите удалить содержимое нескольких песочниц?</translation>
</message>
<message>
<source>Do you want to terminate all processes in the selected sandbox(es)?</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>This sandbox is disabled, do you want to enable it?</source>
<translation type="unfinished"></translation>
</message>
</context>
@ -1376,10 +1440,6 @@ Please download the latest release and set it up with the Sandboxie.ini as instr
<source>Snapshot</source>
<translation>Снимок</translation>
</message>
<message>
<source>Snapshot: %1 taken: %2</source>
<translation type="vanished">Снимок: %1 сделан: %2</translation>
</message>
<message>
<source>Do you really want to switch the active snapshot? Doing so will delete the current state!</source>
<translation>Вы действительно хотите переключить активный снимок? Это приведет к удалению текущего состояния!</translation>
@ -1413,7 +1473,11 @@ Please download the latest release and set it up with the Sandboxie.ini as instr
</message>
<message>
<source>Enter a name for the new box:</source>
<translation>Введите имя для новой песочницы:</translation>
<translation type="vanished">Введите имя для новой песочницы:</translation>
</message>
<message>
<source>Sandbox Name:</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
@ -1899,10 +1963,6 @@ Note: Forced Programs and Force Folders settings for a sandbox do not apply to
<source>Prevent change to network and firewall parameters</source>
<translation>Запретить изменение параметров сети и брандмауэра</translation>
</message>
<message>
<source>Start the sandboxed RpcSs as a SYSTEM process (breaks some compatibility)</source>
<translation type="vanished">Запускать RpcSs в песочнице как СИСТЕМНЫЙ процесс (нарушает некоторую совместимость)</translation>
</message>
<message>
<source>COM Class Trace</source>
<translation>Трассировка COM класса</translation>
@ -2037,11 +2097,11 @@ Note: Forced Programs and Force Folders settings for a sandbox do not apply to
</message>
<message>
<source>Show All Files</source>
<translation type="unfinished"></translation>
<translation>Показать все файлы</translation>
</message>
<message>
<source>TextLabel</source>
<translation type="unfinished"></translation>
<translation>Текстовая метка</translation>
</message>
</context>
<context>
@ -2182,25 +2242,21 @@ Note: Forced Programs and Force Folders settings for a sandbox do not apply to
<source>Show Notifications for relevant log Messages</source>
<translation>Показать уведомления для соответствующих сообщений журнала</translation>
</message>
<message>
<source>Start with Windows</source>
<translation type="vanished">Запускать с Windows</translation>
</message>
<message>
<source>Open urls from this ui sandboxed</source>
<translation>Открывать URL-адреса из этого пользовательского интерфейса в песочнице</translation>
</message>
<message>
<source>Sandbox &lt;a href=&quot;sbie://docs/filerootpath&quot;&gt;file system root&lt;/a&gt;: </source>
<translation>Sandbox &lt;a href=&quot;sbie://docs/filerootpath&quot;&gt;корень файловой системы&lt;/a&gt;: </translation>
<translation>Песочница &lt;a href=&quot;sbie://docs/filerootpath&quot;&gt;корень файловой системы&lt;/a&gt;: </translation>
</message>
<message>
<source>Sandbox &lt;a href=&quot;sbie://docs/ipcrootpath&quot;&gt;ipc root&lt;/a&gt;: </source>
<translation>Sandbox &lt;a href=&quot;sbie://docs/ipcrootpath&quot;&gt;корень ipc&lt;/a&gt;: </translation>
<translation>Песочница &lt;a href=&quot;sbie://docs/ipcrootpath&quot;&gt;корень ipc&lt;/a&gt;: </translation>
</message>
<message>
<source>Sandbox &lt;a href=&quot;sbie://docs/keyrootpath&quot;&gt;registry root&lt;/a&gt;: </source>
<translation>Sandbox &lt;a href=&quot;sbie://docs/keyrootpath&quot;&gt;корень реестра&lt;/a&gt;: </translation>
<translation>Песочница &lt;a href=&quot;sbie://docs/keyrootpath&quot;&gt;корень реестра&lt;/a&gt;: </translation>
</message>
<message>
<source>Portable root folder</source>
@ -2208,23 +2264,23 @@ Note: Forced Programs and Force Folders settings for a sandbox do not apply to
</message>
<message>
<source>Start UI with Windows</source>
<translation type="unfinished"></translation>
<translation>Запуск пользовательского интерфейса с Windows</translation>
</message>
<message>
<source>Start UI when a sandboxed process is started</source>
<translation type="unfinished"></translation>
<translation>Запуск пользовательского интерфейса при запуске изолированного процесса</translation>
</message>
<message>
<source>Show first recovery window when emptying sandboxes</source>
<translation type="unfinished"></translation>
<translation>Показывать первое окно восстановления при очистке песочницы</translation>
</message>
<message>
<source>...</source>
<translation type="unfinished"></translation>
<translation>...</translation>
</message>
<message>
<source>Other settings</source>
<translation type="unfinished"></translation>
<translation>Другие настройки</translation>
</message>
</context>
<context>
@ -2249,21 +2305,17 @@ Note: Forced Programs and Force Folders settings for a sandbox do not apply to
<source>Go to Snapshot</source>
<translation>Перейти к снимку</translation>
</message>
<message>
<source>Snapshot Details</source>
<translation type="vanished">Детали снимка</translation>
</message>
<message>
<source>Take Snapshot</source>
<translation>Сделать снимок</translation>
</message>
<message>
<source>Selected Snapshot Details</source>
<translation type="unfinished"></translation>
<translation>Сведения о выбранном снимке</translation>
</message>
<message>
<source>Snapshot Actions</source>
<translation type="unfinished"></translation>
<translation>Действия со снимками</translation>
</message>
</context>
</TS>

File diff suppressed because it is too large Load Diff

View File

@ -43,7 +43,15 @@
</message>
<message>
<source>Legacy (old sbie behaviour)</source>
<translation> ()</translation>
<translation type="vanished"> ()</translation>
</message>
<message>
<source>Sandboxie-Plus - Create New Box</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Legacy Sandboxie Behaviour</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
@ -218,15 +226,15 @@
</message>
<message>
<source>This sandbox has been deleted hence configuration can not be saved.</source>
<translation type="unfinished"></translation>
<translation></translation>
</message>
<message>
<source>Some changes haven&apos;t been saved yet, do you really want to close this options window?</source>
<translation type="unfinished"></translation>
<translation>, ?</translation>
</message>
<message>
<source>Executables (*.exe *.cmd);;All files (*.*)</source>
<translation type="unfinished"></translation>
<translation> (*.exe *.cmd);; (*.*)</translation>
</message>
</context>
<context>
@ -295,7 +303,7 @@
</message>
<message>
<source>Yes and add to allowed programs</source>
<translation type="unfinished"></translation>
<translation></translation>
</message>
</context>
<context>
@ -378,13 +386,13 @@
<message>
<source>Do you want to allow %4 (%5) to copy a %1 large file into sandbox: %2?
File name: %3</source>
<translation type="vanished"> %4 (%5) %1 : %2 ?
<translation type="vanished"> %4 (%5) %1 : %2?
: %3</translation>
</message>
<message>
<source>Do you want to allow %1 (%2) access to the internet?
Full path: %3</source>
<translation type="vanished"> %1 (%2) 访?
<translation type="vanished"> %1 (%2) 访?
: %3</translation>
</message>
<message>
@ -444,11 +452,11 @@ Full path: %4</source>
</message>
<message>
<source>One or more selected files are located on a network share, and must be recovered to a local drive, please select a folder to recover all selected files to.</source>
<translation type="unfinished"></translation>
<translation>, , .</translation>
</message>
<message>
<source>There are %1 files and %2 folders in the sandbox, occupying %3 bytes of disk space.</source>
<translation type="unfinished"></translation>
<translation> %1 %2 , %3 .</translation>
</message>
</context>
<context>
@ -512,6 +520,10 @@ Full path: %4</source>
<source>Reduced Isolation</source>
<translation></translation>
</message>
<message>
<source>Disabled</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>CSandMan</name>
@ -1041,26 +1053,70 @@ Please download the latest release and set it up with the Sandboxie.ini as instr
</message>
<message>
<source>Always on Top</source>
<translation type="unfinished"></translation>
<translation></translation>
</message>
<message>
<source>Sellect box:</source>
<translation type="unfinished"></translation>
<translation type="vanished"></translation>
</message>
<message>
<source>Some compatybility templates (%1) are missing, probably deleted, do you want to remove them from all boxes?</source>
<translation type="unfinished"></translation>
<translation type="vanished"> (%1) , , ?</translation>
</message>
<message>
<source>Cleaned up removed templates...</source>
<translation type="unfinished"></translation>
<translation>...</translation>
</message>
<message>
<source>Can not create snapshot of an empty sandbox</source>
<translation type="unfinished"></translation>
<translation></translation>
</message>
<message>
<source>A sandbox with that name already exists</source>
<translation></translation>
</message>
<message>
<source>Reset Columns</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Window Finder</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Show Hidden Boxes</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Select box:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Some compatibility templates (%1) are missing, probably deleted, do you want to remove them from all boxes?</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Do you want to terminate all processes in all sandboxes?</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Terminate all without asking</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The selected window is running as part of program %1 in sandbox %2</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The selected window is not running as part of any sandboxed program.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Drag the Finder Tool over a window to select it, then release the mouse to check if the window is sandboxed.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Sandboxie-Plus - Window Finder</source>
<translation type="unfinished"></translation>
</message>
</context>
@ -1090,6 +1146,10 @@ Please download the latest release and set it up with the Sandboxie.ini as instr
<source>Process ID</source>
<translation>ID</translation>
</message>
<message>
<source>Title</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>CSbieProcess</name>
@ -1118,10 +1178,6 @@ Please download the latest release and set it up with the Sandboxie.ini as instr
<translation>:
</translation>
</message>
<message>
<source>Do you really want to delete the content of the selected sandbox(es)?</source>
<translation type="vanished">?</translation>
</message>
<message>
<source>Drop Admin Rights</source>
<translation></translation>
@ -1298,18 +1354,26 @@ Please download the latest release and set it up with the Sandboxie.ini as instr
</message>
<message>
<source>Don&apos;t show this message again.</source>
<translation type="unfinished"></translation>
<translation></translation>
</message>
<message>
<source>This Sandbox is already empty.</source>
<translation type="unfinished"></translation>
<translation>.</translation>
</message>
<message>
<source>Do you want to delete the content of the selected sandbox?</source>
<translation type="unfinished"></translation>
<translation>?</translation>
</message>
<message>
<source>Do you really want to delete the content of multiple sandboxes?</source>
<translation>?</translation>
</message>
<message>
<source>Do you want to terminate all processes in the selected sandbox(es)?</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>This sandbox is disabled, do you want to enable it?</source>
<translation type="unfinished"></translation>
</message>
</context>
@ -1374,10 +1438,6 @@ Please download the latest release and set it up with the Sandboxie.ini as instr
<source>Snapshot</source>
<translation></translation>
</message>
<message>
<source>Snapshot: %1 taken: %2</source>
<translation type="vanished">: %1 : %2</translation>
</message>
<message>
<source>Do you really want to switch the active snapshot? Doing so will delete the current state!</source>
<translation>使? !</translation>
@ -1411,7 +1471,11 @@ Please download the latest release and set it up with the Sandboxie.ini as instr
</message>
<message>
<source>Enter a name for the new box:</source>
<translation>:</translation>
<translation type="vanished">:</translation>
</message>
<message>
<source>Sandbox Name:</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
@ -1842,10 +1906,6 @@ Note: Forced Programs and Force Folders settings for a sandbox do not apply to
<source>Program Groups</source>
<translation></translation>
</message>
<message>
<source>Start the sandboxed RpcSs as a SYSTEM process (breaks some compatibility)</source>
<translation type="vanished">RpcSs作为系统进程 ()</translation>
</message>
<message>
<source>Issue message 1308 when a program fails to start</source>
<translation>1308,</translation>
@ -2034,11 +2094,11 @@ instead of &quot;*&quot;.</source>
</message>
<message>
<source>Show All Files</source>
<translation type="unfinished"></translation>
<translation></translation>
</message>
<message>
<source>TextLabel</source>
<translation type="unfinished"></translation>
<translation></translation>
</message>
</context>
<context>
@ -2195,33 +2255,29 @@ instead of &quot;*&quot;.</source>
<source>Sandbox &lt;a href=&quot;sbie://docs/filerootpath&quot;&gt;file system root&lt;/a&gt;: </source>
<translation> &lt;a href=&quot;sbie://docs/filerootpath&quot;&gt;文件系统根目录&lt;/a&gt;: </translation>
</message>
<message>
<source>Start with Windows</source>
<translation type="vanished"></translation>
</message>
<message>
<source>Portable root folder</source>
<translation>便</translation>
</message>
<message>
<source>Start UI with Windows</source>
<translation type="unfinished"></translation>
<translation>UI</translation>
</message>
<message>
<source>Start UI when a sandboxed process is started</source>
<translation type="unfinished"></translation>
<translation>UI</translation>
</message>
<message>
<source>Show first recovery window when emptying sandboxes</source>
<translation type="unfinished"></translation>
<translation></translation>
</message>
<message>
<source>...</source>
<translation type="unfinished"></translation>
<translation>...</translation>
</message>
<message>
<source>Other settings</source>
<translation type="unfinished"></translation>
<translation></translation>
</message>
</context>
<context>
@ -2246,21 +2302,17 @@ instead of &quot;*&quot;.</source>
<source>Go to Snapshot</source>
<translation></translation>
</message>
<message>
<source>Snapshot Details</source>
<translation type="vanished"></translation>
</message>
<message>
<source>Take Snapshot</source>
<translation></translation>
</message>
<message>
<source>Selected Snapshot Details</source>
<translation type="unfinished"></translation>
<translation></translation>
</message>
<message>
<source>Snapshot Actions</source>
<translation type="unfinished"></translation>
<translation></translation>
</message>
</context>
</TS>

View File

@ -109,7 +109,7 @@ using namespace std;
// other includes
#define _T(x) L ## x
//#define _T(x) L ## x
#define STR2(X) #X
#define STR(X) STR2(X)

View File

@ -25,43 +25,43 @@ EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Debug|Win32 = Debug|Win32
Release|x64 = Release|x64
Release|x86 = Release|x86
Release|Win32 = Release|Win32
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{B7A8576D-A08A-4A97-84E8-013DAF4D4F1F}.Debug|x64.ActiveCfg = Debug|x64
{B7A8576D-A08A-4A97-84E8-013DAF4D4F1F}.Debug|x64.Build.0 = Debug|x64
{B7A8576D-A08A-4A97-84E8-013DAF4D4F1F}.Debug|x86.ActiveCfg = Debug|Win32
{B7A8576D-A08A-4A97-84E8-013DAF4D4F1F}.Debug|x86.Build.0 = Debug|Win32
{B7A8576D-A08A-4A97-84E8-013DAF4D4F1F}.Debug|Win32.ActiveCfg = Debug|Win32
{B7A8576D-A08A-4A97-84E8-013DAF4D4F1F}.Debug|Win32.Build.0 = Debug|Win32
{B7A8576D-A08A-4A97-84E8-013DAF4D4F1F}.Release|x64.ActiveCfg = Release|x64
{B7A8576D-A08A-4A97-84E8-013DAF4D4F1F}.Release|x64.Build.0 = Release|x64
{B7A8576D-A08A-4A97-84E8-013DAF4D4F1F}.Release|x86.ActiveCfg = Release|Win32
{B7A8576D-A08A-4A97-84E8-013DAF4D4F1F}.Release|x86.Build.0 = Release|Win32
{B7A8576D-A08A-4A97-84E8-013DAF4D4F1F}.Release|Win32.ActiveCfg = Release|Win32
{B7A8576D-A08A-4A97-84E8-013DAF4D4F1F}.Release|Win32.Build.0 = Release|Win32
{1433EC85-BDA4-402E-BEC1-48611206A64A}.Debug|x64.ActiveCfg = Debug|x64
{1433EC85-BDA4-402E-BEC1-48611206A64A}.Debug|x64.Build.0 = Debug|x64
{1433EC85-BDA4-402E-BEC1-48611206A64A}.Debug|x86.ActiveCfg = Debug|Win32
{1433EC85-BDA4-402E-BEC1-48611206A64A}.Debug|x86.Build.0 = Debug|Win32
{1433EC85-BDA4-402E-BEC1-48611206A64A}.Debug|Win32.ActiveCfg = Debug|Win32
{1433EC85-BDA4-402E-BEC1-48611206A64A}.Debug|Win32.Build.0 = Debug|Win32
{1433EC85-BDA4-402E-BEC1-48611206A64A}.Release|x64.ActiveCfg = Release|x64
{1433EC85-BDA4-402E-BEC1-48611206A64A}.Release|x64.Build.0 = Release|x64
{1433EC85-BDA4-402E-BEC1-48611206A64A}.Release|x86.ActiveCfg = Release|Win32
{1433EC85-BDA4-402E-BEC1-48611206A64A}.Release|x86.Build.0 = Release|Win32
{1433EC85-BDA4-402E-BEC1-48611206A64A}.Release|Win32.ActiveCfg = Release|Win32
{1433EC85-BDA4-402E-BEC1-48611206A64A}.Release|Win32.Build.0 = Release|Win32
{7AB8215A-59A4-4B8B-8090-16C87A860429}.Debug|x64.ActiveCfg = Debug|x64
{7AB8215A-59A4-4B8B-8090-16C87A860429}.Debug|x64.Build.0 = Debug|x64
{7AB8215A-59A4-4B8B-8090-16C87A860429}.Debug|x86.ActiveCfg = Debug|Win32
{7AB8215A-59A4-4B8B-8090-16C87A860429}.Debug|x86.Build.0 = Debug|Win32
{7AB8215A-59A4-4B8B-8090-16C87A860429}.Debug|Win32.ActiveCfg = Debug|Win32
{7AB8215A-59A4-4B8B-8090-16C87A860429}.Debug|Win32.Build.0 = Debug|Win32
{7AB8215A-59A4-4B8B-8090-16C87A860429}.Release|x64.ActiveCfg = Release|x64
{7AB8215A-59A4-4B8B-8090-16C87A860429}.Release|x64.Build.0 = Release|x64
{7AB8215A-59A4-4B8B-8090-16C87A860429}.Release|x86.ActiveCfg = Release|Win32
{7AB8215A-59A4-4B8B-8090-16C87A860429}.Release|x86.Build.0 = Release|Win32
{7AB8215A-59A4-4B8B-8090-16C87A860429}.Release|Win32.ActiveCfg = Release|Win32
{7AB8215A-59A4-4B8B-8090-16C87A860429}.Release|Win32.Build.0 = Release|Win32
{B12702AD-ABFB-343A-A199-8E24837244A3}.Debug|x64.ActiveCfg = Debug|x64
{B12702AD-ABFB-343A-A199-8E24837244A3}.Debug|x64.Build.0 = Debug|x64
{B12702AD-ABFB-343A-A199-8E24837244A3}.Debug|x86.ActiveCfg = Debug|Win32
{B12702AD-ABFB-343A-A199-8E24837244A3}.Debug|x86.Build.0 = Debug|Win32
{B12702AD-ABFB-343A-A199-8E24837244A3}.Debug|Win32.ActiveCfg = Debug|Win32
{B12702AD-ABFB-343A-A199-8E24837244A3}.Debug|Win32.Build.0 = Debug|Win32
{B12702AD-ABFB-343A-A199-8E24837244A3}.Release|x64.ActiveCfg = Release|x64
{B12702AD-ABFB-343A-A199-8E24837244A3}.Release|x64.Build.0 = Release|x64
{B12702AD-ABFB-343A-A199-8E24837244A3}.Release|x86.ActiveCfg = Release|Win32
{B12702AD-ABFB-343A-A199-8E24837244A3}.Release|x86.Build.0 = Release|Win32
{B12702AD-ABFB-343A-A199-8E24837244A3}.Release|Win32.ActiveCfg = Release|Win32
{B12702AD-ABFB-343A-A199-8E24837244A3}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE