]> git.sesse.net Git - vlc/commitdiff
Don't launch an update request at the first launch, but wait for the second launch...
authorJean-Baptiste Kempf <jb@videolan.org>
Mon, 4 Aug 2008 19:53:37 +0000 (12:53 -0700)
committerJean-Baptiste Kempf <jb@videolan.org>
Mon, 4 Aug 2008 19:54:50 +0000 (12:54 -0700)
modules/gui/qt4/qt4.cpp

index e5d3e280dca1a238cd7d9e24ca4955d5999d4dbc..722e6fb45fae11c4ded0dba958859338256df673 100644 (file)
@@ -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();