diff options
author | George Hazan <ghazan@miranda.im> | 2018-02-15 14:02:57 +0200 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-02-15 14:02:57 +0200 |
commit | 4698d9baf75de69d3f1c2e7f62e83f6e14e0878b (patch) | |
tree | 298456ffbe701fe3d560f963881f2a170af403e6 /src/mir_core | |
parent | 23539d0833640809508b94bbeb81ff8e66146064 (diff) |
fixes #1155 (Checkboxes do not show checkmarks in options)
Diffstat (limited to 'src/mir_core')
-rw-r--r-- | src/mir_core/src/CCtrlCheck.cpp | 6 | ||||
-rw-r--r-- | src/mir_core/src/CCtrlData.cpp | 3 | ||||
-rw-r--r-- | src/mir_core/src/CDlgBase.cpp | 4 |
3 files changed, 7 insertions, 6 deletions
diff --git a/src/mir_core/src/CCtrlCheck.cpp b/src/mir_core/src/CCtrlCheck.cpp index 603d5da22a..13983b148c 100644 --- a/src/mir_core/src/CCtrlCheck.cpp +++ b/src/mir_core/src/CCtrlCheck.cpp @@ -39,12 +39,14 @@ void CCtrlCheck::OnApply() { CSuper::OnApply(); - SaveInt(GetState()); + if (m_dbLink != nullptr) + SaveInt(GetState()); } void CCtrlCheck::OnReset() { - SetState(LoadInt()); + if (m_dbLink != nullptr) + SetState(LoadInt()); } int CCtrlCheck::GetState() diff --git a/src/mir_core/src/CCtrlData.cpp b/src/mir_core/src/CCtrlData.cpp index eab24a4092..c0677778a8 100644 --- a/src/mir_core/src/CCtrlData.cpp +++ b/src/mir_core/src/CCtrlData.cpp @@ -32,8 +32,7 @@ CCtrlData::CCtrlData(CDlgBase *wnd, int idCtrl) CCtrlData::~CCtrlData() { - if (m_dbLink) - delete m_dbLink; + delete m_dbLink; } void CCtrlData::OnInit() diff --git a/src/mir_core/src/CDlgBase.cpp b/src/mir_core/src/CDlgBase.cpp index 258a4d94fa..e6a4d6f08b 100644 --- a/src/mir_core/src/CDlgBase.cpp +++ b/src/mir_core/src/CDlgBase.cpp @@ -138,12 +138,12 @@ BOOL CALLBACK CDlgBase::GlobalFieldEnum(HWND hwnd, LPARAM lParam) new CCtrlEdit(pDlg, id); else if (!wcsicmp(wszClass, L"ComboBox")) new CCtrlCombo(pDlg, id); -/* else if (!wcsicmp(wszClass, L"Button")) { + else if (!wcsicmp(wszClass, L"Button")) { if (GetWindowLongW(hwnd, GWL_STYLE) & (BS_CHECKBOX | BS_RADIOBUTTON)) new CCtrlCheck(pDlg, id); else new CCtrlButton(pDlg, id); - } */ + } else if (!wcsicmp(wszClass, L"RichEdit50W")) new CCtrlRichEdit(pDlg, id); else if (!wcsicmp(wszClass, L"msctls_updown32")) |