From: Shawn O. Pearce Date: Mon, 13 Nov 2006 21:06:38 +0000 (-0500) Subject: git-gui: Implemented multiple selection in file lists. X-Git-Tag: gitgui-0.6.0~214 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/24263b77165edfd438045ed3c25ec6669b3e76d4?hp=24263b77165edfd438045ed3c25ec6669b3e76d4 git-gui: Implemented multiple selection in file lists. Because I want to let users apply actions to more than one file at a time we really needed a concept of "the current selection" from the two file lists. Since I'm abusing a Tk text widget for the file displays I can't really use the Tk selection to track which files are picked and which aren't. So instead we keep this in an array to tell us which paths are currently selected and we use an inverse fg/bg for the selected file display. This is common most operating systems as a selection indicator. The selection works like most users would expect; single click will clear the selection and pick only that file, M1-click (aka Ctrl-click or Cmd-click) will toggle the one file in/out of the selection, and Shift-click will select the range between the last clicked file and the currently clicked file. Signed-off-by: Shawn O. Pearce ---