[EXPLORER] Notification area icon improvements (#6169)
[reactos.git] / base / shell / explorer / settings.cpp
index 62ac29b..f5932ef 100644 (file)
@@ -32,7 +32,6 @@ BOOL TaskbarSettings::Save()
     SHSetValueW(hkExplorer, L"Advanced", L"TaskbarSizeMove", REG_DWORD, &bAllowSizeMove, sizeof(bAllowSizeMove));
     sr.cbSize = sizeof(sr);
     SHSetValueW(hkExplorer, L"Advanced", L"TaskbarSmallIcons", REG_DWORD, &bSmallIcons, sizeof(bSmallIcons));
-    SHSetValueW(hkExplorer, L"Advanced", L"CompactTrayIcons", REG_DWORD, &bCompactTrayIcons, sizeof(bCompactTrayIcons));
     SHSetValueW(hkExplorer, L"Advanced", L"TaskbarSd", REG_DWORD, &bShowDesktopButton, sizeof(bShowDesktopButton));
     SHSetValueW(hkExplorer, L"StuckRects2", L"Settings", REG_BINARY, &sr, sizeof(sr));
 
@@ -64,7 +63,10 @@ BOOL TaskbarSettings::Load()
     bSmallIcons = (dwRet == ERROR_SUCCESS) ? (dwValue != 0) : TRUE;
 
     dwRet = SHGetValueW(hkExplorer, L"Advanced", L"CompactTrayIcons", NULL, &dwValue, &cbSize);
-    bCompactTrayIcons = (dwRet == ERROR_SUCCESS) ? (dwValue != 0) : bSmallIcons;
+    if (dwRet == ERROR_SUCCESS && dwValue <= TIM_Max)
+        eCompactTrayIcons = static_cast<TrayIconsMode>(dwValue);
+    else
+        eCompactTrayIcons = TIM_Default;
 
     dwRet = SHGetValueW(hkExplorer, L"Advanced", L"TaskbarSd", NULL, &dwValue, &cbSize);
     bShowDesktopButton = (dwRet == ERROR_SUCCESS) ? (dwValue != 0) : TRUE;