Author: gadamopoulos
Date: Thu Feb 6 13:01:54 2014
New Revision: 62010
URL:
http://svn.reactos.org/svn/reactos?rev=62010&view=rev
Log:
[explorer_new]
- Implement showing and closing the start menu by pressing the WIN key
- Implement handling WM_KLUDGEMINRECT message that informs the window manager the place of
an application in the taskbar in order to show the minimization or maximization animation
of a window
- Implement showing taskbar settings when the user selects to show the taskbar settings
from the settings menu in start menu
- Implement hiding the Favorites menu in the start menu when needed
Modified:
branches/shell-experiments/base/shell/explorer-new/precomp.h
branches/shell-experiments/base/shell/explorer-new/startmnu.c
branches/shell-experiments/base/shell/explorer-new/taskswnd.c
branches/shell-experiments/base/shell/explorer-new/traywnd.c
Modified: branches/shell-experiments/base/shell/explorer-new/precomp.h
URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/base/shell/ex…
==============================================================================
--- branches/shell-experiments/base/shell/explorer-new/precomp.h [iso-8859-1] (original)
+++ branches/shell-experiments/base/shell/explorer-new/precomp.h [iso-8859-1] Thu Feb 6
13:01:54 2014
@@ -23,6 +23,7 @@
#include <shlguid_undoc.h>
#include <uxtheme.h>
#include <strsafe.h>
+#include <undocuser.h>
#include "tmschema.h"
#include "resource.h"
Modified: branches/shell-experiments/base/shell/explorer-new/startmnu.c
URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/base/shell/ex…
==============================================================================
--- branches/shell-experiments/base/shell/explorer-new/startmnu.c [iso-8859-1] (original)
+++ branches/shell-experiments/base/shell/explorer-new/startmnu.c [iso-8859-1] Thu Feb 6
13:01:54 2014
@@ -552,7 +552,15 @@
TEXT("Advanced"),
TEXT("StartMenuLogoff")));
- /* FIXME: Favorites */
+ /* Favorites */
+ if (!GetExplorerRegValueSet(HKEY_CURRENT_USER,
+ TEXT("Advanced"),
+ TEXT("StartMenuFavorites")))
+ {
+ DeleteMenu(hMenu,
+ IDM_FAVORITES,
+ MF_BYCOMMAND);
+ }
/* Documents */
if (SHRestricted(REST_NORECENTDOCSMENU))
Modified: branches/shell-experiments/base/shell/explorer-new/taskswnd.c
URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/base/shell/ex…
==============================================================================
--- branches/shell-experiments/base/shell/explorer-new/taskswnd.c [iso-8859-1] (original)
+++ branches/shell-experiments/base/shell/explorer-new/taskswnd.c [iso-8859-1] Thu Feb 6
13:01:54 2014
@@ -1632,6 +1632,9 @@
break;
case HSHELL_TASKMAN:
+ PostMessage(ITrayWindow_GetHWND(This->Tray), TWM_OPENSTARTMENU,0, 0);
+ break;
+
case HSHELL_LANGUAGE:
case HSHELL_SYSMENU:
case HSHELL_ENDTASK:
@@ -2123,6 +2126,24 @@
break;
#endif
+ case WM_KLUDGEMINRECT:
+ {
+ PTASK_ITEM TaskItem = TaskSwitchWnd_FindTaskItem(This, (HWND)wParam);
+ if (TaskItem)
+ {
+ RECT* prcMinRect = (RECT*)lParam;
+ RECT rcItem, rcToolbar;
+ SendMessageW(This->hWndToolbar,TB_GETITEMRECT, TaskItem->Index,
(LPARAM)&rcItem);
+ GetWindowRect(This->hWndToolbar, &rcToolbar);
+
+ OffsetRect(&rcItem, rcToolbar.left, rcToolbar.top);
+
+ *prcMinRect = rcItem;
+ return TRUE;
+ }
+ return FALSE;
+ }
+
default:
/* HandleDefaultMessage: */
if (uMsg == This->ShellHookMsg && This->ShellHookMsg != 0)
Modified: branches/shell-experiments/base/shell/explorer-new/traywnd.c
URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/base/shell/ex…
==============================================================================
--- branches/shell-experiments/base/shell/explorer-new/traywnd.c [iso-8859-1] (original)
+++ branches/shell-experiments/base/shell/explorer-new/traywnd.c [iso-8859-1] Thu Feb 6
13:01:54 2014
@@ -2550,9 +2550,19 @@
break;
case TWM_OPENSTARTMENU:
- SendMessage(This->hWnd, WM_COMMAND, MAKEWPARAM(BN_CLICKED,
IDC_STARTBTN), (LPARAM)This->hwndStart);
+ {
+ HWND hwndStartMenu;
+ HRESULT hr = IUnknown_GetWindow((IUnknown*)This->StartMenuPopup,
&hwndStartMenu);
+ if (FAILED(hr))
+ break;
+
+ if (IsWindowVisible(hwndStartMenu))
+ SetWindowPos(hwndStartMenu, 0,0,0,0,0, SWP_HIDEWINDOW |
SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOZORDER);
+ else
+ SendMessage(This->hWnd, WM_COMMAND, MAKEWPARAM(BN_CLICKED,
IDC_STARTBTN), (LPARAM)This->hwndStart);
+
break;
-
+ }
case WM_COMMAND:
if ((HWND)lParam == This->hwndStart)
{
@@ -2603,6 +2613,10 @@
{
/* FIXME: Handle these commands as well */
case IDM_TASKBARANDSTARTMENU:
+
+
ITrayWindowImpl_DisplayProperties(ITrayWindow_from_impl(This));
+ break;
+
case IDM_SEARCH:
case IDM_HELPANDSUPPORT:
break;