diff options
Diffstat (limited to 'protocols/Gadu-Gadu/src/options.cpp')
-rw-r--r-- | protocols/Gadu-Gadu/src/options.cpp | 38 |
1 files changed, 11 insertions, 27 deletions
diff --git a/protocols/Gadu-Gadu/src/options.cpp b/protocols/Gadu-Gadu/src/options.cpp index bfe9a6394b..6714d3aeb0 100644 --- a/protocols/Gadu-Gadu/src/options.cpp +++ b/protocols/Gadu-Gadu/src/options.cpp @@ -405,10 +405,10 @@ public: chkManualHosts.OnChange = Callback(this, &GaduOptionsDlgAdvanced::onCheck_ManualHosts); chkDirectConnections.OnChange = Callback(this, &GaduOptionsDlgAdvanced::onCheck_DirectConnections); - edtDirectPort.OnChange = Callback(this, &GaduOptionsDlgAdvanced::showRecconectRequired); + edtDirectPort.OnChange = Callback(this, &GaduOptionsDlgAdvanced::showReconnectRequired); chkForwarding.OnChange = Callback(this, &GaduOptionsDlgAdvanced::onCheck_Forwarding); - edtForwardHost.OnChange = Callback(this, &GaduOptionsDlgAdvanced::showRecconectRequired); - edtForwardPort.OnChange = Callback(this, &GaduOptionsDlgAdvanced::showRecconectRequired); + edtForwardHost.OnChange = Callback(this, &GaduOptionsDlgAdvanced::showReconnectRequired); + edtForwardPort.OnChange = Callback(this, &GaduOptionsDlgAdvanced::showReconnectRequired); } bool OnInitDialog() override @@ -416,22 +416,6 @@ public: chkKeepConnectionAlive.Disable(); chkSslConnection.Disable(); - chkManualHosts.Disable(); - bool useManualHosts = chkManualHosts.GetState() && chkManualHosts.Enabled(); - edtServerHosts.Enable(useManualHosts); - txtServerHostsLabel.Enable(useManualHosts); - - bool useDirectConnection = chkDirectConnections.GetState(); - edtDirectPort.Enable(useDirectConnection); - txtDirectPortLabel.Enable(useDirectConnection); - chkForwarding.Enable(useDirectConnection); - - bool useForwarding = useDirectConnection && chkForwarding.GetState(); - edtForwardHost.Enable(useForwarding); - txtForwardHostLabel.Enable(useForwarding); - edtForwardPort.Enable(useForwarding); - txtForwardPortLabel.Enable(useForwarding); - txtReconnectRequired.Hide(); return true; } @@ -447,41 +431,41 @@ public: void onCheck_ManualHosts(CCtrlCheck *) { - bool useManualHosts = chkManualHosts.GetState(); + bool useManualHosts = chkManualHosts.IsChecked(); edtServerHosts.Enable(useManualHosts); txtServerHostsLabel.Enable(useManualHosts); - showRecconectRequired(); + showReconnectRequired(); } void onCheck_DirectConnections(CCtrlCheck *) { - bool useDirectConnection = chkDirectConnections.GetState(); + bool useDirectConnection = chkDirectConnections.IsChecked(); edtDirectPort.Enable(useDirectConnection); txtDirectPortLabel.Enable(useDirectConnection); chkForwarding.Enable(useDirectConnection); - bool useForwarding = useDirectConnection && chkForwarding.GetState(); + bool useForwarding = useDirectConnection && chkForwarding.IsChecked(); edtForwardHost.Enable(useForwarding); txtForwardHostLabel.Enable(useForwarding); edtForwardPort.Enable(useForwarding); txtForwardPortLabel.Enable(useForwarding); - showRecconectRequired(); + showReconnectRequired(); } void onCheck_Forwarding(CCtrlCheck *) { - bool useForwarding = chkForwarding.GetState(); + bool useForwarding = chkForwarding.IsChecked(); edtForwardHost.Enable(useForwarding); txtForwardHostLabel.Enable(useForwarding); edtForwardPort.Enable(useForwarding); txtForwardPortLabel.Enable(useForwarding); - showRecconectRequired(); + showReconnectRequired(); } - void showRecconectRequired(CCtrlBase* = nullptr) + void showReconnectRequired(CCtrlBase* = nullptr) { txtReconnectRequired.Show(); } |