Commit c5197167 authored by Olivier Teulière's avatar Olivier Teulière

* modules/gui/win32/network.cpp: added support for ftp and mms

 * modules/gui/win32/disc.cpp: cosmetic
parent ebc092f4
......@@ -79,13 +79,13 @@ void __fastcall TDiscDlg::ButtonOkClick( TObject *Sender )
Chapter.sprintf( "%d", SpinEditChapter->Value );
/* Build source name and add it to playlist */
if ( CheckBoxMenus->Checked )
if ( CheckBoxMenus->Checked && RadioGroupType->ItemIndex == 0 )
{
Source = Method + ":" + Device;
Source = "dvdplay://" + Device;
}
else
{
Source = Method + ":" + Device + "@" + Title + "," + Chapter;
Source = Method + "://" + Device + "@" + Title + "," + Chapter;
}
p_intf->p_sys->p_playwin->Add( Source, PLAYLIST_APPEND
......@@ -102,13 +102,14 @@ void __fastcall TDiscDlg::RadioGroupTypeClick( TObject *Sender )
{
psz_device = config_GetPsz( p_intf, "dvd" );
CheckBoxMenus->Enabled = true;
CheckBoxMenus->Checked = true;
DisableTitles( CheckBoxMenus->Checked );
}
else
{
psz_device = config_GetPsz( p_intf, "vcd" );
CheckBoxMenus->Checked = false;
CheckBoxMenus->Enabled = false;
/* We don't support menus for vcds, so we use titles and chapters */
DisableTitles( false );
}
if( psz_device )
......@@ -118,10 +119,14 @@ void __fastcall TDiscDlg::RadioGroupTypeClick( TObject *Sender )
}
}
//---------------------------------------------------------------------------
void __fastcall TDiscDlg::CheckBoxMenusClick(TObject *Sender)
void __fastcall TDiscDlg::CheckBoxMenusClick( TObject *Sender )
{
DisableTitles( CheckBoxMenus->Checked );
}
//---------------------------------------------------------------------------
void __fastcall TDiscDlg::DisableTitles( Boolean disable )
{
if ( CheckBoxMenus->Checked )
if( disable )
{
LabelTitle->Enabled = false;
LabelChapter->Enabled = false;
......
object DiscDlg: TDiscDlg
Left = 502
Top = 336
Left = 390
Top = 320
BorderIcons = [biSystemMenu, biMinimize]
BorderStyle = bsDialog
Caption = 'Open disc'
......
......@@ -52,9 +52,10 @@ __published: // IDE-managed Components
void __fastcall ButtonCancelClick( TObject *Sender );
void __fastcall ButtonOkClick( TObject *Sender);
void __fastcall RadioGroupTypeClick( TObject *Sender );
void __fastcall CheckBoxMenusClick(TObject *Sender);
void __fastcall CheckBoxMenusClick( TObject *Sender );
private: // User declarations
intf_thread_t *p_intf;
void __fastcall DisableTitles( Boolean disable );
public: // User declarations
__fastcall TDiscDlg( TComponent* Owner, intf_thread_t *_p_intf );
};
......
......@@ -143,8 +143,11 @@ void __fastcall TNetworkDlg::BitBtnOkClick( TObject *Sender )
config_PutInt( p_intf, "network-channel", FALSE );
Address = EditHTTPURL->Text;
/* Build source name with a basic test */
if( Address.SubString( 1, 4 ) == "http" )
/* Build source name with a basic test;
* http is the default protocol */
if( Address.SubString( 1, 7 ) == "http://" ||
Address.SubString( 1, 6 ) == "ftp://" ||
Address.SubString( 1, 6 ) == "mms://" )
{
Source = Address;
}
......
object NetworkDlg: TNetworkDlg
Left = 369
Top = 301
Left = 329
Top = 253
BorderStyle = bsDialog
Caption = 'Open network'
ClientHeight = 206
ClientWidth = 482
ClientWidth = 497
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
......@@ -249,7 +249,7 @@ object NetworkDlg: TNetworkDlg
TextHeight = 13
object BitBtnOk: TBitBtn
Tag = 3
Left = 40
Left = 52
Top = 168
Width = 177
Height = 25
......@@ -259,7 +259,7 @@ object NetworkDlg: TNetworkDlg
end
object BitBtnCancel: TBitBtn
Tag = 3
Left = 256
Left = 268
Top = 168
Width = 177
Height = 25
......@@ -271,13 +271,13 @@ object NetworkDlg: TNetworkDlg
Tag = 3
Left = 8
Top = 8
Width = 465
Width = 481
Height = 145
Caption = 'Network mode'
TabOrder = 2
object LabelUDPPort: TLabel
Tag = 3
Left = 148
Left = 172
Top = 26
Width = 22
Height = 13
......@@ -285,7 +285,7 @@ object NetworkDlg: TNetworkDlg
end
object LabelMulticastPort: TLabel
Tag = 3
Left = 364
Left = 388
Top = 54
Width = 22
Height = 13
......@@ -294,7 +294,7 @@ object NetworkDlg: TNetworkDlg
end
object LabelCSPort: TLabel
Tag = 3
Left = 364
Left = 388
Top = 82
Width = 22
Height = 13
......@@ -303,7 +303,7 @@ object NetworkDlg: TNetworkDlg
end
object LabelMulticastAddress: TLabel
Tag = 3
Left = 139
Left = 163
Top = 54
Width = 41
Height = 13
......@@ -312,7 +312,7 @@ object NetworkDlg: TNetworkDlg
end
object LabelCSAddress: TLabel
Tag = 3
Left = 139
Left = 163
Top = 82
Width = 41
Height = 13
......@@ -321,7 +321,7 @@ object NetworkDlg: TNetworkDlg
end
object LabelHTTPURL: TLabel
Tag = 3
Left = 147
Left = 171
Top = 110
Width = 25
Height = 13
......@@ -332,9 +332,9 @@ object NetworkDlg: TNetworkDlg
Tag = 3
Left = 16
Top = 24
Width = 97
Width = 113
Height = 17
Caption = 'UDP'
Caption = 'UDP/RTP'
Checked = True
TabOrder = 0
TabStop = True
......@@ -344,9 +344,9 @@ object NetworkDlg: TNetworkDlg
Tag = 3
Left = 16
Top = 52
Width = 97
Width = 113
Height = 17
Caption = 'UDP Multicast'
Caption = 'UDP/RTP Multicast'
TabOrder = 1
OnEnter = RadioButtonMulticastEnter
end
......@@ -354,7 +354,7 @@ object NetworkDlg: TNetworkDlg
Tag = 3
Left = 16
Top = 80
Width = 97
Width = 113
Height = 17
Caption = 'Channel Server'
TabOrder = 2
......@@ -364,15 +364,15 @@ object NetworkDlg: TNetworkDlg
Tag = 3
Left = 16
Top = 108
Width = 97
Width = 113
Height = 17
Caption = 'HTTP'
Caption = 'HTTP/FTP/MMS'
TabOrder = 3
OnEnter = RadioButtonHTTPEnter
end
object ComboBoxMulticastAddress: TComboBox
Tag = 5
Left = 184
Left = 208
Top = 50
Width = 161
Height = 21
......@@ -382,7 +382,7 @@ object NetworkDlg: TNetworkDlg
end
object ComboBoxCSAddress: TComboBox
Tag = 5
Left = 184
Left = 208
Top = 78
Width = 161
Height = 21
......@@ -395,7 +395,7 @@ object NetworkDlg: TNetworkDlg
end
object EditHTTPURL: TEdit
Tag = 5
Left = 184
Left = 208
Top = 106
Width = 265
Height = 21
......@@ -403,7 +403,7 @@ object NetworkDlg: TNetworkDlg
TabOrder = 9
end
object SpinEditUDPPort: TCSpinEdit
Left = 184
Left = 208
Top = 21
Width = 57
Height = 22
......@@ -414,7 +414,7 @@ object NetworkDlg: TNetworkDlg
Value = 1234
end
object SpinEditMulticastPort: TCSpinEdit
Left = 392
Left = 416
Top = 49
Width = 57
Height = 22
......@@ -426,7 +426,7 @@ object NetworkDlg: TNetworkDlg
Value = 1234
end
object SpinEditCSPort: TCSpinEdit
Left = 392
Left = 416
Top = 77
Width = 57
Height = 22
......
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