Commit 47e1fff7 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Don't launch an update request at the first launch, but wait for the second...

Don't launch an update request at the first launch, but wait for the second launch in order to have the right network-policy value. This fixes the 'I update even when you said no" bug.
parent ea456fa5
...@@ -345,6 +345,22 @@ static void *Init( vlc_object_t *obj ) ...@@ -345,6 +345,22 @@ static void *Init( vlc_object_t *obj )
QPointer<MainInterface> *miP = NULL; QPointer<MainInterface> *miP = NULL;
#ifdef UPDATE_CHECK
/* Checking for VLC updates */
if( config_GetInt( p_intf, "qt-updates-notif" ) &&
!config_GetInt( p_intf, "qt-privacy-ask" ) )
{
int interval = config_GetInt( p_intf, "qt-updates-days" );
if( QDate::currentDate() >
getSettings()->value( "updatedate" ).toDate().addDays( interval ) )
{
/* The constructor of the update Dialog will do the 1st request */
UpdateDialog::getInstance( p_intf );
getSettings()->setValue( "updatedate", QDate::currentDate() );
}
}
#endif
/* Create the normal interface in non-DP mode */ /* Create the normal interface in non-DP mode */
if( !p_intf->pf_show_dialog ) if( !p_intf->pf_show_dialog )
{ {
...@@ -395,21 +411,6 @@ static void *Init( vlc_object_t *obj ) ...@@ -395,21 +411,6 @@ static void *Init( vlc_object_t *obj )
p_intf->p_sys->psz_filepath = EMPTY_STR( psz_path ) ? psz_path p_intf->p_sys->psz_filepath = EMPTY_STR( psz_path ) ? psz_path
: config_GetHomeDir(); : config_GetHomeDir();
#ifdef UPDATE_CHECK
/* Checking for VLC updates */
if( config_GetInt( p_intf, "qt-updates-notif" ) )
{
int interval = config_GetInt( p_intf, "qt-updates-days" );
if( QDate::currentDate() >
getSettings()->value( "updatedate" ).toDate().addDays( interval ) )
{
/* The constructor of the update Dialog will do the 1st request */
UpdateDialog::getInstance( p_intf );
getSettings()->setValue( "updatedate", QDate::currentDate() );
}
}
#endif
/* Launch */ /* Launch */
app->exec(); app->exec();
......
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