Files
mcde/programs/dtsystemsettings/panes.c
T
lotherkandClaude Opus 5.5 8ab668c689 mcde: Accounts and Software Update, in dtsystemsettings and McdeSys
McdeSys: mcde_sys_users/user_add/user_delete (users.c, POSIX getpwent and
useradd/userdel), user_set_password and user_set_admin per system (NetBSD:
pw_gensalt+crypt for usermod -p, wheel; a group member removed by rewriting
the group's line as user.c does, since usermod -G only appends -- measured;
Linux: chpasswd on stdin, gpasswd, sudo), mcde_sys_update_check/apply
(NetBSD: /etc/makronix/update, RELEASE, sysupgrade, pkg_add -uu; Linux:
apt-get).  A secret goes through a pipe, never on a command line.
Tests: test_sysinfo refuses a bad login and, not as root, adding (PASS on
Linux and NetBSD); as root in the NetBSD VM add/admin on/off/password/delete
pass and /etc/group is as before.

dtsystemsettings: Accounts (list, Add/Delete/Password/Administrator,
Unlock... through su -m root in a terminal, password fields show stars),
Software Update (running, available, new packages, source, Check Now,
Update Now... runs -apply-update as root in a terminal; the check runs
after the pane shows: apt took 21 s here).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 12:38:21 +00:00

69 lines
2.1 KiB
C

/*
* panes.c -- dtsystemsettings: the panes and their categories (panes.h)
*
* Copyright (c) 2026 The Makronix project. GNU LGPL 2.0 or later, as CDE.
*
* One place for the computer's settings, in four rows. A pane is drawn
* here (sound, network, Bluetooth, date and time, about) when the setting
* goes through McdeSys; the panes that are CDE's own style manager open it
* until they are drawn here too.
*/
#include <string.h>
#include "panes.h"
const char *const categoryNames[CAT_COUNT] = {
"Personal",
"Hardware",
"Internet & Network",
"System"
};
const Pane panes[] = {
{ "appearance", "Appearance", CAT_PERSONAL, "DtColor.pm", PANE_COMMAND,
"dtstyle" },
{ "desktop", "Desktop", CAT_PERSONAL, "DtBkdrp.pm", PANE_COMMAND,
"dtstyle" },
{ "fonts", "Fonts", CAT_PERSONAL, "DtFont.pm", PANE_COMMAND, "dtstyle" },
{ "language", "Language", CAT_PERSONAL, "DtI18N.pm", PANE_COMMAND,
"dtstyle" },
{ "screensaver", "Screen Saver", CAT_PERSONAL, "DtScrn.pm",
PANE_COMMAND, "dtstyle" },
{ "sound", "Sound", CAT_HARDWARE, "Dtaudio.m.pm", PANE_OWN, NULL },
{ "keyboard", "Keyboard", CAT_HARDWARE, "DtKeybd.pm", PANE_COMMAND,
"dtstyle" },
{ "mouse", "Mouse", CAT_HARDWARE, "DtMouse.pm", PANE_COMMAND,
"dtstyle" },
{ "printers", "Printers", CAT_HARDWARE, "Dtprint.m.pm", PANE_COMMAND,
"dtprintinfo -all" },
{ "network", "Network", CAT_NETWORK, "McdeWired.m.pm", PANE_OWN, NULL },
{ "bluetooth", "Bluetooth", CAT_NETWORK, "McdeBluetooth.m.pm",
PANE_OWN, NULL },
{ "datetime", "Date & Time", CAT_SYSTEM, "Dtdate.m.pm", PANE_OWN, NULL },
{ "startup", "Startup", CAT_SYSTEM, "DtStart.pm", PANE_COMMAND,
"dtstyle" },
{ "accounts", "Accounts", CAT_SYSTEM, "DtStart.pm", PANE_OWN, NULL },
{ "update", "Software Update", CAT_SYSTEM, "Dtstyle.m.pm", PANE_OWN,
NULL },
{ "about", "About", CAT_SYSTEM, "MakronixDtlogo.m.pm", PANE_OWN, NULL },
};
const int paneCount = (int) (sizeof panes / sizeof panes[0]);
const Pane *
PaneFind(const char *id)
{
int i;
if (id == NULL)
return NULL;
for (i = 0; i < paneCount; i++)
if (strcmp(panes[i].id, id) == 0)
return &panes[i];
return NULL;
}