]> git.sesse.net Git - vlc/commitdiff
* Fix p_item etc breakages. Question.. is the seperate fileinfo dialog still useful?
authorDerk-Jan Hartman <hartman@videolan.org>
Thu, 1 Apr 2004 18:21:56 +0000 (18:21 +0000)
committerDerk-Jan Hartman <hartman@videolan.org>
Thu, 1 Apr 2004 18:21:56 +0000 (18:21 +0000)
modules/gui/macosx/info.h
modules/gui/macosx/info.m
modules/gui/macosx/intf.m
modules/gui/macosx/playlist.m

index 3b8a3d5b9204faa44dda1744e64a17d60888294d..07cb7918987653e6cab75d1814f06685014e5b85 100644 (file)
@@ -36,6 +36,6 @@
 - (void)updateInfo;
 - (IBAction)toggleInfoPanel:(id)sender;
 - (IBAction)showCategory:(id)sender;
-- (void)createInfoView:(input_info_category_t *)p_category;
+- (void)createInfoView:(info_category_t *)p_category;
 
 @end
index 4ab2823c16ced8a2657c6bbd15866b1e0e4183b7..d9307ad38d3521e0e78e9f51a242a6341acfd4b2 100644 (file)
@@ -75,6 +75,7 @@
 - (void)updateInfo
 {
     NSString *o_selectedPane;
+    int i, i_select;
     
     if( ![o_window isVisible] )
     {
 
     [o_strings removeAllObjects];
     [o_selector removeAllItems];
-
-    vlc_mutex_lock( &p_input->stream.stream_lock );
-    input_info_category_t * p_category = p_input->stream.p_info;
-
-    while( p_category )
+    
+    vlc_mutex_lock( &p_input->p_item->lock );
+    for( i = 0; i < p_input->p_item->i_categories; i++ )
     {
-        [self createInfoView: p_category];
-        p_category = p_category->p_next;
-    }
+        info_category_t *p_cat = p_input->p_item->pp_categories[i];
 
-    vlc_mutex_unlock( &p_input->stream.stream_lock );
-    if( p_input ) vlc_object_release( p_input );
+        [self createInfoView: p_cat];
+    }
+    vlc_mutex_unlock( &p_input->p_item->lock );
 
-    int i_select = [o_selector indexOfItemWithTitle:o_selectedPane];
+    i_select = [o_selector indexOfItemWithTitle:o_selectedPane];
     if ( i_select < 0 )
     {
         i_select = 0;
     [self showCategory: o_selector];
 }
 
-- (void)createInfoView:(input_info_category_t *)p_category
+- (void)createInfoView:(info_category_t *)p_cat
 {
     NSString * o_title;
     NSMutableString * o_content;
-    input_info_t * p_info;
+    info_t * p_info;
+    int i;
 
     /* Add a category */
-    o_title = [NSString stringWithUTF8String: p_category->psz_name];
+    o_title = [NSString stringWithUTF8String: p_cat->psz_name];
     [o_selector addItemWithTitle: o_title];
 
     /* Create empty content string */
     o_content = [NSMutableString string];
 
     /* Add the fields */
-    p_info = p_category->p_info;
-
-    while( p_info )
+    for( i= 0; i < p_cat->i_infos; i++ )
     {
+        p_info = p_cat->pp_infos[i];
         [o_content appendFormat: @"%@: %@\n\n", [NSApp localizedString: p_info->psz_name],
-                                                [NSApp localizedString: p_info->psz_value]]; 
-        p_info = p_info->p_next;
+                                                [NSApp localizedString: p_info->psz_value]];
     }
 
     [o_strings setObject: o_content forKey: o_title];
index ef3252d11a86770742ec385dc5ae37d9f659fc4e..d8bfb1645286d7a085484597be810f46e1bb072c 100644 (file)
@@ -739,7 +739,7 @@ unsigned int VLCModifiersToCocoa( unsigned int i_key )
 
         vlc_mutex_lock( &p_playlist->object_lock );
         [o_scrollfield setStringValue: [NSString stringWithUTF8String: 
-            p_playlist->pp_items[p_playlist->i_index]->psz_name]]; 
+            p_playlist->pp_items[p_playlist->i_index]->input.psz_name]]; 
         vlc_mutex_unlock( &p_playlist->object_lock );
 
         if( p_vout != NULL )
index 31dfb8aa2f673bf72d2c291df25ad3ccce99e39f..e9f26f27ee33a494f0c80c850fb89b6937ec6d8b 100644 (file)
@@ -684,7 +684,7 @@ belongs to an Apple hidden private API, and then can "disapear" at any time*/
     else if( [[o_tc identifier] isEqualToString:@"3"] )
     {
         char psz_duration[MSTRTIME_MAX_SIZE];
-        mtime_t dur = p_playlist->pp_items[i_row]->i_duration;
+        mtime_t dur = p_playlist->pp_items[i_row]->input.i_duration;
         if( dur != -1 )
         {
             secstotimestr( psz_duration, dur/1000000 );