MCPcopy Create free account
hub / github.com/CobaltFusion/DebugViewPP / OnSources

Method OnSources

DebugView++/MainFrame.cpp:1258–1278  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1256}
1257
1258void CMainFrame::OnSources(UINT /*uNotifyCode*/, int /*nID*/, CWindow /*wndCtl*/)
1259{
1260 CSourcesDlg dlg(m_sourceInfos);
1261 if (dlg.DoModal() != IDOK)
1262 return;
1263
1264 auto pSources = m_logSources.GetSources();
1265 for (auto& pSource : pSources)
1266 {
1267 if (dynamic_cast<DbgviewReader*>(pSource) || dynamic_cast<SocketReader*>(pSource))
1268 m_logSources.Remove(pSource);
1269 }
1270
1271 auto sourceInfos = dlg.GetSourceInfos();
1272 for (auto& sourceInfo : sourceInfos)
1273 {
1274 if (sourceInfo.enabled)
1275 AddLogSource(sourceInfo);
1276 }
1277 m_sourceInfos = sourceInfos;
1278}
1279
1280void CMainFrame::AddLogSource(const SourceInfo& info)
1281{

Callers

nothing calls this directly

Calls 3

GetSourcesMethod · 0.80
GetSourceInfosMethod · 0.80
RemoveMethod · 0.45

Tested by

no test coverage detected