MCPcopy Create free account
hub / github.com/NPP-JSONViewer/JSON-Viewer / UpdateTitle

Method UpdateTitle

src/NppJsonViewer/JsonViewDlg.cpp:568–586  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

566}
567
568void 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
588auto JsonViewDlg::GetTitleFileName() const -> std::wstring
589{

Callers 1

ProcessNotificationMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected