Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[pull] master from sandboxie-plus:master #338

Merged
merged 2 commits into from
Dec 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
- fixed BSOD "SYSTEM_SERVICE_EXCEPTION (3b)" when opening a DLL from AlertFolder using x64dbg [#4421](https://github.com/sandboxie-plus/Sandboxie/issues/4421)
- fixed BSoD "CRITICAL_PROCESS_DIED" when terminate all sandboxed programs [#1316](https://github.com/sandboxie-plus/Sandboxie/issues/1316)
- Note: we now terminate boxed processes individually instead of terminating using the job object, unless "TerminateJobObject=y" is set
- fixed Ini Editor Font Selection Not Working After INI Highlighting Feature Added [#4429](https://github.com/sandboxie-plus/Sandboxie/issues/4429)



Expand Down
10 changes: 10 additions & 0 deletions SandboxiePlus/MiscHelpers/Common/CodeEdit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,16 @@ CCodeEdit::CCodeEdit(QSyntaxHighlighter* pHighlighter, QWidget* pParent)
m_pSourceCode->addAction(m_pUnComment);*/
}

void CCodeEdit::SetFont(const QFont& Font)
{
m_pSourceCode->setFont(Font);
}

const QFont& CCodeEdit::GetFont() const
{
return m_pSourceCode->font();
}

#define ADD_HISTORY(list,entry) \
list.removeAll(entry); \
list.prepend(entry); \
Expand Down
2 changes: 2 additions & 0 deletions SandboxiePlus/MiscHelpers/Common/CodeEdit.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ class MISCHELPERS_EXPORT CCodeEdit : public QWidget

void SetCode(const QString& Code) {m_pSourceCode->setPlainText(Code);}
QString GetCode() {return m_pSourceCode->toPlainText();}
void SetFont(const QFont& Font);
const QFont& GetFont() const;

signals:
void textChanged();
Expand Down
8 changes: 5 additions & 3 deletions SandboxiePlus/SandMan/Windows/OptionsWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -684,9 +684,11 @@ void COptionsWindow::ApplyIniEditFont()
{
QFont font; // defaults to application font
auto fontName = theConf->GetString("UIConfig/IniFont", "").trimmed();
if (!fontName.isEmpty()) bool dummy = font.fromString(fontName); // ignore fromString() fail
//ui.txtIniSection->setFont(font);
m_pCodeEdit->setFont(font);
if (!fontName.isEmpty()) {
font.fromString(fontName); // ignore fromString() fail
//ui.txtIniSection->setFont(font);
m_pCodeEdit->SetFont(font);
}
}

void COptionsWindow::OnSetTree()
Expand Down
10 changes: 6 additions & 4 deletions SandboxiePlus/SandMan/Windows/SettingsWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -666,17 +666,19 @@ void CSettingsWindow::ApplyIniEditFont()
{
QFont font; // defaults to application font
auto fontName = theConf->GetString("UIConfig/IniFont", "").trimmed();
if (!fontName.isEmpty()) bool dummy = font.fromString(fontName); // ignore fromString() fail
//ui.txtIniSection->setFont(font);
m_pCodeEdit->setFont(font);
if (!fontName.isEmpty()) {
font.fromString(fontName); // ignore fromString() fail
//ui.txtIniSection->setFont(font);
m_pCodeEdit->SetFont(font);
}
ui.lblIniEditFont->setText(tr("%0, %1 pt").arg(font.family()).arg(font.pointSizeF())); // tr: example: "Calibri, 9.5 pt"
}

void CSettingsWindow::OnSelectIniEditFont()
{
bool ok;
//auto newFont = QFontDialog::getFont(&ok, ui.txtIniSection->font(), this);
auto newFont = QFontDialog::getFont(&ok, m_pCodeEdit->font(), this);
auto newFont = QFontDialog::getFont(&ok, m_pCodeEdit->GetFont(), this);
if (!ok) return;
theConf->SetValue("UIConfig/IniFont", newFont.toString());
ApplyIniEditFont();
Expand Down