summaryrefslogtreecommitdiff
path: root/protocols/Tox/src/tox_dialogs.h
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/Tox/src/tox_dialogs.h')
-rw-r--r--protocols/Tox/src/tox_dialogs.h34
1 files changed, 23 insertions, 11 deletions
diff --git a/protocols/Tox/src/tox_dialogs.h b/protocols/Tox/src/tox_dialogs.h
index c78c7a8943..d72c83eb92 100644
--- a/protocols/Tox/src/tox_dialogs.h
+++ b/protocols/Tox/src/tox_dialogs.h
@@ -1,21 +1,33 @@
#ifndef _TOX_DIALOGS_H_
#define _TOX_DIALOGS_H_
-typedef CProtoDlgBase<CToxProto> CToxDlgBase;
-
-class CToxPasswordEditor : public CToxDlgBase
+class CCtrlLabel : public CCtrlData
{
-private:
- CCtrlEdit password;
- CCtrlCheck savePermanently;
+ typedef CCtrlData CSuper;
- CCtrlButton ok;
+public:
+ CCtrlLabel(CDlgBase *dlg, int ctrlId) :
+ CSuper(dlg, ctrlId)
+ {
+ }
-protected:
- void OnOk(CCtrlButton*);
+ virtual void OnInit()
+ {
+ CSuper::OnInit();
+ OnReset();
+ }
-public:
- CToxPasswordEditor(CToxProto *proto);
+ virtual void OnReset()
+ {
+ if (GetDataType() == DBVT_TCHAR)
+ SetText(LoadText());
+ else if (GetDataType() != DBVT_DELETED)
+ SetInt(LoadInt());
+ }
};
+///////////////////////////////////////////////
+
+typedef CProtoDlgBase<CToxProto> CToxDlgBase;
+
#endif //_TOX_DIALOGS_H_ \ No newline at end of file