From 331a65ffc21684134006d40459129024e9c0910b Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 13 Jul 2020 12:00:06 +0300 Subject: =?UTF-8?q?fixes=20#2484=20(rtf=20control:=20=D0=BE=D0=B3=D1=80?= =?UTF-8?q?=D0=B0=D0=BD=D0=B8=D1=87=D0=B8=D1=82=D1=8C=20=D1=88=D0=B8=D1=80?= =?UTF-8?q?=D0=B8=D0=BD=D1=83=20=D0=BC=D0=B5=D0=BD=D1=8E=20=D1=80=D0=B0?= =?UTF-8?q?=D0=B7=D1=83=D0=BC=D0=BD=D1=8B=D0=BC=20=D0=B7=D0=BD=D0=B0=D1=87?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D0=B5=D0=BC)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/mir_app/src/srmm_log_rtf.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/mir_app/src/srmm_log_rtf.cpp b/src/mir_app/src/srmm_log_rtf.cpp index a5132a9af0..d54800df29 100644 --- a/src/mir_app/src/srmm_log_rtf.cpp +++ b/src/mir_app/src/srmm_log_rtf.cpp @@ -322,9 +322,12 @@ INT_PTR CRtfLogWindow::WndProc(UINT msg, WPARAM wParam, LPARAM lParam) EnableMenuItem(hSubMenu, 2, flags); if (pszWord && pszWord[0]) { - wchar_t szMenuText[4096]; - mir_snwprintf(szMenuText, TranslateT("Look up '%s':"), pszWord); - ModifyMenu(hSubMenu, 4, MF_STRING | MF_BYPOSITION, 4, szMenuText); + CMStringW wszText(FORMAT, TranslateT("Look up '%s':"), pszWord); + if (wszText.GetLength() > 30) { + wszText.Truncate(30); + wszText.AppendChar('\''); + } + ModifyMenu(hSubMenu, 4, MF_STRING | MF_BYPOSITION, 4, wszText); } else ModifyMenu(hSubMenu, 4, MF_STRING | MF_GRAYED | MF_BYPOSITION, 4, TranslateT("No word to look up")); -- cgit v1.2.3