summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2015-06-13 11:56:12 +0000
committerGeorge Hazan <george.hazan@gmail.com>2015-06-13 11:56:12 +0000
commit351bcbec48ed77af5f8efcc4d5198707922c5d86 (patch)
tree76f33bc88995da318477d998451f70f74c3f4fed
parente095cd0a755191d61f652ac400cf045d38f5b5d0 (diff)
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
-rw-r--r--bin10/lib/mir_core.libbin385816 -> 386082 bytes
-rw-r--r--bin10/lib/mir_core64.libbin388906 -> 389178 bytes
-rw-r--r--bin12/lib/mir_core.libbin385816 -> 386082 bytes
-rw-r--r--bin12/lib/mir_core64.libbin388906 -> 389178 bytes
-rw-r--r--include/m_gui.h3
-rw-r--r--src/mir_core/src/mir_core.def1
-rw-r--r--src/mir_core/src/mir_core64.def1
-rw-r--r--src/mir_core/src/ui_utils.cpp5
-rw-r--r--src/modules/clist/genmenuopt.cpp3
9 files changed, 10 insertions, 3 deletions
diff --git a/bin10/lib/mir_core.lib b/bin10/lib/mir_core.lib
index 1c78b841ee..8110b799c5 100644
--- a/bin10/lib/mir_core.lib
+++ b/bin10/lib/mir_core.lib
Binary files differ
diff --git a/bin10/lib/mir_core64.lib b/bin10/lib/mir_core64.lib
index 925dde519b..c478e222db 100644
--- a/bin10/lib/mir_core64.lib
+++ b/bin10/lib/mir_core64.lib
Binary files differ
diff --git a/bin12/lib/mir_core.lib b/bin12/lib/mir_core.lib
index 7d5b67bdb6..8110b799c5 100644
--- a/bin12/lib/mir_core.lib
+++ b/bin12/lib/mir_core.lib
Binary files differ
diff --git a/bin12/lib/mir_core64.lib b/bin12/lib/mir_core64.lib
index 9ea396afea..c478e222db 100644
--- a/bin12/lib/mir_core64.lib
+++ b/bin12/lib/mir_core64.lib
Binary files differ
diff --git a/include/m_gui.h b/include/m_gui.h
index ffa03bbdb6..3994cb4645 100644
--- a/include/m_gui.h
+++ b/include/m_gui.h
@@ -338,6 +338,7 @@ public:
__forceinline int GetCtrlId() const { return m_idCtrl; }
__forceinline CDlgBase *GetParent() { return m_parentWnd; }
__forceinline bool IsChanged() const { return m_bChanged; }
+ __forceinline void SetSilent() { m_bSilent = true; }
void Enable(int bIsEnable = true);
__forceinline void Disable() { Enable(false); }
@@ -376,7 +377,7 @@ protected:
HWND m_hwnd; // must be the first data item
int m_idCtrl;
CDlgBase* m_parentWnd;
- bool m_bChanged;
+ bool m_bChanged, m_bSilent;
public:
CCallback<CCtrlBase> OnChange;
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 -------------------------------------------