summaryrefslogtreecommitdiff
path: root/plugins/NewStory/src/history_menus.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2023-11-21 19:24:23 +0300
committerGeorge Hazan <george.hazan@gmail.com>2023-11-21 19:24:23 +0300
commit0af92c332862c3d326384967f4b306b1f296d23e (patch)
treea2c520ca67c1fa342198a4b69ca4d7a1ef3fe133 /plugins/NewStory/src/history_menus.cpp
parenta4c4e3fc08395be5fc83b6f36fc1be07dbe5b245 (diff)
fixes #3944 (NewStory: добавить для скачанного облачного файла пункт меню "Показать в папке")
Diffstat (limited to 'plugins/NewStory/src/history_menus.cpp')
-rw-r--r--plugins/NewStory/src/history_menus.cpp18
1 files changed, 14 insertions, 4 deletions
diff --git a/plugins/NewStory/src/history_menus.cpp b/plugins/NewStory/src/history_menus.cpp
index 2fd82c16e7..e520ee636b 100644
--- a/plugins/NewStory/src/history_menus.cpp
+++ b/plugins/NewStory/src/history_menus.cpp
@@ -20,7 +20,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
enum
{
- MENU_COPY, MENU_COPYTEXT, MENU_COPYURL, MENU_QUOTE,
+ MENU_COPY, MENU_COPYTEXT, MENU_COPYURL, MENU_OPENFOLDER, MENU_QUOTE,
MENU_SAVEAS, MENU_DOWNLOAD,
MENU_EDIT, MENU_DELETE,
MENU_SELECTALL, MENU_BOOKMARK,
@@ -28,7 +28,7 @@ enum
static int hMenuObject;
static HANDLE hEventPreBuildMenu;
-static HGENMENU hmiHistory, hmiCopy, hmiCopyUrl, hmiSaveAs, hmiDownload, hmiQuote;
+static HGENMENU hmiHistory, hmiOpenFolder, hmiCopyUrl, hmiSaveAs, hmiDownload, hmiQuote;
static HGENMENU hmiEdit, hmiBookmark, hmiDelete;
HMENU NSMenu_Build(NewstoryListData *data, ItemData *item)
@@ -37,6 +37,7 @@ HMENU NSMenu_Build(NewstoryListData *data, ItemData *item)
Menu_ShowItem(hmiSaveAs, false);
Menu_ShowItem(hmiCopyUrl, false);
Menu_ShowItem(hmiDownload, false);
+ Menu_ShowItem(hmiOpenFolder, false);
bool bShowEventActions;
if (item != nullptr) {
@@ -45,6 +46,7 @@ HMENU NSMenu_Build(NewstoryListData *data, ItemData *item)
Menu_ShowItem(hmiCopyUrl, true);
Menu_ShowItem(hmiSaveAs, true);
Menu_ShowItem(hmiDownload, !item->m_bOfflineDownloaded);
+ Menu_ShowItem(hmiOpenFolder, item->m_bOfflineDownloaded);
}
bShowEventActions = item->hEvent != 0;
@@ -99,6 +101,10 @@ static INT_PTR NSMenuHelper(WPARAM wParam, LPARAM lParam)
pData->CopyUrl();
break;
+ case MENU_OPENFOLDER:
+ pData->OpenFolder();
+ break;
+
case MENU_QUOTE:
pData->Quote();
break;
@@ -218,17 +224,21 @@ void InitMenus()
mi.position = 100000;
mi.name.a = LPGEN("Copy");
- hmiCopy = Menu_AddNewStoryMenuItem(&mi, MENU_COPY);
+ Menu_AddNewStoryMenuItem(&mi, MENU_COPY);
mi.position++;
mi.name.a = LPGEN("Copy text");
- hmiCopy = Menu_AddNewStoryMenuItem(&mi, MENU_COPYTEXT);
+ Menu_AddNewStoryMenuItem(&mi, MENU_COPYTEXT);
mi.position++;
mi.name.a = LPGEN("Copy URL");
hmiCopyUrl = Menu_AddNewStoryMenuItem(&mi, MENU_COPYURL);
mi.position++;
+ mi.name.a = LPGEN("Show in folder");
+ hmiOpenFolder = Menu_AddNewStoryMenuItem(&mi, MENU_OPENFOLDER);
+
+ mi.position++;
mi.name.a = LPGEN("Quote");
hmiQuote = Menu_AddNewStoryMenuItem(&mi, MENU_QUOTE);