mirror of
https://github.com/rizonesoft/Notepad3.git
synced 2026-06-14 21:09:05 +08:00
+ chg: replace "save modified file warning" by (silent) custom messagebox if message beeps are muted.
+ add: infos of sreen/display for "Copy Version Info" button
This commit is contained in:
parent
af1f960532
commit
2470432a08
@ -1 +1 @@
|
||||
2701
|
||||
2702
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
<assemblyIdentity
|
||||
name="Notepad3"
|
||||
processorArchitecture="*"
|
||||
version="5.20.110.2701"
|
||||
version="5.20.110.2702"
|
||||
type="win32"
|
||||
/>
|
||||
<description>Notepad3 BETA</description>
|
||||
|
||||
@ -884,6 +884,12 @@ INT_PTR CALLBACK AboutDlgProc(HWND hwnd, UINT umsg, WPARAM wParam, LPARAM lParam
|
||||
WCHAR wchBuf2[128] = { L'\0' };
|
||||
WCHAR wchVerInfo[2048] = { L'\0' };
|
||||
|
||||
int ResX, ResY;
|
||||
GetCurrentMonitorResolution(Globals.hwndMain, &ResX, &ResY);
|
||||
DPI_T const wndDPI = GetCurrentDPI(Globals.hwndMain);
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
StringCchCopy(wchVerInfo, COUNTOF(wchVerInfo), _W(_STRG(VERSION_FILEVERSION_LONG)));
|
||||
StringCchCat(wchVerInfo, COUNTOF(wchVerInfo), L"\n" VERSION_COMPILER);
|
||||
|
||||
@ -899,16 +905,29 @@ INT_PTR CALLBACK AboutDlgProc(HWND hwnd, UINT umsg, WPARAM wParam, LPARAM lParam
|
||||
break;
|
||||
}
|
||||
}
|
||||
StringCchPrintf(wchBuf2, ARRAYSIZE(wchBuf2), L"\nLocale: %s (Codepage: '%s')",
|
||||
StringCchPrintf(wchBuf2, ARRAYSIZE(wchBuf2), L"\nLocale: %s (CP:'%s')",
|
||||
wchBuf, g_Encodings[CPI_ANSI_DEFAULT].wchLabel);
|
||||
StringCchCat(wchVerInfo, COUNTOF(wchVerInfo), wchBuf2);
|
||||
|
||||
StringCchCat(wchVerInfo, COUNTOF(wchVerInfo), L"\n" VERSION_SCIVERSION);
|
||||
StringCchCat(wchVerInfo, COUNTOF(wchVerInfo), L"\n" VERSION_ONIGURUMA);
|
||||
StringCchCat(wchVerInfo, COUNTOF(wchVerInfo), L"\n" VERSION_UCHARDET);
|
||||
StringCchCat(wchVerInfo, COUNTOF(wchVerInfo), L"\n" VERSION_TINYEXPR);
|
||||
StringCchCat(wchVerInfo, COUNTOF(wchVerInfo), L"\n" VERSION_UTHASH);
|
||||
StringCchCat(wchVerInfo, COUNTOF(wchVerInfo), (IsProcessElevated() ?
|
||||
//StringCchCat(wchVerInfo, COUNTOF(wchVerInfo), L"\n" VERSION_UCHARDET);
|
||||
//StringCchCat(wchVerInfo, COUNTOF(wchVerInfo), L"\n" VERSION_TINYEXPR);
|
||||
//StringCchCat(wchVerInfo, COUNTOF(wchVerInfo), L"\n" VERSION_UTHASH);
|
||||
|
||||
StringCchPrintf(wchBuf, COUNTOF(wchBuf), L"\nScreen-Resolution = %i x %i [pix].", ResX, ResY);
|
||||
StringCchCat(wchVerInfo, COUNTOF(wchVerInfo), wchBuf);
|
||||
|
||||
StringCchPrintf(wchBuf, COUNTOF(wchBuf), L"\nDisplay-DPI = %i x %i (Scale: %i%%).", wndDPI.x, wndDPI.y, ScaleIntToCurrentDPI(100));
|
||||
StringCchCat(wchVerInfo, COUNTOF(wchVerInfo), wchBuf);
|
||||
|
||||
StringCchPrintf(wchBuf, COUNTOF(wchBuf), L"\nRendering-Technology = %s.", Settings.RenderingTechnology ? L"DIRECT-WRITE" : L"GDI");
|
||||
StringCchCat(wchVerInfo, COUNTOF(wchVerInfo), wchBuf);
|
||||
|
||||
StringCchPrintf(wchBuf, COUNTOF(wchBuf), L"\nZoom = %i%%.", SciCall_GetZoom());
|
||||
StringCchCat(wchVerInfo, COUNTOF(wchVerInfo), wchBuf);
|
||||
|
||||
StringCchCat(wchVerInfo, COUNTOF(wchVerInfo), (IsProcessElevated() ?
|
||||
L"\nProcess is elevated." :
|
||||
L"\nProcess is not elevated."));
|
||||
StringCchCat(wchVerInfo, COUNTOF(wchVerInfo), (IsUserInAdminGroup() ?
|
||||
@ -917,6 +936,8 @@ INT_PTR CALLBACK AboutDlgProc(HWND hwnd, UINT umsg, WPARAM wParam, LPARAM lParam
|
||||
|
||||
StringCchCat(wchVerInfo, COUNTOF(wchVerInfo), L"\n");
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
SetClipboardTextW(Globals.hwndMain, wchVerInfo, StringCchLen(wchVerInfo,0));
|
||||
}
|
||||
break;
|
||||
|
||||
@ -394,7 +394,7 @@ if (!bSucceed) {
|
||||
//=============================================================================
|
||||
//
|
||||
// GetSystemMetricsEx()
|
||||
// get system metrix for current DPI
|
||||
// get system metric for current DPI
|
||||
// https://docs.microsoft.com/de-de/windows/desktop/api/winuser/nf-winuser-getsystemmetricsfordpi
|
||||
//
|
||||
int GetSystemMetricsEx(int nValue) {
|
||||
|
||||
@ -10071,13 +10071,17 @@ bool FileSave(bool bSaveAlways, bool bAsk, bool bSaveAs, bool bSaveCopy, bool bP
|
||||
WCHAR tch[MAX_PATH] = { L'\0' };
|
||||
if (StrIsNotEmpty(Globals.CurrentFile)) {
|
||||
StringCchCopy(tch, COUNTOF(tch), PathFindFileName(Globals.CurrentFile));
|
||||
if (Settings.MuteMessageBeep) { PathStripPath(tch); } // need shorter string for custom msgbox
|
||||
}
|
||||
else {
|
||||
GetLngString(IDS_MUI_UNTITLED, tch, COUNTOF(tch));
|
||||
}
|
||||
|
||||
INT_PTR const btn = Settings.MuteMessageBeep ?
|
||||
InfoBoxLng(MB_YESNOCANCEL | MB_ICONWARNING, NULL, IDS_MUI_ASK_SAVE, tch) :
|
||||
MessageBoxLng(Globals.hwndMain, MB_YESNOCANCEL | MB_ICONWARNING, IDS_MUI_ASK_SAVE, tch);
|
||||
|
||||
switch (MessageBoxLng(Globals.hwndMain, MB_YESNOCANCEL | MB_ICONWARNING, IDS_MUI_ASK_SAVE, tch))
|
||||
switch (btn)
|
||||
{
|
||||
case IDCANCEL:
|
||||
return false;
|
||||
@ -10117,8 +10121,9 @@ bool FileSave(bool bSaveAlways, bool bAsk, bool bSaveAs, bool bSaveCopy, bool bP
|
||||
StringCchCopy(tchFile, COUNTOF(tchFile), s_tchLastSaveCopyDir);
|
||||
PathCchAppend(tchFile, COUNTOF(tchFile), PathFindFileName(Globals.CurrentFile));
|
||||
}
|
||||
else
|
||||
else {
|
||||
StringCchCopy(tchFile, COUNTOF(tchFile), Globals.CurrentFile);
|
||||
}
|
||||
|
||||
if (SaveFileDlg(Globals.hwndMain, tchFile, COUNTOF(tchFile), tchInitialDir))
|
||||
{
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
#define VERSION_MAJOR 5
|
||||
#define VERSION_MINOR 20
|
||||
#define VERSION_REV 110
|
||||
#define VERSION_BUILD 2701
|
||||
#define VERSION_BUILD 2702
|
||||
#define SCINTILLA_VER 423
|
||||
#define ONIGURUMA_REGEX_VER 6.9.4
|
||||
#define UCHARDET_VER 2018.09.27
|
||||
|
||||
Loading…
Reference in New Issue
Block a user