mirror of
https://github.com/reactos/reactos.git
synced 2025-02-22 08:25:03 +00:00
[EXPLORER] CTaskSwitchWnd: Implement getting the setting for grouping tasks. This doesn't work yet but the setting does get stored in m_IsGroupingEnabled. TSWM_ENABLEGROUPING is not needed.
This commit is contained in:
parent
6c073e9539
commit
5a1984c998
2 changed files with 6 additions and 17 deletions
|
@ -349,7 +349,6 @@ HRESULT CSysPagerWnd_CreateInstance(HWND hwndParent, REFIID riid, void **ppv);
|
||||||
* taskswnd.c
|
* taskswnd.c
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define TSWM_ENABLEGROUPING (WM_USER + 1)
|
|
||||||
#define TSWM_UPDATETASKBARPOS (WM_USER + 2)
|
#define TSWM_UPDATETASKBARPOS (WM_USER + 2)
|
||||||
|
|
||||||
HRESULT CTaskSwitchWnd_CreateInstance(IN HWND hWndParent, IN OUT ITrayWindow *Tray, REFIID riid, void **ppv);
|
HRESULT CTaskSwitchWnd_CreateInstance(IN HWND hWndParent, IN OUT ITrayWindow *Tray, REFIID riid, void **ppv);
|
||||||
|
|
|
@ -1718,19 +1718,6 @@ public:
|
||||||
return Ret;
|
return Ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
LRESULT OnEnableGrouping(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
|
|
||||||
{
|
|
||||||
LRESULT Ret = m_IsGroupingEnabled;
|
|
||||||
if ((BOOL)wParam != m_IsGroupingEnabled)
|
|
||||||
{
|
|
||||||
m_IsGroupingEnabled = (BOOL)wParam;
|
|
||||||
|
|
||||||
/* Collapse or expand groups if necessary */
|
|
||||||
UpdateButtonsSize(FALSE);
|
|
||||||
}
|
|
||||||
return Ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
LRESULT OnUpdateTaskbarPos(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
|
LRESULT OnUpdateTaskbarPos(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
|
||||||
{
|
{
|
||||||
/* Update the button spacing */
|
/* Update the button spacing */
|
||||||
|
@ -1743,8 +1730,12 @@ public:
|
||||||
TaskbarSettings* newSettings = (TaskbarSettings*)lParam;
|
TaskbarSettings* newSettings = (TaskbarSettings*)lParam;
|
||||||
if (newSettings->bGroupButtons != g_TaskbarSettings.bGroupButtons)
|
if (newSettings->bGroupButtons != g_TaskbarSettings.bGroupButtons)
|
||||||
{
|
{
|
||||||
/* TODO: Toggle grouping */
|
|
||||||
g_TaskbarSettings.bGroupButtons = newSettings->bGroupButtons;
|
g_TaskbarSettings.bGroupButtons = newSettings->bGroupButtons;
|
||||||
|
m_IsGroupingEnabled = g_TaskbarSettings.bGroupButtons;
|
||||||
|
|
||||||
|
/* Collapse or expand groups if necessary */
|
||||||
|
RefreshWindowList();
|
||||||
|
UpdateButtonsSize(FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -1833,7 +1824,7 @@ public:
|
||||||
HRESULT Initialize(IN HWND hWndParent, IN OUT ITrayWindow *tray)
|
HRESULT Initialize(IN HWND hWndParent, IN OUT ITrayWindow *tray)
|
||||||
{
|
{
|
||||||
m_Tray = tray;
|
m_Tray = tray;
|
||||||
m_IsGroupingEnabled = TRUE; /* FIXME */
|
m_IsGroupingEnabled = g_TaskbarSettings.bGroupButtons;
|
||||||
Create(hWndParent, 0, szRunningApps, WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_TABSTOP);
|
Create(hWndParent, 0, szRunningApps, WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_TABSTOP);
|
||||||
if (!m_hWnd)
|
if (!m_hWnd)
|
||||||
return E_FAIL;
|
return E_FAIL;
|
||||||
|
@ -1864,7 +1855,6 @@ public:
|
||||||
MESSAGE_HANDLER(WM_NCHITTEST, OnNcHitTest)
|
MESSAGE_HANDLER(WM_NCHITTEST, OnNcHitTest)
|
||||||
MESSAGE_HANDLER(WM_COMMAND, OnCommand)
|
MESSAGE_HANDLER(WM_COMMAND, OnCommand)
|
||||||
MESSAGE_HANDLER(WM_NOTIFY, OnNotify)
|
MESSAGE_HANDLER(WM_NOTIFY, OnNotify)
|
||||||
MESSAGE_HANDLER(TSWM_ENABLEGROUPING, OnEnableGrouping)
|
|
||||||
MESSAGE_HANDLER(TSWM_UPDATETASKBARPOS, OnUpdateTaskbarPos)
|
MESSAGE_HANDLER(TSWM_UPDATETASKBARPOS, OnUpdateTaskbarPos)
|
||||||
MESSAGE_HANDLER(TWM_SETTINGSCHANGED, OnTaskbarSettingsChanged)
|
MESSAGE_HANDLER(TWM_SETTINGSCHANGED, OnTaskbarSettingsChanged)
|
||||||
MESSAGE_HANDLER(WM_CONTEXTMENU, OnContextMenu)
|
MESSAGE_HANDLER(WM_CONTEXTMENU, OnContextMenu)
|
||||||
|
|
Loading…
Reference in a new issue