From 76041fa0bb6de7be851cf9ddb274efc0de0b2492 Mon Sep 17 00:00:00 2001 From: Takashi Sawanaka Date: Sun, 26 Sep 2021 09:36:53 +0900 Subject: [PATCH] WInMergeContextMenu.dll: Disable advanced menu due to stability issues --- ShellExtension/Common/WinMergeContextMenu.cpp | 8 +------- ShellExtension/WinMergeContextMenu/dllmain.cpp | 6 +++++- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/ShellExtension/Common/WinMergeContextMenu.cpp b/ShellExtension/Common/WinMergeContextMenu.cpp index 4eb42eb0275..05a39750686 100644 --- a/ShellExtension/Common/WinMergeContextMenu.cpp +++ b/ShellExtension/Common/WinMergeContextMenu.cpp @@ -238,17 +238,13 @@ HRESULT WinMergeContextMenu::InvokeCommand(DWORD verb) if (verb == CMD_COMPARE) { + bCompare = TRUE; switch (m_dwMenuState) { - case MENU_SIMPLE: - bCompare = TRUE; - break; - case MENU_ONESEL_PREV: m_strPaths.resize(2); m_strPaths[1] = m_strPaths[0]; m_strPaths[0] = m_strPreviousPaths[0]; - bCompare = TRUE; // Forget previous selection if (reg.Open(HKEY_CURRENT_USER, f_RegDir) == ERROR_SUCCESS) @@ -263,7 +259,6 @@ HRESULT WinMergeContextMenu::InvokeCommand(DWORD verb) m_strPaths[2] = m_strPaths[0]; m_strPaths[0] = m_strPreviousPaths[0]; m_strPaths[1] = m_strPreviousPaths[1]; - bCompare = TRUE; // Forget previous selection if (reg.Open(HKEY_CURRENT_USER, f_RegDir) == ERROR_SUCCESS) @@ -276,7 +271,6 @@ HRESULT WinMergeContextMenu::InvokeCommand(DWORD verb) case MENU_TWOSEL: case MENU_THREESEL: // "Compare" - compare m_strPaths - bCompare = TRUE; m_strPreviousPaths[0].erase(); m_strPreviousPaths[1].erase(); break; diff --git a/ShellExtension/WinMergeContextMenu/dllmain.cpp b/ShellExtension/WinMergeContextMenu/dllmain.cpp index fbf69fa50e3..a4c169dc8a8 100644 --- a/ShellExtension/WinMergeContextMenu/dllmain.cpp +++ b/ShellExtension/WinMergeContextMenu/dllmain.cpp @@ -300,7 +300,7 @@ class __declspec(uuid("90340779-F37E-468E-9728-A2593498ED32")) WinMergeFileDirEx , WinMergeExplorerCommandBase(&m_contextMenu) { } - const wchar_t* Title() override { return L"WinMerge"; } + const wchar_t* Title() override { return L"&WinMerge"; } const int IconId(_In_opt_ IShellItemArray* selection) override { auto paths = GetPaths(selection); @@ -311,10 +311,14 @@ class __declspec(uuid("90340779-F37E-468E-9728-A2593498ED32")) WinMergeFileDirEx const int Verb() override { return WinMergeContextMenu::CMD_COMPARE; } const EXPCMDFLAGS Flags() override { + // Due to stability issues, the advanced menu is currently disabled. + return ECF_DEFAULT; + /* if ((m_contextMenu.GetContextMenuEnabled() & (WinMergeContextMenu::EXT_ENABLED | WinMergeContextMenu::EXT_ADVANCED)) == (WinMergeContextMenu::EXT_ENABLED | WinMergeContextMenu::EXT_ADVANCED)) return ECF_HASSUBCOMMANDS; else return ECF_DEFAULT; + */ } const EXPCMDSTATE State(_In_opt_ IShellItemArray* selection) override {