mirror of
https://github.com/reactos/reactos.git
synced 2024-11-28 05:53:31 +08:00
[NETSHELL] Fix Network Tray icon activity indication (#4669)
The network activity tray icon wasn't showing activity until the Properties dialog was opened at least once. This was due to the fact that the tray icon was initialized once with missing initialization parameters for pContext (default state and Adapter index). Fix this problem by adding the missing initialization. CORE-4497, CORE-9017, CORE-15744
This commit is contained in:
parent
d5382f91e6
commit
6dcc07c18d
@ -9,6 +9,8 @@
|
||||
|
||||
#include <winsock.h>
|
||||
|
||||
#define NETTIMERID 0xFABC
|
||||
|
||||
CLanStatus::CLanStatus() :
|
||||
m_lpNetMan(NULL),
|
||||
m_pHead(NULL)
|
||||
@ -116,7 +118,7 @@ UpdateLanStatusUiDlg(
|
||||
}
|
||||
|
||||
VOID
|
||||
UpdateLanStatus(HWND hwndDlg, LANSTATUSUI_CONTEXT * pContext)
|
||||
UpdateLanStatus(HWND hwndDlg, LANSTATUSUI_CONTEXT * pContext)
|
||||
{
|
||||
MIB_IFROW IfEntry;
|
||||
HICON hIcon, hOldIcon = NULL;
|
||||
@ -839,7 +841,7 @@ LANStatusDlg(
|
||||
case WM_INITDIALOG:
|
||||
pContext = (LANSTATUSUI_CONTEXT *)lParam;
|
||||
SetWindowLongPtr(hwndDlg, DWLP_USER, (LONG_PTR)lParam);
|
||||
pContext->nIDEvent = SetTimer(hwndDlg, 0xFABC, 1000, NULL);
|
||||
pContext->nIDEvent = SetTimer(hwndDlg, NETTIMERID, 1000, NULL);
|
||||
return TRUE;
|
||||
case WM_TIMER:
|
||||
pContext = (LANSTATUSUI_CONTEXT*)GetWindowLongPtr(hwndDlg, DWLP_USER);
|
||||
@ -946,6 +948,8 @@ CLanStatus::InitializeNetTaskbarNotifications()
|
||||
ZeroMemory(pContext, sizeof(LANSTATUSUI_CONTEXT));
|
||||
pContext->uID = Index;
|
||||
pContext->pNet = pNetCon;
|
||||
pContext->Status = -1;
|
||||
pContext->dwAdapterIndex = Index;
|
||||
pItem->uID = Index;
|
||||
pItem->pNext = NULL;
|
||||
pItem->pNet = pNetCon;
|
||||
|
@ -125,3 +125,4 @@
|
||||
#define IDS_WZD_DOMAIN_NAME 13457
|
||||
|
||||
#define IDR_NETSHELL 20000
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user