]> git.sesse.net Git - vlc/blobdiff - modules/gui/qt4/components/simple_preferences.cpp
Qt4 - Getting rid of useless setCheckState( Qt::Checked ) when setChecked is enough...
[vlc] / modules / gui / qt4 / components / simple_preferences.cpp
index 90eb29630b1cf0472479cfdb6804f1e1e9225fb8..797e0ee9a7648e24ab4c77aed150f32fca589cac 100644 (file)
@@ -170,7 +170,6 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent,
             CONFIG_GENERIC( "video-on-top", Bool, NULL, alwaysOnTop );
             CONFIG_GENERIC( "video-deco", Bool, NULL, windowDecorations );
             CONFIG_GENERIC( "skip-frames" , Bool, NULL, skipFrames );
-            CONFIG_GENERIC( "overlay", Bool, NULL, overlay );
             CONFIG_GENERIC( "vout", Module, NULL, outputModule );
 
 #ifdef WIN32
@@ -254,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->setChecked( true );
+                else
+                    ui.lastfm->setChecked( false );
+                CONNECT( ui.lastfm, stateChanged( int ), this ,
+                        lastfm_Changed( int ) );
+            }
 
             /* Normalizer */
 
@@ -285,7 +287,8 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent,
             /* Disk Devices */
             {
                 ui.DVDDevice->setToolTip(
-                    qtr( "If this propriety is blank, then you have\n"
+                    //BUG: make this sentence understandable
+                    qtr( "If this property is blank, then you have\n"
                          "values for DVD, VCD, and CDDA.\n"
                          "You can define a unique one or set that in"
                          "the advanced preferences" ) );