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