summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2015-05-20 20:31:45 +0000
committerGeorge Hazan <george.hazan@gmail.com>2015-05-20 20:31:45 +0000
commit14c356f7b506bd3b9f8e2535c17ba7336b7df0f9 (patch)
tree754d7324fd1b8d24ff7da7d66ecd9a5f3c50773e
parent83c38ef95c18b7bb504ae246f2821e04416c5539 (diff)
CDlgBase::m_first && CCtrlBase::m_next removed
git-svn-id: http://svn.miranda-ng.org/main/trunk@13724 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r--include/m_gui.h3
-rw-r--r--src/mir_core/src/ui_utils.cpp16
2 files changed, 4 insertions, 15 deletions
diff --git a/include/m_gui.h b/include/m_gui.h
index fe2a0e66a3..ffa03bbdb6 100644
--- a/include/m_gui.h
+++ b/include/m_gui.h
@@ -292,8 +292,6 @@ protected:
enum { CLOSE_ON_OK = 0x1, CLOSE_ON_CANCEL = 0x2 };
BYTE m_autoClose; // automatically close dialog on IDOK/CANCEL commands. default: CLOSE_ON_OK|CLOSE_ON_CANCEL
- CCtrlBase* m_first;
-
// override this handlers to provide custom functionality
// general messages
virtual void OnInitDialog() { }
@@ -377,7 +375,6 @@ public:
protected:
HWND m_hwnd; // must be the first data item
int m_idCtrl;
- CCtrlBase* m_next;
CDlgBase* m_parentWnd;
bool m_bChanged;
diff --git a/src/mir_core/src/ui_utils.cpp b/src/mir_core/src/ui_utils.cpp
index c560d78643..d4c69d53c0 100644
--- a/src/mir_core/src/ui_utils.cpp
+++ b/src/mir_core/src/ui_utils.cpp
@@ -50,9 +50,7 @@ CDlgBase::CDlgBase(HINSTANCE hInst, int idDialog)
{
m_hInst = hInst;
m_idDialog = idDialog;
- m_hwndParent = NULL;
- m_hwnd = NULL;
- m_first = NULL;
+ m_hwnd = m_hwndParent = NULL;
m_isModal = false;
m_initialized = false;
m_autoClose = CLOSE_ON_OK | CLOSE_ON_CANCEL;
@@ -104,10 +102,7 @@ INT_PTR CDlgBase::DlgProc(UINT msg, WPARAM wParam, LPARAM lParam)
case WM_INITDIALOG:
m_initialized = false;
TranslateDialogDefault(m_hwnd);
- {
- for (CCtrlBase* p = m_first; p != NULL; p = p->m_next)
- AddControl(p);
- }
+
NotifyControls(&CCtrlBase::OnInit);
OnInitDialog();
@@ -2310,11 +2305,8 @@ CCtrlBase::CCtrlBase(CDlgBase *wnd, int idCtrl)
m_hwnd(NULL),
m_bChanged(false)
{
- if (wnd) {
- m_next = wnd->m_first;
- wnd->m_first = this;
- }
- else m_next = NULL;
+ if (wnd)
+ wnd->AddControl(this);
}
void CCtrlBase::OnInit()