]> git.sesse.net Git - vlc/commitdiff
update system :
authorAntoine Cellerier <dionoea@videolan.org>
Mon, 12 Sep 2005 18:49:42 +0000 (18:49 +0000)
committerAntoine Cellerier <dionoea@videolan.org>
Mon, 12 Sep 2005 18:49:42 +0000 (18:49 +0000)
only take into account "stable" releases when release_type == stable
stable and testing when == testing
stable, testing and nighlty when == nightly
all when !=
(still need a way to change release_type in the intf ... i'm lazy. default
set to "testing")

modules/gui/wxwidgets/updatevlc.cpp

index 2f707ecd4ccc1422edd22e662367ea5801f97e4d..8ff37f1601d23376712edd5b2310935f2d3a2641 100644 (file)
@@ -106,7 +106,7 @@ UpdateVLC::UpdateVLC( intf_thread_t *_p_intf, wxWindow *p_parent ):
 {
     /* Initializations */
     p_intf = _p_intf;
-    release_type = wxT( "stable" );
+    release_type = wxT( "testing" );
     SetIcon( *p_intf->p_sys->p_icon );
     SetAutoLayout( TRUE );
 
@@ -507,6 +507,32 @@ void UpdateVLC::UpdateUpdatesTree()
     it = m_versions.begin();
     while( it != m_versions.end() )
     {
+        if( it->type != release_type )
+        {
+            it++;
+            continue;
+        }
+
+        if( release_type != wxT( "stable" ) && it->type == wxT( "stable" ) )
+        {
+            it++;
+            continue;
+        }
+
+        if( release_type != wxT( "stable" ) && release_type != wxT( "testing" )
+            && it->type == wxT( "testing" ) )
+        {
+            it++;
+            continue;
+        }
+
+        if( release_type != wxT( "stable" ) && release_type != wxT( "testing" )
+            && release_type != wxT( "nightly" ) )
+        {
+            it++;
+            continue;
+        }
+
         if( atoi((const char *)it->major.mb_str()) <
             atoi(PACKAGE_VERSION_MAJOR)
          || ( atoi((const char *)it->major.mb_str()) ==