From 2ea7cc593310c5d5a795050ba251903141de7942 Mon Sep 17 00:00:00 2001 From: Rainer Kottenhoff Date: Mon, 17 Aug 2020 07:47:34 +0200 Subject: [PATCH] + fix: reload language resource for about-box on init (maybe language changed) --- src/Dialogs.c | 60 +++++++++++++++++++++++++-------------------------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/src/Dialogs.c b/src/Dialogs.c index 42e79b077..3c1b4fc86 100644 --- a/src/Dialogs.c +++ b/src/Dialogs.c @@ -731,36 +731,36 @@ INT_PTR CALLBACK AboutDlgProc(HWND hwnd, UINT umsg, WPARAM wParam, LPARAM lParam SendDlgItemMessage(hwnd, IDC_RICHEDITABOUT, EM_SETEVENTMASK, 0, (LPARAM)(ENM_LINK)); // link click - if (StrIsEmptyA(pAboutResource)) { - char pAboutRes[4096]; - StringCchCopyA(pAboutResource, COUNTOF(pAboutResource), ""); - GetLngStringA(IDS_MUI_ABOUT_RTF_0, pAboutRes, COUNTOF(pAboutRes)); - StringCchCatA(pAboutResource, COUNTOF(pAboutResource), pAboutRes); - GetLngStringA(IDS_MUI_ABOUT_DEV, pAboutRes, COUNTOF(pAboutRes)); - StringCchCatA(pAboutResource, COUNTOF(pAboutResource), pAboutRes); - GetLngStringA(IDS_MUI_ABOUT_RTF_1, pAboutRes, COUNTOF(pAboutRes)); - StringCchCatA(pAboutResource, COUNTOF(pAboutResource), pAboutRes); - GetLngStringA(IDS_MUI_ABOUT_CONTRIBS, pAboutRes, COUNTOF(pAboutRes)); - StringCchCatA(pAboutResource, COUNTOF(pAboutResource), pAboutRes); - GetLngStringA(IDS_MUI_ABOUT_RTF_2, pAboutRes, COUNTOF(pAboutRes)); - StringCchCatA(pAboutResource, COUNTOF(pAboutResource), pAboutRes); - GetLngStringA(IDS_MUI_ABOUT_LIBS, pAboutRes, COUNTOF(pAboutRes)); - StringCchCatA(pAboutResource, COUNTOF(pAboutResource), pAboutRes); - GetLngStringA(IDS_MUI_ABOUT_RTF_3, pAboutRes, COUNTOF(pAboutRes)); - StringCchCatA(pAboutResource, COUNTOF(pAboutResource), pAboutRes); - GetLngStringA(IDS_MUI_ABOUT_ACKNOWLEDGES, pAboutRes, COUNTOF(pAboutRes)); - StringCchCatA(pAboutResource, COUNTOF(pAboutResource), pAboutRes); - GetLngStringA(IDS_MUI_ABOUT_RTF_4, pAboutRes, COUNTOF(pAboutRes)); - StringCchCatA(pAboutResource, COUNTOF(pAboutResource), pAboutRes); - GetLngStringA(IDS_MUI_ABOUT_MORE, pAboutRes, COUNTOF(pAboutRes)); - StringCchCatA(pAboutResource, COUNTOF(pAboutResource), pAboutRes); - GetLngStringA(IDS_MUI_ABOUT_RTF_5, pAboutRes, COUNTOF(pAboutRes)); - StringCchCatA(pAboutResource, COUNTOF(pAboutResource), pAboutRes); - GetLngStringA(IDS_MUI_ABOUT_LICENSES, pAboutRes, COUNTOF(pAboutRes)); - StringCchCatA(pAboutResource, COUNTOF(pAboutResource), pAboutRes); - GetLngStringA(IDS_MUI_ABOUT_RTF_6, pAboutRes, COUNTOF(pAboutRes)); - StringCchCatA(pAboutResource, COUNTOF(pAboutResource), pAboutRes); - } + //~if (StrIsEmptyA(pAboutResource)) { ~ maybe language resource changed, so reload + char pAboutRes[4096]; + StringCchCopyA(pAboutResource, COUNTOF(pAboutResource), ""); + GetLngStringA(IDS_MUI_ABOUT_RTF_0, pAboutRes, COUNTOF(pAboutRes)); + StringCchCatA(pAboutResource, COUNTOF(pAboutResource), pAboutRes); + GetLngStringA(IDS_MUI_ABOUT_DEV, pAboutRes, COUNTOF(pAboutRes)); + StringCchCatA(pAboutResource, COUNTOF(pAboutResource), pAboutRes); + GetLngStringA(IDS_MUI_ABOUT_RTF_1, pAboutRes, COUNTOF(pAboutRes)); + StringCchCatA(pAboutResource, COUNTOF(pAboutResource), pAboutRes); + GetLngStringA(IDS_MUI_ABOUT_CONTRIBS, pAboutRes, COUNTOF(pAboutRes)); + StringCchCatA(pAboutResource, COUNTOF(pAboutResource), pAboutRes); + GetLngStringA(IDS_MUI_ABOUT_RTF_2, pAboutRes, COUNTOF(pAboutRes)); + StringCchCatA(pAboutResource, COUNTOF(pAboutResource), pAboutRes); + GetLngStringA(IDS_MUI_ABOUT_LIBS, pAboutRes, COUNTOF(pAboutRes)); + StringCchCatA(pAboutResource, COUNTOF(pAboutResource), pAboutRes); + GetLngStringA(IDS_MUI_ABOUT_RTF_3, pAboutRes, COUNTOF(pAboutRes)); + StringCchCatA(pAboutResource, COUNTOF(pAboutResource), pAboutRes); + GetLngStringA(IDS_MUI_ABOUT_ACKNOWLEDGES, pAboutRes, COUNTOF(pAboutRes)); + StringCchCatA(pAboutResource, COUNTOF(pAboutResource), pAboutRes); + GetLngStringA(IDS_MUI_ABOUT_RTF_4, pAboutRes, COUNTOF(pAboutRes)); + StringCchCatA(pAboutResource, COUNTOF(pAboutResource), pAboutRes); + GetLngStringA(IDS_MUI_ABOUT_MORE, pAboutRes, COUNTOF(pAboutRes)); + StringCchCatA(pAboutResource, COUNTOF(pAboutResource), pAboutRes); + GetLngStringA(IDS_MUI_ABOUT_RTF_5, pAboutRes, COUNTOF(pAboutRes)); + StringCchCatA(pAboutResource, COUNTOF(pAboutResource), pAboutRes); + GetLngStringA(IDS_MUI_ABOUT_LICENSES, pAboutRes, COUNTOF(pAboutRes)); + StringCchCatA(pAboutResource, COUNTOF(pAboutResource), pAboutRes); + GetLngStringA(IDS_MUI_ABOUT_RTF_6, pAboutRes, COUNTOF(pAboutRes)); + StringCchCatA(pAboutResource, COUNTOF(pAboutResource), pAboutRes); + //~} CenterDlgInParent(hwnd, NULL);