Closes https://github.com/godotengine/godot-proposals/issues/2721
On `EditorFileDialog`:
* Add filter box that only shows folders and files in current directory that match
* Add sort button to sort files and directories
* Add a shortcut for CTRL+F for selecting the filter box
Also moved common code between `EditorFileDialog` and `FileSystemDock`
to it's own file.
Co-authored-by: fox <12120644+foxydevloper@users.noreply.github.com>
Some of these shortcuts are inspired by Visual Studio Code's defaults.
- Ctrl + Alt + C: Copy Absolute Path
- Ctrl + Alt + Shift + C: Copy UID
- Ctrl + Alt + R: Open in File Manager
- Ctrl + Alt + E: Open in External Program
- Ctrl + Alt + T: Open in Terminal
- Note: On Linux distributions that have Ctrl + Alt + T as a default
shortcut to open a terminal, the system shortcut takes priority
over this one.
The "Open Containing Folder in Terminal" text was shortened so that
the context menu doesn't become too wide with the default shortcut
annotations.
* Replaces `find(...) != -1` with `contains` for `String`
* Replaces `find(...) == -1` with `!contains` for `String`
* Replaces `find(...) != -1` with `has` for containers
* Replaces `find(...) == -1` with `!has` for containers
Random-access access to `List` when iterating is `O(n^2)` (`O(n)` when
accessing a single element)
* Removed subscript operator, in favor of a more explicit `get`
* Added conversion from `Iterator` to `ConstIterator`
* Remade existing operations into other solutions when applicable
There were (at least) three cases where thumbnails would not display, if they were generated while the FileSystemDock was not visible:
- current_path == "Favorites", due to p_path not starting with "Favorites"
- current_path == "res://", due to current_path having last "/" trimmed for comparison
- current_path pointing to a selected file instead of folder, since it no longer matches p_path's base directory
This change removes the current_path and is_visible_in_tree checks when determining whether to update the file's icon.
Fixes#90801Fixes#91432