From 07feb451bf28c855a383b395d1d27eb6e2558b66 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 10 Dec 2023 18:52:02 +0300 Subject: =?UTF-8?q?fixes=20#4039=20(NewStory:=20Forward=20=D0=B8=D0=B7=20?= =?UTF-8?q?=D1=87=D0=B0=D1=82=D0=B0=20=D1=81=20=D0=BF=D1=83=D1=81=D1=82?= =?UTF-8?q?=D1=8B=D0=BC=20=D0=B6=D1=83=D1=80=D0=BD=D0=B0=D0=BB=D0=BE=D0=BC?= =?UTF-8?q?=20=D0=BF=D1=80=D0=B8=D0=B2=D0=BE=D0=B4=D0=B8=D1=82=20=D0=BA=20?= =?UTF-8?q?=D0=BF=D0=B0=D0=B4=D0=B5=D0=BD=D0=B8=D1=8E)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- protocols/VKontakte/src/vk_proto.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'protocols/VKontakte/src') diff --git a/protocols/VKontakte/src/vk_proto.cpp b/protocols/VKontakte/src/vk_proto.cpp index ca6df00340..372e8690a8 100644 --- a/protocols/VKontakte/src/vk_proto.cpp +++ b/protocols/VKontakte/src/vk_proto.cpp @@ -415,9 +415,10 @@ int CVkProto::OnPreBuildContactMenu(WPARAM hContact, LPARAM) return 0; } -int CVkProto::OnPrebuildNSMenu(WPARAM, LPARAM) +int CVkProto::OnPrebuildNSMenu(WPARAM hContact, LPARAM lParam) { - Menu_ShowItem(m_hNewStoryMenuItems[NSMI_FORWARD], true); + auto &dbei = *(DB::EventInfo *)lParam; + Menu_ShowItem(m_hNewStoryMenuItems[NSMI_FORWARD], hContact != 0 && dbei); return 0; } @@ -431,6 +432,9 @@ INT_PTR CVkProto::SvcNSExecMenu(WPARAM iCommand, LPARAM pHandle) case NSMI_FORWARD: { std::vector vIds = NS_GetSelection(HANDLE(pHandle)); + if (vIds.empty()) + break; + wchar_t wszMsg[2048] = L""; if (auto *pDlg = NS_GetSrmm((HANDLE)pHandle)) GetWindowText(pDlg->GetInput(), wszMsg, 2048); -- cgit v1.2.3