[STOBJECT][MMSYS][POWERCFG] Store the "Show x icon in the taskbar" setting for the hotplug, power and volume icons.

CORE-12365
CORE-12972
CORE-15234
This commit is contained in:
Eric Kohl 2019-04-23 00:04:01 +02:00
parent a7ddabcc12
commit 8fb2a2dd12
2 changed files with 7 additions and 4 deletions

View file

@ -365,7 +365,7 @@ SaveData(HWND hwndDlg)
bShowIcon = (IsDlgButtonChecked(hwndDlg, IDC_ICON_IN_TASKBAR) == BST_CHECKED);
SetSystrayVolumeIconState(!bShowIcon);
SetSystrayVolumeIconState(bShowIcon);
}
VOID

View file

@ -301,17 +301,20 @@ Adv_InitDialog(VOID)
BOOLEAN bSuspend = FALSE;
BOOLEAN bHibernate;
BOOLEAN bShutdown;
BOOL bEnabled;
SYSTEM_POWER_CAPABILITIES spc;
if (GetSystrayPowerIconState())
bEnabled = GetSystrayPowerIconState();
if (bEnabled)
gGPP.user.GlobalFlags |= EnableSysTrayBatteryMeter;
else
gGPP.user.GlobalFlags &= ~EnableSysTrayBatteryMeter;
CheckDlgButton(hAdv,
IDC_SYSTRAYBATTERYMETER,
gGPP.user.GlobalFlags & EnableSysTrayBatteryMeter ? BST_CHECKED : BST_UNCHECKED);
bEnabled ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(hAdv,
IDC_PASSWORDLOGON,
gGPP.user.GlobalFlags & EnablePasswordLogon ? BST_CHECKED : BST_UNCHECKED);
@ -501,7 +504,7 @@ Adv_SaveData(HWND hwndDlg)
MessageBox(hwndDlg, L"WriteGlobalPwrPolicy failed", NULL, MB_OK);
}
SetSystrayPowerIconState(!bSystrayBatteryMeter);
SetSystrayPowerIconState(bSystrayBatteryMeter);
Adv_InitDialog();
}