author | Shawn O. Pearce <spearce@spearce.org> | |
Mon, 13 Nov 2006 21:06:38 +0000 (16:06 -0500) | ||
committer | Shawn O. Pearce <spearce@spearce.org> | |
Mon, 13 Nov 2006 21:06:38 +0000 (16:06 -0500) | ||
commit | 24263b77165edfd438045ed3c25ec6669b3e76d4 | |
tree | 72f79c514a509d0bf4779cdcac7ee7f8b8a4c7a1 | tree | snapshot |
parent | a37eee4406ff965fda4d234759aa58526657cbe3 | commit | diff |
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 <spearce@spearce.org>
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 <spearce@spearce.org>
git-gui | diff | blob | history |