[vlc-devel] commit: Qt: hide record button when the record access-filter is not present ( Jean-Philippe Andre )
git version control
git at videolan.org
Sun Aug 24 00:50:33 CEST 2008
vlc | branch: master | Jean-Philippe Andre <jpeg at via.ecp.fr> | Sat Aug 23 18:38:11 2008 -0400| [a0841e007d1ff1e007d61a57ee3dc16b32875701] | committer: Jean-Philippe Andre
Qt: hide record button when the record access-filter is not present
If this stays too counter-intuitive, revert this commit, 672c3f35c4e4
and 7fe659bf364.
IMHO, the user who enables the record access-filter knows what he does.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=a0841e007d1ff1e007d61a57ee3dc16b32875701
---
modules/gui/qt4/components/interface_widgets.cpp | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/modules/gui/qt4/components/interface_widgets.cpp b/modules/gui/qt4/components/interface_widgets.cpp
index 66b75b3..1f36d90 100644
--- a/modules/gui/qt4/components/interface_widgets.cpp
+++ b/modules/gui/qt4/components/interface_widgets.cpp
@@ -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() );
#endif
+ /* Record Button */
recordButton = new QPushButton;
setupSmallButton( recordButton );
advLayout->addWidget( recordButton );
@@ -360,7 +361,15 @@ void AdvControlsWidget::enableInput( bool enable )
{
input_item_t *p_item = input_GetItem( THEMIM->getInput() );
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 );
recordButton->setEnabled( enable );
@@ -448,6 +457,7 @@ void AdvControlsWidget::record()
/* This method won't work fine if the stream can't be cut anywhere */
if( var_Type( p_input, "record-toggle" ) == VLC_VAR_VOID )
var_TriggerCallback( p_input, "record-toggle" );
+#if 0
else
{
/* 'record' access-filter is not loaded, we open Save dialog */
@@ -459,6 +469,7 @@ void AdvControlsWidget::record()
if( psz )
THEDP->streamingDialog( NULL, psz, true );
}
+#endif
}
}
More information about the vlc-devel
mailing list