From bf8ad124d03b4fd059318d9ba8889b11faaf5b53 Mon Sep 17 00:00:00 2001 From: Goraf <22941576+Goraf@users.noreply.github.com> Date: Wed, 24 Jan 2018 19:47:13 +0100 Subject: Gadu-Gadu: partial move to UI classes * advanced options form refactored * move to options class * const correctness * code cleaning --- protocols/Gadu-Gadu/src/options.h | 57 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 protocols/Gadu-Gadu/src/options.h (limited to 'protocols/Gadu-Gadu/src/options.h') diff --git a/protocols/Gadu-Gadu/src/options.h b/protocols/Gadu-Gadu/src/options.h new file mode 100644 index 0000000000..c0eaecae75 --- /dev/null +++ b/protocols/Gadu-Gadu/src/options.h @@ -0,0 +1,57 @@ +#pragma once + +#include "gg.h" + +struct GaduOptions +{ + CMOption autoRecconect; + CMOption keepConnectionAlive; + CMOption showConnectionErrors; + CMOption useDirectConnections; + CMOption useForwarding; + CMOption useManualHosts; + CMOption useMsgDeliveryAcknowledge; + CMOption useSslConnection; + + CMOption directConnectionPort; + CMOption forwardPort; + + CMOption forwardHost; + CMOption serverHosts; + + GaduOptions(PROTO_INTERFACE *proto); +}; + +using GaduDlgBase = CProtoDlgBase; + +class GaduOptionsDlgAdvanced : public GaduDlgBase +{ +private: + CCtrlCheck chkAutoReconnect; + CCtrlCheck chkKeepConnectionAlive; + CCtrlCheck chkMsgAcknowledge; + CCtrlCheck chkShowConnectionErrors; + CCtrlCheck chkSslConnection; + + CCtrlCheck chkManualHosts; + CCtrlEdit edtServerHosts; + + CCtrlCheck chkDirectConnections; + CCtrlEdit edtDirectPort; + + CCtrlCheck chkForwarding; + CCtrlEdit edtForwardHost; + CCtrlEdit edtForwardPort; + + CCtrlBase txtReconnectRequired; + +public: + GaduOptionsDlgAdvanced(GaduProto *proto); + + void OnInitDialog() override; + +private: + void onCheck_ManualHosts(CCtrlCheck*); + void onCheck_DirectConnections(CCtrlCheck*); + void onCheck_Forwarding(CCtrlCheck*); +}; -- cgit v1.2.3