Commit 0533a0cd authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Qt: fix First run dialog

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)
parent abe147c0
...@@ -29,25 +29,13 @@ ...@@ -29,25 +29,13 @@
#include <QGroupBox> #include <QGroupBox>
#include <QSettings> #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 ) : QWidget( _p ), p_intf( _p_intf )
{ {
#ifndef HAVE_MAEMO #ifndef HAVE_MAEMO
/** msg_Dbg( p_intf, "Boring first Run Wizard" );
* Ask for the network policy on FIRST STARTUP buildPrivDialog();
**/ setVisible( true );
if( getSettings()->value( "IsFirstRun", 1 ).toInt() )
{
if( config_GetInt( p_intf, "qt-privacy-ask") )
{
buildPrivDialog();
setVisible( true );
}
else
close();
getSettings()->setValue( "IsFirstRun", 0 );
}
#endif #endif
} }
......
...@@ -24,11 +24,24 @@ ...@@ -24,11 +24,24 @@
#include "qt4.hpp" #include "qt4.hpp"
#include <QWidget> #include <QWidget>
#include <QSettings>
class ConfigControl; class ConfigControl;
class FirstRun : public QWidget class FirstRun : public QWidget
{ {
Q_OBJECT Q_OBJECT
public: 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 * ); FirstRun( QWidget *, intf_thread_t * );
private: private:
QList<ConfigControl *> controlsList; QList<ConfigControl *> controlsList;
......
...@@ -189,6 +189,7 @@ void MessagesDialog::updateConfig() ...@@ -189,6 +189,7 @@ void MessagesDialog::updateConfig()
{ {
config_PutPsz(p_intf, "verbose-objects", qtu(vbobjectsEdit->text())); config_PutPsz(p_intf, "verbose-objects", qtu(vbobjectsEdit->text()));
//vbobjectsEdit->setText("vbEdit changed!"); //vbobjectsEdit->setText("vbEdit changed!");
msg_Dbg( p_intf, "Here" );
char * psz_verbose_objects = strdup(qtu(vbobjectsEdit->text())); char * psz_verbose_objects = strdup(qtu(vbobjectsEdit->text()));
msg_EnableObjectPrinting(p_intf, "all"); msg_EnableObjectPrinting(p_intf, "all");
......
...@@ -100,7 +100,7 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf ) ...@@ -100,7 +100,7 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf )
i_bg_height = 0; i_bg_height = 0;
/* Ask for Privacy */ /* Ask for Privacy */
new FirstRun( this, p_intf ); FirstRun::CheckAndRun( this, p_intf );
/** /**
* Configuration and settings * Configuration and settings
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment