Files
mcde/programs/dtsystemsettings/panes.c
T
lotherkandClaude Opus 5.5 e73c2858e9 mcde: System Settings: Desktop and Screen Saver, with a folder as slideshow
One pane with two pages.  Desktop: the backdrop in use as a preview with
its name; the places on the left -- CDE's backdrops, ~/.dt/backdrops,
~/Pictures, folders the user adds with Choose Folder... (kept in
~/.dt/backdrop-folders); their pictures small on the right, made one at a
time while the window is idle and scaled with Xrender; the style (fill,
fit, centre, tile); "Change picture every ..." and "Random order" make
the place a slideshow in dtwm (f.mcde_slideshow now, Dtwm*mcdeSlideshow
for the next login).  Screen Saver: the savers of $DTSCREENSAVERLIST with
one running in a preview (_DtSaverStart), the minutes until it starts and
whether it asks for the password, sent to dtsession as dtstyle does.

DtWidget's mail control crashed in strlen when neither MAIL nor LOGNAME
was set (dtwm's front panel in a session started by hand): the name now
comes from the password file.

Measured on Xvfb with dtwm (build/mcde-shots/desk-*.png): the backdrops
and ~/Pictures appear as small pictures; a click made d-green.jpg the
backdrop and the preview; Change picture put "Dtwm*mcdeSlideshow: 30 0 3
.../Pictures" into the resources and dtwm showed the folder's first
picture; the Screen Saver page ran Swarm and Qix in its preview.  Not
measured: the saver settings through dtsession (the test was not run).

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

66 lines
2.0 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_OWN,
NULL },
{ "desktop", "Desktop", CAT_PERSONAL, "DtBkdrp.pm", PANE_OWN, NULL },
{ "fonts", "Fonts", CAT_PERSONAL, "DtFont.pm", PANE_OWN, NULL },
{ "language", "Language", CAT_PERSONAL, "DtI18N.pm", PANE_COMMAND,
"dtstyle" },
{ "screensaver", "Screen Saver", CAT_PERSONAL, "DtScrn.pm",
PANE_OWN, NULL },
{ "sound", "Sound", CAT_HARDWARE, "Dtaudio.m.pm", PANE_OWN, NULL },
{ "keyboard", "Keyboard", CAT_HARDWARE, "DtKeybd.pm", PANE_OWN, NULL },
{ "mouse", "Mouse", CAT_HARDWARE, "DtMouse.pm", PANE_OWN, NULL },
{ "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;
}