Commit 732be244 authored by Gildas Bazin's avatar Gildas Bazin

* modules/gui/kde/info.cpp: info_category_t compilation fix.

parent 07729565
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* info.cpp: the KInfoWindow class * info.cpp: the KInfoWindow class
***************************************************************************** *****************************************************************************
* Copyright (C) 2001-2003 VideoLAN * Copyright (C) 2001-2003 VideoLAN
* $Id: info.cpp,v 1.2 2003/12/22 14:23:14 sam Exp $ * $Id$
* *
* Author: Sigmund Augdal <sigmunau@idi.ntnu.no> * Author: Sigmund Augdal <sigmunau@idi.ntnu.no>
* *
...@@ -34,10 +34,15 @@ KInfoWindow::KInfoWindow( intf_thread_t * p_intf, input_thread_t *p_input ) : ...@@ -34,10 +34,15 @@ KInfoWindow::KInfoWindow( intf_thread_t * p_intf, input_thread_t *p_input ) :
// clearWFlags(~0); // clearWFlags(~0);
// setWFlags(WType_TopLevel); // setWFlags(WType_TopLevel);
setSizeGripEnabled(true); setSizeGripEnabled(true);
vlc_mutex_lock( &p_input->stream.stream_lock );
input_info_category_t *p_category = p_input->stream.p_info; int i, j;
while ( p_category )
vlc_mutex_lock( &p_input->p_item->lock );
for ( i = 0; i < p_input->p_item->i_categories; i++ )
{ {
info_category_t *p_category =
p_input->p_item->pp_categories[i];
QFrame *page = addPage( QString(p_category->psz_name) ); QFrame *page = addPage( QString(p_category->psz_name) );
QVBoxLayout *toplayout = new QVBoxLayout( page); QVBoxLayout *toplayout = new QVBoxLayout( page);
QVBox *category_table = new QVBox(page); QVBox *category_table = new QVBox(page);
...@@ -45,17 +50,17 @@ KInfoWindow::KInfoWindow( intf_thread_t * p_intf, input_thread_t *p_input ) : ...@@ -45,17 +50,17 @@ KInfoWindow::KInfoWindow( intf_thread_t * p_intf, input_thread_t *p_input ) :
toplayout->setResizeMode(QLayout::FreeResize); toplayout->setResizeMode(QLayout::FreeResize);
toplayout->addStretch(10); toplayout->addStretch(10);
category_table->setSpacing(spacingHint()); category_table->setSpacing(spacingHint());
input_info_t *p_info = p_category->p_info;
while ( p_info ) for ( j = 0; j < p_category->i_infos; j++ )
{ {
info_t *p_info = p_category->pp_infos[j];
QHBox *hb = new QHBox( category_table ); QHBox *hb = new QHBox( category_table );
new QLabel( QString(p_info->psz_name) + ":", hb ); new QLabel( QString(p_info->psz_name) + ":", hb );
new QLabel( p_info->psz_value, hb ); new QLabel( p_info->psz_value, hb );
p_info = p_info->p_next;
} }
p_category = p_category->p_next;
} }
vlc_mutex_unlock( &p_input->stream.stream_lock ); vlc_mutex_unlock( &p_input->p_item->lock );
resize(300,400); resize(300,400);
show(); show();
} }
......
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