https://git.reactos.org/?p=reactos.git;a=commitdiff;h=8fb2a2dd12ed238b52d82…
commit 8fb2a2dd12ed238b52d82e658c8726e787fe2070
Author: Eric Kohl <eric.kohl(a)reactos.org>
AuthorDate: Tue Apr 23 00:04:01 2019 +0200
Commit: Eric Kohl <eric.kohl(a)reactos.org>
CommitDate: Tue Apr 23 00:04:01 2019 +0200
[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
---
dll/cpl/mmsys/volume.c | 2 +-
dll/cpl/powercfg/advanced.c | 9 ++++++---
2 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/dll/cpl/mmsys/volume.c b/dll/cpl/mmsys/volume.c
index 4c3189bbbe..b8e546e276 100644
--- a/dll/cpl/mmsys/volume.c
+++ b/dll/cpl/mmsys/volume.c
@@ -365,7 +365,7 @@ SaveData(HWND hwndDlg)
bShowIcon = (IsDlgButtonChecked(hwndDlg, IDC_ICON_IN_TASKBAR) == BST_CHECKED);
- SetSystrayVolumeIconState(!bShowIcon);
+ SetSystrayVolumeIconState(bShowIcon);
}
VOID
diff --git a/dll/cpl/powercfg/advanced.c b/dll/cpl/powercfg/advanced.c
index 6f28272868..6ca281abe6 100644
--- a/dll/cpl/powercfg/advanced.c
+++ b/dll/cpl/powercfg/advanced.c
@@ -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();
}