From 351bcbec48ed77af5f8efcc4d5198707922c5d86 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sat, 13 Jun 2015 11:56:12 +0000 Subject: CCtrlBase::m_bSilent - a flag not to send change notifications git-svn-id: http://svn.miranda-ng.org/main/trunk@14142 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- src/mir_core/src/mir_core.def | 1 + src/mir_core/src/mir_core64.def | 1 + src/mir_core/src/ui_utils.cpp | 5 +++-- src/modules/clist/genmenuopt.cpp | 3 +++ 4 files changed, 8 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/mir_core/src/mir_core.def b/src/mir_core/src/mir_core.def index 07605d05dd..5c5896f34f 100644 --- a/src/mir_core/src/mir_core.def +++ b/src/mir_core/src/mir_core.def @@ -1240,3 +1240,4 @@ Proto_RegisterModule @1074 NONAME Bitmap_GetFilter @1248 Bitmap_Load @1249 CreateProtoServiceFunction @1250 +?SetSilent@CCtrlBase@@QAEXXZ @1251 NONAME diff --git a/src/mir_core/src/mir_core64.def b/src/mir_core/src/mir_core64.def index 5622d57702..4045e1d217 100644 --- a/src/mir_core/src/mir_core64.def +++ b/src/mir_core/src/mir_core64.def @@ -1240,3 +1240,4 @@ Proto_RegisterModule @1074 NONAME Bitmap_GetFilter @1248 Bitmap_Load @1249 CreateProtoServiceFunction @1250 +?SetSilent@CCtrlBase@@QEAAXXZ @1251 NONAME diff --git a/src/mir_core/src/ui_utils.cpp b/src/mir_core/src/ui_utils.cpp index fc87ed95fb..e80ac05897 100644 --- a/src/mir_core/src/ui_utils.cpp +++ b/src/mir_core/src/ui_utils.cpp @@ -2303,7 +2303,8 @@ CCtrlBase::CCtrlBase(CDlgBase *wnd, int idCtrl) : m_parentWnd(wnd), m_idCtrl(idCtrl), m_hwnd(NULL), - m_bChanged(false) + m_bChanged(false), + m_bSilent(false) { if (wnd) wnd->AddControl(this); @@ -2342,7 +2343,7 @@ void CCtrlBase::NotifyChange() if (!m_parentWnd || m_parentWnd->IsInitialized()) m_bChanged = true; - if (m_parentWnd) { + if (m_parentWnd && !m_bSilent) { m_parentWnd->OnChange(this); if (m_parentWnd->IsInitialized()) ::SendMessage(::GetParent(m_parentWnd->GetHwnd()), PSM_CHANGED, 0, 0); diff --git a/src/modules/clist/genmenuopt.cpp b/src/modules/clist/genmenuopt.cpp index d4560781ef..3299a17818 100644 --- a/src/modules/clist/genmenuopt.cpp +++ b/src/modules/clist/genmenuopt.cpp @@ -286,6 +286,9 @@ public: m_menuItems.SetFlags(MTREE_CHECKBOX | MTREE_DND | MTREE_MULTISELECT); m_menuItems.OnSelChanged = Callback(this, &CGenMenuOptionsPage::onMenuItemChanged); + + m_customName.SetSilent(); + m_service.SetSilent(); } //---- init dialog ------------------------------------------- -- cgit v1.2.3