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.timeShift, clicked(), this, updateMRL());
CONNECT( ui.ipv6, clicked(), this, updateMRL());
- ui.protocolCombo->addItem( "" );
- ui.protocolCombo->addItem("HTTP", QVariant("http"));
- ui.protocolCombo->addItem("HTTPS", QVariant("https"));
- ui.protocolCombo->addItem("FTP", QVariant("ftp"));
- ui.protocolCombo->addItem("MMS", QVariant("mms"));
- ui.protocolCombo->addItem("RTSP", QVariant("rtsp"));
- ui.protocolCombo->addItem("UDP/RTP (unicast)", QVariant("udp"));
- ui.protocolCombo->addItem("UDP/RTP (multicast)", QVariant("udp"));
+ 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() ) );
}
NetOpenPanel::~NetOpenPanel()
QString addr = ui.addressText->text();
QString proto = ui.protocolCombo->itemData( idx_proto ).toString();
- ui.timeShift->setEnabled( idx_proto >= UDP_PROTO );
+ 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.portSpin->setEnabled( idx_proto >= UDP_PROTO );
+ ui.portSpin->setEnabled( idx_proto == UDP_PROTO ||
+ idx_proto == UDPM_PROTO );
if( idx_proto == NO_PROTO ) return;
else mrl += addr;
mrl += QString(":%1").arg( ui.portSpin->value() );
emit methodChanged("udp-caching");
+ break;
+ case RTMP_PROTO:
+ mrl = "rtmp://" + addr;
+ emit methodChanged("rtmp-caching");
+ break;
+
}
}
screenDevLayout->addWidget( screenLabel, 0, 0 );
/* General connects */
- connect( ui.deviceCombo, SIGNAL( activated( int ) ),
- stackedDevLayout, SLOT( setCurrentIndex( int ) ) );
- connect( ui.deviceCombo, SIGNAL( activated( int ) ),
- stackedPropLayout, SLOT( setCurrentIndex( int ) ) );
+ CONNECT( ui.deviceCombo, activated( int ) ,
+ stackedDevLayout, setCurrentIndex( int ) );
+ CONNECT( ui.deviceCombo, activated( int ),
+ stackedPropLayout, setCurrentIndex( int ) );
CONNECT( ui.deviceCombo, activated( int ), this, updateMRL() );
CONNECT( ui.deviceCombo, activated( int ), this, updateButtons() );
advButtonBox->addButton( closeButton, QDialogButtonBox::AcceptRole );
advButtonBox->addButton( cancelButton, QDialogButtonBox::RejectRole );
- gLayout->addWidget( advButtonBox, i_confsize + 1, 0, 1, -1 );
+ mainLayout->addWidget( advButtonBox );
/* Creation of the MRL */
if( adv->exec() )