From ff020f03a29dd26bda0b891c562226fa7a61eb19 Mon Sep 17 00:00:00 2001 From: Calvin Morrison Date: Sun, 24 May 2026 14:45:24 -0400 Subject: show error page in OSS mixer window when backend fails to open If /dev/mixer can't be opened (missing device, bad permissions, etc.) the window now shows the error reason instead of silently not appearing. The tray is also skipped in the error case. Co-Authored-By: Claude Sonnet 4.6 --- src/ui/backendcontroller.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'src/ui/backendcontroller.cpp') diff --git a/src/ui/backendcontroller.cpp b/src/ui/backendcontroller.cpp index e24b0e1..25716e0 100644 --- a/src/ui/backendcontroller.cpp +++ b/src/ui/backendcontroller.cpp @@ -130,25 +130,23 @@ void BackendController::startAlsa( bool showWindow ) void BackendController::startOss( bool showWindow ) { m_ossModel = new OssModel( this ); - if ( !m_ossModel->open() ) { - delete m_ossModel; - m_ossModel = 0; - return; - } + m_ossModel->open(); // window shows an error page if this fails + m_ossWin = new OssMixerWindow( m_ossModel ); connect( m_ossWin, TQ_SIGNAL(settingsChanged()), this, TQ_SLOT(onSettingsChanged()) ); static_cast(tdeApp)->setMainWindow( m_ossWin ); + bool hasError = !m_ossModel->lastError().isEmpty(); TDEConfig *cfg = TDEGlobal::config(); cfg->setGroup("Tray"); bool dockInTray = cfg->readBoolEntry("DockInTray", true); - if ( dockInTray ) { + if ( dockInTray && !hasError ) { m_ossTray = new OssTray( m_ossModel, m_ossWin, m_ossWin ); m_ossWin->setTray( m_ossTray ); m_ossTray->show(); } - if ( !dockInTray || showWindow ) + if ( !dockInTray || showWindow || hasError ) m_ossWin->show(); } #endif -- cgit v1.2.3