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 1abb2d5e03
commit 9e88c59fe9
4 files changed
+1504 -204

No files matched your search

+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
+1494 -203
View File
File diff suppressed because it is too large. Load diff
+2
View File
@@ -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.