[vlc-devel] commit: 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. ( Jean-Baptiste Kempf )
git version control
git at videolan.org
Mon Aug 4 21:52:41 CEST 2008
vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Mon Aug 4 12:53:37 2008 -0700| [47e1fff77cb73f99b39d325ebf09cf9f82d01a76] | committer: Jean-Baptiste Kempf
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.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=47e1fff77cb73f99b39d325ebf09cf9f82d01a76
---
modules/gui/qt4/qt4.cpp | 31 ++++++++++++++++---------------
1 files changed, 16 insertions(+), 15 deletions(-)
diff --git a/modules/gui/qt4/qt4.cpp b/modules/gui/qt4/qt4.cpp
index e5d3e28..722e6fb 100644
--- a/modules/gui/qt4/qt4.cpp
+++ b/modules/gui/qt4/qt4.cpp
@@ -345,6 +345,22 @@ static void *Init( vlc_object_t *obj )
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 */
if( !p_intf->pf_show_dialog )
{
@@ -395,21 +411,6 @@ static void *Init( vlc_object_t *obj )
p_intf->p_sys->psz_filepath = EMPTY_STR( psz_path ) ? psz_path
: 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 */
app->exec();
More information about the vlc-devel
mailing list