Commit Graph
12 Commits
Author SHA1 Message Date
lotherk 12fe1a192b dtfile: Eject in the Selected menu and Command+E (t0093)
The network view's warning names Eject; now dtfile has it.  The Selected
menu carries "Eject" (mnemonic E) after "Put in Trash", and Command+E is
bound in the drawing area's translation block (Mod4<Key>e:McdeKey(@,eject)).
Both call McdeEjectSelection(): it takes the selected folders, asks
mcde_sys_disks for the mounted volume whose mountpoint is one of them, and
unmounts it through mcde_sys_disk_unmount -- never a shell, and McdeSys
refuses what the computer runs from.  No selection or no mounted volume gets
a sentence instead; a refused unmount shows mcde_sys_error() (as a user,
udisksctl asks polkit and fails without an agent -- measured).

The menu table is a fixed XtCalloc(menuItemCount): the new item made it 69
entries, so menuItemCount goes from 68 to 69 (51 to 52 without the Trash
menu).  Without that, opening the Selected menu crashed the window (the
overflow was found by the menu click, not by the build).

Catalog: set 20 messages 173 "Eject", 174 "E", 175/176 the two answers, in
dtfile.msg and the German copy.  The desktop's warning now says "Eject in
the file manager (Command+E) or Unmount in the Disk Utility"; its screenshot
docs/screenshots/leopard/Device-Removal-mcde.png is renewed.

Measured (Xvfb, a 32 MB image with one ext4 partition on /dev/loop0p1):
- as the user on :82: the Selected menu shows "Eject" and the window
  survives (0x60002d, 213x218); Command+E opens the Eject message
  "/usr/bin/udisksctl did not succeed (status 1)." -- the key reaches the
  call, polkit refuses a user.
- as root under a root ttsession on :83 (ttsession -c dtfile): selecting the
  mounted folder and Selected > Eject unmounts; findmnt then prints
  "UNMOUNTED" for /tmp/opencode/ejecttest/mnt.
- after that Eject, a simulated removal of loop0p1 in dtwm
  (MCDE_DESK_TEST_DEVICE) logs only "desktop: loop0p1 (remove)" and opens
  0 dialogs -- a volume that was put away stays quiet.
- make mcde-linux MCDE_DIRS="install programs/dtfile" and "install
  programs/localized/C/msg" exit=0; gencat reads both catalogs;
  MCDE_DIRS=plist "mcde-plist-check: ok".
