Commit 15206e75 authored by Derk-Jan Hartman's avatar Derk-Jan Hartman

* Fix p_item etc breakages. Question.. is the seperate fileinfo dialog still useful?

parent e2bbf5ca
...@@ -36,6 +36,6 @@ ...@@ -36,6 +36,6 @@
- (void)updateInfo; - (void)updateInfo;
- (IBAction)toggleInfoPanel:(id)sender; - (IBAction)toggleInfoPanel:(id)sender;
- (IBAction)showCategory:(id)sender; - (IBAction)showCategory:(id)sender;
- (void)createInfoView:(input_info_category_t *)p_category; - (void)createInfoView:(info_category_t *)p_category;
@end @end
...@@ -75,6 +75,7 @@ ...@@ -75,6 +75,7 @@
- (void)updateInfo - (void)updateInfo
{ {
NSString *o_selectedPane; NSString *o_selectedPane;
int i, i_select;
if( ![o_window isVisible] ) if( ![o_window isVisible] )
{ {
...@@ -94,20 +95,17 @@ ...@@ -94,20 +95,17 @@
[o_strings removeAllObjects]; [o_strings removeAllObjects];
[o_selector removeAllItems]; [o_selector removeAllItems];
vlc_mutex_lock( &p_input->stream.stream_lock ); vlc_mutex_lock( &p_input->p_item->lock );
input_info_category_t * p_category = p_input->stream.p_info; for( i = 0; i < p_input->p_item->i_categories; i++ )
while( p_category )
{ {
[self createInfoView: p_category]; info_category_t *p_cat = p_input->p_item->pp_categories[i];
p_category = p_category->p_next;
}
vlc_mutex_unlock( &p_input->stream.stream_lock ); [self createInfoView: p_cat];
if( p_input ) vlc_object_release( p_input ); }
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 ) if ( i_select < 0 )
{ {
i_select = 0; i_select = 0;
...@@ -116,27 +114,26 @@ ...@@ -116,27 +114,26 @@
[self showCategory: o_selector]; [self showCategory: o_selector];
} }
- (void)createInfoView:(input_info_category_t *)p_category - (void)createInfoView:(info_category_t *)p_cat
{ {
NSString * o_title; NSString * o_title;
NSMutableString * o_content; NSMutableString * o_content;
input_info_t * p_info; info_t * p_info;
int i;
/* Add a category */ /* Add a category */
o_title = [NSString stringWithUTF8String: p_category->psz_name]; o_title = [NSString stringWithUTF8String: p_cat->psz_name];
[o_selector addItemWithTitle: o_title]; [o_selector addItemWithTitle: o_title];
/* Create empty content string */ /* Create empty content string */
o_content = [NSMutableString string]; o_content = [NSMutableString string];
/* Add the fields */ /* Add the fields */
p_info = p_category->p_info; for( i= 0; i < p_cat->i_infos; i++ )
while( p_info )
{ {
p_info = p_cat->pp_infos[i];
[o_content appendFormat: @"%@: %@\n\n", [NSApp localizedString: p_info->psz_name], [o_content appendFormat: @"%@: %@\n\n", [NSApp localizedString: p_info->psz_name],
[NSApp localizedString: p_info->psz_value]]; [NSApp localizedString: p_info->psz_value]];
p_info = p_info->p_next;
} }
[o_strings setObject: o_content forKey: o_title]; [o_strings setObject: o_content forKey: o_title];
......
...@@ -739,7 +739,7 @@ unsigned int VLCModifiersToCocoa( unsigned int i_key ) ...@@ -739,7 +739,7 @@ unsigned int VLCModifiersToCocoa( unsigned int i_key )
vlc_mutex_lock( &p_playlist->object_lock ); vlc_mutex_lock( &p_playlist->object_lock );
[o_scrollfield setStringValue: [NSString stringWithUTF8String: [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 ); vlc_mutex_unlock( &p_playlist->object_lock );
if( p_vout != NULL ) if( p_vout != NULL )
......
...@@ -684,7 +684,7 @@ belongs to an Apple hidden private API, and then can "disapear" at any time*/ ...@@ -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"] ) else if( [[o_tc identifier] isEqualToString:@"3"] )
{ {
char psz_duration[MSTRTIME_MAX_SIZE]; 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 ) if( dur != -1 )
{ {
secstotimestr( psz_duration, dur/1000000 ); secstotimestr( psz_duration, dur/1000000 );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment