MCPcopy Create free account
hub / github.com/WinMerge/winmerge / LoadList

Method LoadList

Src/DirAdditionalPropertiesDlg.cpp:84–111  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

82}
83
84void CDirAdditionalPropertiesDlg::LoadList()
85{
86 m_root.hItem = TVI_ROOT;
87 PropertySystem ps(PropertySystem::VIEWABLE);
88 for (const auto& canonicalName : ps.GetCanonicalNames())
89 {
90 PropertySystem ps2({ canonicalName });
91 std::vector<String> displayNames;
92 ps2.GetDisplayNames(displayNames);
93 if (!displayNames[0].empty())
94 {
95 auto path = strutils::split(canonicalName, '.');
96 Node& node = MakeNode(m_root, path, path.begin());
97 if (std::count(m_canonicalNames.begin(), m_canonicalNames.end(), canonicalName) > 0)
98 {
99 for (HTREEITEM hItem = m_treeProps.GetParentItem(node.hItem); hItem; hItem = m_treeProps.GetParentItem(hItem))
100 m_treeProps.Expand(hItem, TVE_EXPAND);
101 node.selected = true;
102 m_treeProps.SetItemState(node.hItem, TVIS_BOLD, TVIS_BOLD);
103 m_listProps.InsertItem(LVIF_TEXT|LVIF_PARAM,
104 m_listProps.GetItemCount(), node.displayName.c_str(),
105 0, 0, 0, reinterpret_cast<LPARAM>(&node));
106 }
107 }
108 }
109 if (!m_root.childNodes.empty())
110 m_treeProps.SelectItem(m_root.childNodes.front().hItem);
111}
112
113/////////////////////////////////////////////////////////////////////////////
114// CDirAdditionalPropertiesDlg message handlers

Callers

nothing calls this directly

Calls 9

splitFunction · 0.85
countClass · 0.85
GetDisplayNamesMethod · 0.80
SelectItemMethod · 0.80
emptyMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
GetItemCountMethod · 0.45
frontMethod · 0.45

Tested by

no test coverage detected