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

 * Fixed a stupid bug in the Network dialog.
parent 35070dfc
......@@ -48,6 +48,8 @@ __fastcall TNetworkDlg::TNetworkDlg( TComponent* Owner )
{
char *psz_channel_server;
OldRadioValue = 0;
/* server port */
UpDownUDPPort->Position = config_GetIntVariable( "server-port" );
UpDownMulticastPort->Position = config_GetIntVariable( "server-port" );
......@@ -56,6 +58,7 @@ __fastcall TNetworkDlg::TNetworkDlg( TComponent* Owner )
if( config_GetIntVariable( "network-channel" ) )
{
RadioButtonCS->Checked = true;
RadioButtonCSEnter( RadioButtonCS );
}
psz_channel_server = config_GetPszVariable( "channel-server" );
......@@ -66,8 +69,6 @@ __fastcall TNetworkDlg::TNetworkDlg( TComponent* Owner )
}
UpDownCSPort->Position = config_GetIntVariable( "channel-port" );
OldRadioValue = 0;
}
//---------------------------------------------------------------------------
void __fastcall TNetworkDlg::FormShow( TObject *Sender )
......@@ -203,28 +204,28 @@ void __fastcall TNetworkDlg::ChangeEnabled( int i_selected )
}
}
//---------------------------------------------------------------------------
void __fastcall TNetworkDlg::RadioButtonUDPClick( TObject *Sender )
void __fastcall TNetworkDlg::RadioButtonUDPEnter( TObject *Sender )
{
ChangeEnabled( OldRadioValue );
OldRadioValue = 0;
ChangeEnabled( OldRadioValue );
}
//---------------------------------------------------------------------------
void __fastcall TNetworkDlg::RadioButtonMulticastClick( TObject *Sender )
void __fastcall TNetworkDlg::RadioButtonMulticastEnter( TObject *Sender )
{
ChangeEnabled( OldRadioValue );
OldRadioValue = 1;
ChangeEnabled( OldRadioValue );
}
//---------------------------------------------------------------------------
void __fastcall TNetworkDlg::RadioButtonCSClick( TObject *Sender )
void __fastcall TNetworkDlg::RadioButtonCSEnter( TObject *Sender )
{
ChangeEnabled( OldRadioValue );
OldRadioValue = 2;
ChangeEnabled( OldRadioValue );
}
//---------------------------------------------------------------------------
void __fastcall TNetworkDlg::RadioButtonHTTPClick( TObject *Sender )
void __fastcall TNetworkDlg::RadioButtonHTTPEnter( TObject *Sender )
{
ChangeEnabled( OldRadioValue );
OldRadioValue = 3;
......
......@@ -328,7 +328,7 @@ object NetworkDlg: TNetworkDlg
Checked = True
TabOrder = 0
TabStop = True
OnClick = RadioButtonUDPClick
OnEnter = RadioButtonUDPEnter
end
object RadioButtonMulticast: TRadioButton
Left = 16
......@@ -337,7 +337,7 @@ object NetworkDlg: TNetworkDlg
Height = 17
Caption = 'UDP Multicast'
TabOrder = 1
OnClick = RadioButtonMulticastClick
OnEnter = RadioButtonMulticastEnter
end
object RadioButtonCS: TRadioButton
Left = 16
......@@ -346,7 +346,7 @@ object NetworkDlg: TNetworkDlg
Height = 17
Caption = 'Channel Server'
TabOrder = 2
OnClick = RadioButtonCSClick
OnEnter = RadioButtonCSEnter
end
object RadioButtonHTTP: TRadioButton
Left = 16
......@@ -355,7 +355,7 @@ object NetworkDlg: TNetworkDlg
Height = 17
Caption = 'HTTP'
TabOrder = 3
OnClick = RadioButtonHTTPClick
OnEnter = RadioButtonHTTPEnter
end
object EditUDPPort: TEdit
Left = 184
......@@ -384,7 +384,7 @@ object NetworkDlg: TNetworkDlg
Width = 41
Height = 21
Enabled = False
TabOrder = 6
TabOrder = 7
Text = '1234'
end
object UpDownMulticastPort: TUpDown
......@@ -397,7 +397,7 @@ object NetworkDlg: TNetworkDlg
Min = 0
Max = 32767
Position = 1234
TabOrder = 7
TabOrder = 8
Thousands = False
Wrap = False
end
......@@ -407,7 +407,7 @@ object NetworkDlg: TNetworkDlg
Width = 41
Height = 21
Enabled = False
TabOrder = 8
TabOrder = 10
Text = '6010'
end
object UpDownCSPort: TUpDown
......@@ -420,7 +420,7 @@ object NetworkDlg: TNetworkDlg
Min = 0
Max = 32767
Position = 6010
TabOrder = 9
TabOrder = 11
Thousands = False
Wrap = False
end
......@@ -431,7 +431,7 @@ object NetworkDlg: TNetworkDlg
Height = 21
Enabled = False
ItemHeight = 13
TabOrder = 10
TabOrder = 6
end
object ComboBoxCSAddress: TComboBox
Left = 184
......@@ -440,7 +440,7 @@ object NetworkDlg: TNetworkDlg
Height = 21
Enabled = False
ItemHeight = 13
TabOrder = 11
TabOrder = 9
Text = '138.195.156.230'
Items.Strings = (
'138.195.159.230')
......
......@@ -63,10 +63,10 @@ __published: // IDE-managed Components
void __fastcall FormHide( TObject *Sender );
void __fastcall BitBtnCancelClick( TObject *Sender );
void __fastcall BitBtnOkClick( TObject *Sender );
void __fastcall RadioButtonUDPClick( TObject *Sender );
void __fastcall RadioButtonMulticastClick( TObject *Sender );
void __fastcall RadioButtonCSClick( TObject *Sender );
void __fastcall RadioButtonHTTPClick( TObject *Sender );
void __fastcall RadioButtonUDPEnter( TObject *Sender );
void __fastcall RadioButtonMulticastEnter( TObject *Sender );
void __fastcall RadioButtonCSEnter( TObject *Sender );
void __fastcall RadioButtonHTTPEnter( TObject *Sender );
private: // User declarations
int OldRadioValue;
void __fastcall ChangeEnabled( int i_selected );
......
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