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

Qt: Save/Convert dialog should not show any streaming features.

This hides all stream features from the Stream/Save dialog (Sout)
This resolves a little bug too: the dialog did not refresh correctly when switching between stream and save.
parent e9499469
...@@ -286,19 +286,29 @@ void SoutDialog::setOptions() ...@@ -286,19 +286,29 @@ void SoutDialog::setOptions()
void SoutDialog::toggleSout() void SoutDialog::toggleSout()
{ {
//Toggle all the streaming options. //Toggle all the streaming options.
TOGGLEV( ui.HTTPOutput ) ; TOGGLEV( ui.RTPOutput ) ; TOGGLEV( ui.MMSHOutput ) ; TOGGLEV( ui.UDPOutput ) ; #define HIDEORSHOW(x) if( b_transcode_only ) x->hide(); else x->show();
TOGGLEV( ui.HTTPEdit ) ; TOGGLEV( ui.RTPEdit ) ; TOGGLEV( ui.MMSHEdit ) ; TOGGLEV( ui.UDPEdit ) ; HIDEORSHOW( ui.HTTPOutput ) ; HIDEORSHOW( ui.RTPOutput ) ; HIDEORSHOW( ui.MMSHOutput ) ; HIDEORSHOW( ui.UDPOutput ) ;
TOGGLEV( ui.HTTPLabel ) ; TOGGLEV( ui.RTPLabel ) ; TOGGLEV( ui.MMSHLabel ) ; TOGGLEV( ui.UDPLabel ) ; HIDEORSHOW( ui.HTTPEdit ) ; HIDEORSHOW( ui.RTPEdit ) ; HIDEORSHOW( ui.MMSHEdit ) ; HIDEORSHOW( ui.UDPEdit ) ;
TOGGLEV( ui.HTTPPortLabel ) ; TOGGLEV( ui.RTPPortLabel ) ; TOGGLEV( ui.MMSHPortLabel ) ; TOGGLEV( ui.UDPPortLabel ) HIDEORSHOW( ui.HTTPLabel ) ; HIDEORSHOW( ui.RTPLabel ) ; HIDEORSHOW( ui.MMSHLabel ) ; HIDEORSHOW( ui.UDPLabel ) ;
TOGGLEV( ui.HTTPPort ) ; TOGGLEV( ui.RTPPort ) ; TOGGLEV( ui.MMSHPort ) ; TOGGLEV( ui.UDPPort ) ; HIDEORSHOW( ui.HTTPPortLabel ) ; HIDEORSHOW( ui.RTPPortLabel ) ; HIDEORSHOW( ui.MMSHPortLabel ) ; HIDEORSHOW( ui.UDPPortLabel )
HIDEORSHOW( ui.HTTPPort ) ; HIDEORSHOW( ui.RTPPort ) ; HIDEORSHOW( ui.MMSHPort ) ; HIDEORSHOW( ui.UDPPort ) ; HIDEORSHOW( ui.RTPPortLabel2 ); HIDEORSHOW( ui.RTPPort2 );
TOGGLEV( ui.sap ); TOGGLEV( ui.sapName );
TOGGLEV( ui.sapGroup ); TOGGLEV( ui.sapGroupLabel ); HIDEORSHOW( ui.sap ); HIDEORSHOW( ui.sapName );
TOGGLEV( ui.ttlLabel ); TOGGLEV( ui.ttl ); HIDEORSHOW( ui.sapGroup ); HIDEORSHOW( ui.sapGroupLabel );
HIDEORSHOW( ui.ttlLabel ); HIDEORSHOW( ui.ttl );
HIDEORSHOW( ui.IcecastOutput ); HIDEORSHOW( ui.IcecastEdit );
HIDEORSHOW( ui.IcecastNamePassEdit ); HIDEORSHOW( ui.IcecastMountpointEdit );
HIDEORSHOW( ui.IcecastPort ); HIDEORSHOW( ui.IcecastLabel );
HIDEORSHOW( ui.IcecastPortLabel );
HIDEORSHOW( ui.IcecastMountpointLabel ); HIDEORSHOW( ui.IcecastNameLabel );
#undef HIDEORSHOW
if( b_transcode_only ) okButton->setText( "&Save" ); if( b_transcode_only ) okButton->setText( "&Save" );
else okButton->setText( "&Stream" ); else okButton->setText( "&Stream" );
/* FIXME:
* The Save dialog is too big if the Stream dialog has already be shown */
updateGeometry(); updateGeometry();
} }
......
...@@ -51,11 +51,8 @@ public: ...@@ -51,11 +51,8 @@ public:
{ {
/* Recenter the dialog on the parent */ /* Recenter the dialog on the parent */
instance->setParent( parent, Qt::Dialog ); instance->setParent( parent, Qt::Dialog );
if( transcode_only != instance->b_transcode_only ) instance->b_transcode_only = transcode_only;
{ instance->toggleSout();
instance->toggleSout();
instance->b_transcode_only = transcode_only;
}
} }
return instance; return instance;
} }
......
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