From 3909a06fe6786027c83e3adaef89c343cde4fbe3 Mon Sep 17 00:00:00 2001 From: Calvin Morrison Date: Sun, 17 May 2026 23:38:18 -0400 Subject: ALSA backend, backend switcher, UX fixes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - ALSA backend: AlsaModel, AlsaDevice, AlsaMixerWindow, AlsaTray, AlsaPopup - BackendController: live pulse↔alsa switching, preserves window position/visibility - PA shutdown fix: stop mainloop thread before disconnect/free to prevent crash - Exit crash fix: BackendController deleted explicitly before TQApplication exits - Waiting-for-PulseAudio placeholder when PA not connected - Preferences: live backend stack (Pulse/ALSA), Startup/Exit card with autostart, Recording card, no-tabs greying, remove stale "requires restart" label - Recording tray: track source outputs directly; fix LED init in popup; level meter forwarding for monitor-source recordings via m_monitorSourceToSink - TmixTray: fix config group General→Tray for scroll/mute/popup settings; RecordingTray suppresses right-click menu - audiodevice.h: add recordingActive() virtual accessor Co-Authored-By: Claude Sonnet 4.6 --- src/ui/preferencesdlg.h | 45 +++++++++++++++++++++++++++++++++++++++------ 1 file changed, 39 insertions(+), 6 deletions(-) (limited to 'src/ui/preferencesdlg.h') diff --git a/src/ui/preferencesdlg.h b/src/ui/preferencesdlg.h index 09d740f..93ac377 100644 --- a/src/ui/preferencesdlg.h +++ b/src/ui/preferencesdlg.h @@ -1,17 +1,30 @@ #pragma once #include +#include +#include class TQCheckBox; class TQComboBox; +class TQLabel; class TQSpinBox; +class TQWidgetStack; + +#ifdef WITH_ALSA +class AlsaModel; +#endif class PreferencesDlg : public KDialogBase { TQ_OBJECT public: - PreferencesDlg( TQWidget *parent = 0 ); + explicit PreferencesDlg( TQWidget *parent = 0 ); + +#ifdef WITH_ALSA + PreferencesDlg( AlsaModel *model, TQWidget *parent = 0 ); +#endif + void load(); signals: @@ -23,22 +36,42 @@ protected slots: private slots: void onPopupModeChanged( int idx ); + void onBackendComboChanged( int idx ); + void onNoTabsToggled( bool checked ); private: + void buildGeneralPage(); + void buildBackendPage(); void save(); - TQCheckBox *m_dockInTray; - TQComboBox *m_popupMode; + // General — shared + TQComboBox *m_backend; + TQCheckBox *m_dockInTray; + TQComboBox *m_popupMode; + TQSpinBox *m_scrollStep; + TQCheckBox *m_confirmQuit; + TQCheckBox *m_middleClickMute; + TQCheckBox *m_startOnLogin; + + // Backend settings stack + TQWidgetStack *m_backendStack; + + // Pulse widgets — always built, may be on the inactive stack page TQCheckBox *m_popupShowOutput; TQCheckBox *m_popupShowMic; TQCheckBox *m_popupShowApps; TQCheckBox *m_showRecTray; - TQCheckBox *m_confirmQuit; - TQSpinBox *m_scrollStep; - TQCheckBox *m_noTabs; + TQLabel *m_showTabsLabel; TQCheckBox *m_showOutput; TQCheckBox *m_showInput; TQCheckBox *m_showPlayback; TQCheckBox *m_showRecording; + +#ifdef WITH_ALSA + AlsaModel *m_alsaModel; + TQComboBox *m_trayDevice; + TQValueList m_trayCardIndices; + TQValueList m_trayDeviceNames; +#endif }; -- cgit v1.2.3