Merge pull request #11 from love-code-yeyixiao/ImproveGameUI
Improve game UI
This commit is contained in:
commit
9a92ce114d
|
@ -35,6 +35,8 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
||||||
- Usage: "RpcPortFilter=Port,ID,Label" label is optional
|
- Usage: "RpcPortFilter=Port,ID,Label" label is optional
|
||||||
- added "Job Object" Options page to colelct all job object related options
|
- added "Job Object" Options page to colelct all job object related options
|
||||||
- added UI options for "ForceRestartAll" and "UseCreateToken" in OptionWindow.
|
- added UI options for "ForceRestartAll" and "UseCreateToken" in OptionWindow.
|
||||||
|
- added a optional context menu option to make folder/file forced quickly.
|
||||||
|
- You can also use "Sandman.exe /add_force program_path" to do it.
|
||||||
|
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|
|
@ -487,6 +487,42 @@ void CSbieUtils::RemoveContextMenu2()
|
||||||
RegDeleteTreeW(HKEY_CURRENT_USER, L"software\\classes\\*\\shell\\unbox");
|
RegDeleteTreeW(HKEY_CURRENT_USER, L"software\\classes\\*\\shell\\unbox");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool CSbieUtils::HasContextMenu3()
|
||||||
|
{
|
||||||
|
const wchar_t* key = L"Software\\Classes\\*\\shell\\addforce\\command";
|
||||||
|
//const wchar_t* key2 = L"Software\\Classes\\*\\Folder\\addforce\\command";
|
||||||
|
HKEY hkey,hKey2;
|
||||||
|
LONG rc = RegOpenKeyEx(HKEY_CURRENT_USER, key, 0, KEY_READ, &hkey);
|
||||||
|
if (rc != 0)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
RegCloseKey(hkey);
|
||||||
|
|
||||||
|
|
||||||
|
/*rc = RegOpenKeyEx(HKEY_CURRENT_USER, key2, 0, KEY_READ, &hkey2);
|
||||||
|
if (rc != 0)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
RegCloseKey(hkey2);*/
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void CSbieUtils::AddContextMenu3(const QString& StartPath, const QString& RunStr, const QString& IconPath)
|
||||||
|
{
|
||||||
|
std::wstring start_path = L"\"" + StartPath.toStdWString() + L"\"";
|
||||||
|
std::wstring icon_path = L"\"" + (IconPath.isEmpty() ? StartPath : IconPath).toStdWString() + L"\"";
|
||||||
|
|
||||||
|
CreateShellEntry(L"*", L"addforce", RunStr.toStdWString(), icon_path, start_path + L" /add_force \"%1\" %*");
|
||||||
|
CreateShellEntry(L"Folder", L"addforce", RunStr.toStdWString(), icon_path, start_path + L" /add_force \"%1\" %*");
|
||||||
|
}
|
||||||
|
|
||||||
|
void CSbieUtils::RemoveContextMenu3()
|
||||||
|
{
|
||||||
|
RegDeleteTreeW(HKEY_CURRENT_USER, L"software\\classes\\*\\shell\\addforce");
|
||||||
|
RegDeleteTreeW(HKEY_CURRENT_USER, L"software\\classes\\folder\\shell\\addforce");
|
||||||
|
}
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
// Shortcuts
|
// Shortcuts
|
||||||
|
|
||||||
|
|
|
@ -36,6 +36,10 @@ public:
|
||||||
static void AddContextMenu2(const QString& StartPath, const QString& RunStr, const QString& IconPath = QString());
|
static void AddContextMenu2(const QString& StartPath, const QString& RunStr, const QString& IconPath = QString());
|
||||||
static void RemoveContextMenu2();
|
static void RemoveContextMenu2();
|
||||||
|
|
||||||
|
static bool HasContextMenu3();
|
||||||
|
static void AddContextMenu3(const QString& StartPath, const QString& RunStr, const QString& IconPath = QString());
|
||||||
|
static void RemoveContextMenu3();
|
||||||
|
|
||||||
static bool CreateShortcut(const QString& StartExe, QString LinkPath, const QString &LinkName, const QString &boxname, const QString &arguments, const QString &iconPath = QString(), int iconIndex = 0, const QString &workdir = QString(), bool bRunElevated = false);
|
static bool CreateShortcut(const QString& StartExe, QString LinkPath, const QString &LinkName, const QString &boxname, const QString &arguments, const QString &iconPath = QString(), int iconIndex = 0, const QString &workdir = QString(), bool bRunElevated = false);
|
||||||
static bool GetStartMenuShortcut(class CSbieAPI* pApi, QString &BoxName, QString &LinkPath, QString &IconPath, quint32& IconIndex, QString &WorkDir);
|
static bool GetStartMenuShortcut(class CSbieAPI* pApi, QString &BoxName, QString &LinkPath, QString &IconPath, quint32& IconIndex, QString &WorkDir);
|
||||||
|
|
||||||
|
|
|
@ -6,8 +6,8 @@
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>747</width>
|
<width>820</width>
|
||||||
<height>524</height>
|
<height>565</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
|
@ -48,7 +48,7 @@
|
||||||
<enum>QTabWidget::North</enum>
|
<enum>QTabWidget::North</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="currentIndex">
|
<property name="currentIndex">
|
||||||
<number>1</number>
|
<number>5</number>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="tabGeneral">
|
<widget class="QWidget" name="tabGeneral">
|
||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
|
@ -455,191 +455,194 @@
|
||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
<string>Windows Shell</string>
|
<string>Windows Shell</string>
|
||||||
</attribute>
|
</attribute>
|
||||||
<layout class="QGridLayout" name="gridLayout_30">
|
<layout class="QGridLayout" name="gridLayout_13">
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
<layout class="QGridLayout" name="gridLayout_13">
|
<widget class="QLabel" name="lblStartUp">
|
||||||
<item row="11" column="3" colspan="2">
|
<property name="font">
|
||||||
<spacer name="horizontalSpacer_2">
|
<font>
|
||||||
<property name="orientation">
|
<weight>75</weight>
|
||||||
<enum>Qt::Horizontal</enum>
|
<bold>true</bold>
|
||||||
</property>
|
<kerning>true</kerning>
|
||||||
<property name="sizeHint" stdset="0">
|
</font>
|
||||||
<size>
|
</property>
|
||||||
<width>40</width>
|
<property name="text">
|
||||||
<height>0</height>
|
<string>Start Sandbox Manager</string>
|
||||||
</size>
|
</property>
|
||||||
</property>
|
</widget>
|
||||||
</spacer>
|
</item>
|
||||||
</item>
|
<item row="1" column="1" colspan="2">
|
||||||
<item row="9" column="0" colspan="2">
|
<widget class="QCheckBox" name="chkAutoStart">
|
||||||
<widget class="QLabel" name="label_22">
|
<property name="text">
|
||||||
<property name="text">
|
<string>Start UI with Windows</string>
|
||||||
<string>Integrate with Host Start Menu</string>
|
</property>
|
||||||
</property>
|
</widget>
|
||||||
<property name="alignment">
|
</item>
|
||||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
<item row="2" column="1" colspan="3">
|
||||||
</property>
|
<widget class="QCheckBox" name="chkSvcStart">
|
||||||
<property name="openExternalLinks">
|
<property name="text">
|
||||||
<bool>true</bool>
|
<string>Start UI when a sandboxed process is started</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="4" column="1" colspan="3">
|
<item row="3" column="0">
|
||||||
<widget class="QCheckBox" name="chkShellMenu">
|
<widget class="QLabel" name="lblRunBoxed">
|
||||||
<property name="text">
|
<property name="font">
|
||||||
<string>Add 'Run Sandboxed' to the explorer context menu</string>
|
<font>
|
||||||
</property>
|
<weight>75</weight>
|
||||||
</widget>
|
<bold>true</bold>
|
||||||
</item>
|
<kerning>true</kerning>
|
||||||
<item row="6" column="2" colspan="3">
|
</font>
|
||||||
<widget class="QCheckBox" name="chkShellMenu2">
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Add 'Run Un-Sandboxed' to the context menu</string>
|
<string>Run Sandboxed - Actions</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="5" column="2" colspan="3">
|
<item row="3" column="1">
|
||||||
<widget class="QCheckBox" name="chkAlwaysDefault">
|
<widget class="QLabel" name="label_37">
|
||||||
<property name="text">
|
<property name="maximumSize">
|
||||||
<string>Always use DefaultBox</string>
|
<size>
|
||||||
</property>
|
<width>20</width>
|
||||||
</widget>
|
<height>16777215</height>
|
||||||
</item>
|
</size>
|
||||||
<item row="10" column="2">
|
</property>
|
||||||
<widget class="QComboBox" name="cmbIntegrateDesk"/>
|
<property name="text">
|
||||||
</item>
|
<string/>
|
||||||
<item row="10" column="0" colspan="2">
|
</property>
|
||||||
<widget class="QLabel" name="label_29">
|
</widget>
|
||||||
<property name="text">
|
</item>
|
||||||
<string>Integrate with Host Desktop</string>
|
<item row="3" column="2">
|
||||||
</property>
|
<spacer name="horizontalSpacer_9">
|
||||||
<property name="alignment">
|
<property name="orientation">
|
||||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
<enum>Qt::Horizontal</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="openExternalLinks">
|
<property name="sizeHint" stdset="0">
|
||||||
<bool>true</bool>
|
<size>
|
||||||
</property>
|
<width>272</width>
|
||||||
</widget>
|
<height>20</height>
|
||||||
</item>
|
</size>
|
||||||
<item row="2" column="1" colspan="3">
|
</property>
|
||||||
<widget class="QCheckBox" name="chkSvcStart">
|
</spacer>
|
||||||
<property name="text">
|
</item>
|
||||||
<string>Start UI when a sandboxed process is started</string>
|
<item row="3" column="3">
|
||||||
</property>
|
<spacer name="horizontalSpacer_6">
|
||||||
</widget>
|
<property name="orientation">
|
||||||
</item>
|
<enum>Qt::Horizontal</enum>
|
||||||
<item row="8" column="1" colspan="3">
|
</property>
|
||||||
<widget class="QCheckBox" name="chkScanMenu">
|
<property name="sizeHint" stdset="0">
|
||||||
<property name="text">
|
<size>
|
||||||
<string>Scan shell folders and offer links in run menu</string>
|
<width>272</width>
|
||||||
</property>
|
<height>20</height>
|
||||||
</widget>
|
</size>
|
||||||
</item>
|
</property>
|
||||||
<item row="9" column="2">
|
</spacer>
|
||||||
<widget class="QComboBox" name="cmbIntegrateMenu"/>
|
</item>
|
||||||
</item>
|
<item row="4" column="1" colspan="3">
|
||||||
<item row="1" column="1" colspan="3">
|
<widget class="QCheckBox" name="chkShellMenu">
|
||||||
<widget class="QCheckBox" name="chkAutoStart">
|
<property name="text">
|
||||||
<property name="text">
|
<string>Add 'Run Sandboxed' to the explorer context menu</string>
|
||||||
<string>Start UI with Windows</string>
|
</property>
|
||||||
</property>
|
</widget>
|
||||||
</widget>
|
</item>
|
||||||
</item>
|
<item row="5" column="2" colspan="2">
|
||||||
<item row="3" column="2">
|
<widget class="QCheckBox" name="chkAlwaysDefault">
|
||||||
<spacer name="horizontalSpacer_9">
|
<property name="text">
|
||||||
<property name="orientation">
|
<string>Always use DefaultBox</string>
|
||||||
<enum>Qt::Horizontal</enum>
|
</property>
|
||||||
</property>
|
</widget>
|
||||||
<property name="sizeHint" stdset="0">
|
</item>
|
||||||
<size>
|
<item row="6" column="2" colspan="2">
|
||||||
<width>40</width>
|
<widget class="QCheckBox" name="chkShellMenu2">
|
||||||
<height>20</height>
|
<property name="text">
|
||||||
</size>
|
<string>Add 'Run Un-Sandboxed' to the context menu</string>
|
||||||
</property>
|
</property>
|
||||||
</spacer>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="7" column="0">
|
<item row="7" column="1" colspan="3">
|
||||||
<widget class="QLabel" name="lblStartMenu">
|
<widget class="QCheckBox" name="chkShellMenu3">
|
||||||
<property name="font">
|
<property name="text">
|
||||||
<font>
|
<string>Add ‘Make Folder/File Forced' to the context menu</string>
|
||||||
<weight>75</weight>
|
</property>
|
||||||
<bold>true</bold>
|
</widget>
|
||||||
<kerning>true</kerning>
|
</item>
|
||||||
</font>
|
<item row="8" column="0">
|
||||||
</property>
|
<widget class="QLabel" name="lblStartMenu">
|
||||||
<property name="text">
|
<property name="font">
|
||||||
<string>Start Menu Integration</string>
|
<font>
|
||||||
</property>
|
<weight>75</weight>
|
||||||
</widget>
|
<bold>true</bold>
|
||||||
</item>
|
<kerning>true</kerning>
|
||||||
<item row="3" column="3">
|
</font>
|
||||||
<spacer name="horizontalSpacer_6">
|
</property>
|
||||||
<property name="orientation">
|
<property name="text">
|
||||||
<enum>Qt::Horizontal</enum>
|
<string>Start Menu Integration</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizeHint" stdset="0">
|
</widget>
|
||||||
<size>
|
</item>
|
||||||
<width>40</width>
|
<item row="9" column="1" colspan="3">
|
||||||
<height>20</height>
|
<widget class="QCheckBox" name="chkScanMenu">
|
||||||
</size>
|
<property name="text">
|
||||||
</property>
|
<string>Scan shell folders and offer links in run menu</string>
|
||||||
</spacer>
|
</property>
|
||||||
</item>
|
</widget>
|
||||||
<item row="11" column="1">
|
</item>
|
||||||
<spacer name="verticalSpacer_6">
|
<item row="10" column="0" colspan="2">
|
||||||
<property name="orientation">
|
<widget class="QLabel" name="label_22">
|
||||||
<enum>Qt::Vertical</enum>
|
<property name="text">
|
||||||
</property>
|
<string>Integrate with Host Start Menu</string>
|
||||||
<property name="sizeHint" stdset="0">
|
</property>
|
||||||
<size>
|
<property name="alignment">
|
||||||
<width>20</width>
|
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||||
<height>0</height>
|
</property>
|
||||||
</size>
|
<property name="openExternalLinks">
|
||||||
</property>
|
<bool>true</bool>
|
||||||
</spacer>
|
</property>
|
||||||
</item>
|
</widget>
|
||||||
<item row="3" column="1">
|
</item>
|
||||||
<widget class="QLabel" name="label_37">
|
<item row="10" column="2">
|
||||||
<property name="maximumSize">
|
<widget class="QComboBox" name="cmbIntegrateMenu"/>
|
||||||
<size>
|
</item>
|
||||||
<width>20</width>
|
<item row="11" column="0" colspan="2">
|
||||||
<height>16777215</height>
|
<widget class="QLabel" name="label_29">
|
||||||
</size>
|
<property name="text">
|
||||||
</property>
|
<string>Integrate with Host Desktop</string>
|
||||||
<property name="text">
|
</property>
|
||||||
<string/>
|
<property name="alignment">
|
||||||
</property>
|
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||||
</widget>
|
</property>
|
||||||
</item>
|
<property name="openExternalLinks">
|
||||||
<item row="0" column="0">
|
<bool>true</bool>
|
||||||
<widget class="QLabel" name="lblStartUp">
|
</property>
|
||||||
<property name="font">
|
</widget>
|
||||||
<font>
|
</item>
|
||||||
<weight>75</weight>
|
<item row="11" column="2">
|
||||||
<bold>true</bold>
|
<widget class="QComboBox" name="cmbIntegrateDesk"/>
|
||||||
<kerning>true</kerning>
|
</item>
|
||||||
</font>
|
<item row="12" column="1">
|
||||||
</property>
|
<spacer name="verticalSpacer_6">
|
||||||
<property name="text">
|
<property name="orientation">
|
||||||
<string>Start Sandbox Manager</string>
|
<enum>Qt::Vertical</enum>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
<property name="sizeHint" stdset="0">
|
||||||
</item>
|
<size>
|
||||||
<item row="3" column="0">
|
<width>20</width>
|
||||||
<widget class="QLabel" name="lblRunBoxed">
|
<height>154</height>
|
||||||
<property name="font">
|
</size>
|
||||||
<font>
|
</property>
|
||||||
<weight>75</weight>
|
</spacer>
|
||||||
<bold>true</bold>
|
</item>
|
||||||
<kerning>true</kerning>
|
<item row="12" column="3">
|
||||||
</font>
|
<spacer name="horizontalSpacer_2">
|
||||||
</property>
|
<property name="orientation">
|
||||||
<property name="text">
|
<enum>Qt::Horizontal</enum>
|
||||||
<string>Run Sandboxed - Actions</string>
|
</property>
|
||||||
</property>
|
<property name="sizeHint" stdset="0">
|
||||||
</widget>
|
<size>
|
||||||
</item>
|
<width>272</width>
|
||||||
</layout>
|
<height>13</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
|
@ -1948,225 +1951,228 @@ Unlike the preview channel, it does not include untested, potentially breaking,
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
<widget class="QTabWidget" name="tabsAdvanced">
|
<widget class="QTabWidget" name="tabsAdvanced">
|
||||||
<property name="currentIndex">
|
<property name="currentIndex">
|
||||||
<number>1</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="tabSandbox">
|
<widget class="QWidget" name="tabSandbox">
|
||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
<string>Sandboxie Config</string>
|
<string>Sandboxie Config</string>
|
||||||
</attribute>
|
</attribute>
|
||||||
<layout class="QGridLayout" name="gridLayout_20">
|
<layout class="QGridLayout" name="gridLayout_18">
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
<layout class="QGridLayout" name="gridLayout_18">
|
<widget class="QLabel" name="lblBoxRoot">
|
||||||
<item row="11" column="4">
|
<property name="font">
|
||||||
<spacer name="horizontalSpacer_5">
|
<font>
|
||||||
<property name="orientation">
|
<weight>75</weight>
|
||||||
<enum>Qt::Horizontal</enum>
|
<bold>true</bold>
|
||||||
</property>
|
<kerning>true</kerning>
|
||||||
<property name="sizeHint" stdset="0">
|
</font>
|
||||||
<size>
|
</property>
|
||||||
<width>40</width>
|
<property name="text">
|
||||||
<height>20</height>
|
<string>Sandbox default</string>
|
||||||
</size>
|
</property>
|
||||||
</property>
|
</widget>
|
||||||
</spacer>
|
</item>
|
||||||
</item>
|
<item row="1" column="0">
|
||||||
<item row="11" column="2">
|
<widget class="QLabel" name="label_7">
|
||||||
<spacer name="verticalSpacer_2">
|
<property name="text">
|
||||||
<property name="orientation">
|
<string>Default sandbox:</string>
|
||||||
<enum>Qt::Vertical</enum>
|
</property>
|
||||||
</property>
|
<property name="alignment">
|
||||||
<property name="sizeHint" stdset="0">
|
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||||
<size>
|
</property>
|
||||||
<width>20</width>
|
</widget>
|
||||||
<height>40</height>
|
</item>
|
||||||
</size>
|
<item row="1" column="2">
|
||||||
</property>
|
<widget class="QComboBox" name="cmbDefault"/>
|
||||||
</spacer>
|
</item>
|
||||||
</item>
|
<item row="1" column="5">
|
||||||
<item row="3" column="0" colspan="2">
|
<widget class="QCheckBox" name="chkAutoRoot">
|
||||||
<widget class="QLabel" name="label_16">
|
<property name="text">
|
||||||
<property name="text">
|
<string>Portable root folder</string>
|
||||||
<string>Sandbox <a href="sbie://docs/keyrootpath">registry root</a>: </string>
|
</property>
|
||||||
</property>
|
</widget>
|
||||||
<property name="alignment">
|
</item>
|
||||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
<item row="2" column="0" colspan="2">
|
||||||
</property>
|
<widget class="QLabel" name="label_15">
|
||||||
<property name="openExternalLinks">
|
<property name="text">
|
||||||
<bool>true</bool>
|
<string>Sandbox <a href="sbie://docs/filerootpath">file system root</a>: </string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
<property name="alignment">
|
||||||
</item>
|
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||||
<item row="0" column="0">
|
</property>
|
||||||
<widget class="QLabel" name="lblBoxRoot">
|
<property name="openExternalLinks">
|
||||||
<property name="font">
|
<bool>true</bool>
|
||||||
<font>
|
</property>
|
||||||
<weight>75</weight>
|
</widget>
|
||||||
<bold>true</bold>
|
</item>
|
||||||
<kerning>true</kerning>
|
<item row="2" column="2" colspan="2">
|
||||||
</font>
|
<widget class="QLineEdit" name="fileRoot"/>
|
||||||
</property>
|
</item>
|
||||||
<property name="text">
|
<item row="2" column="6">
|
||||||
<string>Sandbox default</string>
|
<widget class="QPushButton" name="btnBrowse">
|
||||||
</property>
|
<property name="maximumSize">
|
||||||
</widget>
|
<size>
|
||||||
</item>
|
<width>23</width>
|
||||||
<item row="1" column="2" colspan="2">
|
<height>16777215</height>
|
||||||
<widget class="QComboBox" name="cmbDefault"/>
|
</size>
|
||||||
</item>
|
</property>
|
||||||
<item row="4" column="2" colspan="5">
|
<property name="text">
|
||||||
<widget class="QLineEdit" name="ipcRoot"/>
|
<string>...</string>
|
||||||
</item>
|
</property>
|
||||||
<item row="2" column="0" colspan="2">
|
</widget>
|
||||||
<widget class="QLabel" name="label_15">
|
</item>
|
||||||
<property name="text">
|
<item row="3" column="0" colspan="2">
|
||||||
<string>Sandbox <a href="sbie://docs/filerootpath">file system root</a>: </string>
|
<widget class="QLabel" name="label_16">
|
||||||
</property>
|
<property name="text">
|
||||||
<property name="alignment">
|
<string>Sandbox <a href="sbie://docs/keyrootpath">registry root</a>: </string>
|
||||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
</property>
|
||||||
</property>
|
<property name="alignment">
|
||||||
<property name="openExternalLinks">
|
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||||
<bool>true</bool>
|
</property>
|
||||||
</property>
|
<property name="openExternalLinks">
|
||||||
</widget>
|
<bool>true</bool>
|
||||||
</item>
|
</property>
|
||||||
<item row="5" column="2">
|
</widget>
|
||||||
<spacer name="horizontalSpacer_12">
|
</item>
|
||||||
<property name="orientation">
|
<item row="3" column="2" colspan="2">
|
||||||
<enum>Qt::Horizontal</enum>
|
<widget class="QLineEdit" name="regRoot"/>
|
||||||
</property>
|
</item>
|
||||||
<property name="sizeHint" stdset="0">
|
<item row="4" column="0">
|
||||||
<size>
|
<widget class="QLabel" name="label_17">
|
||||||
<width>40</width>
|
<property name="text">
|
||||||
<height>20</height>
|
<string>Sandbox <a href="sbie://docs/ipcrootpath">ipc root</a>: </string>
|
||||||
</size>
|
</property>
|
||||||
</property>
|
<property name="alignment">
|
||||||
</spacer>
|
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||||
</item>
|
</property>
|
||||||
<item row="1" column="0" colspan="2">
|
<property name="openExternalLinks">
|
||||||
<widget class="QLabel" name="label_7">
|
<bool>true</bool>
|
||||||
<property name="text">
|
</property>
|
||||||
<string>Default sandbox:</string>
|
</widget>
|
||||||
</property>
|
</item>
|
||||||
<property name="alignment">
|
<item row="4" column="2" colspan="2">
|
||||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
<widget class="QLineEdit" name="ipcRoot"/>
|
||||||
</property>
|
</item>
|
||||||
</widget>
|
<item row="5" column="0" colspan="2">
|
||||||
</item>
|
<widget class="QLabel" name="lblBoxFeatures">
|
||||||
<item row="7" column="1" colspan="6">
|
<property name="font">
|
||||||
<widget class="QCheckBox" name="chkObjCb">
|
<font>
|
||||||
<property name="text">
|
<weight>75</weight>
|
||||||
<string>Activate Kernel Mode Object Filtering</string>
|
<bold>true</bold>
|
||||||
</property>
|
<kerning>true</kerning>
|
||||||
</widget>
|
</font>
|
||||||
</item>
|
</property>
|
||||||
<item row="5" column="0" colspan="2">
|
<property name="text">
|
||||||
<widget class="QLabel" name="lblBoxFeatures">
|
<string>Sandboxing features</string>
|
||||||
<property name="font">
|
</property>
|
||||||
<font>
|
</widget>
|
||||||
<weight>75</weight>
|
</item>
|
||||||
<bold>true</bold>
|
<item row="5" column="2">
|
||||||
<kerning>true</kerning>
|
<spacer name="horizontalSpacer_12">
|
||||||
</font>
|
<property name="orientation">
|
||||||
</property>
|
<enum>Qt::Horizontal</enum>
|
||||||
<property name="text">
|
</property>
|
||||||
<string>Sandboxing features</string>
|
<property name="sizeHint" stdset="0">
|
||||||
</property>
|
<size>
|
||||||
</widget>
|
<width>108</width>
|
||||||
</item>
|
<height>20</height>
|
||||||
<item row="11" column="3">
|
</size>
|
||||||
<spacer name="horizontalSpacer_15">
|
</property>
|
||||||
<property name="orientation">
|
</spacer>
|
||||||
<enum>Qt::Horizontal</enum>
|
</item>
|
||||||
</property>
|
<item row="6" column="1" colspan="4">
|
||||||
<property name="sizeHint" stdset="0">
|
<widget class="QCheckBox" name="chkWFP">
|
||||||
<size>
|
<property name="text">
|
||||||
<width>40</width>
|
<string>Use Windows Filtering Platform to restrict network access</string>
|
||||||
<height>20</height>
|
</property>
|
||||||
</size>
|
</widget>
|
||||||
</property>
|
</item>
|
||||||
</spacer>
|
<item row="7" column="1" colspan="3">
|
||||||
</item>
|
<widget class="QCheckBox" name="chkObjCb">
|
||||||
<item row="8" column="1" colspan="6">
|
<property name="text">
|
||||||
<widget class="QCheckBox" name="chkWin32k">
|
<string>Activate Kernel Mode Object Filtering</string>
|
||||||
<property name="text">
|
</property>
|
||||||
<string>Hook selected Win32k system calls to enable GPU acceleration (experimental)</string>
|
</widget>
|
||||||
</property>
|
</item>
|
||||||
</widget>
|
<item row="8" column="1" colspan="5">
|
||||||
</item>
|
<widget class="QCheckBox" name="chkWin32k">
|
||||||
<item row="9" column="1" colspan="6">
|
<property name="text">
|
||||||
<widget class="QCheckBox" name="chkSbieLogon">
|
<string>Hook selected Win32k system calls to enable GPU acceleration (experimental)</string>
|
||||||
<property name="text">
|
</property>
|
||||||
<string>Use a Sandboxie login instead of an anonymous token</string>
|
</widget>
|
||||||
</property>
|
</item>
|
||||||
</widget>
|
<item row="9" column="1" colspan="3">
|
||||||
</item>
|
<widget class="QCheckBox" name="chkSbieLogon">
|
||||||
<item row="2" column="2" colspan="5">
|
<property name="text">
|
||||||
<widget class="QLineEdit" name="fileRoot"/>
|
<string>Use a Sandboxie login instead of an anonymous token</string>
|
||||||
</item>
|
</property>
|
||||||
<item row="1" column="5" colspan="2">
|
</widget>
|
||||||
<widget class="QCheckBox" name="chkAutoRoot">
|
</item>
|
||||||
<property name="text">
|
<item row="10" column="1" colspan="4">
|
||||||
<string>Portable root folder</string>
|
<widget class="QCheckBox" name="chkSbieAll">
|
||||||
</property>
|
<property name="text">
|
||||||
</widget>
|
<string>Add "Sandboxie\All Sandboxes" group to the sandboxed token (experimental)</string>
|
||||||
</item>
|
</property>
|
||||||
<item row="4" column="0" colspan="2">
|
</widget>
|
||||||
<widget class="QLabel" name="label_17">
|
</item>
|
||||||
<property name="text">
|
<item row="11" column="1" colspan="4">
|
||||||
<string>Sandbox <a href="sbie://docs/ipcrootpath">ipc root</a>: </string>
|
<widget class="QCheckBox" name="chkImproveGame">
|
||||||
</property>
|
<property name="text">
|
||||||
<property name="alignment">
|
<string>Enhance the 3D gaming experience by releasing some system calls.</string>
|
||||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
</property>
|
||||||
</property>
|
</widget>
|
||||||
<property name="openExternalLinks">
|
</item>
|
||||||
<bool>true</bool>
|
<item row="12" column="1">
|
||||||
</property>
|
<spacer name="horizontalSpacer_4">
|
||||||
</widget>
|
<property name="orientation">
|
||||||
</item>
|
<enum>Qt::Horizontal</enum>
|
||||||
<item row="11" column="1">
|
</property>
|
||||||
<spacer name="horizontalSpacer_4">
|
<property name="sizeHint" stdset="0">
|
||||||
<property name="orientation">
|
<size>
|
||||||
<enum>Qt::Horizontal</enum>
|
<width>108</width>
|
||||||
</property>
|
<height>20</height>
|
||||||
<property name="sizeHint" stdset="0">
|
</size>
|
||||||
<size>
|
</property>
|
||||||
<width>40</width>
|
</spacer>
|
||||||
<height>20</height>
|
</item>
|
||||||
</size>
|
<item row="12" column="2">
|
||||||
</property>
|
<spacer name="verticalSpacer_2">
|
||||||
</spacer>
|
<property name="orientation">
|
||||||
</item>
|
<enum>Qt::Vertical</enum>
|
||||||
<item row="3" column="2" colspan="5">
|
</property>
|
||||||
<widget class="QLineEdit" name="regRoot"/>
|
<property name="sizeHint" stdset="0">
|
||||||
</item>
|
<size>
|
||||||
<item row="2" column="7">
|
<width>20</width>
|
||||||
<widget class="QPushButton" name="btnBrowse">
|
<height>139</height>
|
||||||
<property name="maximumSize">
|
</size>
|
||||||
<size>
|
</property>
|
||||||
<width>23</width>
|
</spacer>
|
||||||
<height>16777215</height>
|
</item>
|
||||||
</size>
|
<item row="12" column="3">
|
||||||
</property>
|
<spacer name="horizontalSpacer_15">
|
||||||
<property name="text">
|
<property name="orientation">
|
||||||
<string>...</string>
|
<enum>Qt::Horizontal</enum>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
<property name="sizeHint" stdset="0">
|
||||||
</item>
|
<size>
|
||||||
<item row="6" column="1" colspan="6">
|
<width>107</width>
|
||||||
<widget class="QCheckBox" name="chkWFP">
|
<height>20</height>
|
||||||
<property name="text">
|
</size>
|
||||||
<string>Use Windows Filtering Platform to restrict network access</string>
|
</property>
|
||||||
</property>
|
</spacer>
|
||||||
</widget>
|
</item>
|
||||||
</item>
|
<item row="12" column="4">
|
||||||
<item row="10" column="1" colspan="6">
|
<spacer name="horizontalSpacer_5">
|
||||||
<widget class="QCheckBox" name="chkSbieAll">
|
<property name="orientation">
|
||||||
<property name="text">
|
<enum>Qt::Horizontal</enum>
|
||||||
<string>Add "Sandboxie\All Sandboxes" group to the sandboxed token (experimental)</string>
|
</property>
|
||||||
</property>
|
<property name="sizeHint" stdset="0">
|
||||||
</widget>
|
<size>
|
||||||
</item>
|
<width>108</width>
|
||||||
</layout>
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
|
|
|
@ -1636,6 +1636,30 @@ void CSandMan::OnMessage(const QString& MsgData)
|
||||||
setWindowState(Qt::WindowActive);
|
setWindowState(Qt::WindowActive);
|
||||||
SetForegroundWindow(MainWndHandle);
|
SetForegroundWindow(MainWndHandle);
|
||||||
}
|
}
|
||||||
|
else if (Message.left(4) == "Add:")
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
QString respone = QInputDialog::getText(g_GUIParent, tr("Which box you want to add in?"), tr("Type the box name which you are going to set:"));
|
||||||
|
if(!respone.isEmpty())
|
||||||
|
{
|
||||||
|
if (theAPI->GetBoxByName(respone) != NULL) {
|
||||||
|
if (Message.right(1)=="\\"||!Message.contains(".", Qt::CaseInsensitive)) {
|
||||||
|
theAPI->GetBoxByName(respone)->AppendText("ForceFolder", Message.mid(4).replace("\"",""));
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
theAPI->GetBoxByName(respone)->AppendText("ForceProcess", Message.mid(4).replace("\"", "").mid(Message.mid(4).replace("\"", "").lastIndexOf("\\")+1));
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
QMessageBox::warning(g_GUIParent, tr("Sandboxie-Plus Warning"), tr("You typed a wrong box name!Nothing was changed."), QMessageBox::Ok, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
QMessageBox::warning(g_GUIParent, tr("Sandboxie-Plus Warning"), tr("Users canceled this operation."), QMessageBox::Yes, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
else if (Message.left(4) == "Run:")
|
else if (Message.left(4) == "Run:")
|
||||||
{
|
{
|
||||||
QString BoxName;
|
QString BoxName;
|
||||||
|
|
|
@ -331,7 +331,8 @@ CSettingsWindow::CSettingsWindow(QWidget* parent)
|
||||||
connect(ui.chkShellMenu, SIGNAL(stateChanged(int)), this, SLOT(OnOptChanged()));
|
connect(ui.chkShellMenu, SIGNAL(stateChanged(int)), this, SLOT(OnOptChanged()));
|
||||||
connect(ui.chkAlwaysDefault, SIGNAL(stateChanged(int)), this, SLOT(OnOptChanged()));
|
connect(ui.chkAlwaysDefault, SIGNAL(stateChanged(int)), this, SLOT(OnOptChanged()));
|
||||||
connect(ui.chkShellMenu2, SIGNAL(stateChanged(int)), this, SLOT(OnOptChanged()));
|
connect(ui.chkShellMenu2, SIGNAL(stateChanged(int)), this, SLOT(OnOptChanged()));
|
||||||
|
connect(ui.chkShellMenu3, SIGNAL(stateChanged(int)), this, SLOT(OnOptChanged()));
|
||||||
|
|
||||||
connect(ui.chkScanMenu, SIGNAL(stateChanged(int)), this, SLOT(OnOptChanged()));
|
connect(ui.chkScanMenu, SIGNAL(stateChanged(int)), this, SLOT(OnOptChanged()));
|
||||||
connect(ui.cmbIntegrateMenu, SIGNAL(currentIndexChanged(int)), this, SLOT(OnOptChanged()));
|
connect(ui.cmbIntegrateMenu, SIGNAL(currentIndexChanged(int)), this, SLOT(OnOptChanged()));
|
||||||
connect(ui.cmbIntegrateDesk, SIGNAL(currentIndexChanged(int)), this, SLOT(OnOptChanged()));
|
connect(ui.cmbIntegrateDesk, SIGNAL(currentIndexChanged(int)), this, SLOT(OnOptChanged()));
|
||||||
|
@ -426,6 +427,7 @@ CSettingsWindow::CSettingsWindow(QWidget* parent)
|
||||||
connect(ui.chkWin32k, SIGNAL(stateChanged(int)), this, SLOT(OnGeneralChanged()));
|
connect(ui.chkWin32k, SIGNAL(stateChanged(int)), this, SLOT(OnGeneralChanged()));
|
||||||
connect(ui.chkSbieLogon, SIGNAL(stateChanged(int)), this, SLOT(OnGeneralChanged()));
|
connect(ui.chkSbieLogon, SIGNAL(stateChanged(int)), this, SLOT(OnGeneralChanged()));
|
||||||
connect(ui.chkSbieAll, SIGNAL(stateChanged(int)), this, SLOT(OnGeneralChanged()));
|
connect(ui.chkSbieAll, SIGNAL(stateChanged(int)), this, SLOT(OnGeneralChanged()));
|
||||||
|
connect(ui.chkImproveGame, SIGNAL(stateChanged(int)), this, SLOT(OnGeneralChanged()));
|
||||||
m_GeneralChanged = false;
|
m_GeneralChanged = false;
|
||||||
|
|
||||||
connect(ui.chkWatchConfig, SIGNAL(stateChanged(int)), this, SLOT(OnOptChanged())); // not sbie ini
|
connect(ui.chkWatchConfig, SIGNAL(stateChanged(int)), this, SLOT(OnOptChanged())); // not sbie ini
|
||||||
|
@ -891,6 +893,7 @@ void CSettingsWindow::LoadSettings()
|
||||||
|
|
||||||
ui.chkShellMenu->setCheckState(IsContextMenu());
|
ui.chkShellMenu->setCheckState(IsContextMenu());
|
||||||
ui.chkShellMenu2->setChecked(CSbieUtils::HasContextMenu2());
|
ui.chkShellMenu2->setChecked(CSbieUtils::HasContextMenu2());
|
||||||
|
ui.chkShellMenu3->setChecked(CSbieUtils::HasContextMenu3());
|
||||||
ui.chkAlwaysDefault->setChecked(theConf->GetBool("Options/RunInDefaultBox", false));
|
ui.chkAlwaysDefault->setChecked(theConf->GetBool("Options/RunInDefaultBox", false));
|
||||||
|
|
||||||
ui.cmbDPI->setCurrentIndex(theConf->GetInt("Options/DPIScaling", 1));
|
ui.cmbDPI->setCurrentIndex(theConf->GetInt("Options/DPIScaling", 1));
|
||||||
|
@ -1009,6 +1012,7 @@ void CSettingsWindow::LoadSettings()
|
||||||
ui.chkWin32k->setChecked(theAPI->GetGlobalSettings()->GetBool("EnableWin32kHooks", true));
|
ui.chkWin32k->setChecked(theAPI->GetGlobalSettings()->GetBool("EnableWin32kHooks", true));
|
||||||
ui.chkSbieLogon->setChecked(theAPI->GetGlobalSettings()->GetBool("SandboxieLogon", false));
|
ui.chkSbieLogon->setChecked(theAPI->GetGlobalSettings()->GetBool("SandboxieLogon", false));
|
||||||
ui.chkSbieAll->setChecked(theAPI->GetGlobalSettings()->GetBool("SandboxieAllGroup", false));
|
ui.chkSbieAll->setChecked(theAPI->GetGlobalSettings()->GetBool("SandboxieAllGroup", false));
|
||||||
|
ui.chkImproveGame->setChecked(theAPI->GetGlobalSettings()->GetBool("Improve3DGameRate", false));
|
||||||
|
|
||||||
ui.chkAdminOnly->setChecked(theAPI->GetGlobalSettings()->GetBool("EditAdminOnly", false));
|
ui.chkAdminOnly->setChecked(theAPI->GetGlobalSettings()->GetBool("EditAdminOnly", false));
|
||||||
ui.chkAdminOnly->setEnabled(IsAdminUser());
|
ui.chkAdminOnly->setEnabled(IsAdminUser());
|
||||||
|
@ -1061,6 +1065,7 @@ void CSettingsWindow::LoadSettings()
|
||||||
ui.chkWin32k->setEnabled(false);
|
ui.chkWin32k->setEnabled(false);
|
||||||
ui.chkSbieLogon->setEnabled(false);
|
ui.chkSbieLogon->setEnabled(false);
|
||||||
ui.chkSbieAll->setEnabled(false);
|
ui.chkSbieAll->setEnabled(false);
|
||||||
|
ui.chkImproveGame->setEnabled(false);
|
||||||
ui.regRoot->setEnabled(false);
|
ui.regRoot->setEnabled(false);
|
||||||
ui.ipcRoot->setEnabled(false);
|
ui.ipcRoot->setEnabled(false);
|
||||||
ui.chkRamDisk->setEnabled(false);
|
ui.chkRamDisk->setEnabled(false);
|
||||||
|
@ -1598,7 +1603,15 @@ void CSettingsWindow::SaveSettings()
|
||||||
} else
|
} else
|
||||||
CSbieUtils::RemoveContextMenu2();
|
CSbieUtils::RemoveContextMenu2();
|
||||||
}
|
}
|
||||||
|
if (ui.chkShellMenu3->isChecked() != CSbieUtils::HasContextMenu3()) {
|
||||||
|
if (ui.chkShellMenu3->isChecked()) {
|
||||||
|
CSbieUtils::AddContextMenu3(QApplication::applicationDirPath().replace("/", "\\") + "\\SandMan.exe",
|
||||||
|
tr("Make Folder/File &Forced"),
|
||||||
|
QApplication::applicationDirPath().replace("/", "\\") + "\\Start.exe");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
CSbieUtils::RemoveContextMenu3();
|
||||||
|
}
|
||||||
theConf->SetValue("Options/RunInDefaultBox", ui.chkAlwaysDefault->isChecked());
|
theConf->SetValue("Options/RunInDefaultBox", ui.chkAlwaysDefault->isChecked());
|
||||||
|
|
||||||
theConf->SetValue("Options/CheckSilentMode", ui.chkSilentMode->isChecked());
|
theConf->SetValue("Options/CheckSilentMode", ui.chkSilentMode->isChecked());
|
||||||
|
@ -1703,6 +1716,7 @@ void CSettingsWindow::SaveSettings()
|
||||||
WriteAdvancedCheck(ui.chkWin32k, "EnableWin32kHooks", "", "n");
|
WriteAdvancedCheck(ui.chkWin32k, "EnableWin32kHooks", "", "n");
|
||||||
WriteAdvancedCheck(ui.chkSbieLogon, "SandboxieLogon", "y", "");
|
WriteAdvancedCheck(ui.chkSbieLogon, "SandboxieLogon", "y", "");
|
||||||
WriteAdvancedCheck(ui.chkSbieAll, "SandboxieAllGroup", "y", "");
|
WriteAdvancedCheck(ui.chkSbieAll, "SandboxieAllGroup", "y", "");
|
||||||
|
WriteAdvancedCheck(ui.chkImproveGame, "Improve3DGameRate", "y", "");
|
||||||
|
|
||||||
if (m_FeaturesChanged) {
|
if (m_FeaturesChanged) {
|
||||||
m_FeaturesChanged = false;
|
m_FeaturesChanged = false;
|
||||||
|
|
|
@ -135,6 +135,8 @@ bool CSetupWizard::ShowWizard(int iOldLevel)
|
||||||
{
|
{
|
||||||
if (wizard.field("editAdminOnly").toBool())
|
if (wizard.field("editAdminOnly").toBool())
|
||||||
theAPI->GetGlobalSettings()->SetText("EditAdminOnly", "y");
|
theAPI->GetGlobalSettings()->SetText("EditAdminOnly", "y");
|
||||||
|
if (wizard.field("improveGame").toBool())
|
||||||
|
theAPI->GetGlobalSettings()->SetText("Improve3DGameRate", "y");
|
||||||
}
|
}
|
||||||
|
|
||||||
theConf->SetValue("Options/WizardLevel", SETUP_LVL_CURRENT);
|
theConf->SetValue("Options/WizardLevel", SETUP_LVL_CURRENT);
|
||||||
|
@ -530,6 +532,11 @@ CShellPage::CShellPage(QWidget *parent)
|
||||||
layout->addWidget(m_pEditOnlyAdmin);
|
layout->addWidget(m_pEditOnlyAdmin);
|
||||||
registerField("editAdminOnly", m_pEditOnlyAdmin);
|
registerField("editAdminOnly", m_pEditOnlyAdmin);
|
||||||
|
|
||||||
|
m_pImproveGame = new QCheckBox(tr("Enhance the 3D gaming experience by releasing some system calls."));
|
||||||
|
m_pImproveGame->setChecked(false);
|
||||||
|
layout->addWidget(m_pImproveGame);
|
||||||
|
registerField("improveGame", m_pImproveGame);
|
||||||
|
|
||||||
setLayout(layout);
|
setLayout(layout);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -123,6 +123,7 @@ private:
|
||||||
QCheckBox *m_pContecxtMenu;
|
QCheckBox *m_pContecxtMenu;
|
||||||
QCheckBox *m_pBrowserIcon;
|
QCheckBox *m_pBrowserIcon;
|
||||||
QCheckBox* m_pEditOnlyAdmin;
|
QCheckBox* m_pEditOnlyAdmin;
|
||||||
|
QCheckBox* m_pImproveGame;
|
||||||
};
|
};
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
|
@ -111,7 +111,14 @@ int main(int argc, char *argv[])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
int DfpPos = Args.indexOf("/disable_force", Qt::CaseInsensitive);
|
int DfpPos = Args.indexOf("/disable_force", Qt::CaseInsensitive);
|
||||||
// the first argument wins
|
int AfpPos = Args.indexOf("/add_force", Qt::CaseInsensitive);
|
||||||
|
|
||||||
|
//Add_Force has the highest priority.
|
||||||
|
if (AfpPos != -1) {
|
||||||
|
DfpPos = -1;
|
||||||
|
BoxPos = -1;
|
||||||
|
}else
|
||||||
|
// the first argument wins
|
||||||
if (BoxPos != -1 && DfpPos != -1) {
|
if (BoxPos != -1 && DfpPos != -1) {
|
||||||
if (BoxPos < DfpPos) DfpPos = -1;
|
if (BoxPos < DfpPos) DfpPos = -1;
|
||||||
else BoxPos = -1;
|
else BoxPos = -1;
|
||||||
|
@ -158,7 +165,13 @@ int main(int argc, char *argv[])
|
||||||
|
|
||||||
g_PendingMessage += "\nIn:*DFP*";
|
g_PendingMessage += "\nIn:*DFP*";
|
||||||
}
|
}
|
||||||
|
if (AfpPos != -1) {
|
||||||
|
LPWSTR cmdLine0 = wcsstr(GetCommandLineW(), L"/add_force");
|
||||||
|
if (!cmdLine0) return -1;
|
||||||
|
LPWSTR cmdLine = cmdLine0 + 10;
|
||||||
|
g_PendingMessage = "Add:" + QString::fromWCharArray(cmdLine + 1);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
if (IsBoxed) {
|
if (IsBoxed) {
|
||||||
QMessageBox::critical(NULL, "Sandboxie-Plus", CSandMan::tr("Sandboxie Manager can not be run sandboxed!"));
|
QMessageBox::critical(NULL, "Sandboxie-Plus", CSandMan::tr("Sandboxie Manager can not be run sandboxed!"));
|
||||||
|
|
Loading…
Reference in New Issue