[vlc-devel] commit: Qt: first run dialog is never asked again if --no-qt-privacy-ask was passed on the first run . (Jean-Baptiste Kempf )

git version control git at videolan.org
Fri Dec 4 07:21:45 CET 2009


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Fri Nov 27 18:41:02 2009 +0100| [b02915bd65ec72c70d9e1a38ade59f8ea56736f8] | committer: Jean-Baptiste Kempf 

Qt: first run dialog is never asked again if --no-qt-privacy-ask was passed on the first run.

This will help deployment.
And Close #1834.
I believe that it will work on Maemo now.

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

 modules/gui/qt4/dialogs/firstrun.cpp |   17 +++++++++++------
 1 files changed, 11 insertions(+), 6 deletions(-)

diff --git a/modules/gui/qt4/dialogs/firstrun.cpp b/modules/gui/qt4/dialogs/firstrun.cpp
index 67b403c..232d463 100644
--- a/modules/gui/qt4/dialogs/firstrun.cpp
+++ b/modules/gui/qt4/dialogs/firstrun.cpp
@@ -21,13 +21,13 @@
  * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
-
 #include "dialogs/firstrun.hpp"
 
 #include "components/preferences_widgets.hpp"
 
 #include <QGridLayout>
 #include <QGroupBox>
+#include <QSettings>
 
 FirstRun::FirstRun( QWidget *_p, intf_thread_t *_p_intf )
          : QWidget( _p ), p_intf( _p_intf )
@@ -36,13 +36,18 @@ FirstRun::FirstRun( QWidget *_p, intf_thread_t *_p_intf )
     /**
      * Ask for the network policy on FIRST STARTUP
      **/
-    if( config_GetInt( p_intf, "qt-privacy-ask") )
+    if( getSettings()->value( "IsFirstRun", 1 ).toInt() )
     {
-        buildPrivDialog();
-        setVisible( true );
+        if( config_GetInt( p_intf, "qt-privacy-ask") )
+        {
+            buildPrivDialog();
+            setVisible( true );
+        }
+        else
+            close();
+
+        getSettings()->setValue( "IsFirstRun", 0 );
     }
-    else
-        close();
 #endif
 }
 




More information about the vlc-devel mailing list