Show stylesCombo only on Linux and Win32-debug
authorJean-Baptiste Kempf <jb@videolan.org>
Tue, 11 Aug 2009 22:12:53 +0000 (00:12 +0200)
committerJean-Baptiste Kempf <jb@videolan.org>
Tue, 11 Aug 2009 22:13:22 +0000 (00:13 +0200)
modules/gui/qt4/components/simple_preferences.cpp

index d905ac8..e167796 100644 (file)
 #include <QSettings>
 #include <QtAlgorithms>
 
-#include <string>
-
 #define ICON_HEIGHT 64
 
 #ifdef WIN32
-#include "vistaassoc.h"
+# include "vistaassoc.h"
 #endif
 
 /*********************************************************************
@@ -497,14 +495,6 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent,
             ui.languageBox->hide();
             ui.assoBox->hide();
 #endif
-            ui.stylesCombo->addItems( QStyleFactory::keys() );
-            ui.stylesCombo->setCurrentIndex( ui.stylesCombo->findText(
-                        getSettings()->value( "MainWindow/QtStyle", "" ).toString() ) );
-            ui.stylesCombo->insertSeparator( 1 );
-
-            CONNECT( ui.stylesCombo, currentIndexChanged( QString ), this, changeStyle( QString ) );
-
-
             /* interface */
             char *psz_intf = config_GetPsz( p_intf, "intf" );
             if( psz_intf )
@@ -519,7 +509,17 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent,
 
             optionWidgets.append( ui.skins );
             optionWidgets.append( ui.qt4 );
+#if !defined(NDEBUG) || !defined( WIN32)
+            ui.stylesCombo->addItems( QStyleFactory::keys() );
+            ui.stylesCombo->setCurrentIndex( ui.stylesCombo->findText(
+                        getSettings()->value( "MainWindow/QtStyle", "" ).toString() ) );
+            ui.stylesCombo->insertSeparator( 1 );
+
+            CONNECT( ui.stylesCombo, currentIndexChanged( QString ), this, changeStyle( QString ) );
             optionWidgets.append( ui.stylesCombo );
+#else
+            ui.styleCombo->hide();
+#endif
 
             ui.skins_zone->setEnabled( ui.skins->isChecked() );
             CONNECT( ui.skins, toggled( bool ), ui.skins_zone, setEnabled( bool ) );
@@ -817,6 +817,7 @@ void SPrefsPanel::changeStyle( QString s_style )
 #include <QDialogButtonBox>
 #include <QHeaderView>
 #include "util/registry.hpp"
+#include <string>
 
 bool SPrefsPanel::addType( const char * psz_ext, QTreeWidgetItem* current,
                            QTreeWidgetItem* parent, QVLCRegistry *qvReg )