mcde: one window size for System Settings, tabs that are one of many, icons that exist
- 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).
This commit is contained in:
1 parent
633787ec1f
commit
8f03d0d74e
5 files changed
+39
-28
No files matched your search
@@ -223,8 +223,13 @@ McdePrefsCreate(Widget parent, const char *prog)
|
||||
xmRowColumnWidgetClass, p->shell, XmNorientation, XmVERTICAL,
|
||||
XmNspacing, 6, XmNmarginWidth, 8, XmNmarginHeight, 8,
|
||||
XmNwidth, 560, NULL);
|
||||
/* the tabs are one of many: a toggle stays pressed only when it is the
|
||||
* chosen page. Without the radio behaviour every tab that was visited
|
||||
* stayed pressed (measured 2026-11-21: Keyboard, Mouse and Shortcuts
|
||||
* were all down at once). */
|
||||
p->tabs = XtVaCreateManagedWidget("prefsTabs",
|
||||
xmRowColumnWidgetClass, p->box, XmNorientation, XmHORIZONTAL,
|
||||
XmNradioBehavior, True, XmNradioAlwaysOne, True,
|
||||
XmNspacing, 4, XmNmarginWidth, 0, XmNentryAlignment,
|
||||
XmALIGNMENT_CENTER, NULL);
|
||||
p->pages = XtVaCreateManagedWidget("prefsPages",
|
||||
|
||||
@@ -288,6 +288,17 @@ mcde_sys_keyboard_is_mac(void)
|
||||
|
||||
if (uname(&u) == 0 && strcmp(u.machine, "macppc") == 0)
|
||||
return 1;
|
||||
/* The machine itself: a MacBook's internal keyboard IS Apple's, and
|
||||
* usbdevs may not have enumerated it yet when the session starts
|
||||
* (measured 2026-11-21: _MCDE_KEYS said "pc" on a MacBook, so dtkeys
|
||||
* exchanged Alt and Command). hw.model is there from boot. */
|
||||
{
|
||||
char model[64];
|
||||
|
||||
if (Sysctl("hw.model", model, sizeof model) &&
|
||||
strncmp(model, "Mac", 3) == 0)
|
||||
return 1;
|
||||
}
|
||||
if (mcde_sys_capture(argv, out, sizeof out) != MCDE_SYS_OK)
|
||||
return 0;
|
||||
for (line = strtok_r(out, "\n", &last); line != NULL;
|
||||
|
||||
@@ -118,7 +118,8 @@ CatName(int c)
|
||||
categoryNames[0];
|
||||
}
|
||||
|
||||
static Widget shell, title, showAll, overview, paneArea, current;
|
||||
static Widget shell, title, showAll, overview, paneScroll, paneArea,
|
||||
current;
|
||||
static Widget backBtn, forwardBtn, searchField;
|
||||
static Widget ovButton[64], ovLabel[64]; /* the overview's items */
|
||||
static char *history[16]; /* the panes shown, by id */
|
||||
@@ -1082,7 +1083,7 @@ ShowOverview(void)
|
||||
current = NULL;
|
||||
}
|
||||
shown = NULL;
|
||||
XtUnmanageChild(paneArea);
|
||||
XtUnmanageChild(paneScroll);
|
||||
XtManageChild(overview);
|
||||
SetText(title, Msg(31, "System Settings"));
|
||||
XtVaSetValues(shell, XmNtitle, Msg(31, "System Settings"), NULL);
|
||||
@@ -1107,39 +1108,30 @@ ShowPane(const Pane *p)
|
||||
w = MakeSound(paneArea);
|
||||
else if (strcmp(p->id, "printers") == 0) {
|
||||
w = MakePrinters(paneArea);
|
||||
XtVaSetValues(shell, XmNheight, 640, XmNwidth, 760, NULL);
|
||||
}
|
||||
else if (strcmp(p->id, "startupdisk") == 0) {
|
||||
w = MakeStartupDisk(paneArea);
|
||||
XtVaSetValues(shell, XmNheight, 560, XmNwidth, 680, NULL);
|
||||
}
|
||||
else if (strcmp(p->id, "sysinfo") == 0) {
|
||||
w = MakeSysinfo(paneArea);
|
||||
XtVaSetValues(shell, XmNheight, 520, XmNwidth, 700, NULL);
|
||||
}
|
||||
else if (strcmp(p->id, "defaults") == 0) {
|
||||
w = MakeDefaults(paneArea);
|
||||
XtVaSetValues(shell, XmNheight, 560, XmNwidth, 640, NULL);
|
||||
}
|
||||
else if (strcmp(p->id, "internet") == 0) {
|
||||
w = MakeInternet(paneArea);
|
||||
XtVaSetValues(shell, XmNheight, 560, XmNwidth, 640, NULL);
|
||||
}
|
||||
else if (strcmp(p->id, "energy") == 0) {
|
||||
w = MakeEnergy(paneArea);
|
||||
XtVaSetValues(shell, XmNheight, 520, XmNwidth, 720, NULL);
|
||||
}
|
||||
else if (strcmp(p->id, "cds") == 0) {
|
||||
w = MakeCDs(paneArea);
|
||||
XtVaSetValues(shell, XmNheight, 500, XmNwidth, 700, NULL);
|
||||
}
|
||||
else if (strcmp(p->id, "parental") == 0) {
|
||||
w = MakeParental(paneArea);
|
||||
XtVaSetValues(shell, XmNheight, 640, XmNwidth, 780, NULL);
|
||||
}
|
||||
else if (strcmp(p->id, "security") == 0) {
|
||||
w = MakeSecurity(paneArea);
|
||||
XtVaSetValues(shell, XmNheight, 620, XmNwidth, 700, NULL);
|
||||
}
|
||||
else if (strcmp(p->id, "network") == 0)
|
||||
w = MakeNetwork(paneArea);
|
||||
@@ -1149,13 +1141,9 @@ ShowPane(const Pane *p)
|
||||
w = MakeAppearance(paneArea);
|
||||
/* palette, the four groups and the fonts need more room than
|
||||
* the overview */
|
||||
XtVaSetValues(shell, XmNheight, 720, XmNwidth, 780, NULL);
|
||||
}
|
||||
else if (strcmp(p->id, "datetime") == 0) {
|
||||
w = MakeDateTime(paneArea);
|
||||
/* calendar, clock and the two tabs need more room than the
|
||||
* overview's height; this pane brings its own */
|
||||
XtVaSetValues(shell, XmNheight, 660, NULL);
|
||||
}
|
||||
else if (strcmp(p->id, "about") == 0)
|
||||
w = MakeAbout(paneArea);
|
||||
@@ -1173,13 +1161,11 @@ ShowPane(const Pane *p)
|
||||
strcmp(p->id, "screensaver") == 0) {
|
||||
w = MakeDesktopPane(paneArea,
|
||||
strcmp(p->id, "screensaver") == 0);
|
||||
XtVaSetValues(shell, XmNheight, 660, XmNwidth, 800, NULL);
|
||||
}
|
||||
else if (strcmp(p->id, "keyboardmouse") == 0 ||
|
||||
strcmp(p->id, "keyboard") == 0 || strcmp(p->id, "mouse") == 0 ||
|
||||
strcmp(p->id, "shortcuts") == 0) {
|
||||
w = MakeInput(paneArea, p->id);
|
||||
XtVaSetValues(shell, XmNheight, 660, XmNwidth, 760, NULL);
|
||||
}
|
||||
else if (strcmp(p->id, "displays") == 0)
|
||||
w = MakeDisplays(paneArea);
|
||||
@@ -1191,6 +1177,7 @@ ShowPane(const Pane *p)
|
||||
shown = p;
|
||||
XtManageChild(w);
|
||||
XtUnmanageChild(overview);
|
||||
XtManageChild(paneScroll);
|
||||
XtManageChild(paneArea);
|
||||
SetText(title, PaneLabel(p));
|
||||
XtVaSetValues(shell, XmNtitle, PaneLabel(p), NULL);
|
||||
@@ -1533,15 +1520,27 @@ main(int argc, char **argv)
|
||||
XmNtopAttachment, XmATTACH_WIDGET, XmNtopWidget, bar,
|
||||
XmNleftAttachment, XmATTACH_FORM, XmNrightAttachment, XmATTACH_FORM,
|
||||
NULL);
|
||||
/* One size for the whole program (Konrad, 2026-11-21): every pane
|
||||
* lives in this window, and a pane taller than it scrolls instead of
|
||||
* making the window grow. The overview and the pages share it. */
|
||||
XtVaSetValues(shell, XmNwidth, 1022, XmNheight, 550,
|
||||
XmNminWidth, 1022, XmNmaxWidth, 1022,
|
||||
XmNminHeight, 550, XmNmaxHeight, 550, NULL);
|
||||
overview = MakeOverview(form);
|
||||
XtVaSetValues(overview, XmNtopAttachment, XmATTACH_WIDGET,
|
||||
XmNtopWidget, sep, XmNleftAttachment, XmATTACH_FORM,
|
||||
XmNrightAttachment, XmATTACH_FORM, XmNbottomAttachment,
|
||||
XmATTACH_FORM, NULL);
|
||||
paneArea = XtVaCreateWidget("paneArea", xmRowColumnWidgetClass, form,
|
||||
paneScroll = XtVaCreateWidget("paneScroll", xmScrolledWindowWidgetClass,
|
||||
form,
|
||||
XmNtopAttachment, XmATTACH_WIDGET, XmNtopWidget, sep,
|
||||
XmNleftAttachment, XmATTACH_FORM, XmNrightAttachment, XmATTACH_FORM,
|
||||
XmNbottomAttachment, XmATTACH_FORM, NULL);
|
||||
XmNbottomAttachment, XmATTACH_FORM,
|
||||
XmNscrollingPolicy, XmAUTOMATIC,
|
||||
XmNscrollBarDisplayPolicy, XmAS_NEEDED,
|
||||
XmNvisualPolicy, XmVARIABLE, NULL);
|
||||
paneArea = XtVaCreateWidget("paneArea", xmRowColumnWidgetClass,
|
||||
paneScroll, NULL);
|
||||
XtManageChild(overview);
|
||||
XtSetSensitive(showAll, False);
|
||||
XtRealizeWidget(shell);
|
||||
|
||||
@@ -29,9 +29,7 @@ const Pane panes[] = {
|
||||
"screensaver screen saver bildschirmschoner" },
|
||||
{ "language", "Language", CAT_PERSONAL, "DtI18N.pm", PANE_OWN,
|
||||
NULL, "language sprache locale region formats datum" },
|
||||
{ "dock", "Dock", CAT_PERSONAL, "DtPanel.m.pm", PANE_LATER, NULL,
|
||||
"dock leiste panel front panel" },
|
||||
{ "security", "Security", CAT_PERSONAL, "McdeLock.pm", PANE_OWN, NULL,
|
||||
{ "security", "Security", CAT_PERSONAL, "McdeLock.pm", PANE_OWN, NULL,
|
||||
"security sicherheit firewall lock sperre password passwort "
|
||||
"encryption verschluesselung cgd swap virtual memory npf" },
|
||||
|
||||
@@ -49,9 +47,9 @@ const Pane panes[] = {
|
||||
"printers drucker print cups queues warteschlange" },
|
||||
{ "bluetooth", "Bluetooth", CAT_HARDWARE, "McdeBluetooth.m.pm",
|
||||
PANE_OWN, NULL, "bluetooth" },
|
||||
{ "cds", "CDs & DVDs", CAT_HARDWARE, "Dtmedia.m.pm", PANE_OWN, NULL,
|
||||
{ "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, "Dtbattery.m.pm", PANE_OWN,
|
||||
{ "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",
|
||||
@@ -72,14 +70,12 @@ const Pane panes[] = {
|
||||
{ "parental", "Parental Controls", CAT_SYSTEM, "McdeUser.t.pm",
|
||||
PANE_OWN, NULL, "parental controls kinderschutz limits hours "
|
||||
"programs erlaubte programme" },
|
||||
{ "accounts", "Accounts", CAT_SYSTEM, "DtStart.pm", PANE_OWN, NULL,
|
||||
{ "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" },
|
||||
{ "startupdisk", "Startup Disk", CAT_SYSTEM, "Dtdisk.m.pm", PANE_OWN,
|
||||
NULL, "startup disk startvolume boot volume" },
|
||||
{ "accessibility", "Accessibility", CAT_SYSTEM, "Dtmouse.m.pm",
|
||||
PANE_LATER, NULL, "accessibility bedienungshilfen" },
|
||||
{ "about", "About", CAT_SYSTEM, "MakronixDtlogo.m.pm", PANE_OWN, NULL,
|
||||
|
||||
@@ -2,5 +2,5 @@ $ MCDE dttoolbox message catalog (set 1) -- English is the source; a locale's co
|
||||
$
|
||||
$set 1
|
||||
|
||||
1 ToolChest
|
||||
1 dttoolchest
|
||||
2 No ToolChest menu
|
||||
Reference in new issue
Block a user