Files
mcde/programs
lotherk 63acc18853 MCDE: one settings window for every program, dtpad first (t0164)
lib/DtWidget/McdePrefs.c and include/Dt/McdePrefs.h: the reference's
preferences window -- a row of icon tabs from appconfig/icons/C (the active
one pressed), the tab's form under it, no OK or Cancel.  A tab's form is
built the first time it is shown; Escape closes, the close box only hides
it.  McdePrefsRow() puts a right-aligned label left of a widget and stacks
the rows; McdePrefsSeparator() draws the group lines.

Values are kept in ~/.dt/<prog>.conf as KEY=VALUE (English, the tab shown
last as lasttab=) -- McdePrefsConf.c does that without X, so test_prefs
tests it without a display: get/set, keep the other keys, replace instead of
doubling, no comment pile-up.

dtpad is the first user: Options > Preferences... opens two tabs, "Editing"
(Wrap to fit, Overstrike) and "Window" (Status line).  A change goes to the
Dt Editor at once, the Options menu's toggle follows, and the value is
written.  At start dtpad overlays ~/.dt/dtpad.conf over its X resources, so
the next start has it.

Measured under Xvfb with xdotool:

  - Options > Preferences... shows the icon tabs and the rows
    (docs/screenshots/leopard/dtpad-preferences-mcde.png);
  - switching "Wrap to fit" on writes "wrap=1" into ~/.dt/dtpad.conf (cat;
    the header is written once, lasttab=Editing is kept);
  - starting dtpad with "wrap=1" and "status=1" in that file shows the
    status line (Line: 1  Total: 1) without any menu being touched -- the
    change survives a restart;
  - Escape closes the window;
  - make check in lib/DtWidget: test_prefs PASS.

Open: dtfile's Prefs.c and dtcalendar (t0149, not built yet) are not moved
to it -- dtpad proves the building block; Command+, still finds a program's
menu entry through the old name heuristic instead of an explicit
registration.  Both are follow-up tasks.
2026-11-14 11:52:34 +00:00
..