Commit b320d38a authored by Christophe Mutricy's avatar Christophe Mutricy

fileinfo.*: Don't show stats when they qre disable.

parent 6ad64134
......@@ -58,7 +58,7 @@ FileInfo::FileInfo( intf_thread_t *_p_intf, wxWindow *p_parent ):
playlist_t *p_playlist = (playlist_t *)vlc_object_find( p_intf,
VLC_OBJECT_PLAYLIST,
FIND_ANYWHERE );
bool b_stats = config_GetInt(p_intf, "stats");
/* Initializations */
SetIcon( *p_intf->p_sys->p_icon );
SetAutoLayout( TRUE );
......@@ -71,10 +71,12 @@ FileInfo::FileInfo( intf_thread_t *_p_intf, wxWindow *p_parent ):
#endif
item_info = new MetaDataPanel( p_intf, notebook, false );
advanced_info = new AdvancedInfoPanel( p_intf, notebook );
if( b_stats )
stats_info = new InputStatsInfoPanel( p_intf, notebook );
notebook->AddPage( item_info, wxU(_("General") ), true );
notebook->AddPage( advanced_info, wxU(_("Advanced information") ), false );
if( b_stats )
notebook->AddPage( stats_info, wxU(_("Statistics") ), false );
#if (!wxCHECK_VERSION(2,5,2))
......@@ -117,6 +119,7 @@ void FileInfo::Update()
{
item_info->Clear();
advanced_info->Clear();
if( b_stats )
stats_info->Clear();
vlc_object_release( p_playlist );
return;
......@@ -131,6 +134,7 @@ void FileInfo::Update()
vlc_mutex_lock( &p_input->input.p_item->lock );
advanced_info->Update( p_input->input.p_item );
}
if( b_stats )
stats_info->Update( p_input->input.p_item );
vlc_mutex_unlock( &p_input->input.p_item->lock );
......
......@@ -58,6 +58,7 @@ namespace wxvlc
InputStatsInfoPanel *stats_info;
wxBoxSizer *panel_sizer;
bool b_stats;
};
};
......
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