1
0
mirror of https://github.com/valinet/ExplorerPatcher.git synced 2024-11-24 07:30:22 +01:00

Ability to hide the "Properties" item from the taskbar context menu

This commit is contained in:
Valentin Radu 2022-01-21 14:14:54 +02:00
parent 82da95b384
commit 321d76a440
4 changed files with 34 additions and 15 deletions

View File

@ -14,6 +14,7 @@ Tested on OS build 22000.434.
* Option to disable `Office` hotkeys (`Ctrl`+`Alt`+`Shift`+`Windows` key combinations) (#661) (.4)
* Simple Window Switcher can switch applications instead of windows (#665) (.5, .6)
* Option to disable rounded corners for windows (.7)
* Ability to hide the "Properties" item from the taskbar context menu (.9)
#### Feature enhancements

View File

@ -82,6 +82,7 @@ BOOL bDoNotRedirectProgramsAndFeaturesToSettingsApp = FALSE;
BOOL bDoNotRedirectDateAndTimeToSettingsApp = FALSE;
BOOL bDoNotRedirectNotificationIconsToSettingsApp = FALSE;
BOOL bDisableOfficeHotkeys = FALSE;
DWORD bNoPropertiesInContextMenu = FALSE;
#define TASKBARGLOMLEVEL_DEFAULT 2
#define MMTASKBARGLOMLEVEL_DEFAULT 2
DWORD dwTaskbarGlomLevel = TASKBARGLOMLEVEL_DEFAULT;
@ -1447,12 +1448,15 @@ HMENU explorer_LoadMenuW(HINSTANCE hInstance, LPCWSTR lpMenuName)
menuInfo.fType = MFT_STRING;
menuInfo.dwTypeData = buffer;
menuInfo.cch = wcslen(buffer);
InsertMenuItemW(
hSubMenu,
GetMenuItemCount(hSubMenu) - 4,
TRUE,
&menuInfo
);
if (!bNoPropertiesInContextMenu)
{
InsertMenuItemW(
hSubMenu,
GetMenuItemCount(hSubMenu) - 4,
TRUE,
&menuInfo
);
}
}
}
return hMenu;
@ -1764,12 +1768,15 @@ INT64 Shell_TrayWndSubclassProc(
menuInfo.fType = MFT_STRING;
menuInfo.dwTypeData = buffer;
menuInfo.cch = wcslen(buffer);
InsertMenuItemW(
hSubMenu,
GetMenuItemCount(hSubMenu) - 1,
TRUE,
&menuInfo
);
if (!bNoPropertiesInContextMenu)
{
InsertMenuItemW(
hSubMenu,
GetMenuItemCount(hSubMenu) - 1,
TRUE,
&menuInfo
);
}
INT64* unknown_array = NULL;
if (bSkinMenus)
@ -4363,6 +4370,15 @@ void WINAPI LoadSettings(LPARAM lParam)
&dwSize
);
dwSize = sizeof(DWORD);
RegQueryValueExW(
hKey,
TEXT("NoPropertiesInContextMenu"),
0,
NULL,
&bNoPropertiesInContextMenu,
&dwSize
);
dwSize = sizeof(DWORD);
RegQueryValueExW(
hKey,
TEXT("NoMenuAccelerator"),

View File

@ -433,6 +433,8 @@
;d Enable SysListView32 for Explorer views *
@=""
[HKEY_CURRENT_USER\Software\ExplorerPatcher]
;b Do not show the program settings item ("Properties") in the taskbar context menu
"NoPropertiesInContextMenu"=dword:00000000
;b Enable symbols download *
"EnableSymbolDownload"=dword:00000001
;i Do not hook Start menu from main Explorer process (permanently disabled) *

View File

@ -1,7 +1,7 @@
#define VER_MAJOR 22000
#define VER_MINOR 434
#define VER_BUILD_HI 41
#define VER_BUILD_LO 8
#define VER_BUILD_LO 9
#define VER_FLAGS VS_FF_PRERELEASE
@ -12,5 +12,5 @@
#define VER_STR(arg) #arg
// The String form of the version numbers
#define VER_FILE_STRING VALUE "FileVersion", "22000.434.41.8"
#define VER_PRODUCT_STRING VALUE "ProductVersion", "22000.434.41.8"
#define VER_FILE_STRING VALUE "FileVersion", "22000.434.41.9"
#define VER_PRODUCT_STRING VALUE "ProductVersion", "22000.434.41.9"