Files
mcde/programs/dtfile/Navigation.h
T
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

33 lines
1.5 KiB
C

/*
* Navigation.h -- MCDE: the navigation parts of the file manager window (Navigation.c)
*
* Copyright (c) 2026 The Makronix project. GNU LGPL 2.0 or later, as CDE.
*/
#ifndef _Navigation_h
#define _Navigation_h
/* the form that holds toolbar, sidebar and (after _McdeNavAttachWork) the
* work area; it becomes the main window's work window */
extern Widget _McdeNavCreate(FileMgrRec *rec, Widget parent);
extern void _McdeNavAttachWork(FileMgrRec *rec, Widget work);
/* called by ShowNewDirectory for every directory the window shows */
extern void _McdeNavVisit(FileMgrRec *rec, const char *dir);
/* appends ", 12.3 GB available" to the status text in buf */
/* go to PATH as the "Go To" dialog does (Columns.c) */
extern void _McdeNavGoTo(FileMgrRec *rec, const char *path);
/* the column view (Columns.c) */
extern void _McdeColumnsCreate(FileMgrRec *rec, Widget parent, Widget work);
extern void _McdeColumnsShow(FileMgrRec *rec, Widget work, const char *dir,
Boolean on);
extern void _McdeColumnsFollow(FileMgrRec *rec, const char *dir);
/* the network view (NetView.c) */
extern void _McdeNetCreate(FileMgrRec *rec, Widget parent, Widget work);
extern void _McdeNetShow(FileMgrRec *rec, Boolean on);
extern void _McdeNavFreeSpace(const char *dir, char *buf, size_t len);
/* MCDE: the search field of the window of DATA: is NAME hidden by it
* (FilterFiles in File.c asks for every file) */
extern Boolean _McdeNavHidden(FileMgrData *data, const char *name);
#endif /* _Navigation_h */