Author: dquintana
Date: Tue Sep 1 12:32:05 2015
New Revision: 68893
URL:
http://svn.reactos.org/svn/reactos?rev=68893&view=rev
Log:
[EXPLORER]
* Remove old icons from the tray imagelist.
Modified:
trunk/reactos/base/shell/explorer/trayntfy.cpp
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] Tue Sep 1 12:32:05 2015
@@ -163,8 +163,14 @@
if (iconData->uFlags & NIF_ICON)
{
+ TBBUTTONINFO tbbiOld = { 0 };
+ tbbiOld.cbSize = sizeof(tbbiOld);
+ tbbiOld.dwMask = TBIF_BYINDEX | TBIF_IMAGE;
+
+ GetButtonInfo(index, &tbbiOld);
+
tbbi.dwMask |= TBIF_IMAGE;
- tbbi.iImage = ImageList_AddIcon(m_ImageList, iconData->hIcon);
+ tbbi.iImage = ImageList_ReplaceIcon(m_ImageList, tbbiOld.iImage,
iconData->hIcon);
}
if (iconData->uFlags & NIF_TIP)
@@ -208,6 +214,14 @@
int index = FindItemByIconData(iconData, ¬ifyItem);
if (index < 0)
return FALSE;
+
+ TBBUTTONINFO tbbiOld = { 0 };
+ tbbiOld.cbSize = sizeof(tbbiOld);
+ tbbiOld.dwMask = TBIF_BYINDEX | TBIF_IMAGE;
+
+ GetButtonInfo(index, &tbbiOld);
+
+ ImageList_Remove(m_ImageList, tbbiOld.iImage);
DeleteButton(index);