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).
18 lines
477 B
C
18 lines
477 B
C
/*
|
|
* Info.h -- MCDE: the Info window of the file manager (Info.c)
|
|
*
|
|
* Copyright (c) 2026 The Makronix project. GNU LGPL 2.0 or later, as CDE.
|
|
*/
|
|
|
|
#ifndef _Info_h
|
|
#define _Info_h
|
|
|
|
#include "FileMgr.h"
|
|
|
|
/* Get Info (Cmd+I): a narrow window with the file's name, size and date
|
|
* and collapsible sections -- General, Permissions, Comment, Preview. A
|
|
* second call for the same window replaces what it shows. */
|
|
extern void _InfoShow(FileMgrRec *rec);
|
|
|
|
#endif /* _Info_h */
|