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

Method ChangeMergeMenuText

Src/MergeFrameCommon.cpp:454–494  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

452}
453
454void CMergeFrameCommon::ChangeMergeMenuText(int srcPane, int dstPane, CCmdUI* pCmdUI)
455{
456 String text;
457 switch (pCmdUI->m_nID)
458 {
459 case ID_L2R:
460 text = (srcPane == 0 && dstPane == 1) ?
461 _("Copy to &Middle\tAlt+Right") : _("Copy to &Right\tAlt+Right");
462 break;
463 case ID_R2L:
464 text = (srcPane == 2 && dstPane == 1) ?
465 _("Copy to &Middle\tAlt+Left") : _("Copy to L&eft\tAlt+Left");
466 break;
467 case ID_COPY_FROM_LEFT:
468 text = (srcPane == 1 && dstPane == 2) ?
469 _("Copy from Middle\tAlt+Shift+Right") : _("Copy from Left\tAlt+Shift+Right");
470 break;
471 case ID_COPY_FROM_RIGHT:
472 text = (srcPane == 1 && dstPane == 0) ?
473 _("Copy from Middle\tAlt+Shift+Left") : _("Copy from Right\tAlt+Shift+Left");
474 break;
475 case ID_L2RNEXT:
476 text = (srcPane == 0 && dstPane == 1) ?
477 _("Copy to Middle and Advance\tCtrl+Alt+Right") : _("C&opy to Right and Advance\tCtrl+Alt+Right");
478 break;
479 case ID_R2LNEXT:
480 text = (srcPane == 2 && dstPane == 1) ?
481 _("Copy to Middle and Advance\tCtrl+Alt+Left") : _("Copy &to Left and Advance\tCtrl+Alt+Left");
482 break;
483 case ID_ALL_RIGHT:
484 text = (srcPane == 0 && dstPane == 1) ?
485 _("Copy All to Middle") : _("Copy &All to Right");
486 break;
487 case ID_ALL_LEFT:
488 text = (srcPane == 2 && dstPane == 1) ?
489 _("Copy All to Middle") : _("Cop&y All to Left");
490 break;
491 }
492 if (!text.empty())
493 pCmdUI->SetText(text.c_str());
494}
495
496std::pair<int, int> CMergeFrameCommon::MenuIDtoXY(UINT nID, int nActivePane, int nBuffers)
497{

Callers

nothing calls this directly

Calls 2

SetTextMethod · 0.80
emptyMethod · 0.45

Tested by

no test coverage detected