From e154160e2f6cc187ded9364c2e5de9a16c58c2ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herm=C3=A8s=20B=C3=A9lusca-Ma=C3=AFto?= Date: Fri, 20 Feb 2015 20:08:52 +0000 Subject: [PATCH] [EXPLORER]: Activate Logoff command. Patch by Lee Schroeder plus extra modifs. CORE-9104 #resolve svn path=/trunk/; revision=66373 --- reactos/base/shell/explorer/traywnd.cpp | 12 +++++++----- reactos/boot/bootdata/hivedef.inf | 1 + reactos/boot/bootdata/hivesft.inf | 2 +- reactos/include/reactos/undocshell.h | 1 + 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/reactos/base/shell/explorer/traywnd.cpp b/reactos/base/shell/explorer/traywnd.cpp index 2c03f9d7eb7..ab4bb508641 100644 --- a/reactos/base/shell/explorer/traywnd.cpp +++ b/reactos/base/shell/explorer/traywnd.cpp @@ -2622,8 +2622,8 @@ HandleTrayContextMenu: LRESULT OnDoExitWindows(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) { /* - * TWM_DOEXITWINDOWS is send by the CDesktopBrowserr to us to - * show the shutdown dialog + * TWM_DOEXITWINDOWS is send by the CDesktopBrowser to us + * to show the shutdown dialog. */ return DoExitWindows(); } @@ -2717,7 +2717,6 @@ HandleTrayContextMenu: { switch (LOWORD(wParam)) { - /* FIXME: Handle these commands as well */ case IDM_TASKBARANDSTARTMENU: DisplayProperties(); break; @@ -2734,13 +2733,16 @@ HandleTrayContextMenu: DisplayRunFileDlg(); break; - /* FIXME: Handle these commands as well */ + /* FIXME: Handle these commands as well */ case IDM_SYNCHRONIZE: - case IDM_LOGOFF: case IDM_DISCONNECT: case IDM_UNDOCKCOMPUTER: break; + case IDM_LOGOFF: + LogoffWindowsDialog(m_hWnd); // FIXME: Maybe handle it in a similar way as DoExitWindows? + break; + case IDM_SHUTDOWN: DoExitWindows(); break; diff --git a/reactos/boot/bootdata/hivedef.inf b/reactos/boot/bootdata/hivedef.inf index 4fcd47fdc56..ea52ecd785f 100644 --- a/reactos/boot/bootdata/hivedef.inf +++ b/reactos/boot/bootdata/hivedef.inf @@ -1841,6 +1841,7 @@ HKCU,"SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\Classi HKCU,"SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}",,0x00000012 HKCU,"SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced","ListviewShadow",0x00010001,0x00000001 HKCU,"SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced","HideFileExt",0x00010001,0x00000000 +HKCU,"SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced","StartMenuLogoff",0x00010001,0x00000001 ; default shell HKCU,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon",,0x00000012 diff --git a/reactos/boot/bootdata/hivesft.inf b/reactos/boot/bootdata/hivesft.inf index 4d2b4d7bf3b..c4db52d3567 100644 --- a/reactos/boot/bootdata/hivesft.inf +++ b/reactos/boot/bootdata/hivesft.inf @@ -112,7 +112,7 @@ HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\SharedDlls",,0x00000012 HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions",,0x00000012 HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\ShellServiceObjectDelayLoad",,0x00000012 -; FIXME - usetup doesn't handle extra paths +; FIXME - Setup doesn't handle extra paths HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce","",0x00000000,"cmd /c md ""%programfiles%\Internet Explorer\"" && move %windir%\iexplore.exe ""%programfiles%\Internet Explorer\"" && ""%programfiles%\Internet Explorer\iexplore.exe"" /RegServer" ; Create .NET Framework InstallRoot key, reg_sz & full path HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce","InstallRoot.NET",0x00000000,"cmd /c reg add HKLM\SOFTWARE\Microsoft\.NETFramework /v InstallRoot /t REG_SZ /d %SystemRoot%\Microsoft.NET\Framework\" diff --git a/reactos/include/reactos/undocshell.h b/reactos/include/reactos/undocshell.h index 99fa874596c..a618defbfb3 100644 --- a/reactos/include/reactos/undocshell.h +++ b/reactos/include/reactos/undocshell.h @@ -123,6 +123,7 @@ void WINAPI RunFileDlg( LPCWSTR lpstrDescription, UINT uFlags); +int WINAPI LogoffWindowsDialog(HWND hwndOwner); void WINAPI ExitWindowsDialog(HWND hwndOwner); BOOL WINAPI SHFindComputer(