2026-11-16 14:24:00 +00:00
lotherk 96909c0813 MCDE dtfile: the strip view, the fourth Finder view without 3D (t0090)
A new view beside icons, small icons and the columns (Command+4): the chosen
picture large in the middle, three neighbours each side, flat, in Motif's
frame colours -- no perspective, no reflection, no glide; a redraw happens on
Expose and when the choice changes.  Under the strip the name is bold and
the kind follows (the type's label), then a scroll bar for the strip, then
the folder's list; the chosen line is selected and moves with the strip.

Pictures come from McdeThumb: only the visible entries are read, and the
second visit of a folder reads ~/.dt/thumbs (MCDE_THUMB_DEBUG=1 makes the
cache line appear; tools/mcde-shot.sh passes the variable into the session).
A file that is no picture is named where its neighbours are.

The arrows walk the strip (the list follows), Space is the file window's
preview, and the toolbar has the fifth toggle "Strip" -- its icon is the
folder's.  Command+4 was the small-icon view; that moved to Command+5
(docs/reference/shortcuts.txt), as the strip takes the fourth place of the
reference's four views.

Measured under Xvfb with xdotool, a folder of 13 PNGs:

  - Command+4 shows Bild-01 large with its neighbours
    (docs/screenshots/leopard/finder-cover-flow-mcde.png shows Bild-03
    chosen: two left, three right, "Bild-03.png" bold over "PNG", the list
    with Bild-03 selected);
  - Right twice walks to Bild-03 and the list's third line is selected;
  - switching to Icons and back to Strip serves three of the visible
    pictures from the cache: "thumb: .../Bild-02.png from the cache" and its
    neighbours in the log (MCDE_THUMB_DEBUG=1);
  - the strip's own drawing area takes the arrows and Space.

Open: the strip has its own list, not CDE's work-area list below it (the
status line and the other views' selection are not shared), and the split is
fixed -- no sash to drag.  Idle traffic was not measured separately; the
strip draws only on Expose and on a change, and McdeThumb reads no timer.
2026-11-14 11:37:22 +00:00
lotherk 7e5ae467cd MCDE dtfile: Get Info, the window with the sections (t0101)
File > Get Info (Cmd+I) opens the reference's Info window instead of the
CDE permissions dialog: the name, its size and date, then sections that
open and close with a click -- General (kind, size, on disk, where,
created, modified, locked), Permissions (owner, group, everyone: read and
write, read only, none), Comment (an extended attribute) and Preview (the
miniature of McdeThumb).  One window per file manager: Cmd+I again replaces
what it shows and the sections keep their state.  The old "Change
Permissions..." item stays in the menu, without the key.

Two new McdeSys calls, because a program does not touch the file system's
specialties itself (ext/src/mcde/AGENTS.md): mcde_sys_file_comment_get/set
(user.mcde.comment on Linux, EXTATTR_NAMESPACE_USER "mcde.comment" on
NetBSD, MCDE_SYS_ENOTSUP where there are none) and
mcde_sys_file_locked_get/set (FS_IMMUTABLE_FL on Linux, chflags(2)
UF_IMMUTABLE on NetBSD; a normal user may not set it on Linux, the box then
stays as it was).  "Created" says "not known" where POSIX has no birth time
(Linux); NetBSD shows st_birthtime.

Measured under Xvfb with xdotool: Cmd+I on Bild.png opens the window with
General/Permissions/Comment/Preview (docs/screenshots/leopard/
finder-get-info-mcde.png, the comment read back from the attribute); the
Owner menu to "Read only" on a 0664 file leaves -r--rw-r-- (chmod 0464);
the Comment field saved "Wichtig" and
python3 -c "os.getxattr(..., 'user.mcde.comment')" returns b'Wichtig';
clicking "General" collapses it to ">" and the sections below move up.

Open: "Open with" and the label colours of the reference are not there yet
(the action list and a user.dt mapping are a task of their own); the
program's icon is missing in the development session (t0194, no data
types), the sections are ASCII arrows, and dtwm places the window at the
corner (the picture moves it with xdotool).
2026-11-14 07:21:00 +00:00
lotherk b4eb4949bc MCDE dtfile: the Trash is emptied after one clear question (t0095)
The CDE "Shred File(s)" question is replaced by the reference's dialog: the
title "Empty Trash", the question with the number of objects ("Remove the 3
items in the Trash permanently?"), "You cannot undo this action." under it,
and the buttons "Empty Trash" (the default) and "Cancel"; no Help button.
The question carries the rendition tag "bold" -- CDE's app-defaults define
no rendition tags, so the tag falls back to the dialog's font (measured in
the screenshot) until a render table defines one.  The count is read from
~/.dt/Trash when the dialog opens, not from a list a view filled.

The Trash also reaches the File menu of every window (Open Trash, Empty
Trash...), which the CDE source had behind an undefined ADD_SHOW_TRASH and
whose ShowTrash still called the old five-argument handler; the menu now
compiles and calls the current one.  Shift+Cmd+Delete is the menu item's
accelerator (text in Dtfile, the key as a translation of the work area, so
that it also works with the focus in the path field).  The Trash is
initialized on first use, as the trash view does it.

Measured under Xvfb with xdotool, three objects in ~/.dt/Trash:
docs/screenshots/leopard/finder-empty-trash-mcde.png shows the dialog;
"Empty Trash" leaves ~/.dt/Trash empty (ls -A: nothing, .trashinfo gone);
"Cancel" and Escape leave all three files and .trashinfo in place.
tools/mcde-shot.sh exports DTDATABASESEARCHPATH as dtsession would.

