From e5abf09c15f33b9bf50cb7b5f17e1b40260a54dd Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 12 Feb 2018 21:28:15 +0300 Subject: useless CCtrlEdit removed --- plugins/TabSRMM/src/msgoptions.cpp | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) (limited to 'plugins/TabSRMM/src/msgoptions.cpp') diff --git a/plugins/TabSRMM/src/msgoptions.cpp b/plugins/TabSRMM/src/msgoptions.cpp index 8d1760ac6b..6ab0d4fb6d 100644 --- a/plugins/TabSRMM/src/msgoptions.cpp +++ b/plugins/TabSRMM/src/msgoptions.cpp @@ -574,9 +574,8 @@ BOOL TreeViewHandleClick(HWND hwndDlg, HWND hwndTree, WPARAM, LPARAM lParam) class COptMainDlg : public CDlgBase { - CCtrlSpin spnAvatar; + CCtrlSpin spnAvaSize; CCtrlButton btnHelp, btnReset; - CCtrlEdit edtAvaSize; CCtrlCheck chkAvaPreserve; public: @@ -584,8 +583,7 @@ public: : CDlgBase(g_hInst, IDD_OPT_MSGDLG), btnHelp(this, IDC_HELP_GENERAL), btnReset(this, IDC_RESETWARNINGS), - spnAvatar(this, IDC_AVATARSPIN), - edtAvaSize(this, IDC_MAXAVATARHEIGHT), + spnAvaSize(this, IDC_AVATARSPIN), chkAvaPreserve(this, IDC_PRESERVEAVATARSIZE) { btnHelp.OnClick = Callback(this, &COptMainDlg::onClick_Help); @@ -595,20 +593,16 @@ public: virtual void OnInitDialog() override { TreeViewInit(GetDlgItem(m_hwnd, IDC_WINDOWOPTIONS), CTranslator::TREE_MSG, 0, FALSE); - - int iAvaHeight = M.GetDword("avatarheight", 100); - edtAvaSize.SetInt(iAvaHeight); chkAvaPreserve.SetState(M.GetByte("dontscaleavatars", 0)); - spnAvatar.SetRange(150); - spnAvatar.SetPosition(iAvaHeight); + spnAvaSize.SetRange(150); + spnAvaSize.SetPosition(M.GetDword("avatarheight", 100)); } virtual void OnApply() override { - db_set_dw(0, SRMSGMOD_T, "avatarheight", edtAvaSize.GetInt()); - + db_set_dw(0, SRMSGMOD_T, "avatarheight", spnAvaSize.GetPosition()); db_set_b(0, SRMSGMOD_T, "dontscaleavatars", chkAvaPreserve.GetState()); // scan the tree view and obtain the options... -- cgit v1.2.3