diff options
author | George Hazan <ghazan@miranda.im> | 2021-03-20 18:50:20 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2021-03-20 18:50:20 +0300 |
commit | ce09a6d8185f0d9ee8c2b67969aed25e5a29eebe (patch) | |
tree | f902c3057bde9934885ac46b34ef7df1c0575f83 | |
parent | e7fa95c0ba95d5c78582eb2e03d68d27048c1da4 (diff) |
code cleaning
-rw-r--r-- | include/m_gui.h | 2 | ||||
-rw-r--r-- | libs/win32/mir_core.lib | bin | 475208 -> 475218 bytes | |||
-rw-r--r-- | libs/win64/mir_core.lib | bin | 480308 -> 480318 bytes | |||
-rw-r--r-- | plugins/MirLua/src/options.cpp | 31 | ||||
-rw-r--r-- | plugins/MirLua/src/options.h | 4 | ||||
-rw-r--r-- | src/mir_core/src/mir_core.def | 2 | ||||
-rw-r--r-- | src/mir_core/src/mir_core64.def | 2 |
7 files changed, 7 insertions, 34 deletions
diff --git a/include/m_gui.h b/include/m_gui.h index 73fd9de525..f1ac5c07e4 100644 --- a/include/m_gui.h +++ b/include/m_gui.h @@ -470,7 +470,7 @@ public: __forceinline int GetCtrlId() const { return m_idCtrl; }
__forceinline CDlgBase *GetParent() const { return m_parentWnd; }
__forceinline bool IsChanged() const { return m_bChanged; }
- __forceinline void SetSilent() { m_bSilent = true; }
+ __forceinline void SetSilent(bool bSilent = true) { m_bSilent = bSilent; }
__forceinline void UseSystemColors() { m_bUseSystemColors = true; }
void Show(bool bShow = true);
diff --git a/libs/win32/mir_core.lib b/libs/win32/mir_core.lib Binary files differindex 2b146a38c2..700387b3e0 100644 --- a/libs/win32/mir_core.lib +++ b/libs/win32/mir_core.lib diff --git a/libs/win64/mir_core.lib b/libs/win64/mir_core.lib Binary files differindex 99b560204b..cc69bf62f7 100644 --- a/libs/win64/mir_core.lib +++ b/libs/win64/mir_core.lib diff --git a/plugins/MirLua/src/options.cpp b/plugins/MirLua/src/options.cpp index a47ae51bd0..8eac5798e0 100644 --- a/plugins/MirLua/src/options.cpp +++ b/plugins/MirLua/src/options.cpp @@ -1,9 +1,8 @@ #include "stdafx.h"
-CMLuaOptionsMain::CMLuaOptionsMain(CMPlugin &plugin)
- : CDlgBase(plugin, IDD_OPTIONSMAIN),
+CMLuaOptionsMain::CMLuaOptionsMain(CMPlugin &plugin) :
+ CDlgBase(plugin, IDD_OPTIONSMAIN),
m_plugin(plugin),
- isScriptListInit(false),
m_popupOnError(this, IDC_POPUPONERROR),
m_popupOnObsolete(this, IDC_POPUPONOBSOLETE),
m_scriptsList(this, IDC_SCRIPTS),
@@ -47,7 +46,6 @@ bool CMLuaOptionsMain::OnInitDialog() {
CDlgBase::OnInitDialog();
- m_scriptsList.SetSilent();
m_scriptsList.SetExtendedListViewStyle(LVS_EX_SUBITEMIMAGES | LVS_EX_FULLROWSELECT | LVS_EX_CHECKBOXES | LVS_EX_INFOTIP);
HIMAGELIST hImageList = m_scriptsList.CreateImageList(LVSIL_SMALL);
@@ -72,8 +70,6 @@ bool CMLuaOptionsMain::OnInitDialog() m_scriptsList.AddColumn(3, nullptr, 36 - GetSystemMetrics(SM_CXVSCROLL));
LoadScripts();
-
- isScriptListInit = true;
return true;
}
@@ -90,25 +86,6 @@ bool CMLuaOptionsMain::OnApply() return true;
}
-INT_PTR CMLuaOptionsMain::DlgProc(UINT msg, WPARAM wParam, LPARAM lParam)
-{
- switch (msg) {
- case WM_NOTIFY:
- {
- LPNMHDR lpnmHdr = (LPNMHDR)lParam;
- if (lpnmHdr->idFrom == (UINT_PTR)m_scriptsList.GetCtrlId() && lpnmHdr->code == LVN_ITEMCHANGED) {
- LPNMLISTVIEW pnmv = (LPNMLISTVIEW)lParam;
- if (pnmv->uChanged & LVIF_STATE && pnmv->uNewState & LVIS_STATEIMAGEMASK) {
- if (isScriptListInit)
- NotifyChange();
- }
- }
- }
- break;
- }
- return CDlgBase::DlgProc(msg, wParam, lParam);
-}
-
void CMLuaOptionsMain::OnScriptListClick(CCtrlListView::TEventInfo *evt)
{
LVITEM lvi = {};
@@ -155,11 +132,11 @@ void CMLuaOptionsMain::OnScriptListClick(CCtrlListView::TEventInfo *evt) void CMLuaOptionsMain::OnReload(CCtrlBase*)
{
- isScriptListInit = false;
+ m_scriptsList.SetSilent(true);
m_scriptsList.DeleteAllItems();
m_plugin.ReloadLuaScripts();
LoadScripts();
- isScriptListInit = true;
+ m_scriptsList.SetSilent(false);
}
/***********************************************/
diff --git a/plugins/MirLua/src/options.h b/plugins/MirLua/src/options.h index 879f06b55a..f109f4f83d 100644 --- a/plugins/MirLua/src/options.h +++ b/plugins/MirLua/src/options.h @@ -5,8 +5,6 @@ class CMLuaOptionsMain : public CDlgBase private:
CMPlugin &m_plugin;
- bool isScriptListInit;
-
CCtrlCheck m_popupOnError;
CCtrlCheck m_popupOnObsolete;
@@ -22,8 +20,6 @@ protected: void OnScriptListClick(CCtrlListView::TEventInfo *evt);
void OnReload(CCtrlBase*);
- INT_PTR DlgProc(UINT msg, WPARAM wParam, LPARAM lParam) override;
-
public:
CMLuaOptionsMain(CMPlugin &plugin);
};
diff --git a/src/mir_core/src/mir_core.def b/src/mir_core/src/mir_core.def index 2a9322ac5e..594ecb68c0 100644 --- a/src/mir_core/src/mir_core.def +++ b/src/mir_core/src/mir_core.def @@ -897,7 +897,7 @@ WindowList_Create @1105 WindowList_Destroy @1106
WindowList_Find @1107
WindowList_Remove @1108
-?SetSilent@CCtrlBase@@QAEXXZ @1109 NONAME
+?SetSilent@CCtrlBase@@QAEX_N@Z @1109 NONAME
Utils_AssertInsideScreen @1110
Utils_RestoreWindowPosition @1111
Utils_SaveWindowPosition @1112
diff --git a/src/mir_core/src/mir_core64.def b/src/mir_core/src/mir_core64.def index 4d694019fb..658b27f538 100644 --- a/src/mir_core/src/mir_core64.def +++ b/src/mir_core/src/mir_core64.def @@ -897,7 +897,7 @@ WindowList_Create @1105 WindowList_Destroy @1106
WindowList_Find @1107
WindowList_Remove @1108
-?SetSilent@CCtrlBase@@QEAAXXZ @1109 NONAME
+?SetSilent@CCtrlBase@@QEAAX_N@Z @1109 NONAME
Utils_AssertInsideScreen @1110
Utils_RestoreWindowPosition @1111
Utils_SaveWindowPosition @1112
|