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

Improve thumbnailing code Part 2: Clean up File.vala #2464

Merged
merged 9 commits into from
Sep 3, 2024

Conversation

jeremypw
Copy link
Collaborator

@jeremypw jeremypw commented Aug 30, 2024

Extracted from #2340

  • Rewrite and merge some icon related functions
  • Make some members into properties
  • Sanitize requested dimensions in public functions rather than ignore.
  • Assume dimensions valid in private functions
  • Always reset thumbstate on full update
  • Add explanatory comments to some functions

The naming of some functions and variables could be made less confusing but that will be done is another PR.

@jeremypw jeremypw changed the title Improve File.vala thumbnailing code Improve thumbnailing code Part 2: Clean up File.vala Aug 30, 2024
 * Sanitize dimension in public functions
 * Always return an non-null iconinfo
 * Always update file properties
 * Update_icon () only if dimensions change
 * Absorb update_icon_internal ()
 * This function is called by dialogs as well as views
@jeremypw jeremypw marked this pull request as ready for review August 30, 2024 19:12
@jeremypw jeremypw requested a review from a team August 30, 2024 19:12
Copy link
Member

@danirabbit danirabbit left a comment

Choose a reason for hiding this comment

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

This all makes sense to me afaict and everything still seems to be working correctly. Thanks for doing clean up!

@danirabbit danirabbit enabled auto-merge (squash) September 3, 2024 18:24
@danirabbit danirabbit merged commit 754164f into main Sep 3, 2024
4 checks passed
@danirabbit danirabbit deleted the jeremypw/improve-file-thumbnail-code branch September 3, 2024 18:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants