From 55b93592b4c04245f3b7dddf303fc43ac990f5a7 Mon Sep 17 00:00:00 2001 From: =?utf8?q?R=C3=A9mi=20Denis-Courmont?= Date: Wed, 10 Dec 2003 21:54:17 +0000 Subject: [PATCH] Added "Force IPv6" check box to UDP Unicast in open dialog --- modules/gui/wxwindows/open.cpp | 14 ++++++++++++-- modules/gui/wxwindows/wxwindows.h | 4 +++- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/modules/gui/wxwindows/open.cpp b/modules/gui/wxwindows/open.cpp index f5d1f51e1a..e22a6ad052 100644 --- a/modules/gui/wxwindows/open.cpp +++ b/modules/gui/wxwindows/open.cpp @@ -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 * @@ -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" ) ) { diff --git a/modules/gui/wxwindows/wxwindows.h b/modules/gui/wxwindows/wxwindows.h index a4eac76e8f..275e2628e7 100644 --- a/modules/gui/wxwindows/wxwindows.h +++ b/modules/gui/wxwindows/wxwindows.h @@ -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 * @@ -40,6 +40,7 @@ #include #include #include +#include #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; -- 2.39.2