From b0eec8dbfd0b5fe70102e4b61a97a1e01057d4e1 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 30 Nov 2023 18:23:03 +0300 Subject: =?UTF-8?q?fixes=20#3978=20(NewStory:=20=D0=BF=D0=BE=D0=BA=D0=B0?= =?UTF-8?q?=D0=B7=D1=8B=D0=B2=D0=B0=D1=82=D1=8C=20=D0=BF=D1=83=D0=BD=D0=BA?= =?UTF-8?q?=D1=82=20"=D0=B8=D0=B7=D0=BC=D0=B5=D0=BD=D0=B8=D1=82=D1=8C=20?= =?UTF-8?q?=D1=80=D0=B5=D0=BF=D0=BB=D0=B8=D0=BA=D1=83"=20=D1=82=D0=BE?= =?UTF-8?q?=D0=BB=D1=8C=D0=BA=D0=BE=20=D0=B4=D0=BB=D1=8F=20=D1=81=D0=B2?= =?UTF-8?q?=D0=BE=D0=B8=D1=85=20=D1=81=D0=BE=D0=BE=D0=B1=D1=89=D0=B5=D0=BD?= =?UTF-8?q?=D0=B8=D0=B9)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/NewStory/src/history_menus.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'plugins') diff --git a/plugins/NewStory/src/history_menus.cpp b/plugins/NewStory/src/history_menus.cpp index 607525a4db..4e6f67d1c4 100644 --- a/plugins/NewStory/src/history_menus.cpp +++ b/plugins/NewStory/src/history_menus.cpp @@ -47,7 +47,7 @@ HMENU NSMenu_Build(NewstoryListData *data, ItemData *item) Menu_ShowItem(hmiDownload, false); Menu_ShowItem(hmiOpenFolder, false); - bool bShowEventActions; + bool bShowEventActions, bEditable; if (item != nullptr) { if (item->m_bOfflineFile) { Menu_ModifyItem(hmiCopyUrl, (item->m_bOfflineDownloaded) ? TranslateT("Copy file path") : TranslateT("Copy URL")); @@ -57,20 +57,21 @@ HMENU NSMenu_Build(NewstoryListData *data, ItemData *item) Menu_ShowItem(hmiOpenFolder, item->m_bOfflineDownloaded); } + bEditable = (item->dbe.flags & DBEF_SENT) != 0; bShowEventActions = item->hEvent != 0; DB::EventInfo dbei(item->hEvent); NotifyEventHooks(hEventPreBuildMenu, item->hContact, (LPARAM)&dbei); } else { - bShowEventActions = false; + bShowEventActions = bEditable = false; DB::EventInfo dbei; NotifyEventHooks(hEventPreBuildMenu, 0, (LPARAM)&dbei); } - Menu_ShowItem(hmiEdit, bShowEventActions); - Menu_ShowItem(hmiDelete, bShowEventActions); + Menu_ShowItem(hmiEdit, bShowEventActions && bEditable); + Menu_ShowItem(hmiDelete, bShowEventActions && bEditable); Menu_ShowItem(hmiBookmark, bShowEventActions); HMENU hMenu = CreatePopupMenu(); -- cgit v1.2.3