mirror of
https://github.com/reactos/reactos.git
synced 2025-08-02 12:55:43 +00:00
[EXPLORER]
* Allow the result of the notify requests to return back to the caller. Fixes regressed shell32:systray winetests. CORE-8840 #resolve #comment Should be properly fixed in r66019. svn path=/trunk/; revision=66019
This commit is contained in:
parent
8f3b11bfe3
commit
64f6189e30
3 changed files with 20 additions and 25 deletions
|
@ -337,7 +337,7 @@ UnregisterTrayNotifyWndClass(VOID);
|
||||||
HWND
|
HWND
|
||||||
CreateTrayNotifyWnd(IN OUT ITrayWindow *TrayWindow, IN BOOL bHideClock, CTrayNotifyWnd** ppTrayNotify);
|
CreateTrayNotifyWnd(IN OUT ITrayWindow *TrayWindow, IN BOOL bHideClock, CTrayNotifyWnd** ppTrayNotify);
|
||||||
|
|
||||||
VOID
|
BOOL
|
||||||
TrayNotify_NotifyMsg(CTrayNotifyWnd* pTrayNotify, IN WPARAM wParam,
|
TrayNotify_NotifyMsg(CTrayNotifyWnd* pTrayNotify, IN WPARAM wParam,
|
||||||
IN LPARAM lParam);
|
IN LPARAM lParam);
|
||||||
|
|
||||||
|
|
|
@ -82,7 +82,7 @@ public:
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID AddButton(IN CONST NOTIFYICONDATA *iconData)
|
BOOL AddButton(IN CONST NOTIFYICONDATA *iconData)
|
||||||
{
|
{
|
||||||
TBBUTTON tbBtn;
|
TBBUTTON tbBtn;
|
||||||
NOTIFYICONDATA * notifyItem;
|
NOTIFYICONDATA * notifyItem;
|
||||||
|
@ -91,8 +91,7 @@ public:
|
||||||
int index = FindItemByIconData(iconData, ¬ifyItem);
|
int index = FindItemByIconData(iconData, ¬ifyItem);
|
||||||
if (index >= 0)
|
if (index >= 0)
|
||||||
{
|
{
|
||||||
UpdateButton(iconData);
|
return UpdateButton(iconData);
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
notifyItem = new NOTIFYICONDATA();
|
notifyItem = new NOTIFYICONDATA();
|
||||||
|
@ -138,9 +137,11 @@ public:
|
||||||
|
|
||||||
CToolbar::AddButton(&tbBtn);
|
CToolbar::AddButton(&tbBtn);
|
||||||
SetButtonSize(ICON_SIZE, ICON_SIZE);
|
SetButtonSize(ICON_SIZE, ICON_SIZE);
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID UpdateButton(IN CONST NOTIFYICONDATA *iconData)
|
BOOL UpdateButton(IN CONST NOTIFYICONDATA *iconData)
|
||||||
{
|
{
|
||||||
NOTIFYICONDATA * notifyItem;
|
NOTIFYICONDATA * notifyItem;
|
||||||
TBBUTTONINFO tbbi = { 0 };
|
TBBUTTONINFO tbbi = { 0 };
|
||||||
|
@ -148,8 +149,7 @@ public:
|
||||||
int index = FindItemByIconData(iconData, ¬ifyItem);
|
int index = FindItemByIconData(iconData, ¬ifyItem);
|
||||||
if (index < 0)
|
if (index < 0)
|
||||||
{
|
{
|
||||||
AddButton(iconData);
|
return AddButton(iconData);
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
tbbi.cbSize = sizeof(tbbi);
|
tbbi.cbSize = sizeof(tbbi);
|
||||||
|
@ -197,15 +197,17 @@ public:
|
||||||
/* TODO: support NIF_INFO, NIF_GUID, NIF_REALTIME, NIF_SHOWTIP */
|
/* TODO: support NIF_INFO, NIF_GUID, NIF_REALTIME, NIF_SHOWTIP */
|
||||||
|
|
||||||
SetButtonInfo(index, &tbbi);
|
SetButtonInfo(index, &tbbi);
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID RemoveButton(IN CONST NOTIFYICONDATA *iconData)
|
BOOL RemoveButton(IN CONST NOTIFYICONDATA *iconData)
|
||||||
{
|
{
|
||||||
NOTIFYICONDATA * notifyItem;
|
NOTIFYICONDATA * notifyItem;
|
||||||
|
|
||||||
int index = FindItemByIconData(iconData, ¬ifyItem);
|
int index = FindItemByIconData(iconData, ¬ifyItem);
|
||||||
if (index < 0)
|
if (index < 0)
|
||||||
return;
|
return FALSE;
|
||||||
|
|
||||||
DeleteButton(index);
|
DeleteButton(index);
|
||||||
|
|
||||||
|
@ -215,6 +217,8 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
delete notifyItem;
|
delete notifyItem;
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID GetTooltipText(int index, LPTSTR szTip, DWORD cchTip)
|
VOID GetTooltipText(int index, LPTSTR szTip, DWORD cchTip)
|
||||||
|
@ -432,20 +436,11 @@ public:
|
||||||
switch (data->notify_code)
|
switch (data->notify_code)
|
||||||
{
|
{
|
||||||
case NIM_ADD:
|
case NIM_ADD:
|
||||||
{
|
return Toolbar.AddButton(iconData);
|
||||||
Toolbar.AddButton(iconData);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case NIM_MODIFY:
|
case NIM_MODIFY:
|
||||||
{
|
return Toolbar.UpdateButton(iconData);
|
||||||
Toolbar.UpdateButton(iconData);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case NIM_DELETE:
|
case NIM_DELETE:
|
||||||
{
|
return Toolbar.RemoveButton(iconData);
|
||||||
Toolbar.RemoveButton(iconData);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
default:
|
default:
|
||||||
TRACE("NotifyMessage received with unknown code %d.\n", data->notify_code);
|
TRACE("NotifyMessage received with unknown code %d.\n", data->notify_code);
|
||||||
break;
|
break;
|
||||||
|
@ -1458,7 +1453,7 @@ public:
|
||||||
{
|
{
|
||||||
if (m_pager)
|
if (m_pager)
|
||||||
{
|
{
|
||||||
m_pager->NotifyMsg(uMsg, wParam, lParam, bHandled);
|
return m_pager->NotifyMsg(uMsg, wParam, lParam, bHandled);
|
||||||
}
|
}
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
@ -1589,11 +1584,11 @@ HWND CreateTrayNotifyWnd(IN OUT ITrayWindow *Tray, BOOL bHideClock, CTrayNotifyW
|
||||||
return pTrayNotify->_Init(Tray, bHideClock);
|
return pTrayNotify->_Init(Tray, bHideClock);
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID
|
BOOL
|
||||||
TrayNotify_NotifyMsg(CTrayNotifyWnd* pTrayNotify, WPARAM wParam, LPARAM lParam)
|
TrayNotify_NotifyMsg(CTrayNotifyWnd* pTrayNotify, WPARAM wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
BOOL bDummy;
|
BOOL bDummy;
|
||||||
pTrayNotify->NotifyMsg(0, wParam, lParam, bDummy);
|
return pTrayNotify->NotifyMsg(0, wParam, lParam, bDummy);
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOL
|
BOOL
|
||||||
|
|
|
@ -2184,7 +2184,7 @@ ChangePos:
|
||||||
{
|
{
|
||||||
if (m_TrayNotify)
|
if (m_TrayNotify)
|
||||||
{
|
{
|
||||||
TrayNotify_NotifyMsg(m_TrayNotifyInstance, wParam, lParam);
|
return TrayNotify_NotifyMsg(m_TrayNotifyInstance, wParam, lParam);
|
||||||
}
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue