Skip to content

feat(settings): add modified-date format preference - #1102

Open
JoeJoeflyn wants to merge 2 commits into
mainfrom
feat/1101-modified-date-format
Open

JoeJoeflyn wants to merge 2 commits into
mainfrom
feat/1101-modified-date-format

Conversation

@JoeJoeflyn

@JoeJoeflyn JoeJoeflyn commented Sep 17, 2026

Copy link
Copy Markdown
Collaborator

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 as date_format; already-open labels re-render live via bind_preference and 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

image image

How to test

  1. Open Settings → Appearance → Date & time → Modified date format; each menu option shows a live example of the format.
  2. Pick ISO 8601 or Long — open file lists/details update immediately, and a second window updates too.
  3. 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

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.
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.

Configurable modified-date format (Relative / ISO 8601 / Long)

1 participant