[vlc-devel] commit: Revert "Fixed open network panel." (Jean-Baptiste Kempf )

git version control git at videolan.org
Mon Jul 7 18:11:22 CEST 2008


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Mon Jul  7 09:11:09 2008 -0700| [dd11b53113b073ef7879fffc5d28b58152dd50bf]

Revert "Fixed open network panel."

This reverts commit 000f1e1fb9253dca219253ee54702cf044aff213.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=dd11b53113b073ef7879fffc5d28b58152dd50bf
---

 modules/gui/qt4/components/open_panels.cpp |   25 +++++++++----------------
 1 files changed, 9 insertions(+), 16 deletions(-)

diff --git a/modules/gui/qt4/components/open_panels.cpp b/modules/gui/qt4/components/open_panels.cpp
index 88e5ad6..6e6a36b 100644
--- a/modules/gui/qt4/components/open_panels.cpp
+++ b/modules/gui/qt4/components/open_panels.cpp
@@ -420,21 +420,15 @@ NetOpenPanel::NetOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
     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("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"));
+    ui.protocolCombo->addItem("RTMP", QVariant("rtmp"));
 }
 
 NetOpenPanel::~NetOpenPanel()
@@ -526,7 +520,6 @@ void NetOpenPanel::updateMRL() {
             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");




More information about the vlc-devel mailing list