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 @@
#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
}
......
......@@ -24,11 +24,24 @@
#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;
......
......@@ -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");
......
......@@ -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
......
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