From 04bad7d78b1b7eaba07cfc58d6cfffc876f774ce Mon Sep 17 00:00:00 2001 From: Alexander Lantsev Date: Sun, 26 Jul 2015 14:19:06 +0000 Subject: MirLua: - single script reloading allowed only in debug - version bump git-svn-id: http://svn.miranda-ng.org/main/trunk@14730 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/MirLua/src/mlua_options.cpp | 8 +++++++- plugins/MirLua/src/version.h | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'plugins/MirLua/src') diff --git a/plugins/MirLua/src/mlua_options.cpp b/plugins/MirLua/src/mlua_options.cpp index 5a08fedd7f..e3ecd89092 100644 --- a/plugins/MirLua/src/mlua_options.cpp +++ b/plugins/MirLua/src/mlua_options.cpp @@ -58,7 +58,9 @@ void CLuaOptions::LoadScripts() if (db_get_b(NULL, MODULE, _T2A(fileName), 1)) m_scripts.SetCheckState(iItem, TRUE); m_scripts.SetItem(iItem, 1, _T(""), 0); +#ifdef DEBUG m_scripts.SetItem(iItem, 2, _T(""), 1); +#endif } } @@ -81,7 +83,9 @@ void CLuaOptions::OnInitDialog() m_scripts.AddColumn(0, _T("Script"), 420); m_scripts.AddColumn(1, NULL, 32 - GetSystemMetrics(SM_CXVSCROLL)); +#ifdef DEBUG m_scripts.AddColumn(2, NULL, 32 - GetSystemMetrics(SM_CXVSCROLL)); +#endif LoadScripts(); @@ -109,7 +113,7 @@ INT_PTR CLuaOptions::DlgProc(UINT msg, WPARAM wParam, LPARAM lParam) case WM_NOTIFY: { LPNMHDR lpnmHdr = (LPNMHDR)lParam; - if (lpnmHdr->idFrom == m_scripts.GetCtrlId() && lpnmHdr->code == LVN_ITEMCHANGED) + if (lpnmHdr->idFrom == (UINT_PTR)m_scripts.GetCtrlId() && lpnmHdr->code == LVN_ITEMCHANGED) { LPNMLISTVIEW pnmv = (LPNMLISTVIEW)lParam; if (pnmv->uChanged & LVIF_STATE && pnmv->uNewState & LVIS_STATEIMAGEMASK) @@ -142,11 +146,13 @@ void CLuaOptions::OnScriptListClick(CCtrlListView::TEventInfo *evt) { ShellExecute(m_hwnd, NULL, lvi.pszText, NULL, script->GetFilePath(), SW_SHOWNORMAL); } +#ifdef DEBUG else if (lvi.iSubItem == 2) { script->Unload(); script->Load(); } +#endif mir_free(lvi.pszText); } diff --git a/plugins/MirLua/src/version.h b/plugins/MirLua/src/version.h index 89795d3de6..0fff245087 100644 --- a/plugins/MirLua/src/version.h +++ b/plugins/MirLua/src/version.h @@ -1,7 +1,7 @@ #define __MAJOR_VERSION 0 #define __MINOR_VERSION 11 #define __RELEASE_NUM 4 -#define __BUILD_NUM 3 +#define __BUILD_NUM 4 #include -- cgit v1.2.3