This commit is contained in:
DavidXanatos 2024-04-20 14:32:15 +02:00
parent e1c46bb269
commit cc63194b5f
18 changed files with 162 additions and 124 deletions

View File

@ -15,7 +15,8 @@ This project adheres to [Semantic Versioning](http://semver.org/).
- Note: this option may cause issues in games hence do not enable it for gaming boxes. - Note: this option may cause issues in games hence do not enable it for gaming boxes.
- added support for hardlinks [#3826](https://github.com/sandboxie-plus/Sandboxie/issues/3826) - added support for hardlinks [#3826](https://github.com/sandboxie-plus/Sandboxie/issues/3826)
- added mechanism to terminate stuck sandboxed processes from the driver - added mechanism to terminate stuck sandboxed processes from the driver
- added Sandman: Make the trigger list editable [#3742](https://github.com/sandboxie-plus/Sandboxie/issues/3742) - added Make the trigger list editable [#3742](https://github.com/sandboxie-plus/Sandboxie/issues/3742)
- added Optionally extend the screenshot protection to the UI [#3739](https://github.com/sandboxie-plus/Sandboxie/issues/3739)
### Changed ### Changed
- improved Avast template [#3777](https://github.com/sandboxie-plus/Sandboxie/pull/3777) - improved Avast template [#3777](https://github.com/sandboxie-plus/Sandboxie/pull/3777)

View File

@ -617,16 +617,16 @@ bool InitConsole(bool bCreateIfNeeded)
// avoid flashing a bright white window when in dark mode // avoid flashing a bright white window when in dark mode
// //
void SafeShow(QWidget* pWidget) { //void SafeShow(QWidget* pWidget) {
static bool Lock = false; // static bool Lock = false;
pWidget->setProperty("windowOpacity", 0.0); // pWidget->setProperty("windowOpacity", 0.0);
if (Lock == false) { // if (Lock == false) {
Lock = true; // Lock = true;
pWidget->show(); // pWidget->show();
QApplication::processEvents(QEventLoop::ExcludeSocketNotifiers); // QApplication::processEvents(QEventLoop::ExcludeSocketNotifiers);
Lock = false; // Lock = false;
} else // } else
pWidget->show(); // pWidget->show();
pWidget->setProperty("windowOpacity", 1.0); // pWidget->setProperty("windowOpacity", 1.0);
} //}

View File

@ -115,7 +115,7 @@ MISCHELPERS_EXPORT void SetPaleteTexture(QPalette& palette, QPalette::ColorRole
MISCHELPERS_EXPORT bool InitConsole(bool bCreateIfNeeded = true); MISCHELPERS_EXPORT bool InitConsole(bool bCreateIfNeeded = true);
#endif #endif
MISCHELPERS_EXPORT void SafeShow(QWidget* pWidget); //MISCHELPERS_EXPORT void SafeShow(QWidget* pWidget);
template <typename T> template <typename T>
QSet<T> ListToSet(const QList<T>& qList) { return QSet<T>(qList.begin(), qList.end()); } QSet<T> ListToSet(const QList<T>& qList) { return QSet<T>(qList.begin(), qList.end()); }

View File

@ -1,22 +1,21 @@
#include "stdafx.h" #include "stdafx.h"
#include "../../MiscHelpers/Common/Settings.h" #include "Settings.h"
#include "MultiErrorDialog.h" #include "MultiErrorDialog.h"
#include "..\SandMan.h"
CMultiErrorDialog::CMultiErrorDialog(const QString& Message, const QStringList& Errors, QWidget* parent) CMultiErrorDialog::CMultiErrorDialog(const QString& Title, const QString& Message, const QStringList& Errors, QWidget* parent)
: QDialog(parent) : QDialog(parent)
{ {
this->setWindowTitle(tr("Sandboxie-Plus - Error")); this->setWindowTitle(Title);
m_pMainLayout = new QGridLayout(this); m_pMainLayout = new QGridLayout(this);
int Row = 0; int Row = 0;
m_pMainLayout->addWidget(new QLabel(Message), Row++, 0, 1, 4); m_pMainLayout->addWidget(new QLabel(Message), Row++, 0, 1, 4);
m_pErrors = new CPanelWidgetEx(); m_pErrors = new CPanelWidgetEx();
m_pErrors->GetTree()->setItemDelegate(new CTreeItemDelegate()); //m_pErrors->GetTree()->setItemDelegate(new CTreeItemDelegate());
m_pErrors->GetTree()->setHeaderLabels(tr("Message").split("|")); //m_pErrors->GetTree()->setHeaderLabels(tr("Message").split("|"));
m_pErrors->GetView()->setSelectionMode(QAbstractItemView::ExtendedSelection); m_pErrors->GetView()->setSelectionMode(QAbstractItemView::ExtendedSelection);
m_pErrors->GetView()->setSortingEnabled(false); m_pErrors->GetView()->setSortingEnabled(false);
@ -31,7 +30,7 @@ CMultiErrorDialog::CMultiErrorDialog(const QString& Message, const QStringList&
connect(m_pButtonBox,SIGNAL(accepted()),this,SLOT(accept())); connect(m_pButtonBox,SIGNAL(accepted()),this,SLOT(accept()));
connect(m_pButtonBox,SIGNAL(rejected()),this,SLOT(reject())); connect(m_pButtonBox,SIGNAL(rejected()),this,SLOT(reject()));
restoreGeometry(theConf->GetBlob("ErrorWindow/Window_Geometry")); //restoreGeometry(theConf->GetBlob("ErrorWindow/Window_Geometry"));
foreach(const QString& Error, Errors) foreach(const QString& Error, Errors)
@ -47,5 +46,5 @@ CMultiErrorDialog::CMultiErrorDialog(const QString& Message, const QStringList&
CMultiErrorDialog::~CMultiErrorDialog() CMultiErrorDialog::~CMultiErrorDialog()
{ {
theConf->SetBlob("ErrorWindow/Window_Geometry", saveGeometry()); //theConf->SetBlob("ErrorWindow/Window_Geometry", saveGeometry());
} }

View File

@ -1,13 +1,12 @@
#pragma once #pragma once
#include "../../MiscHelpers/Common/PanelView.h" #include "PanelView.h"
#include "../../QSbieAPI/SbieStatus.h"
class CMultiErrorDialog : public QDialog class MISCHELPERS_EXPORT CMultiErrorDialog : public QDialog
{ {
Q_OBJECT Q_OBJECT
public: public:
CMultiErrorDialog(const QString& Message, const QStringList& Errors, QWidget* parent = 0); CMultiErrorDialog(const QString& Title, const QString& Message, const QStringList& Errors, QWidget* parent = 0);
virtual ~CMultiErrorDialog(); virtual ~CMultiErrorDialog();
private: private:

View File

@ -35,6 +35,7 @@ HEADERS += ./MiscHelpers.h \
./Common/NeonEffect.h \ ./Common/NeonEffect.h \
./Common/NetworkAccessManager.h \ ./Common/NetworkAccessManager.h \
./Common/MT/ThreadLock.h \ ./Common/MT/ThreadLock.h \
./Common/MultiErrorDialog.h \
./Archive/Archive.h \ ./Archive/Archive.h \
./Archive/ArchiveFS.h \ ./Archive/ArchiveFS.h \
./Archive/ArchiveExtractor.h \ ./Archive/ArchiveExtractor.h \
@ -70,6 +71,7 @@ SOURCES += ./MiscHelpers.cpp \
./Common/TreeItemModel.cpp \ ./Common/TreeItemModel.cpp \
./Common/Xml.cpp \ ./Common/Xml.cpp \
./Common/MT/ThreadLock.cpp \ ./Common/MT/ThreadLock.cpp \
./Common/MultiErrorDialog.cpp \
./Archive/Archive.cpp \ ./Archive/Archive.cpp \
./Archive/ArchiveFS.cpp \ ./Archive/ArchiveFS.cpp \
./Archive/ArchiveExtractor.cpp \ ./Archive/ArchiveExtractor.cpp \

View File

@ -1088,20 +1088,64 @@
<layout class="QGridLayout" name="gridLayout_32"> <layout class="QGridLayout" name="gridLayout_32">
<item row="0" column="0"> <item row="0" column="0">
<layout class="QGridLayout" name="gridLayout_31"> <layout class="QGridLayout" name="gridLayout_31">
<item row="1" column="2"> <item row="1" column="1">
<widget class="QComboBox" name="cmbDPI"/> <widget class="QLabel" name="label_23">
</item>
<item row="2" column="1">
<widget class="QLabel" name="label_24">
<property name="text"> <property name="text">
<string>Font Scaling</string> <string>High DPI Scaling</string>
</property> </property>
<property name="alignment"> <property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property> </property>
</widget> </widget>
</item> </item>
<item row="4" column="3"> <item row="2" column="3">
<widget class="QLabel" name="label_13">
<property name="text">
<string>%</string>
</property>
</widget>
</item>
<item row="6" column="1">
<widget class="QLabel" name="label_26">
<property name="text">
<string>External Ini Editor</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="QLabel" name="label_6">
<property name="text">
<string>Ini Editor Font</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="2" column="2">
<widget class="QComboBox" name="cmbFontScale">
<property name="editable">
<bool>true</bool>
</property>
</widget>
</item>
<item row="7" column="4">
<spacer name="horizontalSpacer_20">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="5" column="3">
<layout class="QHBoxLayout" name="horizontalLayout_4"> <layout class="QHBoxLayout" name="horizontalLayout_4">
<item> <item>
<widget class="QPushButton" name="btnSelectIniFont"> <widget class="QPushButton" name="btnSelectIniFont">
@ -1138,8 +1182,11 @@
</item> </item>
</layout> </layout>
</item> </item>
<item row="6" column="2"> <item row="1" column="2">
<spacer name="horizontalSpacer_18"> <widget class="QComboBox" name="cmbDPI"/>
</item>
<item row="7" column="0">
<spacer name="horizontalSpacer_17">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
@ -1155,7 +1202,6 @@
<widget class="QLabel" name="lblDisplay"> <widget class="QLabel" name="lblDisplay">
<property name="font"> <property name="font">
<font> <font>
<weight>75</weight>
<bold>true</bold> <bold>true</bold>
<kerning>true</kerning> <kerning>true</kerning>
</font> </font>
@ -1165,18 +1211,8 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="1" column="1"> <item row="7" column="2">
<widget class="QLabel" name="label_23"> <spacer name="horizontalSpacer_18">
<property name="text">
<string>High DPI Scaling</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="6" column="4">
<spacer name="horizontalSpacer_20">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
@ -1188,28 +1224,7 @@
</property> </property>
</spacer> </spacer>
</item> </item>
<item row="3" column="0"> <item row="7" column="3">
<widget class="QLabel" name="lblIni">
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
<kerning>true</kerning>
</font>
</property>
<property name="text">
<string>Ini Options</string>
</property>
</widget>
</item>
<item row="2" column="3">
<widget class="QLabel" name="label_13">
<property name="text">
<string>%</string>
</property>
</widget>
</item>
<item row="6" column="3">
<spacer name="horizontalSpacer_19"> <spacer name="horizontalSpacer_19">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
@ -1222,17 +1237,24 @@
</property> </property>
</spacer> </spacer>
</item> </item>
<item row="4" column="1"> <item row="2" column="1">
<widget class="QLabel" name="label_6"> <widget class="QLabel" name="label_24">
<property name="text"> <property name="text">
<string>Ini Editor Font</string> <string>Font Scaling</string>
</property> </property>
<property name="alignment"> <property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property> </property>
</widget> </widget>
</item> </item>
<item row="6" column="1"> <item row="5" column="2">
<widget class="QLabel" name="lblIniEditFont">
<property name="text">
<string>#</string>
</property>
</widget>
</item>
<item row="7" column="1">
<spacer name="verticalSpacer_10"> <spacer name="verticalSpacer_10">
<property name="orientation"> <property name="orientation">
<enum>Qt::Vertical</enum> <enum>Qt::Vertical</enum>
@ -1245,19 +1267,8 @@
</property> </property>
</spacer> </spacer>
</item> </item>
<item row="4" column="2"> <item row="6" column="2" colspan="2">
<widget class="QLabel" name="lblIniEditFont"> <widget class="QLineEdit" name="txtEditor"/>
<property name="text">
<string>#</string>
</property>
</widget>
</item>
<item row="2" column="2">
<widget class="QComboBox" name="cmbFontScale">
<property name="editable">
<bool>true</bool>
</property>
</widget>
</item> </item>
<item row="1" column="3"> <item row="1" column="3">
<widget class="QLabel" name="label"> <widget class="QLabel" name="label">
@ -1266,29 +1277,23 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="6" column="0"> <item row="4" column="0">
<spacer name="horizontalSpacer_17"> <widget class="QLabel" name="lblIni">
<property name="orientation"> <property name="font">
<enum>Qt::Horizontal</enum> <font>
<bold>true</bold>
<kerning>true</kerning>
</font>
</property> </property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="5" column="2" colspan="2">
<widget class="QLineEdit" name="txtEditor"/>
</item>
<item row="5" column="1">
<widget class="QLabel" name="label_26">
<property name="text"> <property name="text">
<string>External Ini Editor</string> <string>Ini Options</string>
</property> </property>
<property name="alignment"> </widget>
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> </item>
<item row="3" column="1" colspan="4">
<widget class="QCheckBox" name="chkHide">
<property name="text">
<string>Hide SandMan windows from screen capture (UI restart required)</string>
</property> </property>
</widget> </widget>
</item> </item>

View File

@ -117,4 +117,14 @@ bool PickWindowsIcon(QWidget* pParent, QString& Path, quint32& Index)
BOOL Ret = PickIconDlg((HWND)pParent->window()->winId(), iconPath, MAX_PATH, (int*)&Index); BOOL Ret = PickIconDlg((HWND)pParent->window()->winId(), iconPath, MAX_PATH, (int*)&Index);
Path = QString::fromWCharArray(iconPath); Path = QString::fromWCharArray(iconPath);
return !!Ret; return !!Ret;
}
void ProtectWindow(void* hWnd)
{
typedef BOOL(*LPSETWINDOWDISPLAYAFFINITY)(HWND, DWORD);
static LPSETWINDOWDISPLAYAFFINITY pSetWindowDisplayAffinity = NULL;
if (!pSetWindowDisplayAffinity)
pSetWindowDisplayAffinity = (LPSETWINDOWDISPLAYAFFINITY)GetProcAddress(LoadLibraryA("user32.dll"), "SetWindowDisplayAffinity");
if (pSetWindowDisplayAffinity)
pSetWindowDisplayAffinity((HWND)hWnd, 0x00000011);
} }

View File

@ -4,4 +4,6 @@ QVariantMap ResolveShortcut(const QString& LinkPath);
QPixmap LoadWindowsIcon(const QString& Path, quint32 Index); QPixmap LoadWindowsIcon(const QString& Path, quint32 Index);
bool PickWindowsIcon(QWidget* pParent, QString& Path, quint32& Index); bool PickWindowsIcon(QWidget* pParent, QString& Path, quint32& Index);
void ProtectWindow(void* hWnd);

View File

@ -6,7 +6,7 @@
#include "Views/SbieView.h" #include "Views/SbieView.h"
#include "../MiscHelpers/Common/CheckableMessageBox.h" #include "../MiscHelpers/Common/CheckableMessageBox.h"
#include <QWinEventNotifier> #include <QWinEventNotifier>
#include "./Dialogs/MultiErrorDialog.h" #include "../MiscHelpers/Common/MultiErrorDialog.h"
#include "../QSbieAPI/SbieUtils.h" #include "../QSbieAPI/SbieUtils.h"
#include "../QSbieAPI/Sandboxie/BoxBorder.h" #include "../QSbieAPI/Sandboxie/BoxBorder.h"
#include "../QSbieAPI/Sandboxie/SbieTemplates.h" #include "../QSbieAPI/Sandboxie/SbieTemplates.h"
@ -119,7 +119,7 @@ CSandMan::CSandMan(QWidget *parent)
: QMainWindow(parent) : QMainWindow(parent)
{ {
#if defined(Q_OS_WIN) #if defined(Q_OS_WIN)
MainWndHandle = (HWND)QWidget::winId(); MainWndHandle = (HWND)winId();
QApplication::instance()->installNativeEventFilter(new CNativeEventFilter); QApplication::instance()->installNativeEventFilter(new CNativeEventFilter);
#endif #endif
@ -1596,6 +1596,23 @@ bool CSandMan::IsSilentMode()
return IsFullScreenMode(); return IsFullScreenMode();
} }
void CSandMan::SafeShow(QWidget* pWidget)
{
if(theConf->GetBool("Options/CoverWindows", false))
ProtectWindow((HWND)pWidget->winId());
static bool Lock = false;
pWidget->setProperty("windowOpacity", 0.0);
if (Lock == false) {
Lock = true;
pWidget->show();
QApplication::processEvents(QEventLoop::ExcludeSocketNotifiers);
Lock = false;
} else
pWidget->show();
pWidget->setProperty("windowOpacity", 1.0);
}
QWidget* g_GUIParent = NULL; QWidget* g_GUIParent = NULL;
int CSandMan::SafeExec(QDialog* pDialog) int CSandMan::SafeExec(QDialog* pDialog)
@ -3992,8 +4009,8 @@ void CSandMan::CheckResults(QList<SB_STATUS> Results, QWidget* pParent, bool bAs
else if (Errors.count() == 1) else if (Errors.count() == 1)
QMessageBox::warning(pParent ? pParent : this, tr("Sandboxie-Plus - Error"), Errors.first()); QMessageBox::warning(pParent ? pParent : this, tr("Sandboxie-Plus - Error"), Errors.first());
else if (Errors.count() > 1) { else if (Errors.count() > 1) {
CMultiErrorDialog Dialog(tr("Operation failed for %1 item(s).").arg(Errors.size()), Errors, pParent ? pParent : this); CMultiErrorDialog Dialog("Sandboxie-Plus", tr("Operation failed for %1 item(s).").arg(Errors.size()), Errors, pParent ? pParent : this);
Dialog.exec(); theGUI->SafeExec(&Dialog);
} }
} }

View File

@ -88,6 +88,7 @@ public:
QString FormatSbieMessage(quint32 MsgCode, const QStringList& MsgData, QString ProcessName, QString* pLink = NULL); QString FormatSbieMessage(quint32 MsgCode, const QStringList& MsgData, QString ProcessName, QString* pLink = NULL);
QString MakeSbieMsgLink(quint32 MsgCode, const QStringList& MsgData, QString ProcessName); QString MakeSbieMsgLink(quint32 MsgCode, const QStringList& MsgData, QString ProcessName);
static void SafeShow(QWidget* pWidget);
int SafeExec(QDialog* pDialog); int SafeExec(QDialog* pDialog);
bool RunSandboxed(const QStringList& Commands, QString BoxName = QString(), const QString& WrkDir = QString()); bool RunSandboxed(const QStringList& Commands, QString BoxName = QString(), const QString& WrkDir = QString());

View File

@ -16,7 +16,6 @@ HEADERS += ./stdafx.h \
./Views/FileView.h \ ./Views/FileView.h \
./Views/TraceView.h \ ./Views/TraceView.h \
./Views/StackView.h \ ./Views/StackView.h \
./Dialogs/MultiErrorDialog.h \
./Helpers/FindTool.h \ ./Helpers/FindTool.h \
./Helpers/FullScreen.h \ ./Helpers/FullScreen.h \
./Helpers/WinAdmin.h \ ./Helpers/WinAdmin.h \
@ -65,7 +64,6 @@ SOURCES += ./main.cpp \
./Views/FileView.cpp \ ./Views/FileView.cpp \
./Views/TraceView.cpp \ ./Views/TraceView.cpp \
./Views/StackView.cpp \ ./Views/StackView.cpp \
./Dialogs/MultiErrorDialog.cpp \
./Helpers/FindTool.cpp \ ./Helpers/FindTool.cpp \
./Helpers/FullScreen.cpp \ ./Helpers/FullScreen.cpp \
./Helpers/WinAdmin.cpp \ ./Helpers/WinAdmin.cpp \

View File

@ -1334,7 +1334,7 @@ void CSbieView::OnSandBoxAction(QAction* Action, const QList<CSandBoxPtr>& SandB
connect(pSnapshotsWindow, &CSnapshotsWindow::Closed, [this, pBox]() { connect(pSnapshotsWindow, &CSnapshotsWindow::Closed, [this, pBox]() {
SnapshotWindows.remove(pBox.data()); SnapshotWindows.remove(pBox.data());
}); });
SafeShow(pSnapshotsWindow); CSandMan::SafeShow(pSnapshotsWindow);
} }
else { else {
pSnapshotsWindow->setWindowState((pSnapshotsWindow->windowState() & ~Qt::WindowMinimized) | Qt::WindowActive); pSnapshotsWindow->setWindowState((pSnapshotsWindow->windowState() & ~Qt::WindowMinimized) | Qt::WindowActive);
@ -1725,7 +1725,7 @@ void CSbieView::ShowOptions(const CSandBoxPtr& pBox)
connect(pBoxEx->m_pOptionsWnd, &COptionsWindow::Closed, [pBoxEx]() { connect(pBoxEx->m_pOptionsWnd, &COptionsWindow::Closed, [pBoxEx]() {
pBoxEx->m_pOptionsWnd = NULL; pBoxEx->m_pOptionsWnd = NULL;
}); });
SafeShow(pBoxEx->m_pOptionsWnd); CSandMan::SafeShow(pBoxEx->m_pOptionsWnd);
} }
else { else {
pBoxEx->m_pOptionsWnd->setWindowState((pBoxEx->m_pOptionsWnd->windowState() & ~Qt::WindowMinimized) | Qt::WindowActive); pBoxEx->m_pOptionsWnd->setWindowState((pBoxEx->m_pOptionsWnd->windowState() & ~Qt::WindowMinimized) | Qt::WindowActive);
@ -1749,7 +1749,7 @@ void CSbieView::ShowBrowse(const CSandBoxPtr& pBox)
connect(pFileBrowserWindow, &CFileBrowserWindow::Closed, [this, pBox]() { connect(pFileBrowserWindow, &CFileBrowserWindow::Closed, [this, pBox]() {
FileBrowserWindows.remove(pBox.data()); FileBrowserWindows.remove(pBox.data());
}); });
SafeShow(pFileBrowserWindow); CSandMan::SafeShow(pFileBrowserWindow);
} }
else { else {
pFileBrowserWindow->setWindowState((pFileBrowserWindow->windowState() & ~Qt::WindowMinimized) | Qt::WindowActive); pFileBrowserWindow->setWindowState((pFileBrowserWindow->windowState() & ~Qt::WindowMinimized) | Qt::WindowActive);

View File

@ -105,15 +105,13 @@ protected:
}; };
QMap<quint32, SProgInfo>m_PidMap; QMap<quint32, SProgInfo>m_PidMap;
bool m_FullRefresh;
quint64 m_LastID; quint64 m_LastID;
int m_LastCount; int m_LastCount;
bool m_bUpdatePending; bool m_bUpdatePending;
QVector<CTraceEntryPtr> m_TraceList; QVector<CTraceEntryPtr> m_TraceList;
QMap<QString, CMonitorEntryPtr> m_MonitorMap; QMap<QString, CMonitorEntryPtr> m_MonitorMap;
protected:
bool m_FullRefresh;
quint32 m_FilterPid; quint32 m_FilterPid;
quint32 m_FilterTid; quint32 m_FilterTid;
QList<quint32> m_FilterTypes; QList<quint32> m_FilterTypes;

View File

@ -1080,7 +1080,7 @@ void COptionsWindow::showTab(const QString& Name)
else else
m_pStack->setCurrentWidget(pWidget); m_pStack->setCurrentWidget(pWidget);
SafeShow(this); CSandMan::SafeShow(this);
} }
void COptionsWindow::SetProgramItem(QString Program, QTreeWidgetItem* pItem, int Column, const QString& Suffix, bool bList) void COptionsWindow::SetProgramItem(QString Program, QTreeWidgetItem* pItem, int Column, const QString& Suffix, bool bList)

View File

@ -104,7 +104,7 @@ void CPopUpWindow::Show()
this->move(scrRect.width() - 600 - 20, scrRect.height() - 200 - 50); this->move(scrRect.width() - 600 - 20, scrRect.height() - 200 - 50);
} }
SafeShow(this); CSandMan::SafeShow(this);
} }
void CPopUpWindow::Poke() void CPopUpWindow::Poke()

View File

@ -160,7 +160,7 @@ int CRecoveryWindow::exec()
{ {
//QDialog::setWindowModality(Qt::WindowModal); //QDialog::setWindowModality(Qt::WindowModal);
ui.btnDeleteAll->setVisible(true); ui.btnDeleteAll->setVisible(true);
SafeShow(this); CSandMan::SafeShow(this);
return QDialog::exec(); return QDialog::exec();
} }

View File

@ -362,6 +362,8 @@ CSettingsWindow::CSettingsWindow(QWidget* parent)
connect(ui.cmbFontScale, SIGNAL(currentIndexChanged(int)), this, SLOT(OnChangeGUI())); connect(ui.cmbFontScale, SIGNAL(currentIndexChanged(int)), this, SLOT(OnChangeGUI()));
connect(ui.cmbFontScale, SIGNAL(currentTextChanged(const QString&)), this, SLOT(OnChangeGUI())); connect(ui.cmbFontScale, SIGNAL(currentTextChanged(const QString&)), this, SLOT(OnChangeGUI()));
connect(ui.chkHide, SIGNAL(stateChanged(int)), this, SLOT(OnOptChanged()));
connect(ui.txtEditor, SIGNAL(textChanged(const QString&)), this, SLOT(OnOptChanged())); connect(ui.txtEditor, SIGNAL(textChanged(const QString&)), this, SLOT(OnOptChanged()));
m_bRebuildUI = false; m_bRebuildUI = false;
@ -680,7 +682,7 @@ void CSettingsWindow::showTab(const QString& Name, bool bExclusive)
} }
} }
SafeShow(this); CSandMan::SafeShow(this);
} }
void CSettingsWindow::closeEvent(QCloseEvent *e) void CSettingsWindow::closeEvent(QCloseEvent *e)
@ -905,6 +907,8 @@ void CSettingsWindow::LoadSettings()
//ui.cmbFontScale->setCurrentIndex(ui.cmbFontScale->findData(theConf->GetInt("Options/FontScaling", 100))); //ui.cmbFontScale->setCurrentIndex(ui.cmbFontScale->findData(theConf->GetInt("Options/FontScaling", 100)));
ui.cmbFontScale->setCurrentText(QString::number(theConf->GetInt("Options/FontScaling", 100))); ui.cmbFontScale->setCurrentText(QString::number(theConf->GetInt("Options/FontScaling", 100)));
ui.chkHide->setChecked(theConf->GetBool("Options/CoverWindows", false));
ui.txtEditor->setText(theConf->GetString("Options/Editor", "notepad.exe")); ui.txtEditor->setText(theConf->GetString("Options/Editor", "notepad.exe"));
@ -1552,6 +1556,8 @@ void CSettingsWindow::SaveSettings()
else if (Scaling > 500) else if (Scaling > 500)
Scaling = 500; Scaling = 500;
theConf->SetValue("Options/FontScaling", Scaling); theConf->SetValue("Options/FontScaling", Scaling);
theConf->SetValue("Options/CoverWindows", ui.chkHide->isChecked());
theConf->SetValue("Options/Editor", ui.txtEditor->text()); theConf->SetValue("Options/Editor", ui.txtEditor->text());