Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: expanded file deletion/trashing #409

Merged
merged 82 commits into from
Sep 1, 2024
Merged

feat: expanded file deletion/trashing #409

merged 82 commits into from
Sep 1, 2024

Conversation

CyanVoxel
Copy link
Member

This is an extension to the work done in #282. This includes:

  • Files are now sent to the *system trash instead of being hard-deleted
  • Added ability to delete multiple files at once via multi-selection
  • Added confirmation dialogue boxes when deleting files
  • Added status bar updates for files being deleted
  • Added Edit Menu option for deleting files
  • Added Delete key shortcut for deleting files
  • Added context menu option to delete file via the Preview Panel
  • Clarify context menu action name
  • Gracefully fail on files that cannot be deleted, with status bar updates
  • Fixed not being able to delete currently-playing videos and GIFs

* On Windows, I can't find a way to tell when a file will be hard-deleted if the OS can't send it to the Recycle Bin. After spending much time on this, I've decided to settle on providing an extra intimidating confirmation dialogue message in place of being able to handle this case.

Closes #269.

NOTE: This PR relies on #390 being pulled first.

Windows screenshots:
image
image

CyanVoxel added 30 commits July 19, 2024 07:39
- Fix RAW images not being loaded correctly in the preview panel
- Fix trying to read size data from null images
- Refactor `os.stat` to `<Path object>.stat()`
- Remove unnecessary upper/lower conversions
- Improve encoding compatibility beyond UTF-8 when reading text files
- Code cleanup
seakrueger and others added 19 commits August 31, 2024 13:20
Mostly as a fallback for xserver.
Moves the previous updated blurb from the README to the new CONTRIBUTING
file. Also reworks some wording to link to the Flake nix wiki page for
nix users who haven't enable flakes yet.
This refactors the file deletion code to send files to the system trash instead of performing a hard deletion. It also fixes deleting video files and GIFs loaded in the Preview Panel.
- Make "Yes" the default choice in the delete file modal for both Windows and macOS (Linux untested)
- Change status messages to be more broad, since they also are displayed when cancelling the operation
Not perfect, and mostly a port of the previous edition. Hours have
already been sunk into this, and need to get this out for consumption,
and for ironing out.
For more information see: https://devenv.sh

NOTE: impure is used only because of the devenv-managed state, do not be
alarmed!
* Enable hardware acceleration for Nix devenv

Section "nativeBuildInputs" needs the dependency "qt6.full" to provide hardware acceleration in QT.
Library "wayland" is needed to create a proper OpenGL context under Wayland as well.

Provide a check for open AMD driver and use it for VDPAU video hardware acceleration.

Move "wrapQtAppsHook" to it's correct place under "nativeBuildInputs".

* Add xorg.libXrandr for hardware accelerated video playback.

Using libva and openssl libraries eliminates the need for a dependency on the qt6.full library.
Use path as an input that can be overriden automatically when direnv is
in use.
nix-direnv version present in .envrc has been updated, using watch_file on the flake is already handled.
- Cleanup direnv-root file
- Set filetype for vi-like editors
- Format and lint according to shellcheck and shfmt
This reverts commit 80ebffa, reversing
changes made to c8dde27.
@CyanVoxel
Copy link
Member Author

(Sorry for the commit flood, this PR just got caught up in a a big rebasing mess upstream)

@CyanVoxel CyanVoxel merged commit 8219ffc into Alpha-v9.4 Sep 1, 2024
8 checks passed
@CyanVoxel CyanVoxel deleted the file-deletion branch September 1, 2024 20:39
CarterPillow pushed a commit to CarterPillow/TagStudio that referenced this pull request Sep 7, 2024
* feat: send deleted files to system trash

This refactors the file deletion code to send files to the system trash instead of performing a hard deletion. It also fixes deleting video files and GIFs loaded in the Preview Panel.

* feat(ui): add file deletion confirmation boxes

* feat(ui): add delete file menu option + shortcut

* ui: update file deletion message boxes

* fix(ui): same default confirm button on win/mac

- Make "Yes" the default choice in the delete file modal for both Windows and macOS (Linux untested)
- Change status messages to be more broad, since they also are displayed when cancelling the operation

* ui: show perm deletion warning on all platforms
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: Medium An issue that shouldn't be be saved for last Type: Enhancement New feature or request Type: File System File system interactions Type: QoL A quality of life (QoL) enhancement or suggestion Type: Refactor Code that needs to be restructured or cleaned up Type: UI/UX User interface and/or user experience
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants