mirror of
https://github.com/reactos/reactos.git
synced 2025-07-31 21:11:54 +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
|
||||
CreateTrayNotifyWnd(IN OUT ITrayWindow *TrayWindow, IN BOOL bHideClock, CTrayNotifyWnd** ppTrayNotify);
|
||||
|
||||
VOID
|
||||
BOOL
|
||||
TrayNotify_NotifyMsg(CTrayNotifyWnd* pTrayNotify, IN WPARAM wParam,
|
||||
IN LPARAM lParam);
|
||||
|
||||
|
|
|
@ -82,7 +82,7 @@ public:
|
|||
return -1;
|
||||
}
|
||||
|
||||
VOID AddButton(IN CONST NOTIFYICONDATA *iconData)
|
||||
BOOL AddButton(IN CONST NOTIFYICONDATA *iconData)
|
||||
{
|
||||
TBBUTTON tbBtn;
|
||||
NOTIFYICONDATA * notifyItem;
|
||||
|
@ -91,8 +91,7 @@ public:
|
|||
int index = FindItemByIconData(iconData, ¬ifyItem);
|
||||
if (index >= 0)
|
||||
{
|
||||
UpdateButton(iconData);
|
||||
return;
|
||||
return UpdateButton(iconData);
|
||||
}
|
||||
|
||||
notifyItem = new NOTIFYICONDATA();
|
||||
|
@ -138,9 +137,11 @@ public:
|
|||
|
||||
CToolbar::AddButton(&tbBtn);
|
||||
SetButtonSize(ICON_SIZE, ICON_SIZE);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
VOID UpdateButton(IN CONST NOTIFYICONDATA *iconData)
|
||||
BOOL UpdateButton(IN CONST NOTIFYICONDATA *iconData)
|
||||
{
|
||||
NOTIFYICONDATA * notifyItem;
|
||||
TBBUTTONINFO tbbi = { 0 };
|
||||
|
@ -148,8 +149,7 @@ public:
|
|||
int index = FindItemByIconData(iconData, ¬ifyItem);
|
||||
if (index < 0)
|
||||
{
|
||||
AddButton(iconData);
|
||||
return;
|
||||
return AddButton(iconData);
|
||||
}
|
||||
|
||||
tbbi.cbSize = sizeof(tbbi);
|
||||
|
@ -197,15 +197,17 @@ public:
|
|||
/* TODO: support NIF_INFO, NIF_GUID, NIF_REALTIME, NIF_SHOWTIP */
|
||||
|
||||
SetButtonInfo(index, &tbbi);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
VOID RemoveButton(IN CONST NOTIFYICONDATA *iconData)
|
||||
BOOL RemoveButton(IN CONST NOTIFYICONDATA *iconData)
|
||||
{
|
||||
NOTIFYICONDATA * notifyItem;
|
||||
|
||||
int index = FindItemByIconData(iconData, ¬ifyItem);
|
||||
if (index < 0)
|
||||
return;
|
||||
return FALSE;
|
||||
|
||||
DeleteButton(index);
|
||||
|
||||
|
@ -215,6 +217,8 @@ public:
|
|||
}
|
||||
|
||||
delete notifyItem;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
VOID GetTooltipText(int index, LPTSTR szTip, DWORD cchTip)
|
||||
|
@ -432,20 +436,11 @@ public:
|
|||
switch (data->notify_code)
|
||||
{
|
||||
case NIM_ADD:
|
||||
{
|
||||
Toolbar.AddButton(iconData);
|
||||
break;
|
||||
}
|
||||
return Toolbar.AddButton(iconData);
|
||||
case NIM_MODIFY:
|
||||
{
|
||||
Toolbar.UpdateButton(iconData);
|
||||
break;
|
||||
}
|
||||
return Toolbar.UpdateButton(iconData);
|
||||
case NIM_DELETE:
|
||||
{
|
||||
Toolbar.RemoveButton(iconData);
|
||||
break;
|
||||
}
|
||||
return Toolbar.RemoveButton(iconData);
|
||||
default:
|
||||
TRACE("NotifyMessage received with unknown code %d.\n", data->notify_code);
|
||||
break;
|
||||
|
@ -1458,7 +1453,7 @@ public:
|
|||
{
|
||||
if (m_pager)
|
||||
{
|
||||
m_pager->NotifyMsg(uMsg, wParam, lParam, bHandled);
|
||||
return m_pager->NotifyMsg(uMsg, wParam, lParam, bHandled);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
|
@ -1589,11 +1584,11 @@ HWND CreateTrayNotifyWnd(IN OUT ITrayWindow *Tray, BOOL bHideClock, CTrayNotifyW
|
|||
return pTrayNotify->_Init(Tray, bHideClock);
|
||||
}
|
||||
|
||||
VOID
|
||||
BOOL
|
||||
TrayNotify_NotifyMsg(CTrayNotifyWnd* pTrayNotify, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
BOOL bDummy;
|
||||
pTrayNotify->NotifyMsg(0, wParam, lParam, bDummy);
|
||||
return pTrayNotify->NotifyMsg(0, wParam, lParam, bDummy);
|
||||
}
|
||||
|
||||
BOOL
|
||||
|
|
|
@ -2184,7 +2184,7 @@ ChangePos:
|
|||
{
|
||||
if (m_TrayNotify)
|
||||
{
|
||||
TrayNotify_NotifyMsg(m_TrayNotifyInstance, wParam, lParam);
|
||||
return TrayNotify_NotifyMsg(m_TrayNotifyInstance, wParam, lParam);
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue