| 1256 | } |
| 1257 | |
| 1258 | void 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 | |
| 1280 | void CMainFrame::AddLogSource(const SourceInfo& info) |
| 1281 | { |
nothing calls this directly
no test coverage detected