mirror of
https://github.com/valinet/ExplorerPatcher.git
synced 2025-02-05 05:45:36 +01:00
File Explorer: Added option to disable the modern navigation bar (FEMNB).
- The code for disabling tabs (TIFE) is also there, but it doesn't work on 22621.2506+ -- it fallbacks to the Windows 10 Ribbon instead so I'm hiding it for now. - This should also fix window position saving when using Windows 10 Ribbon on builds with TIFE enabled, up to 23570 (Dev).
This commit is contained in:
parent
b45f79f25d
commit
2dc1340207
1
ExplorerPatcher-L10N
Submodule
1
ExplorerPatcher-L10N
Submodule
@ -0,0 +1 @@
|
|||||||
|
Subproject commit 4a7eaa5ecb493a49ef33a206681de13fa6b413ec
|
@ -3877,7 +3877,7 @@ HWND WINAPI explorerframe_SHCreateWorkerWindowHook(
|
|||||||
KEY_READ | KEY_WOW64_64KEY,
|
KEY_READ | KEY_WOW64_64KEY,
|
||||||
NULL,
|
NULL,
|
||||||
(LPDWORD)(&dwSize)
|
(LPDWORD)(&dwSize)
|
||||||
) == ERROR_SUCCESS && (dwSize < 4) && dwExStyle == 0x10000 && dwStyle == 1174405120)
|
) == ERROR_SUCCESS && (dwSize < 4) && dwExStyle == 0x10000 && dwStyle == 0x46000000)
|
||||||
{
|
{
|
||||||
result = 0;
|
result = 0;
|
||||||
}
|
}
|
||||||
@ -3906,6 +3906,13 @@ HWND WINAPI explorerframe_SHCreateWorkerWindowHook(
|
|||||||
{
|
{
|
||||||
SetWindowSubclass(hWndParent, HideExplorerSearchBarSubClass, HideExplorerSearchBarSubClass, 0);
|
SetWindowSubclass(hWndParent, HideExplorerSearchBarSubClass, HideExplorerSearchBarSubClass, 0);
|
||||||
}
|
}
|
||||||
|
if (IsWindows11Version22H2OrHigher())
|
||||||
|
{
|
||||||
|
// Fix initial title bar style after disabling TIFE
|
||||||
|
// If we don't do this, it will only fix itself once the user changes the system color scheme or toggling transparency effects
|
||||||
|
BOOL value = ShouldAppsUseDarkMode();
|
||||||
|
DwmSetWindowAttribute(hWndParent, DWMWA_USE_IMMERSIVE_DARK_MODE, &value, sizeof(BOOL));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -8606,7 +8613,7 @@ DEFINE_GUID(IID_UIRibbonFramework,
|
|||||||
|
|
||||||
HRESULT ExplorerFrame_CoCreateInstanceHook(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID riid, LPVOID* ppv)
|
HRESULT ExplorerFrame_CoCreateInstanceHook(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID riid, LPVOID* ppv)
|
||||||
{
|
{
|
||||||
if (dwFileExplorerCommandUI != 0 && IsEqualCLSID(rclsid, &CLSID_XamlIslandViewAdapter))
|
if (dwFileExplorerCommandUI != 0 && dwFileExplorerCommandUI != 3 && dwFileExplorerCommandUI != 4 && IsEqualCLSID(rclsid, &CLSID_XamlIslandViewAdapter))
|
||||||
{
|
{
|
||||||
return REGDB_E_CLASSNOTREG;
|
return REGDB_E_CLASSNOTREG;
|
||||||
}
|
}
|
||||||
@ -9653,10 +9660,22 @@ int RtlQueryFeatureConfigurationHook(UINT32 featureId, int sectionType, INT64* c
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#if 1
|
case 37634385: // TIFE "Tabs in File Explorer"
|
||||||
|
{
|
||||||
|
if (dwFileExplorerCommandUI == 1 // Windows 10 Ribbon <-- fixes saving of window position and size
|
||||||
|
|| dwFileExplorerCommandUI == 2 // Windows 7 Command Bar <-- fixes menu bar behavior
|
||||||
|
|| dwFileExplorerCommandUI == 3) // Windows 11 Command Bar (no Tabs, classic Address Bar) <-- provides option to disable tabs in File Explorer
|
||||||
|
{
|
||||||
|
// Removed in 23575.1000+
|
||||||
|
buffer->enabledState = FEATURE_ENABLED_STATE_DISABLED;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
case 40729001: // WASDKInFileExplorer
|
case 40729001: // WASDKInFileExplorer
|
||||||
{
|
{
|
||||||
if (dwFileExplorerCommandUI != 0)
|
if (dwFileExplorerCommandUI == 1 // Windows 10 Ribbon <-- fixes crashing when navigating back to a WASDK view
|
||||||
|
|| dwFileExplorerCommandUI == 2 // Windows 7 Command Bar <-- ditto
|
||||||
|
|| dwFileExplorerCommandUI == 3) // Windows 11 Command Bar (no Tabs, classic Address Bar) <-- fixes crashing when opening an Explorer window
|
||||||
{
|
{
|
||||||
// Disable the new Windows App SDK views (in Home and Gallery) when not using the Windows 11 command bar
|
// Disable the new Windows App SDK views (in Home and Gallery) when not using the Windows 11 command bar
|
||||||
//
|
//
|
||||||
@ -9673,7 +9692,16 @@ int RtlQueryFeatureConfigurationHook(UINT32 featureId, int sectionType, INT64* c
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
#endif
|
case 40950262: // FEMNB "File Explorer Modern Navigation Bar"
|
||||||
|
{
|
||||||
|
if (dwFileExplorerCommandUI == 3 // Windows 11 Command Bar (no Tabs, classic Address Bar)
|
||||||
|
|| dwFileExplorerCommandUI == 4) // Windows 11 Command Bar (classic Address Bar)
|
||||||
|
{
|
||||||
|
// Option to disable the new navigation bar
|
||||||
|
buffer->enabledState = FEATURE_ENABLED_STATE_DISABLED;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
#if 0
|
#if 0
|
||||||
case 42952021: // CategorySpecificXamlExtensions
|
case 42952021: // CategorySpecificXamlExtensions
|
||||||
{
|
{
|
||||||
|
@ -119,6 +119,8 @@
|
|||||||
#define IDS_EXP_MICA_0 1226
|
#define IDS_EXP_MICA_0 1226
|
||||||
#define IDS_EXP_MICA_1 1227
|
#define IDS_EXP_MICA_1 1227
|
||||||
#define IDS_EXP_MICA_2 1228
|
#define IDS_EXP_MICA_2 1228
|
||||||
|
#define IDS_EXP_CTRLINTF_3 1229
|
||||||
|
#define IDS_EXP_CTRLINTF_4 1230
|
||||||
|
|
||||||
#define IDS_START 1301
|
#define IDS_START 1301
|
||||||
#define IDS_START_STYLE 1302
|
#define IDS_START_STYLE 1302
|
||||||
|
@ -140,6 +140,8 @@ BEGIN
|
|||||||
IDS_EXP_CTRLINTF_0_W10 "Windows 10 Ribbon (default)"
|
IDS_EXP_CTRLINTF_0_W10 "Windows 10 Ribbon (default)"
|
||||||
IDS_EXP_CTRLINTF_1_W11 "Windows 10 Ribbon"
|
IDS_EXP_CTRLINTF_1_W11 "Windows 10 Ribbon"
|
||||||
IDS_EXP_CTRLINTF_2 "Windows 7 Command Bar"
|
IDS_EXP_CTRLINTF_2 "Windows 7 Command Bar"
|
||||||
|
IDS_EXP_CTRLINTF_3 "Windows 11 Command Bar (no Tabs, classic Address Bar)"
|
||||||
|
IDS_EXP_CTRLINTF_4 "Windows 11 Command Bar (classic Address Bar)"
|
||||||
IDS_EXP_NEWWINDOWS "The following settings take effect on newly created File Explorer windows:"
|
IDS_EXP_NEWWINDOWS "The following settings take effect on newly created File Explorer windows:"
|
||||||
IDS_EXP_IMMERSIVEMENUS "Use immersive menus when displaying Windows 10 context menus"
|
IDS_EXP_IMMERSIVEMENUS "Use immersive menus when displaying Windows 10 context menus"
|
||||||
IDS_EXP_DISABLENAVBAR "Disable navigation bar"
|
IDS_EXP_DISABLENAVBAR "Disable navigation bar"
|
||||||
|
@ -205,8 +205,9 @@
|
|||||||
;b %R:1208%
|
;b %R:1208%
|
||||||
"UseClassicDriveGrouping"=dword:00000000
|
"UseClassicDriveGrouping"=dword:00000000
|
||||||
[HKEY_CURRENT_USER\Software\ExplorerPatcher]
|
[HKEY_CURRENT_USER\Software\ExplorerPatcher]
|
||||||
;c 3 %R:1209% *
|
;c 4 %R:1209% *
|
||||||
;x 0 %R:1210%
|
;x 0 %R:1210%
|
||||||
|
;x 4 %R:1230%
|
||||||
;x 1 %R:1212%
|
;x 1 %R:1212%
|
||||||
;x 2 %R:1213%
|
;x 2 %R:1213%
|
||||||
;"Virtualized_{D17F1E1A-5919-4427-8F89-A1A8503CA3EB}_FileExplorerCommandUI"=dword:00000000
|
;"Virtualized_{D17F1E1A-5919-4427-8F89-A1A8503CA3EB}_FileExplorerCommandUI"=dword:00000000
|
||||||
|
Loading…
x
Reference in New Issue
Block a user