]> git.sesse.net Git - vlc/blobdiff - modules/gui/wxwindows/fileinfo.cpp
* modules/gui/wxwindows/*: new --wxwin-keep-size option to remember the size of the...
[vlc] / modules / gui / wxwindows / fileinfo.cpp
index 59a2334b581d5dd95f5efa0412aa83b96fd51eff..fe30bf1601f1b0a2cbb43eee4468509207fd5f44 100644 (file)
@@ -1,8 +1,8 @@
 /*****************************************************************************
  * fileinfo.cpp : wxWindows plugin for vlc
  *****************************************************************************
- * Copyright (C) 2000-2001,2003 VideoLAN
- * $Id: fileinfo.cpp,v 1.22 2003/12/27 14:36:30 gbazin Exp $
+ * Copyright (C) 2000-2004 VideoLAN
+ * $Id$
  *
  * Authors: Sigmund Augdal <sigmunau@idi.ntnu.no>
  *
@@ -28,7 +28,6 @@
 #include <vlc/intf.h>
 
 #include "wxwindows.h"
-#include <wx/treectrl.h>
 
 /*****************************************************************************
  * Event Table.
@@ -116,26 +115,23 @@ void FileInfo::UpdateFileInfo()
     fileinfo_tree->DeleteChildren( fileinfo_root );
     fileinfo_root_label = wxL2U(p_input->psz_name);
 
-    vlc_mutex_lock( &p_input->stream.stream_lock );
-
-    input_info_category_t *p_cat = p_input->stream.p_info;
-
-    while( p_cat )
+    vlc_mutex_lock( &p_input->p_item->lock );
+    for( int i = 0; i < p_input->p_item->i_categories; i++ )
     {
+        info_category_t *p_cat = p_input->p_item->pp_categories[i];
+
         wxTreeItemId cat = fileinfo_tree->AppendItem( fileinfo_root,
                                                       wxL2U(p_cat->psz_name) );
-        input_info_t *p_info = p_cat->p_info;
-        while( p_info )
+        for( int j = 0; j < p_cat->i_infos; j++ )
         {
+            info_t *p_info = p_cat->pp_infos[j];
+
             fileinfo_tree->AppendItem( cat, (wxString)wxL2U(p_info->psz_name) +
                                        wxT(": ") + wxL2U(p_info->psz_value) );
-            p_info = p_info->p_next;
         }
-        p_cat = p_cat->p_next;
         fileinfo_tree->Expand( cat );
     }
-
-    vlc_mutex_unlock( &p_input->stream.stream_lock );
+    vlc_mutex_unlock( &p_input->p_item->lock );
 
     return;
 }