project panel: Allow selecting multiple entries & add support for multiselect actions (#12363)

Fixes #4983 
TODO:
- [x] Improve release note.
- [x] Tests

Release Notes:

- Project panel now supports selecting multiple entries via cmd-click
and shift-click/shift-up/shift-down.
- Added support for handling multiple selected project panel entries to
Cut, Copy, Trash and Delete actions.
This commit is contained in:
Piotr Osiewicz 2024-05-28 15:51:23 +02:00 committed by GitHub
parent 1cf3496fda
commit 016a1444a7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 581 additions and 174 deletions

View File

@ -585,7 +585,10 @@
"cmd-backspace": ["project_panel::Delete", { "skip_prompt": false }],
"cmd-delete": ["project_panel::Delete", { "skip_prompt": false }],
"alt-cmd-r": "project_panel::RevealInFinder",
"alt-shift-f": "project_panel::NewSearchInDirectory"
"alt-shift-f": "project_panel::NewSearchInDirectory",
"shift-down": "menu::SelectNext",
"shift-up": "menu::SelectPrev",
"escape": "menu::Cancel"
}
},
{

File diff suppressed because it is too large Load Diff

View File

@ -5113,6 +5113,7 @@ pub struct ProjectEntryId(usize);
impl ProjectEntryId {
pub const MAX: Self = Self(usize::MAX);
pub const MIN: Self = Self(usize::MIN);
pub fn new(counter: &AtomicUsize) -> Self {
Self(counter.fetch_add(1, SeqCst))