Skip to content

Commit 0cb43dd

Browse files
thisismy-githubIbuprophen
authored andcommitted
Added option to always single-click folders
Opens pinned items on both sides of the start menu in just one click, while preserving hover functionality. Ignores the All Programs button for now as the All Programs folder is rarely accessed and this option can obstruct its use, especially for the inline menu style. Fixes #692.
1 parent b89aaed commit 0cb43dd

File tree

5 files changed

+13
-1
lines changed

5 files changed

+13
-1
lines changed

Src/StartMenu/StartMenuDLL/MenuContainer.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,7 @@ bool CMenuContainer::s_bShowTopEmpty=false;
315315
bool CMenuContainer::s_bNoDragDrop=false;
316316
bool CMenuContainer::s_bNoContextMenu=false;
317317
bool CMenuContainer::s_bExpandLinks=false;
318+
bool CMenuContainer::s_bSingleClickFolders=false;
318319
bool CMenuContainer::s_bLogicalSort=false;
319320
bool CMenuContainer::s_bExtensionSort=false;
320321
bool CMenuContainer::s_bAllPrograms=false;
@@ -6823,7 +6824,7 @@ LRESULT CMenuContainer::OnLButtonUp( UINT uMsg, WPARAM wParam, LPARAM lParam, BO
68236824
const MenuItem &item=m_Items[index];
68246825
POINT pt2=pt;
68256826
ClientToScreen(&pt2);
6826-
if (!item.bFolder)
6827+
if (!item.bFolder || (s_bSingleClickFolders && item.id!=MENU_PROGRAMS)) // never open All Programs link with single click
68276828
{
68286829
if (item.jumpIndex>=0 && m_bHotArrow)
68296830
{
@@ -7672,6 +7673,7 @@ HWND CMenuContainer::ToggleStartMenu( int taskbarId, bool bKeyboard, bool bAllPr
76727673
g_ItemManager.ResetTempIcons();
76737674
s_ScrollMenus=GetSettingInt(L"ScrollType");
76747675
s_bExpandLinks=GetSettingBool(L"ExpandFolderLinks");
7676+
s_bSingleClickFolders=GetSettingBool(L"SingleClickFolders");
76757677
s_bLogicalSort=GetSettingBool(L"NumericSort");
76767678
s_MaxRecentDocuments=GetSettingInt(L"MaxRecentDocuments");
76777679
s_ShellFormat=RegisterClipboardFormat(CFSTR_SHELLIDLIST);

Src/StartMenu/StartMenuDLL/MenuContainer.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -876,6 +876,7 @@ class CMenuContainer: public IDropTarget, public IFrameworkInputPaneHandler, pub
876876
static bool s_bNoDragDrop; // disables drag/drop
877877
static bool s_bNoContextMenu; // disables the context menu
878878
static bool s_bExpandLinks; // expand links to folders
879+
static bool s_bSingleClickFolders; // open links to folders with one click instead of two
879880
static bool s_bLogicalSort; // use StrCmpLogical instead of CompareString
880881
static bool s_bExtensionSort; // sort file names by extension
881882
static bool s_bAllPrograms; // this is the All Programs menu of the Windows start menu

Src/StartMenu/StartMenuDLL/SettingsUI.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4313,6 +4313,7 @@ CSetting g_Settings[]={
43134313
{L"UserNameCommand",CSetting::TYPE_STRING,IDS_NAME_COMMAND,IDS_NAME_COMMAND_TIP,L"control nusrmgr.cpl"},
43144314
{L"SearchFilesCommand",CSetting::TYPE_STRING,IDS_SEARCH_COMMAND,IDS_SEARCH_COMMAND_TIP,L"search-ms:",CSetting::FLAG_MENU_CLASSIC_BOTH},
43154315
{L"ExpandFolderLinks",CSetting::TYPE_BOOL,IDS_EXPAND_LINKS,IDS_EXPAND_LINKS_TIP,1},
4316+
{L"SingleClickFolders",CSetting::TYPE_BOOL,IDS_NO_DBLCLICK,IDS_NO_DBLCLICK_TIP,0},
43164317
{L"EnableTouch",CSetting::TYPE_BOOL,IDS_ENABLE_TOUCH,IDS_ENABLE_TOUCH_TIP,1},
43174318
{L"EnableAccessibility",CSetting::TYPE_BOOL,IDS_ACCESSIBILITY,IDS_ACCESSIBILITY_TIP,1},
43184319
{L"ShowNextToTaskbar",CSetting::TYPE_BOOL,IDS_NEXTTASKBAR,IDS_NEXTTASKBAR_TIP,0},

Src/StartMenu/StartMenuDLL/StartMenuDLL.rc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1295,6 +1295,12 @@ BEGIN
12951295
IDS_CLEAR_CACHE "Clear cached information"
12961296
END
12971297

1298+
STRINGTABLE
1299+
BEGIN
1300+
IDS_NO_DBLCLICK "Single-click to open folder shortcuts"
1301+
IDS_NO_DBLCLICK_TIP "When this is checked, single-clicking shortcuts (links) to folders will open them in explorer. Hovering over the shortcut will still expand sub-menus"
1302+
END
1303+
12981304
#endif // English (U.S.) resources
12991305
/////////////////////////////////////////////////////////////////////////////
13001306

Src/StartMenu/StartMenuDLL/resource.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -760,6 +760,8 @@
760760
#define IDS_HOR_OFFSET_TIP 3663
761761
#define IDS_VERT_OFFSET 3664
762762
#define IDS_VERT_OFFSET_TIP 3665
763+
#define IDS_NO_DBLCLICK 3666
764+
#define IDS_NO_DBLCLICK_TIP 3667
763765
#define IDS_STRING7001 7001
764766
#define IDS_STRING7002 7002
765767
#define IDS_STRING7003 7003

0 commit comments

Comments
 (0)