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

Method UpdateHeaderPath

Src/HexMergeDoc.cpp:616–639  ·  view source on GitHub ↗

* @brief Write path and filename to headerbar * @note SetText() does not repaint unchanged text */

Source from the content-addressed store, hash-verified

614 * @note SetText() does not repaint unchanged text
615 */
616void CHexMergeDoc::UpdateHeaderPath(int pane)
617{
618 CHexMergeFrame *pf = GetParentFrame();
619 ASSERT(pf != nullptr);
620 String sText;
621
622 if (m_nBufferType[pane] == BUFFERTYPE::UNNAMED ||
623 m_nBufferType[pane] == BUFFERTYPE::NORMAL_NAMED)
624 {
625 sText = m_strDesc[pane];
626 }
627 else
628 {
629 sText = m_filePaths.GetPath(pane);
630 if (m_pDirDoc != nullptr)
631 m_pDirDoc->ApplyDisplayRoot(pane, sText);
632 }
633 if (m_pView[pane]->GetModified())
634 sText.insert(0, _T("* "));
635 pf->GetHeaderInterface()->SetCaption(pane, sText);
636 pf->GetHeaderInterface()->SetPath(pane, m_filePaths.GetPath(pane));
637
638 SetTitle(nullptr);
639}
640
641
642/**

Callers

nothing calls this directly

Calls 7

ApplyDisplayRootMethod · 0.80
GetModifiedMethod · 0.80
SetCaptionMethod · 0.80
GetPathMethod · 0.45
insertMethod · 0.45
GetHeaderInterfaceMethod · 0.45
SetPathMethod · 0.45

Tested by

no test coverage detected