[Feature request with patch] Add hotkeys for Copy Revisions

25 views
Skip to first unread message

Dave Lawrence

unread,
Feb 13, 2023, 7:55:03 PM2/13/23
to torto...@googlegroups.com
Add accelerators to the log window to copy revisions to the clipboard: Alt-Ctrl-C or Ctrl-R.

Note, as far as I can tell, this code is obsolete so I removed it:

void CLogDlg::CopySelectionToClipBoard() const
{
    if ((GetKeyState(VK_CONTROL) & 0x8000) && ((GetKeyState(L'C') & 0x8000) == 0) &&
        ((GetKeyState(VK_INSERT) & 0x8000) == 0))
    {
        CopyCommaSeparatedRevisionsToClipboard();
    }
    else
    {
        CopySelectionToClipBoard(!(GetKeyState(VK_SHIFT) & 0x8000));
    }
}


It was originally added in revision 24175 as a way to copy revisions by holding down Ctrl while selecting "Copy to Clipboard" from the context menu. It also checks for 'C' and Insert keys so Ctrl-C and Ctrl-Insert do not copy revisions to the clipboard. Since the Copy option was replaced with a submenu, I don't see any conditions that would cause that branch to be taken anymore.
CopyRevisions.patch

Stefan

unread,
Feb 16, 2023, 11:38:21 AM2/16/23
to TortoiseSVN
Thanks for your patch, but it doesn't compile. I guess because the resource.h file is in utf-16 and therefore not included in the patch file.

please check r29525, maybe that's what you're looking for?


Dave Lawrence

unread,
Feb 16, 2023, 2:15:09 PM2/16/23
to TortoiseSVN on behalf of Stefan
It looks like r29525 changes the behavior of Ctrl-Shift-C, which currently copies the log without changed paths (done in the else statement.) I didn't want to remove that behavior so I was adding separate hotkeys.

Here's what was missing from the patch if you want to try it again...

In resource.h, I added a new command:

#define ID_POPUP_UPDATEALL              32877
#define ID_LOGDLG_MONITOR_CLEARERRORS   32878
#define ID_LOGDLG_COPYREVISIONS         32879


In TortoiseProcENG.rc I added two new hotkeys:

IDR_ACC_LOGDLG ACCELERATORS
BEGIN
    "C",            ID_EDIT_COPY,           VIRTKEY, CONTROL, NOINVERT
    "C",            ID_EDIT_COPY,           VIRTKEY, SHIFT, CONTROL, NOINVERT
    "C",            ID_LOGDLG_COPYREVISIONS,VIRTKEY, ALT, CONTROL, NOINVERT
    "R",            ID_LOGDLG_COPYREVISIONS,VIRTKEY, CONTROL, NOINVERT




On Thu, Feb 16, 2023 at 8:38 AM Stefan via TortoiseSVN <torto...@googlegroups.com> wrote:
Thanks for your patch, but it doesn't compile. I guess because the resource.h file is in utf-16 and therefore not included in the patch file.

please check r29525, maybe that's what you're looking for?


--
You received this message because you are subscribed to the Google Groups "TortoiseSVN" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tortoisesvn...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tortoisesvn/81cfbcf5-8c38-48af-8855-7db445e8dddbn%40googlegroups.com.

Stefan

unread,
Feb 18, 2023, 2:51:09 AM2/18/23
to TortoiseSVN
committed your patch in r29526
Reply all
Reply to author
Forward
0 new messages