MCDE S2: the desktop's events play -- dtfile, dtwm, dtterm

dtfile plays OpenFolder when a directory opens (Main.c, GetNewView) and
Launch when a file starts (Columns.c, ColumnOpen); dtwm plays DeskSwitch on
ChangeToWorkspace; dtterm's bell plays TerminalBell instead of XBell and
falls back to XBell when no server runs.  The three programs link
libMcdeSound; the theme gained TerminalBell.

Measured under Xvfb with ttsession and dtwm:
  mcdesoundd: OpenFolder -> .../open_folder.wav (player)
  mcdesoundd: TerminalBell -> .../terminal_bell.wav (player)
DeskSwitch is built but not exercised (it needs a workspace switch in dtwm).
This commit is contained in:
lotherk committed 2026-11-12 12:32:14 +00:00
1 parent 45142a5a76
commit 977a7347c6
12 files changed
+39 -6

No files matched your search

+11 -2
View File
@@ -191,8 +191,17 @@ ueber paplay/aplay/audioplay (sonst X-Bell) und verwirft Wiederholungen
innerhalb von 50 ms. Theme mit 19 Events und eigenen Toenen (erzeugt, keine
Fremddateien). Belegt: `mcdesoundd -selftest` -> `PASS`; Daemon-Log
`Launch -> .../launch.wav (player)`, `OpenFolder -> .../open_folder.wav`.
Offen (S2/S3/S4): Verdrahtung in dtfile/dtwm/dtterm/dtlogin, Pane
"Systemeinstellungen > Sound", Lautstaerke/Theme-Wechsel zur Laufzeit.
S2 ist verdrahtet (2026-11-12): dtfile spielt `OpenFolder`, wenn ein
Verzeichnis aufgeht (Main.c, GetNewView), und `Launch`, wenn eine Datei
gestartet wird (Columns.c, ColumnOpen); dtwm spielt `DeskSwitch` beim
Wechsel der Arbeitsflaeche (WmWrkspace.c, ChangeToWorkspace); dtterm spielt
`TerminalBell` statt XBell, wenn der Server laeuft (lib/DtTerm,
TermPrimRender.c). Belegt end-to-end unter Xvfb mit ttsession+dtwm:
`OpenFolder -> .../open_folder.wav (player)` und
`TerminalBell -> .../terminal_bell.wav (player)` im Daemon-Log. `DeskSwitch`
ist gebaut, aber ohne Lauf (der Wechsel braucht eine Bedienung im dtwm).
Offen (S3/S4): Pane "Systemeinstellungen > Sound", Lautstaerke/Theme-Wechsel
zur Laufzeit, dtlogin/Start- und End-Ton, AX-Events.
## 3. Paket B: dttoolbox (der ToolChest)
@@ -38,6 +38,8 @@
#include "TermPrimLineDraw.h"
#include "TermPrimBufferP.h"
#include "TermPrimRender.h"
#include <Mcde/Sound.h>
#include "TermPrimRenderP.h"
#include "TermPrimSelect.h"
#include "TermPrimSelectP.h"
@@ -141,6 +143,7 @@ _DtTermPrimBell(Widget w)
/* restore the GC... */
(void) XSetFunction(XtDisplay(w), tpd->renderGC.gc, GXcopy);
} else {
if (McdeSoundEvent(XtDisplay(w), "TerminalBell") != 0)
(void) XBell(XtDisplay(w), 0);
}
}
+1
View File
@@ -402,6 +402,7 @@ ColumnOpen(Widget w, XtPointer client, XtPointer call)
memset(&arg, 0, sizeof arg);
arg.argClass = DtACTION_FILE;
arg.u.file.name = path;
(void)McdeSoundEvent(XtDisplay(w), "Launch");
(void)DtActionInvoke(w, first, &arg, 1, NULL, NULL,
wins[k].col[ci].dir, True, NULL, NULL);
XtFree(first);
+5
View File
@@ -156,6 +156,8 @@
#include "SharedProcs.h"
#include "Help.h"
#include "FileMgr.h"
#include <Mcde/Sound.h>
#include "Desktop.h"
#include "Main.h"
#include "Navigation.h"
@@ -3207,6 +3209,9 @@ ShowNewDirectory(
/* MCDE: the window's history for Back and Forward (Navigation.c) */
_McdeNavVisit((FileMgrRec *) file_mgr_data->file_mgr_rec, directory_name);
(void) McdeSoundEvent(
XtDisplay(((FileMgrRec *) file_mgr_data->file_mgr_rec)->shell),
"OpenFolder");
if (openDirType == NEW)
{
+5
View File
@@ -177,6 +177,8 @@
#include "FileMgr.h"
#include "Desktop.h"
#include "Main.h"
#include <Mcde/Sound.h>
#include "ChangeDir.h"
#include "Prefs.h"
#include "Common.h"
@@ -3577,6 +3579,9 @@ GetNewView(
return(NULL);
}
/* MCDE: a folder opens -- the desktop's OpenFolder event */
(void) McdeSoundEvent(XtDisplay(toplevel), "OpenFolder");
/*
* Special case: When opening any of the special desktop directory
* icons (Home, Remote Systems, etc), we want to display the correct
+2 -1
View File
@@ -15,7 +15,8 @@ dtfile_CPPFLAGS = -I./dtcopy -DSHAPE -D_ILS_MACROS -DSUN_PERF \
-DCDE_INSTALLATION_TOP=\"$(CDE_INSTALLATION_TOP)\" \
-DCDE_CONFIGURATION_TOP=\"$(CDE_CONFIGURATION_TOP)\"
dtfile_LDADD = dtcopy/sharedFuncs.o \
dtfile_LDADD = $(top_builddir)/lib/McdeSound/libMcdeSound.la \
dtcopy/sharedFuncs.o \
dtcopy/fsrtns.o \
$(LIBMCDESYS) $(DTCLIENTLIBS) $(TIRPCLIB) $(XTOOLLIB)
+2 -1
View File
@@ -5,7 +5,8 @@ bin_PROGRAMS = dtterm
# MCDE: the front panel's Remote Login (action McdeRemoteLogin)
dist_bin_SCRIPTS = dtremotelogin
dtterm_LDADD = $(LIBTERM) $(DTCLIENTLIBS) $(XTOOLLIB)
dtterm_LDADD = $(LIBTERM) $(top_builddir)/lib/McdeSound/libMcdeSound.la \
$(DTCLIENTLIBS) $(XTOOLLIB)
if BSD
dtterm_LDADD += -lutil
+2 -1
View File
@@ -13,7 +13,8 @@ AM_CPPFLAGS = -DLARGECURSORS -DR2_COMPAT -DOPAQUE -DSHAPE -DUNMAP_ON_RESTART \
-DCDE_CONFIGURATION_TOP=\"$(CDE_CONFIGURATION_TOP)\"
# Xrandr: monitors plugged in and out (WmMcdeDisplays.c)
dtwm_LDADD = $(LIBMCDESYS) $(DTCLIENTLIBS) $(XRANDRLIB) $(XTOOLLIB)
dtwm_LDADD = $(LIBMCDESYS) $(top_builddir)/lib/McdeSound/libMcdeSound.la \
$(DTCLIENTLIBS) $(XRANDRLIB) $(XTOOLLIB)
dtfplist_LDADD = $(DTCLIENTLIBS) $(TIRPCLIB) $(XTOOLLIB)
if SOLARIS
+4
View File
@@ -62,6 +62,8 @@
#include "WmWrkspace.h"
#include <Mcde/Sound.h>
/******** Static Function Declarations ********/
static void InsureUniqueWorkspaceHints(
@@ -128,6 +130,8 @@ ChangeToWorkspace(
if (pNewWS == pSD->pActiveWS)
return; /* already there */
(void) McdeSoundEvent(XtDisplay(pSD->screenTopLevelW), "DeskSwitch");
pSD->pLastWS = pSD->pActiveWS;
/*
+1 -1
View File
@@ -17,7 +17,7 @@ mcdesoundd_SOURCES = mcdesoundd.c
# the first theme: the reference's event names, MCDE's own short tones
soundsdir = $(CDE_INSTALLATION_TOP)/share/sounds/themes/Camouflage
sounds_DATA = theme.ss \
sounds/launch.wav sounds/start.wav sounds/end.wav sounds/error.wav \
sounds/launch.wav sounds/terminal_bell.wav sounds/start.wav sounds/end.wav sounds/error.wav \
sounds/warning.wav sounds/beep.wav sounds/open_folder.wav \
sounds/drop_move.wav sounds/drop_copy.wav sounds/remove.wav \
sounds/remove_to_dumpster.wav sounds/desk_switch.wav \
@@ -39,3 +39,6 @@
*SearchMiss.label: SearchMiss
*ClockChimeHour.soundfile: clock_chime_hour.wav
*ClockChimeHour.label: ClockChimeHour
*TerminalBell.soundfile: terminal_bell.wav
*TerminalBell.label: TerminalBell