Add special case for category labels.
authorAntoine Cellerier <dionoea@videolan.org>
Sat, 5 Jan 2008 17:43:23 +0000 (17:43 +0000)
committerAntoine Cellerier <dionoea@videolan.org>
Sat, 5 Jan 2008 17:43:23 +0000 (17:43 +0000)
modules/gui/qt4/components/extended_panels.cpp

index 3c6aab7..bb5d54f 100644 (file)
@@ -689,12 +689,20 @@ void ExtV4l2::Refresh( void )
                 }
                 case VLC_VAR_VOID:
                 {
-                    QPushButton *button = new QPushButton( psz_label, box );
-                    button->setObjectName( psz_var );
+                    if( i_type & VLC_VAR_ISCOMMAND )
+                    {
+                        QPushButton *button = new QPushButton( psz_label, box );
+                        button->setObjectName( psz_var );
 
-                    CONNECT( button, clicked( bool ), this,
-                             ValueChange( bool ) );
-                    layout->addWidget( button );
+                        CONNECT( button, clicked( bool ), this,
+                                 ValueChange( bool ) );
+                        layout->addWidget( button );
+                    }
+                    else
+                    {
+                        QLabel *label = new QLabel( psz_label, box );
+                        layout->addWidget( label );
+                    }
                     break;
                 }
                 default: