Commit 55b93592 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Added "Force IPv6" check box to UDP Unicast in open dialog

parent 1df7592a
......@@ -2,7 +2,7 @@
* open.cpp : wxWindows plugin for vlc
*****************************************************************************
* Copyright (C) 2000-2001 VideoLAN
* $Id: open.cpp,v 1.48 2003/12/10 11:04:25 courmisch Exp $
* $Id: open.cpp,v 1.49 2003/12/10 21:54:16 courmisch Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
......@@ -80,6 +80,7 @@ enum
NetRadio1_Event, NetRadio2_Event, NetRadio3_Event,
NetPort1_Event, NetPort2_Event, NetPort3_Event,
NetAddr1_Event, NetAddr2_Event, NetAddr3_Event,
NetForceIPv6_Event,
#ifndef WIN32
VideoType_Event,
......@@ -129,6 +130,7 @@ BEGIN_EVENT_TABLE(OpenDialog, wxFrame)
EVT_SPINCTRL(NetPort3_Event, OpenDialog::OnNetPanelChange)
EVT_TEXT(NetAddr2_Event, OpenDialog::OnNetPanelChange)
EVT_TEXT(NetAddr3_Event, OpenDialog::OnNetPanelChange)
EVT_CHECKBOX(NetForceIPv6_Event, OpenDialog::OnNetPanelChange)
#ifndef WIN32
/* Events generated by the v4l panel */
......@@ -531,7 +533,7 @@ wxPanel *OpenDialog::NetPanel( wxWindow* parent )
wxFlexGridSizer *subpanel_sizer;
wxStaticText *label;
i_net_ports[0] = config_GetInt( p_intf, "server-port" );
subpanel_sizer = new wxFlexGridSizer( 2, 1, 20 );
subpanel_sizer = new wxFlexGridSizer( 3, 1, 20 );
label = new wxStaticText( net_subpanels[0], -1, wxU(_("Port")) );
net_ports[0] = new wxSpinCtrl( net_subpanels[0], NetPort1_Event,
wxString::Format(wxT("%d"), i_net_ports[0]),
......@@ -542,6 +544,10 @@ wxPanel *OpenDialog::NetPanel( wxWindow* parent )
subpanel_sizer->Add( label, 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL );
subpanel_sizer->Add( net_ports[0], 1,
wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL );
net_ipv6 = new wxCheckBox( net_subpanels[0], NetForceIPv6_Event,
wxU(_("Force IPv6")));
subpanel_sizer->Add( net_ipv6, 0,
wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL );
net_subpanels[0]->SetSizerAndFit( subpanel_sizer );
net_radios[0]->SetValue( TRUE );
......@@ -686,6 +692,10 @@ void OpenDialog::UpdateMRL( int i_access_method )
{
case 0:
mrltemp = wxT("udp") + demux + wxT("://");
if ( net_ipv6->GetValue() )
{
mrltemp += wxT("@[::]");
}
if( i_net_ports[0] !=
config_GetInt( p_intf, "server-port" ) )
{
......
......@@ -2,7 +2,7 @@
* wxwindows.h: private wxWindows interface description
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: wxwindows.h,v 1.76 2003/12/09 00:46:03 yoann Exp $
* $Id: wxwindows.h,v 1.77 2003/12/10 21:54:17 courmisch Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
......@@ -40,6 +40,7 @@
#include <wx/treectrl.h>
#include <wx/gauge.h>
#include <wx/accel.h>
#include <wx/checkbox.h>
#include "vlc_keys.h"
DECLARE_LOCAL_EVENT_TYPE( wxEVT_DIALOG, 0 );
......@@ -387,6 +388,7 @@ private:
wxSpinCtrl *net_ports[4];
int i_net_ports[4];
wxTextCtrl *net_addrs[4];
wxCheckBox *net_ipv6;
/* Controls for the v4l panel */
wxRadioBox *video_type;
......
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