CaptureOpenPanel::CaptureOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
OpenPanel( _parent, _p_intf )
{
+ isInitialized = false;
+}
+
+void CaptureOpenPanel::initialize()
+{
+ if( isInitialized ) return;
+
+ msg_Dbg( p_intf, "Initialization of Capture device panel" );
+ isInitialized = true;
+
ui.setupUi( this );
BUTTONACT( ui.advancedButton, advancedDialog() );
setMenuAction();
/* Force MRL update on tab change */
- CONNECT( ui.Tab, currentChanged( int ), this, signalCurrent() );
+ CONNECT( ui.Tab, currentChanged( int ), this, signalCurrent( int ) );
CONNECT( fileOpenPanel, mrlUpdated( QString ), this, updateMRL( QString ) );
CONNECT( netOpenPanel, mrlUpdated( QString ), this, updateMRL( QString ) );
void OpenDialog::showTab( int i_tab )
{
+ if( i_tab == OPEN_CAPTURE_TAB ) captureOpenPanel->initialize();
ui.Tab->setCurrentIndex( i_tab );
show();
}
/* Function called on signal currentChanged triggered */
-void OpenDialog::signalCurrent()
+void OpenDialog::signalCurrent( int i_tab )
{
+ if( i_tab == OPEN_CAPTURE_TAB ) captureOpenPanel->initialize();
+
if( ui.Tab->currentWidget() != NULL )
( dynamic_cast<OpenPanel *>( ui.Tab->currentWidget() ) )->updateMRL();
}