This commit is contained in:
DavidXanatos 2024-03-24 10:08:38 +01:00
parent b91daec2a1
commit 7203acdf1e
4 changed files with 12 additions and 8 deletions

View File

@ -95,7 +95,7 @@ _FX BOOLEAN Gui_InitTitle(HMODULE module)
// hook functions
//
if (! Gui_DisableTitle||SbieApi_QueryConfBool(NULL,"NoTitle",FALSE)) {
if (! Gui_DisableTitle) {
SBIEDLL_HOOK_GUI(GetWindowTextW);
SBIEDLL_HOOK_GUI(GetWindowTextA);
@ -291,6 +291,7 @@ _FX int Gui_FixTitleW(HWND hWnd, WCHAR *lpWindowTitle, int len)
{
if (len >= (int)Gui_TitleSuffixW_len * 2 &&
Gui_ShouldCreateTitle(hWnd)) {
if (wmemcmp(lpWindowTitle, &Gui_TitleSuffixW[1], 3) == 0) {
len -= 4;
wmemmove(lpWindowTitle, lpWindowTitle + 4, len);
@ -325,6 +326,7 @@ _FX int Gui_FixTitleA(HWND hWnd, UCHAR *lpWindowTitle, int len)
{
if (len >= (int)Gui_TitleSuffixA_len * 2 &&
Gui_ShouldCreateTitle(hWnd)) {
if (memcmp(lpWindowTitle, &Gui_TitleSuffixA[1], 3) == 0) {
len -= 4;
memmove(lpWindowTitle, lpWindowTitle + 4, len);

View File

@ -97,17 +97,18 @@ CBoxImageWindow::CBoxImageWindow(EAction Action, QWidget *parent)
ui.chkProtect->setVisible(false);
ui.chkAutoLock->setVisible(false);
}
//restoreGeometry(theConf->GetBlob("BoxImageWindow/Window_Geometry"));
}
void CBoxImageWindow::SetForce(bool force) {
void CBoxImageWindow::SetForce(bool force)
{
ui.chkProtect->setEnabled(!force);
ui.chkProtect->setChecked(true);
ui.chkAutoLock->setChecked(true);
ui.chkAutoLock->setEnabled(!force);
}
CBoxImageWindow::~CBoxImageWindow()
{
//theConf->SetBlob("BoxImageWindow/Window_Geometry", saveGeometry());

View File

@ -266,13 +266,14 @@ void COptionsWindow::LoadAdvanced()
ui.chkProtectWindow->setChecked(m_pBox->GetBool("IsProtectScreen"));
QString str = m_pBox->GetText("OpenWinClass", "");
ui.chkBlockCapture->setChecked(m_pBox->GetBool("IsBlockCapture")&& QString::compare(str, "*") != 0);
ui.chkBlockCapture->setChecked(m_pBox->GetBool("IsBlockCapture") && QString::compare(str, "*") != 0);
ui.chkBlockCapture->setCheckable(QString::compare(str, "*") != 0);
/*ui.chkLockWhenClose->setChecked(m_pBox->GetBool("LockWhenClose", false));
ui.chkLockWhenClose->setCheckable(m_pBox->GetBool("UseFileImage", false));
ui.chkLockWhenClose->setEnabled(m_pBox->GetBool("UseFileImage", false));
*/
QStringList Users = m_pBox->GetText("Enabled").split(",");
ui.lstUsers->clear();
if (Users.count() > 1)

View File

@ -692,8 +692,8 @@ CAdvancedPage::CAdvancedPage(QWidget *parent)
QCheckBox* pSharedTemplate = new QCheckBox(tr("Use a shared local template"));
pSharedTemplate->setToolTip(tr("This setting adds a local template to the sandbox configuration so that the settings in that template are shared between sandboxes. However, some settings added to the template may not be reflected in the user interface."
"\nTo change the template's settings, simply locate and edit the 'SharedTemplate' template in the App Templates list under Sandbox Options."
"\nTo disable this template for a sandbox, simply uncheck it in the template list."));
"\nTo change the template's settings, simply locate and edit the 'SharedTemplate' template in the App Templates list under Sandbox Options."
"\nTo disable this template for a sandbox, simply uncheck it in the template list."));
pSharedTemplate->setChecked(theConf->GetBool("BoxDefaults/SharedTemplate", false));
layout->addWidget(pSharedTemplate, row++, 1, 1, 3);
registerField("sharedTemplate", pSharedTemplate);