Open: the dialog is placed in the screen's corner, not centered over the
window (dtwm's placement, tried with XmNtransientFor and XmNx/XmNy);
Motif's button order puts "Empty Trash" left of "Cancel", the reference has
Cancel left; the bold question waits for a rendition tag in the CDE theme.
2026-11-14 05:54:10 +00:00
lotherk a08599a461 MCDE dtfile: Space previews the chosen file (t0118)
Space opens a small window beside the file manager with what is chosen: a
picture scaled to the room beside the window, the first 64 KB of a text, a
folder's icon and how much is in it, the type's icon for anything else.
Space again, Escape or the window's close button hides it, and a change of
the selection -- a click, an arrow key, the column view's list -- replaces
the content.  Option+Space puts it over the whole screen through
_NET_WM_STATE_FULLSCREEN.  The picture is read in the idle time through
McdeThumbRequest, one per work proc, and the window is placed beside the
one it belongs to, never over the list (dtwm does not raise on focus).

tools/mcde-shot.sh gained MCDE_SHOT_SETUP (fill the fresh test home) and
MCDE_SHOT_ACTIONS (drive the program with xdotool before the picture);
docs/screenshots/ records the states, never the reference's artwork.

Measured on Xvfb with xdotool: Space opens the preview
(docs/screenshots/leopard/finder-quick-look-mcde.png) and a text file in it
(finder-quick-look-text-mcde.png); choosing another icon replaces its title
and picture (Bild-5.png); Space and Escape close it, and without a preview
Escape still runs the two actions it replaced (DrawingAreaInput,
ManagerGadgetSelect).  The column view's list keeps its own selection; the
preview follows it there too, but Space in that list is not wired yet (the
list has the focus, not the work area) -- the next step, together with a
list translation for it.
2026-11-13 23:59:51 +00:00
lotherkandClaude Sonnet 5.5 edb0e6949c MCDE: Mac OS X keyboard shortcuts through the desktop (Cmd+space dtlaunch, f.mcde_app, bar commands, dtterm/dtfile keys); fuse-afpfs-ng dropped from the build
The makronix set list is regenerated (46569 entries,
build/logs/x-userland-2026-11-13d.log); mcde-host exit=0
(build/logs/mcde-host-2026-11-13c.log).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-13 12:05:06 +00:00
lotherk 57d88b94b9 MCDE S2: the desktop's events play -- dtfile, dtwm, dtterm
dtfile plays OpenFolder when a directory opens (Main.c, GetNewView) and
Launch when a file starts (Columns.c, ColumnOpen); dtwm plays DeskSwitch on
ChangeToWorkspace; dtterm's bell plays TerminalBell instead of XBell and
falls back to XBell when no server runs.  The three programs link
libMcdeSound; the theme gained TerminalBell.

Measured under Xvfb with ttsession and dtwm:
  mcdesoundd: OpenFolder -> .../open_folder.wav (player)
  mcdesoundd: TerminalBell -> .../terminal_bell.wav (player)
DeskSwitch is built but not exercised (it needs a workspace switch in dtwm).
2026-11-12 12:32:14 +00:00
lotherkandClaude Opus 5.5 6de349e604 mcde: dtfile: Network, a browser for the computers around
"Network" in the sidebar shows, in place of the work area: the
computers that announce themselves by DNS-SD (McdeSys), what the chosen
one offers -- its files by SFTP, a terminal by SSH, its NFS exports, its
SMB shares (listed; NetBSD has no SMB client that mounts) -- and
"Connect to Server:" for sftp://, nfs:// and afp:// addresses.  A share
is mounted on ~/Network/HOST[/NAME] and opened in the window; a server
that wants a password gets a dialog whose field shows stars, and the
mount is tried again with it.  Finding takes a few seconds and runs once
the view is drawn; going to any folder leaves the view.

Measured on Xvfb (build/mcde-shots/df-*.png): Network found the 4
computers of the LAN, by the names they give; KITT listed its SMB share
"nobody"; Connect to sftp://localhost without a key asked for the
password (nothing mounted).  Through McdeSys on the host:
sftp://127.0.0.1/.../www mounted with the user's key, its files were
there, and it was unmounted again.  Not measured: NFS and AFP mounts,
and anything of this on NetBSD past the build (no LAN in the VM).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 12:54:19 +00:00
lotherkandClaude Opus 5.5 d0fd050046 mcde: dtfile: the column view
A fourth view button, Columns: one column per folder from Home (or /)
down to the window's folder, as many of the deepest as fit, and on the
right a preview of what is chosen -- the type's icon, its kind (TYPE_LABEL
as words, and the MIME type), size and date.  A folder chosen opens the
next column and becomes the window's folder through dtfile's own
ChangeDirectoryToParent, so title, path bar, history and the other views
follow; Back, Forward and the places rebuild the columns; a double click
on a file runs the first action of its type.

