- dtsystemsettings: the shell is 1022x550 and stays so (min/max equal); every pane lives in it instead of growing the window (thirteen per-pane XtVaSetValues(shell, width, height) calls are gone), and a taller pane scrolls (the pages sit in an XmScrolledWindow with XmAUTOMATIC). - panes.c: CDs & DVDs had no icon (Dtmedia.m.pm does not exist) - it shows IrixCD.m.pm; Energy Saver shows SDtpowermgr.m.pm; Accounts had the same icon as Startup (DtStart.pm) and shows McdeUser.t.pm. The "Startup Disk" entry and the disabled "Dock" entry (no icon, PANE_LATER) are removed. - McdePrefs: the tab strip is one of many (XmNradioBehavior, XmNradioAlwaysOne). Without it every visited tab stayed pressed (measured 2026-11-21: Keyboard, Mouse and Shortcuts all down at once). - dttoolbox: the window title is "dttoolchest" (msg 1 of the catalog). - McdeSys: mcde_sys_keyboard_is_mac asks the machine (hw.model "Mac...") before usbdevs. At session start the internal keyboard may not be enumerated yet, so dtkeys took a MacBook for a PC keyboard and exchanged Alt and Command (_MCDE_KEYS said "pc", measured 2026-11-21). Measured on the MacBook: keyboard _MCDE_KEYS "pc" with an Apple Internal Keyboard / Trackpad on usb1 port 2 addr 7.
154 lines
5.4 KiB
C
154 lines
5.4 KiB
C
/*
|
|
* panes.c -- dtsystemsettings: the panes and their categories (panes.h)
|
|
*
|
|
* License: CNCL 1.0 (Could Not Care Less), see LICENSE at the top of the tree.
|
|
*
|
|
* 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_OWN,
|
|
NULL, "appearance colours colors palette theme farben fonts "
|
|
"schrift schriften smoothing antialias" },
|
|
{ "desktop", "Desktop & Screen Saver", CAT_PERSONAL, "DtBkdrp.pm",
|
|
PANE_OWN, NULL, "desktop background wallpaper hintergrund "
|
|
"screensaver screen saver bildschirmschoner" },
|
|
{ "language", "Language", CAT_PERSONAL, "DtI18N.pm", PANE_OWN,
|
|
NULL, "language sprache locale region formats datum" },
|
|
{ "security", "Security", CAT_PERSONAL, "McdeLock.pm", PANE_OWN, NULL,
|
|
"security sicherheit firewall lock sperre password passwort "
|
|
"encryption verschluesselung cgd swap virtual memory npf" },
|
|
|
|
{ "defaults", "Default Programs", CAT_PERSONAL, "Dtmail.t.pm",
|
|
PANE_OWN, NULL, "default programs browser mail image video text "
|
|
"standardprogramme" },
|
|
{ "sound", "Sound", CAT_HARDWARE, "Dtaudio.m.pm", PANE_OWN, NULL,
|
|
"sound audio lautstaerke volume ton" },
|
|
{ "displays", "Displays", CAT_HARDWARE, "DtScrn.pm", PANE_OWN,
|
|
NULL, "displays monitors resolution aufloesung bildschirm" },
|
|
{ "keyboardmouse", "Keyboard & Mouse", CAT_HARDWARE, "DtKeybd.pm",
|
|
PANE_OWN, NULL, "keyboard mouse tastatur maus wiederholung "
|
|
"repeat shortcuts keys tastenkuerzel" },
|
|
{ "printers", "Printers", CAT_HARDWARE, "Dtprint.m.pm", PANE_OWN, NULL,
|
|
"printers drucker print cups queues warteschlange" },
|
|
{ "bluetooth", "Bluetooth", CAT_HARDWARE, "McdeBluetooth.m.pm",
|
|
PANE_OWN, NULL, "bluetooth" },
|
|
{ "cds", "CDs & DVDs", CAT_HARDWARE, "IrixCD.m.pm", PANE_OWN, NULL,
|
|
"cds dvds medien media einlegen audio video picture blank" },
|
|
{ "energy", "Energy Saver", CAT_HARDWARE, "SDtpowermgr.m.pm", PANE_OWN,
|
|
NULL, "energy energie sleep ruhezustand strom display disks" },
|
|
|
|
{ "internet", "Internet Accounts", CAT_NETWORK, "Dtmail.t.pm",
|
|
PANE_OWN, NULL, "internet accounts konten caldav carddav imap "
|
|
"mail server" },
|
|
{ "network", "Network", CAT_NETWORK, "McdeWired.m.pm", PANE_OWN, NULL,
|
|
"network netzwerk lan wlan wifi ethernet dhcp ip" },
|
|
{ "sharing", "Sharing", CAT_NETWORK, "Dtlink.m.pm", PANE_OWN, NULL,
|
|
"sharing freigaben smb afp nfs ssh dateien" },
|
|
|
|
{ "sysinfo", "System Information", CAT_SYSTEM, "DtSystem.m.pm",
|
|
PANE_OWN, NULL, "system information hardware network software "
|
|
"about ueber rechner" },
|
|
{ "datetime", "Date & Time", CAT_SYSTEM, "Dtdate.m.pm", PANE_OWN, NULL,
|
|
"date time uhr zeit timezone zeitzone ntp" },
|
|
{ "startup", "Startup", CAT_SYSTEM, "DtStart.pm", PANE_OWN, NULL,
|
|
"startup boot" },
|
|
{ "parental", "Parental Controls", CAT_SYSTEM, "McdeUser.t.pm",
|
|
PANE_OWN, NULL, "parental controls kinderschutz limits hours "
|
|
"programs erlaubte programme" },
|
|
{ "accounts", "Accounts", CAT_SYSTEM, "McdeUser.t.pm", PANE_OWN, NULL,
|
|
"accounts benutzer users password passwort" },
|
|
{ "update", "Software Update", CAT_SYSTEM, "Dtstyle.m.pm", PANE_OWN,
|
|
NULL, "update software aktualisierung pakete packages" },
|
|
{ "backup", "Backup", CAT_SYSTEM, "DtSystem.m.pm", PANE_OWN, NULL,
|
|
"backup sicherung" },
|
|
{ "accessibility", "Accessibility", CAT_SYSTEM, "Dtmouse.m.pm",
|
|
PANE_LATER, NULL, "accessibility bedienungshilfen" },
|
|
{ "about", "About", CAT_SYSTEM, "MakronixDtlogo.m.pm", PANE_OWN, NULL,
|
|
"about info systembericht" },
|
|
};
|
|
|
|
const int paneCount = (int) (sizeof panes / sizeof panes[0]);
|
|
|
|
static void
|
|
Lower(const char *in, char *out, size_t len)
|
|
{
|
|
size_t i;
|
|
|
|
for (i = 0; in[i] != '\0' && i + 1 < len; i++)
|
|
out[i] = (in[i] >= 'A' && in[i] <= 'Z') ? in[i] - 'A' + 'a' :
|
|
in[i];
|
|
out[i] = '\0';
|
|
}
|
|
|
|
int
|
|
PaneMatch(const Pane *p, const char *query)
|
|
{
|
|
char q[128], hay[512];
|
|
|
|
if (p == NULL)
|
|
return 0;
|
|
if (query == NULL || query[0] == '\0')
|
|
return 1;
|
|
Lower(query, q, sizeof q);
|
|
if (q[0] == '\0')
|
|
return 1;
|
|
(void)snprintf(hay, sizeof hay, "%s %s %s", p->id, p->label,
|
|
p->keywords != NULL ? p->keywords : "");
|
|
Lower(hay, hay, sizeof hay);
|
|
return strstr(hay, q) != NULL;
|
|
}
|
|
|
|
const Pane *
|
|
PaneFind(const char *id)
|
|
{
|
|
static Pane alias;
|
|
int i;
|
|
|
|
if (id == NULL)
|
|
return NULL;
|
|
/* the fonts are part of Appearance since t0099; the old id stays */
|
|
if (strcmp(id, "fonts") == 0)
|
|
id = "appearance";
|
|
/* Desktop & Screen Saver is one pane since t0110; the old id opens the
|
|
* saver's page */
|
|
if (strcmp(id, "screensaver") == 0) {
|
|
for (i = 0; i < paneCount; i++)
|
|
if (strcmp(panes[i].id, "desktop") == 0) {
|
|
alias = panes[i];
|
|
alias.id = id;
|
|
return &alias;
|
|
}
|
|
return NULL;
|
|
}
|
|
/* Keyboard & Mouse is one pane since t0129; the old ids open its tab */
|
|
if (strcmp(id, "keyboard") == 0 || strcmp(id, "mouse") == 0 ||
|
|
strcmp(id, "shortcuts") == 0) {
|
|
for (i = 0; i < paneCount; i++)
|
|
if (strcmp(panes[i].id, "keyboardmouse") == 0) {
|
|
alias = panes[i];
|
|
alias.id = id;
|
|
return &alias;
|
|
}
|
|
return NULL;
|
|
}
|
|
for (i = 0; i < paneCount; i++)
|
|
if (strcmp(panes[i].id, id) == 0)
|
|
return &panes[i];
|
|
return NULL;
|
|
}
|