MCPcopy Create free account
hub / github.com/ALTaleX531/OpenGlass / UpdateOptionStatusIcons

Method UpdateOptionStatusIcons

OpenGlassGUI/MainFrame.Core.cpp:581–716  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

579 }
580
581 void MainFrame::UpdateOptionStatusIcons()
582 {
583 if (!m_config)
584 {
585 return;
586 }
587
588 RegistryConfig userConfig(false);
589 bool needLayout = false;
590
591 const bool isVista = (m_rbGlassType && m_rbGlassType->GetSelection() == 0);
592 const bool hasUserKey = userConfig.HasKey();
593 std::unordered_map<std::wstring, bool> hkcuHasValueCache;
594 std::unordered_map<std::wstring, bool> activeHasValueCache;
595 std::unordered_map<std::wstring, bool> systemHasValueCache;
596
597 for (auto& item : m_optionStatus)
598 {
599 // Check relevancy to current Mode
600 bool isRelevant = true;
601 if (isVista)
602 {
603 if (item.vistaIrrelevant)
604 {
605 isRelevant = false;
606 }
607 }
608 else
609 {
610 if (item.win7Irrelevant)
611 {
612 isRelevant = false;
613 }
614 }
615 if (!isRelevant)
616 {
617 if (item.overrideIcon && item.overrideIcon->IsShown())
618 {
619 item.overrideIcon->Show(false);
620 needLayout = true;
621 }
622 if (item.hkcuWarnIcon && item.hkcuWarnIcon->IsShown())
623 {
624 item.hkcuWarnIcon->Show(false);
625 needLayout = true;
626 }
627 continue;
628 }
629
630 RegistryConfig* activeConfig = GetConfigForKey(item.key);
631 if (!activeConfig)
632 {
633 if (item.overrideIcon && item.overrideIcon->IsShown())
634 {
635 item.overrideIcon->Show(false);
636 needLayout = true;
637 }
638 if (item.hkcuWarnIcon && item.hkcuWarnIcon->IsShown())

Callers

nothing calls this directly

Calls 4

HasKeyMethod · 0.80
getMethod · 0.80
HasValueMethod · 0.80
IsHklmMethod · 0.80

Tested by

no test coverage detected