The columns are a sibling of CDE's work frame with its attachments; they
are managed before the work frame is unmanaged, with the form around held
at XmRESIZE_NONE: otherwise the window shrank to the columns' own size.

Measured on Xvfb (build/mcde-shots/df-*.png): Columns, Documents,
Projects, plan.txt -- three columns, the preview with the text icon,
"Kind: Textfile (text/plain)", 6 bytes; Back rebuilt the columns at
Documents; Icons brought the work area back; the window kept its size.
Not measured: the double click.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 09:00:01 +00:00
lotherkandClaude Opus 5.5 92f1d6a762 mcde: dtfile: search field, view buttons right at start, places and Back/Forward fixed
- A search field in the toolbar narrows the window to the names with the
  text (any case); FilterFiles asks _McdeNavHidden, the text is kept per
  window in Navigation.c; a new directory starts with an empty search.
- The view buttons show the window's view from the start, and the first
  directory starts the history: the first window gets it without
  ShowNewDirectory, so both are set once the window's data is attached.
- ChangeDir.c: the desktop folder's lock compared two empty ToolTalk paths
  and refused every folder ('restricted folder' with an empty name); it
  compares real paths only.
Tested on Xvfb with dtwm: Icons pressed at start, List, Documents from the
sidebar, Back to home, Forward to Documents, 're' leaves report.pdf.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 18:17:13 +00:00
lotherkandClaude Opus 5.5 94f116c272 mcde: builds on Linux (GCC 15); dtfile gets toolbar, sidebar, history, free space; make mcde-linux, mcde-shot
- configure.ac: the C dialect (-std=gnu11 and five GCC 14 downgrades) is
  configure's own, also handed to dtksh's ksh93 build (MCDE_DIALECT_CFLAGS).
- The pkgsrc placeholders folded in from wm/cde (@PREFIX@, @VARBASE@,
  @PKG_SYSCONFDIR@) are configure options now: --with-logfiles-dir,
  --with-config-dir, --with-local-bindir; and --with-pamdir (dtlogin,
  dtsession) and --with-calendar-dir (dtcm, rpc.cmsd) replace paths that
  were fixed.  Defaults unchanged; the recipe passes its paths.
- dtfile: programs/dtfile/Navigation.c -- Back/Forward with a history per
  window, views Icons/Small/List, places in a sidebar, free space in the
  status line (statvfs).  Screenshot: build/mcde-shots/dtfile-7.png.
- make mcde-linux (tools/mcde-linux.sh): the development build on this host,
  every system path under build/mcde-root.  tools/mcde-shot.sh: run a
  program on a private Xvfb with ttsession and dtwm, empty environment and
  its own HOME, take a screenshot.  tools/ext-sync.sh: ext recipes into
  pkgsrc/<cat>/<name>.

Measured: build/logs/mcde-linux-install3-2026-11-09.log (mcde-linux exit=0).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 20:32:32 +00:00
lotherkandClaude Opus 5.5 3b2a54c64b ext/src/mcde: import CDE 2.5.3 and pkgsrc wm/cde unchanged (the base of the MCDE fork)
cde-2.5.3.tar.gz, SHA512 a01b413b... as in pkgsrc distinfo; recipe from
pkgsrc 3c1118e94432.  Added with -f: CDE's .gitignore hides 612 files of
the archive.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 19:36:46 +00:00