diff options
author | George Hazan <george.hazan@gmail.com> | 2023-11-30 18:23:03 +0300 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2023-11-30 18:23:03 +0300 |
commit | b0eec8dbfd0b5fe70102e4b61a97a1e01057d4e1 (patch) | |
tree | 494d8789edd1ecdbf3db69982778f9cd3b5b63e1 /plugins/NewStory/src/history_menus.cpp | |
parent | 14ba52669cf1f87cbf8564ab68ca5859be1bb282 (diff) |
fixes #3978 (NewStory: показывать пункт "изменить реплику" только для своих сообщений)
Diffstat (limited to 'plugins/NewStory/src/history_menus.cpp')
-rw-r--r-- | plugins/NewStory/src/history_menus.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
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(); |