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

Feature: Added 'compress' attribute option to the properties window #16319

Merged
merged 20 commits into from
Dec 4, 2024

Conversation

d2dyno1
Copy link
Member

@d2dyno1 d2dyno1 commented Oct 7, 2024

Summary
This PR continues on the work made in the ya/CompressedAttribute branch and fixes the broken logic to actually enable/disable compression for items

FYI @yaira2

Resolved / Related Issues

Screenshots
image

Todo

  • Tested setting compression for files
  • Tested setting compression for folders
  • Add a GetVolumeInformation check to see if volume supports compression through FILE_FILE_COMPRESSION attribute

@0x5bfa 0x5bfa self-requested a review October 8, 2024 01:16
Copy link
Member

@0x5bfa 0x5bfa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Summary

  • Please use the constants win32metadata defines.
  • Simplified some if-else's.

src/Files.App/Helpers/Win32/Win32Helper.Storage.cs Outdated Show resolved Hide resolved
src/Files.App/Helpers/Win32/Win32Helper.Storage.cs Outdated Show resolved Hide resolved
src/Files.App/Helpers/Win32/Win32Helper.Storage.cs Outdated Show resolved Hide resolved
src/Files.App/Helpers/Win32/Win32Helper.Storage.cs Outdated Show resolved Hide resolved
@d2dyno1
Copy link
Member Author

d2dyno1 commented Oct 28, 2024

@0x5bfa I implemented the changes you requested. Unfortunately, some of them didn't compile and CsWin32 didn't feel like SG-ing enums for me so I reverted to the old values.

@0x5bfa
Copy link
Member

0x5bfa commented Oct 28, 2024

Can you try to add "COMPRESSION_FORMAT" and "FILE_ACCESS_RIGHTS" in NativeMethods.txt beforehand and use these enums?

@yaira2
Copy link
Member

yaira2 commented Nov 27, 2024

@d2dyno1 fyi

@yaira2 yaira2 requested a review from 0x5bfa December 2, 2024 16:29
@d2dyno1 d2dyno1 marked this pull request as ready for review December 3, 2024 00:02
@d2dyno1 d2dyno1 requested a review from 0x5bfa December 3, 2024 00:07
@d2dyno1
Copy link
Member Author

d2dyno1 commented Dec 3, 2024

I think we can move on with it @0x5bfa

@yaira2 yaira2 changed the title Implemented compression in properties Feature: Added 'compress' attribute option to the properties window Dec 3, 2024
@0x5bfa
Copy link
Member

0x5bfa commented Dec 4, 2024

Looks great.

@d2dyno1 d2dyno1 requested a review from yaira2 December 4, 2024 20:51
@yaira2 yaira2 merged commit 5b5541d into files-community:main Dec 4, 2024
6 checks passed
@yaira2 yaira2 added ready to merge Pull requests that are approved and ready to merge and removed needs - code review labels Dec 4, 2024
@d2dyno1 d2dyno1 deleted the d2/f_compress branch December 4, 2024 23:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready to merge Pull requests that are approved and ready to merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature: Add 'compress' attribute to folder/file
3 participants