Author: janderwald
Date: Wed Sep 17 17:21:04 2008
New Revision: 36296
URL:
http://svn.reactos.org/svn/reactos?rev=36296&view=rev
Log:
- Fix several bugs in icon changing code
Modified:
trunk/reactos/dll/win32/netshell/lanstatusui.c
Modified: trunk/reactos/dll/win32/netshell/lanstatusui.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netshell/lanstat…
==============================================================================
--- trunk/reactos/dll/win32/netshell/lanstatusui.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/netshell/lanstatusui.c [iso-8859-1] Wed Sep 17 17:21:04 2008
@@ -151,12 +151,12 @@
pContext->Status = 1;
hIcon = LoadIcon(netshell_hInstance, MAKEINTRESOURCE(IDI_NET_TRANSREC));
}
- else if (pContext->dwInOctets == IfEntry.dwInOctets && pContext->Status
!= 2)
+ else if (pContext->dwInOctets != IfEntry.dwInOctets && pContext->Status
!= 2)
{
hIcon = LoadIcon(netshell_hInstance, MAKEINTRESOURCE(IDI_NET_REC));
- pContext->Status = 2;
- }
- else if (pContext->dwOutOctets == IfEntry.dwOutOctets &&
pContext->Status != 3)
+ pContext->Status = 2;
+ }
+ else if (pContext->dwOutOctets != IfEntry.dwOutOctets &&
pContext->Status != 3)
{
hIcon = LoadIcon(netshell_hInstance, MAKEINTRESOURCE(IDI_NET_TRANS));
pContext->Status = 3;
@@ -246,6 +246,8 @@
}
CoTaskMemFree(pStr);
pContext->dwAdapterIndex = dwAdapterIndex;
+ pContext->dwInOctets = 0;
+ pContext->dwOutOctets = 0;
/* update adapter info */
pContext->Status = -1;