X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=modules%2Fgui%2Fqt4%2Fdialogs%2Fmediainfo.cpp;h=41a5ef34050cd8250814f045e798cbebd65e2664;hb=a8242d184b5eba6bf4728db1186eff4001be8ad2;hp=6994a03c825eb2ee0eda95b30ebabeae9a3a9ddc;hpb=4792d5665b894cb162a905cf3ab6182bc3435539;p=vlc diff --git a/modules/gui/qt4/dialogs/mediainfo.cpp b/modules/gui/qt4/dialogs/mediainfo.cpp index 6994a03c82..41a5ef3405 100644 --- a/modules/gui/qt4/dialogs/mediainfo.cpp +++ b/modules/gui/qt4/dialogs/mediainfo.cpp @@ -1,7 +1,7 @@ /***************************************************************************** * mediainfo.cpp : Information about an item **************************************************************************** - * Copyright (C) 2006-2007 the VideoLAN team + * Copyright (C) 2006-2008 the VideoLAN team * $Id$ * * Authors: Clément Stenac @@ -21,6 +21,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. ******************************************************************************/ + #ifdef HAVE_CONFIG_H # include "config.h" #endif @@ -86,22 +87,36 @@ MediaInfoDialog::MediaInfoDialog( intf_thread_t *_p_intf, BUTTONACT( saveMetaButton, saveMeta() ); /* Let the MetaData Panel update the URI */ - CONNECT( MP, uriSet( QString ), uriLine, setText( QString ) ); + CONNECT( MP, uriSet( const QString& ), uriLine, setText( const QString& ) ); CONNECT( MP, editing(), saveMetaButton, show() ); + /* Display the buttonBar according to the Tab selected */ CONNECT( infoTabW, currentChanged( int ), this, updateButtons( int ) ); /* If using the General Mode */ if( isMainInputInfo ) { msg_Dbg( p_intf, "Using a general info windows" ); + /** + * Connects on the various signals of input_Manager + * For the currently playing element + **/ + CONNECT( THEMIM->getIM(), infoChanged( input_item_t* ), + IP, update( input_item_t* ) ); + CONNECT( THEMIM->getIM(), metaChanged( input_item_t* ), + MP, update( input_item_t* ) ); + CONNECT( THEMIM->getIM(), metaChanged( input_item_t* ), + EMP, update( input_item_t* ) ); + CONNECT( THEMIM->getIM(), statisticsUpdated( input_item_t* ), + ISP, update( input_item_t* ) ); + if( THEMIM->getInput() ) p_item = input_GetItem( THEMIM->getInput() ); } else msg_Dbg( p_intf, "Using an item specific info windows" ); - /* Call update at start, so info is shown for a running input */ + /* Call update at start, so info is filled up at begginning */ if( p_item ) updateAllTabs( p_item ); @@ -131,8 +146,7 @@ void MediaInfoDialog::updateAllTabs( input_item_t *p_item ) MP->update( p_item ); EMP->update( p_item ); - if( isMainInputInfo ) - ISP->update( p_item ); + if( isMainInputInfo ) ISP->update( p_item ); } void MediaInfoDialog::clearAllTabs() @@ -140,6 +154,7 @@ void MediaInfoDialog::clearAllTabs() IP->clear(); MP->clear(); EMP->clear(); + if( isMainInputInfo ) ISP->clear(); }