mirror of
https://github.com/Open-Shell/Open-Shell-Menu.git
synced 2026-12-07 06:12:50 +11:00
Start button's context menu: add the Win+X menu (#2578)
Open-Shell takes over the right-click on the start button, which in Windows opens the Win+X menu (Terminal (Admin), Device Manager, Disk Management and so on). Shift+right-click still opens it, but nothing on screen says so, and the Controls setting can only swap the two menus, not offer both. Win+X Menu is now in the context menu, in the section of Windows Explorer and Open, on Windows 8 and later. It calls ShowWinX(), as Shift+right-click does. EnableExplorer doesn't remove it: that setting is about opening folders, and Win+X opens none. The help's Operation section mentions Shift+right-click and the new item. Menu.WinXMenu is a new string, in English only for now. A Start Menu (Windows) item was in an earlier version and was dropped in review: Open-Shell's own menu has that item by default.
This commit is contained in:
3 files changed
+16
-3
No files matched your search
@@ -107,7 +107,8 @@ screen to open the Start menu.</p>
|
||||
<p>
|
||||
Hold down Shift while clicking on the orb to access the operating
|
||||
system's own
|
||||
Start menu.
|
||||
Start menu. By default Shift+right-click on the orb opens the Win+X menu of Windows. It is
|
||||
also in the orb's right-click menu, as Win+X Menu.
|
||||
</p>
|
||||
<p>
|
||||
Click on an item to execute it.
|
||||
|
||||
@@ -4134,6 +4134,7 @@ if (!g_bTrimHooks)
|
||||
CMD_EXPLORER,
|
||||
CMD_OPEN_PINNED,
|
||||
CMD_RELOAD,
|
||||
CMD_WINX,
|
||||
};
|
||||
|
||||
// right-click on the start button - open the context menu (Settings, Help, Exit)
|
||||
@@ -4151,7 +4152,8 @@ if (!g_bTrimHooks)
|
||||
AppendMenu(menu,MF_SEPARATOR,0,0);
|
||||
}
|
||||
int count0=GetMenuItemCount(menu);
|
||||
if (GetSettingBool(L"EnableExplorer"))
|
||||
bool bExplorer=GetSettingBool(L"EnableExplorer");
|
||||
if (bExplorer)
|
||||
{
|
||||
if (!GetSettingString(L"ExplorerPath").IsEmpty())
|
||||
AppendMenu(menu,MF_STRING,CMD_EXPLORER,FindTranslation(L"Menu.Explorer",L"Windows Explorer"));
|
||||
@@ -4160,8 +4162,13 @@ if (!g_bTrimHooks)
|
||||
AppendMenu(menu,MF_STRING,CMD_OPEN_ALL,FindTranslation(L"Menu.OpenAll",L"O&pen All Users"));
|
||||
if (GetSettingInt(L"PinnedPrograms")==PINNED_PROGRAMS_PINNED)
|
||||
AppendMenu(menu,MF_STRING,CMD_OPEN_PINNED,FindTranslation(L"Menu.OpenPinned",L"O&pen Pinned"));
|
||||
AppendMenu(menu,MF_SEPARATOR,0,0);
|
||||
}
|
||||
// the Win+X menu of Windows, which Shift+right-click opens, for those who don't know the shortcut.
|
||||
// it doesn't open folders, so EnableExplorer doesn't remove it
|
||||
if (winVer>=WIN_VER_WIN8)
|
||||
AppendMenu(menu,MF_STRING,CMD_WINX,FindTranslation(L"Menu.WinXMenu",L"Win+X Menu"));
|
||||
if (bExplorer || winVer>=WIN_VER_WIN8)
|
||||
AppendMenu(menu,MF_SEPARATOR,0,0);
|
||||
if (GetSettingBool(L"EnableSettings"))
|
||||
AppendMenu(menu,MF_STRING,CMD_SETTINGS,FindTranslation(L"Menu.MenuSettings",L"Settings"));
|
||||
if (HasHelp())
|
||||
@@ -4190,6 +4197,10 @@ if (!g_bTrimHooks)
|
||||
int res=TrackPopupMenu(menu,TPM_RIGHTBUTTON|TPM_RETURNCMD|(IsLanguageRTL()?TPM_LAYOUTRTL:0),pt0.x,pt0.y,0,msg->hwnd,NULL);
|
||||
DestroyMenu(menu);
|
||||
g_bInMenu=false;
|
||||
if (res==CMD_WINX)
|
||||
{
|
||||
ShowWinX(); // as Shift+right-click does
|
||||
}
|
||||
if (res==CMD_SETTINGS)
|
||||
{
|
||||
EditSettings(false,0);
|
||||
|
||||
@@ -1084,6 +1084,7 @@ Menu.Explorer = Windows Explorer
|
||||
Menu.Start = Start
|
||||
Menu.StartScreen = Start Screen
|
||||
Menu.StartMenu = Start Menu (Windows)
|
||||
Menu.WinXMenu = Win+X Menu
|
||||
Menu.PinStart = Pin to Start menu
|
||||
Menu.PinStartCs = Pin to Start menu (Open-Shell)
|
||||
Menu.UnpinStartCs = Unpin from Start menu (Open-Shell)
|
||||
|
||||
Reference in new issue
Block a user