| 566 | } |
| 567 | |
| 568 | void JsonViewDlg::UpdateTitle() |
| 569 | { |
| 570 | const auto titleFileName = GetTitleFileName(); |
| 571 | if (!titleFileName.empty()) |
| 572 | { |
| 573 | if (!m_pCurrFileName) |
| 574 | { |
| 575 | m_pCurrFileName = std::make_unique<wchar_t[]>(FILENAME_LEN_IN_TITLE); |
| 576 | } |
| 577 | |
| 578 | if (_wcsicmp(m_pCurrFileName.get(), titleFileName.c_str()) != 0) |
| 579 | { |
| 580 | memset(m_pCurrFileName.get(), 0, FILENAME_LEN_IN_TITLE); |
| 581 | wcsncpy_s(m_pCurrFileName.get(), FILENAME_LEN_IN_TITLE, titleFileName.c_str(), _TRUNCATE); |
| 582 | |
| 583 | updateDockingDlg(); |
| 584 | } |
| 585 | } |
| 586 | } |
| 587 | |
| 588 | auto JsonViewDlg::GetTitleFileName() const -> std::wstring |
| 589 | { |