feat(settings): add modified-date format preference - #1102
Open
JoeJoeflyn wants to merge 2 commits into
Open
JoeJoeflyn wants to merge 2 commits into
JoeJoeflyn wants to merge 2 commits into
Conversation
Relative/ISO 8601/Long choice under Appearance → Date & time, each option rendering a live example. Sub-hour recency follows elapsed time so fresh files stay "Nm ago" across midnight, and mtimes within a minute of now count as clock skew rather than future files.
…eManager Reading ThemeManager::shared() inside modified_date_for_seconds ran a GObject weak-ref upgrade plus a preferences borrow on every modified label render, inside the list row bind path. That extra work in the bind handler let GTK recycle the row before the deferred thumbnail park ran, so the request was already cancelled and unbind_cancels_pending_ thumbnail_work timed out waiting for pending work. Mirror the existing reduce_motion pattern: ThemeManager pushes the parsed DateFormat into a util-side cell on load and in set_date_format, so the render path reads a thread-local with no manager interaction.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds a Modified date format preference under Settings → Appearance → Date & time with three choices, each rendering a live example in the dropdown: Relative (default), ISO 8601 (
2026-09-17 14:30), and Long (September 17, 2026, 14:30). Persisted asdate_format; already-open labels re-render live viabind_preferenceand a bound-label registry that survives row recycling.Fixes two Relative-mode bugs: sub-hour recency now uses elapsed time (a file saved at 23:59 no longer becomes "Yesterday" at 00:00), and mtimes within a minute of now count as clock skew rather than rendering a raw ISO timestamp.
Visual evidence
How to test
touch -d "23:59 yesterday"a file; Relative shows "Yesterday, 23:59"; a file under an hour old shows "Nm ago" even across midnight.Expected result: chosen format applies everywhere, live; Relative keeps "just now"/"Nm ago" across the day boundary.
Related issue
Closes #1101