Show All/Range button

8 views
Skip to first unread message

Dave Lawrence

unread,
Sep 11, 2023, 4:58:21 PM9/11/23
to TortoiseSVN
Hello,

There's still one case where the "Show All"/"Show Range..." button in the Log window does the wrong thing. For example, if you open two Log windows that have the "Show All" button, but change one of them to "Show Range", the second dialog will do the Show Range action even though its button still says "Show All".

The button text is set based on the registry setting during dialog initialization. The code below changes it to not look at the registry again when you click the button. It always will do the action that corresponds to the current button text.

void CLogDlg::GetAll(bool bForceAll /* = false */)

{

    // fetch all requested log messages, either the specified range or

    // really *all* available log messages.

    UpdateData();

 

    INT_PTR entry = m_btnShow.m_nMenuResult;

    if (bForceAll)

        entry = ID_CMD_SHOWALL;

 

    if (entry == ID_CMD_DEFAULT)

    {

        CString buttonText;

        m_btnShow.GetWindowText(buttonText);

        if (buttonText == CString(MAKEINTRESOURCE(IDS_LOG_SHOWRANGE)))

            entry = ID_CMD_SHOWRANGE;

        else

            entry = ID_CMD_SHOWALL;

    }

 

    CRegDWORD reg = CRegDWORD(L"Software\\TortoiseSVN\\ShowAllEntry");

    reg = static_cast<DWORD>(entry);

...


Reply all
Reply to author
Forward
0 new messages