[vlc-devel] commit: Correctly save the privacy dialog modifications. ( Jean-Baptiste Kempf )

git version control git at videolan.org
Mon Aug 4 23:07:36 CEST 2008


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Mon Aug  4 14:09:48 2008 -0700| [2c7642c90200addcab3948a73e542e39bfa30591] | committer: Jean-Baptiste Kempf 

Correctly save the privacy dialog modifications.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=2c7642c90200addcab3948a73e542e39bfa30591
---

 modules/gui/qt4/dialogs/help.cpp   |    4 ++--
 modules/gui/qt4/main_interface.cpp |    9 +++++----
 modules/gui/qt4/main_interface.hpp |    2 +-
 3 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/modules/gui/qt4/dialogs/help.cpp b/modules/gui/qt4/dialogs/help.cpp
index 20190d1..837e903 100644
--- a/modules/gui/qt4/dialogs/help.cpp
+++ b/modules/gui/qt4/dialogs/help.cpp
@@ -241,10 +241,10 @@ UpdateDialog::UpdateDialog( intf_thread_t *_p_intf ) : QVLCFrame( _p_intf )
     p_update = update_New( p_intf );
     b_checked = false;
 
-    setMinimumSize( 300, 100 );
+    setMinimumSize( 300, 300 );
     setMaximumSize( 400, 300 );
 
-    readSettings( "Update", QSize( 300, 100 ) );
+    readSettings( "Update", QSize( 300, 250 ) );
 
     /* Check for updates */
     UpdateOrDownload();
diff --git a/modules/gui/qt4/main_interface.cpp b/modules/gui/qt4/main_interface.cpp
index 38b6feb..7846807 100644
--- a/modules/gui/qt4/main_interface.cpp
+++ b/modules/gui/qt4/main_interface.cpp
@@ -449,9 +449,10 @@ inline void MainInterface::askForPrivacy()
     if( config_GetInt( p_intf, "qt-privacy-ask") )
     {
         QList<ConfigControl *> controls;
-        if( privacyDialog( controls ) == QDialog::Accepted )
+        if( privacyDialog( &controls ) == QDialog::Accepted )
         {
             QList<ConfigControl *>::Iterator i;
+            msg_Dbg( p_intf, "coin coin %i", controls.size() );
             for(  i = controls.begin() ; i != controls.end() ; i++ )
             {
                 ConfigControl *c = qobject_cast<ConfigControl *>(*i);
@@ -465,7 +466,7 @@ inline void MainInterface::askForPrivacy()
     }
 }
 
-int MainInterface::privacyDialog( QList<ConfigControl *> controls )
+int MainInterface::privacyDialog( QList<ConfigControl *> *controls )
 {
     QDialog *privacy = new QDialog();
 
@@ -505,7 +506,7 @@ int MainInterface::privacyDialog( QList<ConfigControl *> controls )
     {                                                             \
         control =  new type ## ConfigControl( VLC_OBJECT(p_intf), \
                 p_config, options, false, optionsLayout, line );  \
-        controls.append( control );                               \
+        controls->append( control );                               \
     }
 
 #define CONFIG_GENERIC_NOBOOL( option, type )                     \
@@ -514,7 +515,7 @@ int MainInterface::privacyDialog( QList<ConfigControl *> controls )
     {                                                             \
         control =  new type ## ConfigControl( VLC_OBJECT(p_intf), \
                 p_config, options, optionsLayout, line );  \
-        controls.append( control );                               \
+        controls->append( control );                               \
     }
 
     CONFIG_GENERIC( "album-art", IntegerList ); line++;
diff --git a/modules/gui/qt4/main_interface.hpp b/modules/gui/qt4/main_interface.hpp
index 4f953df..d4acacc 100644
--- a/modules/gui/qt4/main_interface.hpp
+++ b/modules/gui/qt4/main_interface.hpp
@@ -108,7 +108,7 @@ private:
 
     void handleMainUi( QSettings* );
     void askForPrivacy();
-    int  privacyDialog( QList<ConfigControl *> controls );
+    int  privacyDialog( QList<ConfigControl *> *controls );
 
     /* Systray */
     void handleSystray();




More information about the vlc-devel mailing list