Commit 15206e75 authored by hartman's avatar hartman

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

parent e2bbf5ca
......@@ -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
......@@ -75,6 +75,7 @@
- (void)updateInfo
{
NSString *o_selectedPane;
int i, i_select;
if( ![o_window isVisible] )
{
......@@ -94,20 +95,17 @@
[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;
......@@ -116,27 +114,26 @@
[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];
......
......@@ -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 )
......
......@@ -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 );
......
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