ui.chapterLabel->show();
ui.chapterSpin->show();
ui.diskOptionBox_2->show();
+ ui.dvdsimple->setEnabled( true );
}
else if ( ui.vcdRadioButton->isChecked() )
{
ui.chapterLabel->hide();
ui.chapterSpin->hide();
ui.diskOptionBox_2->show();
+ ui.dvdsimple->setEnabled( false );
}
else /* CDDA */
{
ui.chapterLabel->hide();
ui.chapterSpin->hide();
ui.diskOptionBox_2->hide();
+ ui.dvdsimple->setEnabled( false );
}
updateMRL();
CONNECT( ui.portSpin, valueChanged( int ), this, updateMRL() );
CONNECT( ui.addressText, textChanged( QString ), this, updateMRL());
CONNECT( ui.timeShift, clicked(), this, updateMRL());
- CONNECT( ui.ipv6, clicked(), this, updateMRL());
-
- typedef QPair<QString,QString> QPairString;
- QMap<int, QPairString> protocols;
-#define P(value,name,dsc) do { protocols[value] = QPairString( QString(dsc), QString(name) );} while(0)
- P( NO_PROTO, "", "" );
- P( UDPM_PROTO, "udp", "UDP/RTP (multicast)" );
- P( HTTP_PROTO, "http", "HTTP" );
- P( HTTPS_PROTO, "https", "HTTPS" );
- P( MMS_PROTO, "mms", "MMS" );
- P( FTP_PROTO, "ftp", "FTP" );
- P( RTSP_PROTO, "rtsp", "RTSP" );
- P( UDP_PROTO, "udp", "UDP/RTP (unicast)" );
- P( RTMP_PROTO, "rtmp", "RTMP" );
-#undef P
- foreach( QPairString e, protocols ) /* Sorted by key, exactly what we need */
- ui.protocolCombo->addItem( e.first, QVariant(e.second.isEmpty() ) );
+
+ ui.protocolCombo->addItem( "" );
+ ui.protocolCombo->addItem("HTTP", QVariant("http"));
+ ui.protocolCombo->addItem("HTTPS", QVariant("https"));
+ ui.protocolCombo->addItem("MMS", QVariant("mms"));
+ ui.protocolCombo->addItem("FTP", QVariant("ftp"));
+ ui.protocolCombo->addItem("RTSP", QVariant("rtsp"));
+ ui.protocolCombo->addItem("RTP", QVariant("rtp"));
+ ui.protocolCombo->addItem("UDP", QVariant("udp"));
+ ui.protocolCombo->addItem("RTMP", QVariant("rtmp"));
+
+ updateProtocol( ui.protocolCombo->currentIndex() );
}
NetOpenPanel::~NetOpenPanel()
QString addr = ui.addressText->text();
QString proto = ui.protocolCombo->itemData( idx_proto ).toString();
- ui.timeShift->setEnabled( idx_proto == UDP_PROTO ||
- idx_proto == UDPM_PROTO );
- ui.ipv6->setEnabled( idx_proto == UDP_PROTO );
- ui.addressText->setEnabled( idx_proto != UDP_PROTO );
+ ui.timeShift->setEnabled( idx_proto == UDP_PROTO );
ui.portSpin->setEnabled( idx_proto == UDP_PROTO ||
- idx_proto == UDPM_PROTO );
+ idx_proto == RTP_PROTO );
if( idx_proto == NO_PROTO ) return;
/* If we already have a protocol in the address, replace it */
if( addr.contains( "://"))
{
- if( idx_proto != UDPM_PROTO )
+ if( idx_proto != UDP_PROTO && idx_proto != RTP_PROTO )
addr.replace( QRegExp("^.*://@*"), proto + "://");
else
addr.replace( QRegExp("^.*://"), proto + "://@");
ui.protocolCombo->setCurrentIndex(
ui.protocolCombo->findData( addr.section( ':', 0, 0 ) ) );
- if( idx_proto != UDP_PROTO || idx_proto != UDPM_PROTO )
+ if( idx_proto != UDP_PROTO || idx_proto != RTP_PROTO )
mrl = addr;
}
else
emit methodChanged("rtsp-caching");
break;
case UDP_PROTO:
- mrl = "udp://@";
- if( ui.ipv6->isEnabled() && ui.ipv6->isChecked() )
- {
- mrl += "[::]";
- }
- mrl += QString(":%1").arg( ui.portSpin->value() );
- emit methodChanged("udp-caching");
- break;
- case UDPM_PROTO: /* UDP multicast */
mrl = "udp://@";
/* Add [] to IPv6 */
if ( addr.contains(':') && !addr.contains('[') )
mrl += QString(":%1").arg( ui.portSpin->value() );
emit methodChanged("udp-caching");
break;
+ case RTP_PROTO:
+ mrl = "rtp://@";
+ if ( addr.contains(':') && !addr.contains('[') )
+ mrl += "[" + addr + "]"; /* Add [] to IPv6 */
+ else
+ mrl += addr;
+ mrl += QString(":%1").arg( ui.portSpin->value() );
+ emit methodChanged("rtp-caching");
+ break;
case RTMP_PROTO:
mrl = "rtmp://" + addr;
emit methodChanged("rtmp-caching");
break;
-
}
}
/* New Adv Prop dialog */
adv = new QDialog( this );
- adv->setWindowTitle( qtr( "Advanced options..." ) );
+ adv->setWindowTitle( qtr( "Advanced Options" ) );
/* A main Layout with a Frame */
QVBoxLayout *mainLayout = new QVBoxLayout( adv );
/* Button stuffs */
QDialogButtonBox *advButtonBox = new QDialogButtonBox( adv );
- QPushButton *closeButton = new QPushButton( qtr( "Ok" ) );
+ QPushButton *closeButton = new QPushButton( qtr( "OK" ) );
QPushButton *cancelButton = new QPushButton( qtr( "Cancel" ) );
CONNECT( closeButton, clicked(), adv, accept() );