Commit 8e5a7d79 authored by Anil Daoud's avatar Anil Daoud

*All: fixed unwanted fileinfo window refresh under windows.
parent e2af7970
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* wxwindows.h: private wxWindows interface description * wxwindows.h: private wxWindows interface description
***************************************************************************** *****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN * Copyright (C) 1999, 2000 VideoLAN
* $Id: wxdialogs.h,v 1.1 2003/04/20 20:28:39 ipkiss Exp $ * $Id: wxdialogs.h,v 1.2 2003/04/21 16:55:53 anil Exp $
* *
* Authors: Gildas Bazin <gbazin@netcourrier.com> * Authors: Gildas Bazin <gbazin@netcourrier.com>
* *
...@@ -360,6 +360,7 @@ private: ...@@ -360,6 +360,7 @@ private:
intf_thread_t *p_intf; intf_thread_t *p_intf;
wxTreeCtrl *fileinfo_tree; wxTreeCtrl *fileinfo_tree;
wxTreeItemId fileinfo_root; wxTreeItemId fileinfo_root;
wxString fileinfo_root_label;
}; };
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* fileinfo.cpp : wxWindows plugin for vlc * fileinfo.cpp : wxWindows plugin for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2000-2001 VideoLAN * Copyright (C) 2000-2001 VideoLAN
* $Id: fileinfo.cpp,v 1.9 2003/04/21 00:54:26 ipkiss Exp $ * $Id: fileinfo.cpp,v 1.10 2003/04/21 16:55:53 anil Exp $
* *
* Authors: Sigmund Augdal <sigmunau@idi.ntnu.no> * Authors: Sigmund Augdal <sigmunau@idi.ntnu.no>
* *
...@@ -92,6 +92,8 @@ FileInfo::FileInfo( intf_thread_t *_p_intf, Interface *_p_main_interface ): ...@@ -92,6 +92,8 @@ FileInfo::FileInfo( intf_thread_t *_p_intf, Interface *_p_main_interface ):
new wxTreeCtrl( panel, -1, wxDefaultPosition, wxSize( 350, 350 ), new wxTreeCtrl( panel, -1, wxDefaultPosition, wxSize( 350, 350 ),
wxTR_HAS_BUTTONS | wxTR_HIDE_ROOT | wxSUNKEN_BORDER ); wxTR_HAS_BUTTONS | wxTR_HIDE_ROOT | wxSUNKEN_BORDER );
fileinfo_root_label = "";
/* Create the OK button */ /* Create the OK button */
wxButton *ok_button = new wxButton( panel, wxID_OK, _("OK") ); wxButton *ok_button = new wxButton( panel, wxID_OK, _("OK") );
ok_button->SetDefault(); ok_button->SetDefault();
...@@ -121,17 +123,21 @@ void FileInfo::UpdateFileInfo() ...@@ -121,17 +123,21 @@ void FileInfo::UpdateFileInfo()
{ {
if( fileinfo_root ) if( fileinfo_root )
{ {
fileinfo_tree->SetItemText ( fileinfo_root , "" ); fileinfo_tree->SetItemText ( fileinfo_root , "");
fileinfo_root_label = "";
fileinfo_tree->DeleteChildren ( fileinfo_root ); fileinfo_tree->DeleteChildren ( fileinfo_root );
} }
return; return;
} }
wxString inputinfo = p_input->psz_name;
if( !fileinfo_root ) if( !fileinfo_root )
{ {
fileinfo_root = fileinfo_tree->AddRoot( p_input->psz_name ); fileinfo_root = fileinfo_tree->AddRoot( p_input->psz_name );
fileinfo_root_label = p_input->psz_name;
} }
else if( fileinfo_tree->GetItemText( fileinfo_root ) == p_input->psz_name ) else if( fileinfo_root_label == inputinfo )
{ {
return; return;
} }
...@@ -141,6 +147,8 @@ void FileInfo::UpdateFileInfo() ...@@ -141,6 +147,8 @@ void FileInfo::UpdateFileInfo()
vlc_mutex_lock( &p_input->stream.stream_lock ); vlc_mutex_lock( &p_input->stream.stream_lock );
fileinfo_tree->SetItemText( fileinfo_root , p_input->psz_name ); fileinfo_tree->SetItemText( fileinfo_root , p_input->psz_name );
fileinfo_root_label = p_input->psz_name;
input_info_category_t *p_cat = p_input->stream.p_info; input_info_category_t *p_cat = p_input->stream.p_info;
while ( p_cat ) while ( p_cat )
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* wxwindows.h: private wxWindows interface description * wxwindows.h: private wxWindows interface description
***************************************************************************** *****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN * Copyright (C) 1999, 2000 VideoLAN
* $Id: wxwindows.h,v 1.17 2003/04/17 14:00:44 anil Exp $ * $Id: wxwindows.h,v 1.18 2003/04/21 16:55:53 anil Exp $
* *
* Authors: Gildas Bazin <gbazin@netcourrier.com> * Authors: Gildas Bazin <gbazin@netcourrier.com>
* *
...@@ -413,6 +413,7 @@ private: ...@@ -413,6 +413,7 @@ private:
intf_thread_t *p_intf; intf_thread_t *p_intf;
wxTreeCtrl *fileinfo_tree; wxTreeCtrl *fileinfo_tree;
wxTreeItemId fileinfo_root; wxTreeItemId fileinfo_root;
wxString fileinfo_root_label;
}; };
......
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