https://git.reactos.org/?p=reactos.git;a=commitdiff;h=00f192fa94068d9ad3ce8…
commit 00f192fa94068d9ad3ce8397864850a04227bea1
Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com>
AuthorDate: Mon Oct 30 15:34:03 2023 +0900
Commit: GitHub <noreply(a)github.com>
CommitDate: Mon Oct 30 15:34:03 2023 +0900
[SHELL32] Improve file properties dialog (#5852)
Based on KRosUser's patches.
- Add missing version strings "Comments" and
"LegalTrademarks".
- Add version strings "PrivateBuild" and
"SpecialBuild" if necessary.
- Trim the version string for pretty display.
CORE-19270, CORE-19114, CORE-19275
---
dll/win32/shell32/dialogs/filedefext.cpp | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/dll/win32/shell32/dialogs/filedefext.cpp
b/dll/win32/shell32/dialogs/filedefext.cpp
index d9f0c0e6aee..03890b20a83 100644
--- a/dll/win32/shell32/dialogs/filedefext.cpp
+++ b/dll/win32/shell32/dialogs/filedefext.cpp
@@ -852,6 +852,14 @@ CFileDefExt::InitVersionPage(HWND hwndDlg)
AddVersionString(hwndDlg, L"OriginalFilename");
AddVersionString(hwndDlg, L"FileVersion");
AddVersionString(hwndDlg, L"ProductVersion");
+ AddVersionString(hwndDlg, L"Comments");
+ AddVersionString(hwndDlg, L"LegalTrademarks");
+
+ if (pInfo && (pInfo->dwFileFlags & VS_FF_PRIVATEBUILD))
+ AddVersionString(hwndDlg, L"PrivateBuild");
+
+ if (pInfo && (pInfo->dwFileFlags & VS_FF_SPECIALBUILD))
+ AddVersionString(hwndDlg, L"SpecialBuild");
/* Attach file version to dialog window */
SetWindowLongPtr(hwndDlg, DWLP_USER, (LONG_PTR)this);
@@ -957,8 +965,11 @@ CFileDefExt::VersionPageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam,
LPARAM lPar
if (pwszData == NULL)
break;
- TRACE("hDlgCtrl %x string %s\n", hDlgCtrl,
debugstr_w(pwszData));
- SetDlgItemTextW(hwndDlg, 14010, pwszData);
+ CString str(pwszData);
+ str.Trim();
+
+ TRACE("hDlgCtrl %x string %s\n", hDlgCtrl, debugstr_w(str));
+ SetDlgItemTextW(hwndDlg, 14010, str);
return TRUE;
}