Commit a0841e00 authored by Jean-Philippe Andre's avatar Jean-Philippe Andre

Qt: hide record button when the record access-filter is not present

If this stays too counter-intuitive, revert this commit, 672c3f35
and 7fe659bf.
IMHO, the user who enables the record access-filter knows what he does.
parent 267e1019
...@@ -336,6 +336,7 @@ AdvControlsWidget::AdvControlsWidget( intf_thread_t *_p_i, bool b_fsCreation = f ...@@ -336,6 +336,7 @@ AdvControlsWidget::AdvControlsWidget( intf_thread_t *_p_i, bool b_fsCreation = f
BUTTON_SET_ACT( frameButton, "Fr", qtr( "Frame by frame" ), frame() ); BUTTON_SET_ACT( frameButton, "Fr", qtr( "Frame by frame" ), frame() );
#endif #endif
/* Record Button */
recordButton = new QPushButton; recordButton = new QPushButton;
setupSmallButton( recordButton ); setupSmallButton( recordButton );
advLayout->addWidget( recordButton ); advLayout->addWidget( recordButton );
...@@ -360,7 +361,15 @@ void AdvControlsWidget::enableInput( bool enable ) ...@@ -360,7 +361,15 @@ void AdvControlsWidget::enableInput( bool enable )
{ {
input_item_t *p_item = input_GetItem( THEMIM->getInput() ); input_item_t *p_item = input_GetItem( THEMIM->getInput() );
i_input_id = p_item->i_id; i_input_id = p_item->i_id;
if( var_Type( THEMIM->getInput(), "record-toggle" ) == VLC_VAR_VOID )
recordButton->setVisible( true );
else
recordButton->setVisible( false );
} }
else
recordButton->setVisible( false );
ABButton->setEnabled( enable ); ABButton->setEnabled( enable );
recordButton->setEnabled( enable ); recordButton->setEnabled( enable );
...@@ -448,6 +457,7 @@ void AdvControlsWidget::record() ...@@ -448,6 +457,7 @@ void AdvControlsWidget::record()
/* This method won't work fine if the stream can't be cut anywhere */ /* This method won't work fine if the stream can't be cut anywhere */
if( var_Type( p_input, "record-toggle" ) == VLC_VAR_VOID ) if( var_Type( p_input, "record-toggle" ) == VLC_VAR_VOID )
var_TriggerCallback( p_input, "record-toggle" ); var_TriggerCallback( p_input, "record-toggle" );
#if 0
else else
{ {
/* 'record' access-filter is not loaded, we open Save dialog */ /* 'record' access-filter is not loaded, we open Save dialog */
...@@ -459,6 +469,7 @@ void AdvControlsWidget::record() ...@@ -459,6 +469,7 @@ void AdvControlsWidget::record()
if( psz ) if( psz )
THEDP->streamingDialog( NULL, psz, true ); THEDP->streamingDialog( NULL, psz, true );
} }
#endif
} }
} }
......
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