Author: dquintana
Date: Fri Jan 9 17:24:43 2015
New Revision: 66019
URL:
http://svn.reactos.org/svn/reactos?rev=66019&view=rev
Log:
[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.
Modified:
trunk/reactos/base/shell/explorer/precomp.h
trunk/reactos/base/shell/explorer/trayntfy.cpp
trunk/reactos/base/shell/explorer/traywnd.cpp
Modified: trunk/reactos/base/shell/explorer/precomp.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/explorer/precom…
==============================================================================
--- trunk/reactos/base/shell/explorer/precomp.h [iso-8859-1] (original)
+++ trunk/reactos/base/shell/explorer/precomp.h [iso-8859-1] Fri Jan 9 17:24:43 2015
@@ -337,7 +337,7 @@
HWND
CreateTrayNotifyWnd(IN OUT ITrayWindow *TrayWindow, IN BOOL bHideClock, CTrayNotifyWnd**
ppTrayNotify);
-VOID
+BOOL
TrayNotify_NotifyMsg(CTrayNotifyWnd* pTrayNotify, IN WPARAM wParam,
IN LPARAM lParam);
Modified: trunk/reactos/base/shell/explorer/trayntfy.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/explorer/traynt…
==============================================================================
--- trunk/reactos/base/shell/explorer/trayntfy.cpp [iso-8859-1] (original)
+++ trunk/reactos/base/shell/explorer/trayntfy.cpp [iso-8859-1] Fri Jan 9 17:24:43 2015
@@ -82,7 +82,7 @@
return -1;
}
- VOID AddButton(IN CONST NOTIFYICONDATA *iconData)
+ BOOL AddButton(IN CONST NOTIFYICONDATA *iconData)
{
TBBUTTON tbBtn;
NOTIFYICONDATA * notifyItem;
@@ -91,8 +91,7 @@
int index = FindItemByIconData(iconData, ¬ifyItem);
if (index >= 0)
{
- UpdateButton(iconData);
- return;
+ return UpdateButton(iconData);
}
notifyItem = new NOTIFYICONDATA();
@@ -138,9 +137,11 @@
CToolbar::AddButton(&tbBtn);
SetButtonSize(ICON_SIZE, ICON_SIZE);
- }
-
- VOID UpdateButton(IN CONST NOTIFYICONDATA *iconData)
+
+ return TRUE;
+ }
+
+ BOOL UpdateButton(IN CONST NOTIFYICONDATA *iconData)
{
NOTIFYICONDATA * notifyItem;
TBBUTTONINFO tbbi = { 0 };
@@ -148,8 +149,7 @@
int index = FindItemByIconData(iconData, ¬ifyItem);
if (index < 0)
{
- AddButton(iconData);
- return;
+ return AddButton(iconData);
}
tbbi.cbSize = sizeof(tbbi);
@@ -197,15 +197,17 @@
/* TODO: support NIF_INFO, NIF_GUID, NIF_REALTIME, NIF_SHOWTIP */
SetButtonInfo(index, &tbbi);
- }
-
- VOID RemoveButton(IN CONST NOTIFYICONDATA *iconData)
+
+ return TRUE;
+ }
+
+ 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 @@
}
delete notifyItem;
+
+ return TRUE;
}
VOID GetTooltipText(int index, LPTSTR szTip, DWORD cchTip)
@@ -432,20 +436,11 @@
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 @@
{
if (m_pager)
{
- m_pager->NotifyMsg(uMsg, wParam, lParam, bHandled);
+ return m_pager->NotifyMsg(uMsg, wParam, lParam, bHandled);
}
return TRUE;
@@ -1589,11 +1584,11 @@
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
Modified: trunk/reactos/base/shell/explorer/traywnd.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/explorer/traywn…
==============================================================================
--- trunk/reactos/base/shell/explorer/traywnd.cpp [iso-8859-1] (original)
+++ trunk/reactos/base/shell/explorer/traywnd.cpp [iso-8859-1] Fri Jan 9 17:24:43 2015
@@ -2184,7 +2184,7 @@
{
if (m_TrayNotify)
{
- TrayNotify_NotifyMsg(m_TrayNotifyInstance, wParam, lParam);
+ return TrayNotify_NotifyMsg(m_TrayNotifyInstance, wParam, lParam);
}
return TRUE;
}