From a40b903fee8c1d9afff03d474a3c2a1ca8398d97 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Kempf Date: Wed, 19 Dec 2007 07:02:26 +0000 Subject: [PATCH] Qt4 - Preferences, lastfm fix. --- .../gui/qt4/components/simple_preferences.cpp | 25 +++++++++++-------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/modules/gui/qt4/components/simple_preferences.cpp b/modules/gui/qt4/components/simple_preferences.cpp index 2cb2356d7f..58285f0779 100644 --- a/modules/gui/qt4/components/simple_preferences.cpp +++ b/modules/gui/qt4/components/simple_preferences.cpp @@ -253,17 +253,20 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent, updateAudioOptions( ui.outputModule->currentIndex() ); /* LastFM */ - CONFIG_GENERIC( "lastfm-username", String, ui.lastfm_user_label, - lastfm_user_edit ); - CONFIG_GENERIC( "lastfm-password", String, ui.lastfm_pass_label, - lastfm_pass_edit ); - - if( config_ExistIntf( VLC_OBJECT( p_intf ), "audioscrobbler" ) ) - ui.lastfm->setCheckState( Qt::Checked ); - else - ui.lastfm->setCheckState( Qt::Unchecked ); - CONNECT( ui.lastfm, stateChanged( int ), this , - lastfm_Changed( int ) ); + if( module_Exists( p_intf, "Audioscrobbler" ) ) + { + CONFIG_GENERIC( "lastfm-username", String, ui.lastfm_user_label, + lastfm_user_edit ); + CONFIG_GENERIC( "lastfm-password", String, ui.lastfm_pass_label, + lastfm_pass_edit ); + + if( config_ExistIntf( VLC_OBJECT( p_intf ), "audioscrobbler" ) ) + ui.lastfm->setCheckState( Qt::Checked ); + else + ui.lastfm->setCheckState( Qt::Unchecked ); + CONNECT( ui.lastfm, stateChanged( int ), this , + lastfm_Changed( int ) ); + } /* Normalizer */ -- 2.39.2