From f6f2b4544c33474773c9cbba27a476bd2543c5f7 Mon Sep 17 00:00:00 2001 From: sdottaka Date: Sat, 6 Jun 2015 19:06:12 +0900 Subject: [PATCH] PropShell: Remove "Include subfolders by default" checkbox --HG-- branch : stable --- Src/Merge.rc | 2 -- Src/PropShell.cpp | 25 ------------------------- Src/PropShell.h | 2 -- Src/resource.h | 1 - 4 files changed, 30 deletions(-) diff --git a/Src/Merge.rc b/Src/Merge.rc index 992184f28..977cd44ed 100644 --- a/Src/Merge.rc +++ b/Src/Merge.rc @@ -1839,8 +1839,6 @@ BEGIN GROUPBOX "Explorer",IDC_STATIC,7,7,218,80 CONTROL "E&nable advanced menu",IDC_EXPLORER_ADVANCED,"Button", BS_AUTOCHECKBOX | WS_TABSTOP,27,28,190,10 - CONTROL "In&clude subfolders by default",IDC_EXPLORER_SUBFOLDERS, - "Button",BS_AUTOCHECKBOX | WS_TABSTOP,27,38,190,10 CONTROL "&Add to context menu",IDC_EXPLORER_CONTEXT,"Button", BS_AUTOCHECKBOX | WS_TABSTOP,17,18,200,10 PUSHBUTTON "&Register shell extension",IDC_REGISTER_SHELLEXTENSION,17,48,200,14 diff --git a/Src/PropShell.cpp b/Src/PropShell.cpp index 0d2deac53..5cf23f444 100644 --- a/Src/PropShell.cpp +++ b/Src/PropShell.cpp @@ -24,7 +24,6 @@ static char THIS_FILE[] = __FILE__; /// Flags for enabling and mode of extension #define CONTEXT_F_ENABLED 0x01 #define CONTEXT_F_ADVANCED 0x02 -#define CONTEXT_F_SUBFOLDERS 0x04 // registry dir to WinMerge static LPCTSTR f_RegDir = _T("Software\\Thingamahoochie\\WinMerge"); @@ -81,7 +80,6 @@ PropShell::PropShell(COptionsMgr *optionsMgr) : OptionsPanel(optionsMgr, PropShell::IDD) , m_bContextAdded(FALSE) , m_bContextAdvanced(FALSE) -, m_bContextSubfolders(FALSE) { } @@ -101,7 +99,6 @@ BOOL PropShell::OnInitDialog() UpdateButtons(); GetContextRegValues(); AdvancedContextMenuCheck(); - SubfolderOptionCheck(); UpdateData(FALSE); SetTimer(0, 1000, NULL); @@ -115,7 +112,6 @@ void PropShell::DoDataExchange(CDataExchange* pDX) //{{AFX_DATA_MAP(PropShell) DDX_Check(pDX, IDC_EXPLORER_CONTEXT, m_bContextAdded); DDX_Check(pDX, IDC_EXPLORER_ADVANCED, m_bContextAdvanced); - DDX_Check(pDX, IDC_EXPLORER_SUBFOLDERS, m_bContextSubfolders); //}}AFX_DATA_MAP } @@ -166,16 +162,12 @@ void PropShell::GetContextRegValues() if (dwContextEnabled & CONTEXT_F_ADVANCED) m_bContextAdvanced = TRUE; - - if (dwContextEnabled & CONTEXT_F_SUBFOLDERS) - m_bContextSubfolders = TRUE; } /// Set registry values for ShellExtension void PropShell::OnAddToExplorer() { AdvancedContextMenuCheck(); - SubfolderOptionCheck(); UpdateButtons(); } @@ -217,11 +209,6 @@ void PropShell::SaveMergePath() else dwContextEnabled &= ~CONTEXT_F_ADVANCED; - if (m_bContextSubfolders) - dwContextEnabled |= CONTEXT_F_SUBFOLDERS; - else - dwContextEnabled &= ~CONTEXT_F_SUBFOLDERS; - retVal = reg.WriteDword(f_RegValueEnabled, dwContextEnabled); if (retVal != ERROR_SUCCESS) { @@ -241,16 +228,6 @@ void PropShell::AdvancedContextMenuCheck() } } -/// Enable/Disable "Include subfolders by default" checkbox. -void PropShell::SubfolderOptionCheck() -{ - if (!IsDlgButtonChecked(IDC_EXPLORER_CONTEXT)) - { - CheckDlgButton(IDC_EXPLORER_SUBFOLDERS, FALSE); - m_bContextSubfolders = FALSE; - } -} - void PropShell::UpdateButtons() { bool registered = IsShellExtensionRegistered(); @@ -259,8 +236,6 @@ void PropShell::UpdateButtons() GetDlgItem(IDC_UNREGISTER_SHELLEXTENSION)->EnableWindow(registered); GetDlgItem(IDC_EXPLORER_ADVANCED)->EnableWindow( GetDlgItem(IDC_EXPLORER_CONTEXT)->IsWindowEnabled() && IsDlgButtonChecked(IDC_EXPLORER_CONTEXT)); - GetDlgItem(IDC_EXPLORER_SUBFOLDERS)->EnableWindow( - GetDlgItem(IDC_EXPLORER_CONTEXT)->IsWindowEnabled() && IsDlgButtonChecked(IDC_EXPLORER_CONTEXT)); } void PropShell::OnRegisterShellExtension() diff --git a/Src/PropShell.h b/Src/PropShell.h index 45c10b50b..dd781d99b 100644 --- a/Src/PropShell.h +++ b/Src/PropShell.h @@ -24,7 +24,6 @@ public: enum { IDD = IDD_PROPPAGE_SHELL }; BOOL m_bContextAdded; BOOL m_bContextAdvanced; - BOOL m_bContextSubfolders; // Overrides protected: @@ -40,7 +39,6 @@ protected: void GetContextRegValues(); void AdvancedContextMenuCheck(); - void SubfolderOptionCheck(); void UpdateButtons(); DECLARE_MESSAGE_MAP() diff --git a/Src/resource.h b/Src/resource.h index d3ca067bb..bda3b9504 100644 --- a/Src/resource.h +++ b/Src/resource.h @@ -424,7 +424,6 @@ #define IDC_PROJFILE_RREADONLY 1307 #define IDC_FINDDLG_DONTWRAP 1308 #define IDC_REPORT_COPYCLIPBOARD 1309 -#define IDC_EXPLORER_SUBFOLDERS 1310 #define IDC_FILTERFILE_INSTALL 1311 #define IDC_MATCH_SIMILAR_LINES 1312 #define IDC_BACKUP_FILECMP 1313 -- 2.11.0