mirror of
https://github.com/notepad-plus-plus/notepad-plus-plus.git
synced 2025-07-27 07:44:24 +02:00
Add asNotepad.xml status to Debug Info
Also make debug info readable again. Fix #16795
This commit is contained in:
parent
22c5063d26
commit
fe3f609361
@ -1399,16 +1399,16 @@ BEGIN
|
||||
EDITTEXT IDC_LICENCE_EDIT,30,93,210,117,ES_MULTILINE | ES_AUTOVSCROLL | ES_READONLY | NOT WS_BORDER
|
||||
END
|
||||
|
||||
IDD_DEBUGINFOBOX DIALOGEX 0, 0, 246, 195
|
||||
IDD_DEBUGINFOBOX DIALOGEX 0, 0, 300, 195
|
||||
STYLE DS_SETFONT | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
EXSTYLE WS_EX_DLGMODALFRAME | WS_EX_WINDOWEDGE
|
||||
CAPTION "Debug Info"
|
||||
FONT 8, L"MS Shell Dlg", 0, 0, 0x1
|
||||
BEGIN
|
||||
GROUPBOX "",IDC_STATIC,8,3,230,151,BS_CENTER
|
||||
EDITTEXT IDC_DEBUGINFO_EDIT,18,16,210,128,ES_MULTILINE | ES_AUTOVSCROLL | ES_READONLY | NOT WS_BORDER | WS_VSCROLL
|
||||
GROUPBOX "",IDC_STATIC,8,3,284,151,BS_CENTER
|
||||
EDITTEXT IDC_DEBUGINFO_EDIT,18,16,264,128,ES_MULTILINE | ES_AUTOVSCROLL | ES_READONLY | NOT WS_BORDER | WS_VSCROLL
|
||||
PUSHBUTTON "&Copy debug info to clipboard",IDC_DEBUGINFO_COPYLINK,8,157,126,14
|
||||
DEFPUSHBUTTON "OK",IDOK,98,175,50,14
|
||||
DEFPUSHBUTTON "OK",IDOK,125,175,50,14
|
||||
END
|
||||
|
||||
IDD_DOSAVEORNOTBOX DIALOGEX 0, 0, 312, 80
|
||||
|
@ -1910,6 +1910,7 @@ public:
|
||||
ColumnEditorParam _columnEditParam;
|
||||
unsigned long getScintillaModEventMask() const { return _sintillaModEventMask; };
|
||||
void addScintillaModEventMask(unsigned long mask2Add) { _sintillaModEventMask |= mask2Add; };
|
||||
bool isAsNotepadStyle() const { return _asNotepadStyle; }
|
||||
|
||||
private:
|
||||
NppParameters();
|
||||
|
@ -35,7 +35,7 @@ using namespace std;
|
||||
// local DebugInfo helper
|
||||
void AppendDisplayAdaptersInfo(wstring& strOut, const unsigned int maxAdaptersIn)
|
||||
{
|
||||
strOut += L"\n installed Display Class adapters: ";
|
||||
strOut += L"\r\n installed Display Class adapters: ";
|
||||
|
||||
const wchar_t wszRegDisplayClassWinNT[] = L"SYSTEM\\CurrentControlSet\\Control\\Class\\{4D36E968-E325-11CE-BFC1-08002BE10318}";
|
||||
HKEY hkDisplayClass = nullptr;
|
||||
@ -43,7 +43,7 @@ void AppendDisplayAdaptersInfo(wstring& strOut, const unsigned int maxAdaptersIn
|
||||
KEY_ENUMERATE_SUB_KEYS | KEY_QUERY_VALUE, &hkDisplayClass);
|
||||
if ((lStatus != ERROR_SUCCESS) || !hkDisplayClass)
|
||||
{
|
||||
strOut += L"\n - error, failed to open the Registry Display Class key!";
|
||||
strOut += L"\r\n - error, failed to open the Registry Display Class key!";
|
||||
return;
|
||||
}
|
||||
|
||||
@ -57,7 +57,7 @@ void AppendDisplayAdaptersInfo(wstring& strOut, const unsigned int maxAdaptersIn
|
||||
{
|
||||
if (dwAdapterSubkeysFound >= maxAdaptersIn)
|
||||
{
|
||||
strOut += L"\n - warning, search has been limited to maximum number of adapter records: "
|
||||
strOut += L"\r\n - warning, search has been limited to maximum number of adapter records: "
|
||||
+ std::to_wstring(maxAdaptersIn);
|
||||
break;
|
||||
}
|
||||
@ -69,7 +69,7 @@ void AppendDisplayAdaptersInfo(wstring& strOut, const unsigned int maxAdaptersIn
|
||||
lStatus = ::RegOpenKeyExW(HKEY_LOCAL_MACHINE, strAdapterSubKey.c_str(), 0, KEY_READ, &hkAdapterSubKey);
|
||||
if ((lStatus == ERROR_SUCCESS) && hkAdapterSubKey)
|
||||
{
|
||||
strAdapterNo.insert(0, L"\n "); // doubling the output indentation
|
||||
strAdapterNo.insert(0, L"\r\n "); // doubling the output indentation
|
||||
const unsigned int nKeyValMaxLen = 127;
|
||||
const DWORD dwKeyValMaxSize = nKeyValMaxLen * sizeof(wchar_t);
|
||||
wchar_t wszKeyVal[nKeyValMaxLen + 1]{}; // +1 ... to ensure NUL termination
|
||||
@ -235,7 +235,6 @@ void AboutDlg::doDialog()
|
||||
goToCenter(SWP_SHOWWINDOW | SWP_NOSIZE);
|
||||
}
|
||||
|
||||
|
||||
intptr_t CALLBACK DebugInfoDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
switch (message)
|
||||
@ -374,6 +373,11 @@ intptr_t CALLBACK DebugInfoDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM
|
||||
}
|
||||
_debugInfoStr += L"\r\n";
|
||||
|
||||
// asNotepad
|
||||
_debugInfoStr += L"asNotepad: ";
|
||||
_debugInfoStr += nppParam.isAsNotepadStyle() ? L"ON" : L"OFF";
|
||||
_debugInfoStr += L"\r\n";
|
||||
|
||||
// File Status Auto-Detection
|
||||
_debugInfoStr += L"File Status Auto-Detection: ";
|
||||
if (nppGui._fileAutoDetection == cdDisabled)
|
||||
@ -407,13 +411,13 @@ intptr_t CALLBACK DebugInfoDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM
|
||||
HDC hdc = ::GetDC(nullptr); // desktop DC
|
||||
if (hdc)
|
||||
{
|
||||
_debugInfoStr += L"\n primary monitor: " + std::to_wstring(::GetDeviceCaps(hdc, HORZRES));
|
||||
_debugInfoStr += L"\r\n primary monitor: " + std::to_wstring(::GetDeviceCaps(hdc, HORZRES));
|
||||
_debugInfoStr += L"x" + std::to_wstring(::GetDeviceCaps(hdc, VERTRES));
|
||||
_debugInfoStr += L", scaling " + std::to_wstring(::GetDeviceCaps(hdc, LOGPIXELSX) * 100 / 96);
|
||||
_debugInfoStr += L"%";
|
||||
::ReleaseDC(nullptr, hdc);
|
||||
}
|
||||
_debugInfoStr += L"\n visible monitors count: " + std::to_wstring(::GetSystemMetrics(SM_CMONITORS));
|
||||
_debugInfoStr += L"\r\n visible monitors count: " + std::to_wstring(::GetSystemMetrics(SM_CMONITORS));
|
||||
AppendDisplayAdaptersInfo(_debugInfoStr, 4); // survey up to 4 potential graphics card Registry records
|
||||
}
|
||||
_debugInfoStr += L"\r\n";
|
||||
|
Loading…
x
Reference in New Issue
Block a user