From 44b90a878497fd1b397179128c72d78208d1fecf Mon Sep 17 00:00:00 2001 From: Vadim Yegorov Date: Tue, 4 Jun 2024 00:09:13 +0300 Subject: [PATCH] luamacro: 1. Adaptation to Far 3.0.6342. --- plugins/luamacro/_globalinfo.lua | 2 +- plugins/luamacro/changelog | 4 ++++ plugins/luamacro/luafar/service.c | 7 +++++-- plugins/luamacro/luafar/version.h | 2 +- 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/plugins/luamacro/_globalinfo.lua b/plugins/luamacro/_globalinfo.lua index 97669188f2..a05696e922 100644 --- a/plugins/luamacro/_globalinfo.lua +++ b/plugins/luamacro/_globalinfo.lua @@ -1,6 +1,6 @@ function export.GetGlobalInfo() return { - Version = { 3, 0, 0, 839 }, + Version = { 3, 0, 0, 840 }, MinFarVersion = { 3, 0, 0, 6327 }, Guid = win.Uuid("4EBBEFC8-2084-4B7F-94C0-692CE136894D"), Title = "LuaMacro", diff --git a/plugins/luamacro/changelog b/plugins/luamacro/changelog index 2b57d99e4e..c0f4ff064f 100644 --- a/plugins/luamacro/changelog +++ b/plugins/luamacro/changelog @@ -1,3 +1,7 @@ +zg 2024-06-04 00:07:01+03:00 - build 840 + +1. Adaptation to Far 3.0.6342. + shmuel 2024-05-30 00:17:44+03:00 - build 839 1. Refactoring. diff --git a/plugins/luamacro/luafar/service.c b/plugins/luamacro/luafar/service.c index 771e86087c..f501f0fddb 100644 --- a/plugins/luamacro/luafar/service.c +++ b/plugins/luamacro/luafar/service.c @@ -3985,7 +3985,7 @@ intptr_t LF_DlgProc(lua_State *L, HANDLE hDlg, intptr_t Msg, intptr_t Param1, vo PSInfo *Info = GetPluginData(L)->Info; TDialogData *dd = (TDialogData*) Info->SendDlgMessage(hDlg,DM_GETDLGDATA,0,0); - if (Msg == DN_INITDIALOG && NonModal(dd)) + if (Msg == DN_INITDIALOG && dd->hDlg == INVALID_HANDLE_VALUE) { dd->hDlg = hDlg; } @@ -4053,7 +4053,6 @@ static int far_DialogInit(lua_State *L) // 8-th parameter (flags) Flags = OptFlags(L, 8, 0); dd = NewDialogData(L, pd->Info, INVALID_HANDLE_VALUE, TRUE); - dd->isModal = (Flags&FDLG_NONMODAL) == 0; // 9-th parameter (DlgProc function) Proc = NULL; Param = NULL; @@ -4092,6 +4091,10 @@ static int far_DialogInit(lua_State *L) RemoveDialogFromRegistry(L, dd); lua_pushnil(L); } + else + { + dd->isModal = (Flags&FDLG_NONMODAL) == 0; + } return 1; } diff --git a/plugins/luamacro/luafar/version.h b/plugins/luamacro/luafar/version.h index cda480bb63..c7e3daf30f 100644 --- a/plugins/luamacro/luafar/version.h +++ b/plugins/luamacro/luafar/version.h @@ -1,3 +1,3 @@ #include -#define PLUGIN_BUILD 839 +#define PLUGIN_BUILD 840