From 50834bfbc41f63547b0f5114ff8a0f97de28030a Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 23 Aug 2023 19:59:55 +0300 Subject: =?UTF-8?q?fixes=20#3662=20(NewStory:=20=D0=B4=D0=BE=D0=B1=D0=B0?= =?UTF-8?q?=D0=B2=D0=B8=D1=82=D1=8C=20=D1=84=D1=83=D0=BD=D0=BA=D1=86=D0=B8?= =?UTF-8?q?=D1=8E=20"=D0=BA=D0=BE=D0=BF=D0=B8=D1=80=D0=BE=D0=B2=D0=B0?= =?UTF-8?q?=D1=82=D1=8C=20=D1=82=D0=B5=D0=BA=D1=81=D1=82")?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/NewStory/src/history_control.cpp | 12 +++++++++--- plugins/NewStory/src/history_menus.cpp | 10 +++++++++- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/plugins/NewStory/src/history_control.cpp b/plugins/NewStory/src/history_control.cpp index 90feb511e4..7dfc1ae9f3 100644 --- a/plugins/NewStory/src/history_control.cpp +++ b/plugins/NewStory/src/history_control.cpp @@ -785,9 +785,15 @@ LRESULT CALLBACK NewstoryListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM res.Append(L"\r\n"); } else { - ptrW wszText(TplFormatString(p->getCopyTemplate(), p->hContact, p)); - RemoveBbcodes(wszText); - res.Append(wszText); + if (wParam == 0) { + ptrW wszText(TplFormatString(p->getCopyTemplate(), p->hContact, p)); + RemoveBbcodes(wszText); + res.Append(wszText); + } + else { // copy text only + res.Append(p->wtext); + res.Append(L"\r\n"); + } } } diff --git a/plugins/NewStory/src/history_menus.cpp b/plugins/NewStory/src/history_menus.cpp index 5da0cc1070..abc6598282 100644 --- a/plugins/NewStory/src/history_menus.cpp +++ b/plugins/NewStory/src/history_menus.cpp @@ -37,6 +37,10 @@ static INT_PTR NSMenuHelper(WPARAM wParam, LPARAM lParam) SendMessage(pData->hwnd, NSM_COPY, 0, 0); break; + case 8: + SendMessage(pData->hwnd, NSM_COPY, 1, 0); + break; + case 2: pData->BeginEditItem(pData->caret, false); break; @@ -160,10 +164,14 @@ void InitMenus() hmiCopy = Menu_AddNewStoryMenuItem(&mi, 1); mi.position = 100001; + mi.name.a = LPGEN("Copy text"); + hmiCopy = Menu_AddNewStoryMenuItem(&mi, 8); + + mi.position = 100002; mi.name.a = LPGEN("Save as"); hmiSaveAs = Menu_AddNewStoryMenuItem(&mi, 5); - mi.position = 100002; + mi.position = 100003; mi.name.a = LPGEN("Download"); hmiDownload = Menu_AddNewStoryMenuItem(&mi, 6); -- cgit v1.2.3