]> git.sesse.net Git - vlc/commitdiff
Qt: fix First run dialog
authorJean-Baptiste Kempf <jb@videolan.org>
Tue, 29 Dec 2009 22:25:01 +0000 (23:25 +0100)
committerJean-Baptiste Kempf <jb@videolan.org>
Tue, 29 Dec 2009 22:26:35 +0000 (23:26 +0100)
And close #3182 the unparented widget that could be bothering you.
The issue about the unparented widget was totalled found by freeruner (on IRC and trac)

modules/gui/qt4/dialogs/firstrun.cpp
modules/gui/qt4/dialogs/firstrun.hpp
modules/gui/qt4/dialogs/messages.cpp
modules/gui/qt4/main_interface.cpp

index 232d463982d17a15a5f47ef85450e48ac56ecda4..afaf98c93f91a6d97b445ae635d6f1ecc63b6a2a 100644 (file)
 #include <QGroupBox>
 #include <QSettings>
 
-FirstRun::FirstRun( QWidget *_p, intf_thread_t *_p_intf )
+FirstRun::FirstRun( QWidget *_p, intf_thread_t *_p_intf  )
          : QWidget( _p ), p_intf( _p_intf )
 {
 #ifndef HAVE_MAEMO
-    /**
-     * Ask for the network policy on FIRST STARTUP
-     **/
-    if( getSettings()->value( "IsFirstRun", 1 ).toInt() )
-    {
-        if( config_GetInt( p_intf, "qt-privacy-ask") )
-        {
-            buildPrivDialog();
-            setVisible( true );
-        }
-        else
-            close();
-
-        getSettings()->setValue( "IsFirstRun", 0 );
-    }
+    msg_Dbg( p_intf, "Boring first Run Wizard" );
+    buildPrivDialog();
+    setVisible( true );
 #endif
 }
 
index 357fed94021cec774acd4f032467dea3fe04bd38..f1e71678c0fcfbcaa4fb186e1c9e152ace878b4f 100644 (file)
 #include "qt4.hpp"
 
 #include <QWidget>
+#include <QSettings>
+
 class ConfigControl;
 class FirstRun : public QWidget
 {
     Q_OBJECT
     public:
+        static void CheckAndRun( QWidget *_p, intf_thread_t *p_intf )
+        {
+            if( getSettings()->value( "IsFirstRun", 1 ).toInt() )
+            {
+                if( config_GetInt( p_intf, "qt-privacy-ask") )
+                {
+                    new FirstRun( _p, p_intf );
+                }
+                getSettings()->setValue( "IsFirstRun", 0 );
+            }
+        }
         FirstRun( QWidget *, intf_thread_t * );
     private:
         QList<ConfigControl *> controlsList;
index 8d80e548078c0c1a7e359626d1df57ab514f72ba..84d7259a19055ca221a6d2ff3fe02094d408ee86 100644 (file)
@@ -189,6 +189,7 @@ void MessagesDialog::updateConfig()
 {
     config_PutPsz(p_intf, "verbose-objects", qtu(vbobjectsEdit->text()));
     //vbobjectsEdit->setText("vbEdit changed!");
+    msg_Dbg( p_intf, "Here" );
 
     char * psz_verbose_objects = strdup(qtu(vbobjectsEdit->text()));
     msg_EnableObjectPrinting(p_intf, "all");
index 8663c3807c82d5505b19baac37bd762e099163e9..03a075cc4386e9187c63b74798c84c5aeb7faef6 100644 (file)
@@ -100,7 +100,7 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf )
     i_bg_height          = 0;
 
     /* Ask for Privacy */
-    new FirstRun( this, p_intf );
+    FirstRun::CheckAndRun( this, p_intf );
 
     /**
      *  Configuration and settings