]> git.sesse.net Git - vlc/blobdiff - modules/gui/wxwidgets/dialogs/updatevlc.cpp
XCB: grey scale output support
[vlc] / modules / gui / wxwidgets / dialogs / updatevlc.cpp
index 88eb5e0eaa984f0b7421558c99299f5b4763a8a5..8f4fd2249c155c0eb9323fc36d079f7167819cfc 100644 (file)
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
-#ifdef UPDATE_CHECK
 
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
 #include "updatevlc.hpp"
+
+#ifdef UPDATE_CHECK
 #include <wx/imaglist.h>
 
 #include "bitmaps/update_ascii.xpm"
@@ -100,7 +101,7 @@ void UpdateVLC::OnClose( wxCloseEvent& WXUNUSED(event) )
 
 void UpdateVLC::OnCheckForUpdate( wxCommandEvent& event )
 {
-    update_Check( p_update );
+    update_Check( p_update, NULL, this );
     wxBoxSizer *main_sizer = new wxBoxSizer( wxVERTICAL );
 
     DestroyChildren();
@@ -111,10 +112,14 @@ void UpdateVLC::OnCheckForUpdate( wxCommandEvent& event )
                       + wxU(psz_tmp),
                       i_image );*/
 
-    if( update_CompareReleaseToCurrent( p_update ) == UpdateReleaseStatusNewer )
-        main_sizer->Add( new wxStaticText( this, -1, wxU( p_update->release.psz_desc )
+    if( update_NeedUpgrade( p_update ) )
+    {
+        update_release_t *p_release = update_GetRelease( p_update );
+        assert( p_release );
+        main_sizer->Add( new wxStaticText( this, -1, wxU( p_release->psz_desc )
                          + wxU( "\nYou can download the latest version of VLC at the adress :\n" )
-                         + wxU( p_update->release.psz_url ) ) );
+                         + wxU( p_release->psz_url ) ) );
+    }
     else
         main_sizer->Add( new wxStaticText( this, -1,
                          wxU( _( "\nYou have the latest version of VLC\n" ) ) ) );