]> git.sesse.net Git - vlc/commitdiff
Qt: first run dialog is never asked again if --no-qt-privacy-ask was passed on the...
authorJean-Baptiste Kempf <jb@videolan.org>
Fri, 27 Nov 2009 17:41:02 +0000 (18:41 +0100)
committerJean-Baptiste Kempf <jb@videolan.org>
Fri, 4 Dec 2009 06:21:38 +0000 (07:21 +0100)
This will help deployment.
And Close #1834.
I believe that it will work on Maemo now.

modules/gui/qt4/dialogs/firstrun.cpp

index 67b403c35546f5c6708d8dfa820ae094c11a8a43..232d463982d17a15a5f47ef85450e48ac56ecda4 100644 (file)
  * 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
 }