From f8fa47123887452f48d0b523289ca6990c8a2e25 Mon Sep 17 00:00:00 2001 From: Calvin Morrison Date: Fri, 15 May 2026 19:22:41 -0400 Subject: Devices tab: per-sink/source port switching Add Output port / Input port dropdowns in the Devices tab for any sink or source that has 2+ ports. Selecting a port calls pa_context_set_sink/source_port_by_index live. Active port selection updates in-place when PA reports a port change externally. Co-Authored-By: Claude Sonnet 4.6 --- src/ui/devicespage.h | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) (limited to 'src/ui/devicespage.h') diff --git a/src/ui/devicespage.h b/src/ui/devicespage.h index 49081f4..046b224 100644 --- a/src/ui/devicespage.h +++ b/src/ui/devicespage.h @@ -10,6 +10,7 @@ class TQScrollView; class TQComboBox; class TQLabel; class TQVBoxLayout; +class AudioDevice; struct PortWidgets { TQLabel *dot; @@ -27,6 +28,10 @@ private slots: void onCardRemoved( uint32_t index ); void onCardUpdated( uint32_t index ); void onProfileActivated( int comboIndex ); + void onSinkPortActivated( int comboIndex ); + void onSourcePortActivated( int comboIndex ); + void onSinkUpdated( uint32_t paIndex ); + void onSourceUpdated( uint32_t paIndex ); private: void rebuild(); @@ -35,8 +40,19 @@ private: TQScrollView *m_scroll; TQWidget *m_container; - TQMap m_comboCard; - TQMap > m_profileNames; - TQMap m_cardCombo; - TQMap > m_cardPorts; + // Profile combos + TQMap m_comboCard; + TQMap> m_profileNames; + TQMap m_cardCombo; + TQMap> m_cardPorts; + + // Sink port combos + TQMap m_sinkPortComboSink; + TQMap> m_sinkPortComboNames; + TQMap m_sinkPortCombos; + + // Source port combos + TQMap m_sourcePortComboSource; + TQMap> m_sourcePortComboNames; + TQMap m_sourcePortCombos; }; -- cgit v1.2.3