Files
mcde/programs/dtfile/Connect.h
T
lotherk de97c91087 MCDE dtfile: Connect to Server as a dialog of its own (t0147)
Command+K and the network view's "Connect to Server:" now open the
reference's dialog: "Server Address:" with the field, "+" that keeps the
address, an option menu of the servers used before, "Favorite Servers:" as
a list with Remove, and Browse (the network view, as before) and Connect
(Return).  The favourites are one address a line in ~/.dt/servers, the
history the last ten in ~/.dt/servers.recent, newest first; the field opens
with the newest.

Connect accepts sftp://, nfs:// and afp:// (an address without a scheme is
an sftp one) and mounts through the network view's parse and MountPoint +
mcde_sys_net_mount, so the mount points stay ~/Network/HOST[/NAME]; the
dialog names the reason under the field and keeps the address when it
fails, and remembers the address and goes to the folder when it works.

Measured under Xvfb with xdotool: "sftp://beispiel.local/x" typed and "+"
writes it into ~/.dt/servers (cat) and the list shows it;
"nfs://127.0.0.1/nope" and Return leaves the dialog open with "Could not
connect: /sbin/mount_nfs did not succeed (status 32)."; the picture
(docs/screenshots/leopard/Finder-Connect-to-Server-mcde.png) shows the
dialog with two favourites and the address from the history.

Open: the Recent menu is an option menu filled when it opens
(FillHistory), but a click on it did not post in the Xvfb session, so the
menu was not shown in a picture -- a cascade button outside a menu bar did
not post either.  No "?" help button, no smb:// (mount_smbfs and nsmb.conf
are a task of their own), and a server that wants a password is still the
network view's password dialog, not this one's.
2026-11-14 08:28:14 +00:00

24 lines
767 B
C

/*
* Connect.h -- MCDE: the Connect to Server dialog (Connect.c)
*
* Copyright (c) 2026 The Makronix project. GNU LGPL 2.0 or later, as CDE.
*/
#ifndef _Connect_h
#define _Connect_h
#include "FileMgr.h"
/* File > Connect to Server... (Command+K): the reference's dialog -- the
* address, "+" for the favourites (~/.dt/servers), the history
* (~/.dt/servers.recent), Browse (the network view) and Connect. */
extern void _McdeConnectShow(FileMgrRec *rec);
/* the address MOUNTED through the system layer: 1 with MP (the mount point)
* and an empty ERR, 0 with ERR the reason. NetView.c knows the parse and
* the mount. */
extern int _McdeNetConnectAddress(const char *url, char *mp, size_t mplen,
char *err, size_t errlen);
#endif /* _Connect_h */