]> git.sesse.net Git - vlc/commitdiff
Qt4 - SPrefs: save the interface value... Doesn't seem to work, so please review.
authorJean-Baptiste Kempf <jb@videolan.org>
Mon, 29 Oct 2007 03:02:43 +0000 (03:02 +0000)
committerJean-Baptiste Kempf <jb@videolan.org>
Mon, 29 Oct 2007 03:02:43 +0000 (03:02 +0000)
modules/gui/qt4/components/simple_preferences.cpp
modules/gui/qt4/components/simple_preferences.hpp

index 210d249aaa5796675ea5f083fc42067fe32c225d..d768c8f43803c8c5cf2f881a9584bcfdcc8b059b 100644 (file)
@@ -247,7 +247,6 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent,
                  volNormalizer );
         CONFIG_GENERIC( "audio-visual" , Module , NULL, visualisation);
 
-
         CONFIG_GENERIC( "lastfm-username", String, ui.lastfm_user_label,
                          lastfm_user_edit );
         CONFIG_GENERIC( "lastfm-password", String, ui.lastfm_pass_label,
@@ -323,9 +322,10 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent,
             }
             if( p_config->value.psz && strcmp( p_config->value.psz, "skins2" ))
             {
-                    ui.skins->setChecked( true );
+                ui.skins->setChecked( true );
             }
-            //FIXME interface choice
+            skinInterfaceButton = ui.skins;
+            qtInterfaceButton = ui.qt4;
 
             CONFIG_GENERIC( "qt-always-video", Bool, NULL, qtAlwaysVideo );
             CONFIG_GENERIC_FILE( "skins2-last", File, NULL, fileSkin,
@@ -400,6 +400,7 @@ void SPrefsPanel::apply()
         ConfigControl *c = qobject_cast<ConfigControl *>(*i);
         c->doApply( p_intf );
     }
+    
     /* Devices */
     //FIXME is it qta or qtu ????
     char *psz_devicepath = qtu( inputDevice->text() );
@@ -409,6 +410,12 @@ void SPrefsPanel::apply()
         config_PutPsz( p_intf, "vcd", psz_devicepath );
         config_PutPsz( p_intf, "cd-audio", psz_devicepath );
     }
+    
+    /* Interfaces */
+    if( skinInterfaceButton->isChecked() )
+       config_PutPsz( p_intf, "intf", "skins2" );
+    if( qtInterfaceButton->isChecked() )
+        config_PutPsz( p_intf, "intf", "qt4" );
 }
 
 void SPrefsPanel::clean()
index affc333b3dc7061e653a94d1f52242789aabf47a..f00b380740f68e1a739f823d36b14710e7f3ae25 100644 (file)
@@ -42,6 +42,7 @@ enum {
 class ConfigControl;
 class QComboBox;
 class QLineEdit;
+class QRadioButton;
 
 class SPrefsCatList : public QWidget
 {
@@ -75,6 +76,8 @@ private:
     QWidget *file_options;
     QComboBox *audioOutput;
     QLineEdit *inputDevice;
+    QRadioButton *skinInterfaceButton;
+    QRadioButton *qtInterfaceButton;
 
 /* Display only the options for the selected audio output */
 private slots: