Commit 94e24e9d authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Qt4 - Try to fix the detection of video tracks and show of related buttons,...

Qt4 - Try to fix the detection of video tracks and show of related buttons, fix a segfault that can happen.

parent f7f88d5d
......@@ -590,6 +590,10 @@ ControlsWidget::ControlsWidget( intf_thread_t *_p_i,
/* Volume control connection */
CONNECT( volumeSlider, valueChanged( int ), this, updateVolume( int ) );
CONNECT( THEMIM, volumeChanged( void ), this, updateVolume( void ) );
CONNECT( THEMIM->getIM(), statusChanged( int ), this, updateInput() );
updateInput();
}
ControlsWidget::~ControlsWidget()
......@@ -678,11 +682,13 @@ void ControlsWidget::updateVolume()
volumeSlider->setValue( i_volume );
b_my_volume = false;
}
}
void ControlsWidget::updateInput()
{
/* Activate the interface buttons according to the presence of the input */
enableInput( THEMIM->getIM()->hasInput() );
//enableVideo( THEMIM->getIM()->hasVideo() );
enableVideo( true );
enableVideo( THEMIM->getIM()->hasVideo() );
}
void ControlsWidget::setStatus( int status )
......
......@@ -182,6 +182,7 @@ private slots:
void next();
void updateVolume( int );
void updateVolume( void );
void updateInput();
void fullscreen();
void extSettings();
void faster();
......
......@@ -475,6 +475,7 @@ void MainInputManager::customEvent( QEvent *event )
{
im->delInput();
emit inputChanged( NULL );
p_input = NULL;
}
if( !p_input )
......
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