#include <QVBoxLayout>
#include <QScrollArea>
+#include <QStyleFactory>
+#include <QSettings>
#include <QtAlgorithms>
-#include <string>
-
#define ICON_HEIGHT 64
#ifdef WIN32
-#include "vistaassoc.h"
+# include <vlc_windows_interfaces.h>
#endif
/*********************************************************************
else
ui.lastfm->setChecked( false );
- ui.lastfm_zone->setEnabled( ui.lastfm->isChecked() );
+ ui.lastfm_zone->setVisible( ui.lastfm->isChecked() );
CONNECT( ui.lastfm, toggled( bool ),
- ui.lastfm_zone, setEnabled( bool ) );
+ ui.lastfm_zone, setVisible( bool ) );
CONNECT( ui.lastfm, stateChanged( int ),
this, lastfm_Changed( int ) );
}
CONFIG_GENERIC_NO_BOOL( "ffmpeg-pp-q", Integer, ui.ppLabel,
PostProcLevel );
CONFIG_GENERIC( "avi-index", IntegerList, ui.aviLabel, AviRepair );
- CONFIG_GENERIC( "rtsp-tcp", Bool, NULL, RTSP_TCPBox );
+
+ /* live555 module prefs */
+ CONFIG_GENERIC( "rtsp-tcp", Bool, NULL,
+ live555TransportRTSP_TCPRadio );
+ if ( !module_exists( "live555" ) )
+ {
+ ui.live555TransportRTSP_TCPRadio->hide();
+ ui.live555TransportHTTPRadio->hide();
+ ui.live555TransportLabel->hide();
+ }
#ifdef WIN32
CONFIG_GENERIC( "prefer-system-codecs", Bool, NULL, systemCodecBox );
#else
ui.systemCodecBox->hide();
+ ui.systemCodecLabel->hide();
#endif
optionWidgets.append( ui.DVDDevice );
optionWidgets.append( ui.cachingCombo );
if (module_exists ("pvr"))
TestCaC( "pvr-caching" );
#endif
- TestCaCi( "rtsp-caching", 4 ); TestCaCi( "ftp-caching", 2 );
+ if (module_exists ("livedotcom"))
+ TestCaCi( "rtsp-caching", 4 );
+ TestCaCi( "ftp-caching", 2 );
TestCaCi( "http-caching", 4 );
if (module_exists ("access_realrtsp"))
TestCaCi( "realrtsp-caching", 10 );
* Interface Panel *
*******************/
START_SPREFS_CAT( Interface, qtr("Interface Settings") );
- ui.defaultLabel->setFont( italicFont );
+// ui.defaultLabel->setFont( italicFont );
ui.skinsLabel->setText(
qtr( "This is VLC's skinnable interface. You can download other skins at" )
+ QString( " <a href=\"http://www.videolan.org/vlc/skins.php\">VLC skins website</a>." ) );
ui.languageBox->hide();
ui.assoBox->hide();
#endif
-
/* interface */
char *psz_intf = config_GetPsz( p_intf, "intf" );
if( psz_intf )
optionWidgets.append( ui.skins );
optionWidgets.append( ui.qt4 );
+#if !defined(NDEBUG) || !defined( WIN32)
+ ui.stylesCombo->addItem( qtr("System's default") );
+ 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.stylesCombo->hide();
+ optionWidgets.append( NULL );
+#endif
ui.skins_zone->setEnabled( ui.skins->isChecked() );
CONNECT( ui.skins, toggled( bool ), ui.skins_zone, setEnabled( bool ) );
encoding );
CONFIG_GENERIC( "sub-language", String, ui.subLangLabel,
preferredLanguage );
- CONFIG_GENERIC_FILE( "freetype-font", File, ui.fontLabel, ui.font,
- ui.fontBrowse );
+ CONFIG_GENERIC_NO_BOOL( "freetype-font", Font, ui.fontLabel, font );
CONFIG_GENERIC( "freetype-color", IntegerList, ui.fontColorLabel,
fontColor );
CONFIG_GENERIC( "freetype-rel-fontsize", IntegerList,
config_PutPsz( p_intf, "intf", "skins2" );
if( qobject_cast<QRadioButton *>(optionWidgets[qtRB])->isChecked() )
config_PutPsz( p_intf, "intf", "qt" );
+ if( qobject_cast<QComboBox *>(optionWidgets[styleCB]) )
+ getSettings()->setValue( "MainWindow/QtStyle",
+ qobject_cast<QComboBox *>(optionWidgets[styleCB])->currentText() );
+
break;
}
config_RemoveIntf( VLC_OBJECT( p_intf ), "audioscrobbler" );
}
+void SPrefsPanel::changeStyle( QString s_style )
+{
+ QApplication::setStyle( s_style );
+
+ /* force refresh on all widgets */
+ QWidgetList widgets = QApplication::allWidgets();
+ QWidgetList::iterator it = widgets.begin();
+ while( it != widgets.end() ) {
+ (*it)->update();
+ it++;
+ };
+}
+
#ifdef WIN32
#include <QDialogButtonBox>
#include <QHeaderView>
#include "util/registry.hpp"
+#include <string>
bool SPrefsPanel::addType( const char * psz_ext, QTreeWidgetItem* current,
QTreeWidgetItem* parent, QVLCRegistry *qvReg )