MCDE dtphoto: every menu entry does something, and the test proves it

-menutest read only the command table against itself, so a menu line with
no command stayed invisible: it could be green while an entry did nothing.
It now reads dtphoto.menu and counts what resolves to no command -- 206
items, 0 unbound.  Counter-check: Select/Grow set to CMD_NONE makes it
print "1 unbound" and FAIL.

Four entries only refused before and now work: Window > Show Commands
opens a palette listing the command table itself (206 rows, measured
206x26 px of text in the widget, so it cannot drift from the menu),
Publisher Options sets the EPS resolution (72 and 288 dpi, the
%%BoundingBox scales with it), Adjustment Options the default for new
adjustment layers, and Show Channels/Show Paths show measurements from the
picture and the lasso path.  File > Acquire still refuses: there is no
scan source, and saying so beats a button that does nothing.

Real bug found on the way: Layer > Type > Horizontal/Vertical switched to
tool 7, which is crop; type is slot 8.

Measured on both depths (TrueColor :91, PseudoColor :98): 14 tests x 2 =
28 green, 0 red -- filtertest optest drawtest seltest movetest croftest
croptest typetest retouchtest selecttest selmodtest menutest exporttest
placetest printtest (the last with MCDE_PRINT_COMMAND=/tmp/dtpbin/lp,
230454 bytes spooled).
This commit is contained in:
lotherk committed 2026-11-22 15:26:45 +00:00
1 parent 3e3817a83d
commit f7716b640d
5 files changed
+1522 -204

No files matched your search

+18
View File
@@ -474,6 +474,24 @@ weichgezeichnet, dieselbe Kante zu 255 bzw. 0 geschaerft, eine
Mosaic-Zelle zu ihrem Mittelwert. Alle Tests gruen auf Tiefe 24 und
Tiefe 8, `-selftest` byte-identisch (2.359.350 Bytes, 0 Abweichungen).
Stand 2026-11-22 (alle Menuepunkte): `-menutest` liest jetzt auch
`dtphoto.menu` selbst und zaehlt, was im gelesenen Menue keinen Befehl
hat -- 206 Eintraege, 0 ungebunden. Vorher pruefte er nur die Tabelle
gegen sich selbst, das konnte gruen sein, waehrend ein Menueeintrag
nichts tat. Gegenprobe: `Select/Grow` auf CMD_NONE gesetzt, dann meldet
der Test "1 unbound" und FAIL.
Die vier Eintraege, die bis dahin nur eine Absage meldeten, tun jetzt
etwas: `Window > Show Commands` oeffnet eine Palette, die die Befehlstabelle
selbst auflistet (206 Zeilen, damit sie nicht von dem abweicht, was das
Menue bindet), `Edit > Publisher Options...` setzt die EPS-Aufloesung
(72/288 gemessen, das %%BoundingBox skaliert mit), `Layer > Adjustment
Options...` den Vorgabewert fuer neue Einstellungsebenen, und
`Window > Show Channels`/`Show Paths` zeigen echte Messungen aus dem Bild
bzw. den Lassopfad. `File > Acquire` bleibt eine Absage: es gibt keine
Scan-Quelle in diesem Build, und das zu sagen ist ehrlicher als ein
Knopf, der nichts tut. Ein echter Fehler dabei: `Layer > Type >
Horizontal/Vertical` schaltete auf Werkzeug 7 (crop) statt 8 (type).
Stand 2026-11-22 (View-Menue): Die Schalter des View-Menues werden nicht
nur gekippt, sondern gelesen. `SnapX`/`SnapY` ziehen einen Marquee- oder
Crop-Zug auf das Gitter oder eine Hilfslinie (eine Linie in Reichweite
+7
View File
@@ -128,6 +128,13 @@ narratives and test notes, is `docs/reference/mcde-agents-history-2026-11-13.txt
the test walks it without knowing the length. `DTPHOTO_CMDS=1` prints
what the loaded menu file bound: 206 of 206, none on CMD_NONE. Every
menu path in `dtphoto.menu` resolves, so a bound entry is a wired one.
The test also reads `dtphoto.menu` itself and counts the entries that
resolve to no command (206 items, 0 unbound, measured 2026-11-22): the
table checked against itself can be green while a line in the menu file
does nothing. Counter-check: `Select/Grow` on CMD_NONE makes the test
print "1 unbound" and FAIL, so the count is not decoration.
`Window > Show Commands` lists the command table itself (206 rows), not
a hand-kept list, so the palette cannot drift from what the menu binds.
`XmLoc` is the one place that casts a catalogue string for
`XmStringCreateLocalized`: `Tr` promises `const` because its English
fallback is a literal, and the widget asks for `char *`. Without it six
+1 -1
View File
@@ -5,7 +5,7 @@ bin_PROGRAMS = dtphoto
dtphoto_CPPFLAGS = -I$(top_srcdir)/include \
-DCDE_INSTALLATION_TOP=\"$(CDE_INSTALLATION_TOP)\"
dtphoto_LDADD = $(DTCLIENTLIBS) $(XTOOLLIB)
dtphoto_LDADD = $(LIBMCDESYS) $(DTCLIENTLIBS) $(XTOOLLIB)
if SOLARIS
dtphoto_LDADD += -lintl
File diff suppressed because it is too large. Load diff
@@ -8,3 +8,5 @@ $set 1
4 The picture could not be opened.
5 The picture could not be saved.
6 Tool Options
7 Nothing could be placed.
8 The picture could not be exported.