[vlc-devel] [PATCH] Qt: fix "Browse" button in simple audio preferences dialog

Heiko Becker heirecka at exherbo.org
Thu Jan 16 16:00:58 CET 2014


When selecting the OSS output module the "Browse" button for choosing an
appropriate device appears as a window of its own because it isn't added to
any layout.
---
 modules/gui/qt4/components/simple_preferences.cpp | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/modules/gui/qt4/components/simple_preferences.cpp b/modules/gui/qt4/components/simple_preferences.cpp
index 2d1fea9..d1b6f01 100644
--- a/modules/gui/qt4/components/simple_preferences.cpp
+++ b/modules/gui/qt4/components/simple_preferences.cpp
@@ -418,8 +418,12 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent,
             audioCommon( name ) \
             QLineEdit * name ## Device = new QLineEdit; \
             name ## Label->setBuddy( name ## Device ); \
+            QHBoxLayout * name ## Layout = new QHBoxLayout; \
+            name ## Layout->addWidget( name ## Device ); \
             QPushButton * name ## Browse = new QPushButton( qtr( "Browse..." ) ); \
-            outputAudioLayout->addWidget( name ## Device, outputAudioLayout->rowCount() - 1, 0, 1, -1, Qt::AlignLeft );
+            name ## Layout->addWidget( name ## Browse ); \
+            outputAudioLayout->addLayout( name ## Layout, \
+                outputAudioLayout->rowCount() - 1, 1, 1, -1, Qt::AlignLeft );
 
             /* Build if necessary */
             QGridLayout * outputAudioLayout = qobject_cast<QGridLayout *>(ui.outputAudioBox->layout());
-- 
1.8.5.3




More information about the vlc-devel mailing list