summaryrefslogtreecommitdiff
path: root/plugins/MirLua
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2019-02-27 12:43:20 +0300
committerGeorge Hazan <ghazan@miranda.im>2019-02-27 12:43:20 +0300
commit423be683866fd8e305457eb725d8cdbe1f297fbd (patch)
treec49a7bdaf7f08683b9bfae48f0250050b2bf1872 /plugins/MirLua
parent288a07c81370226937d882b7a14fe3b6e3607e9e (diff)
popup code cleaning (cause we have no tchar.h)
Diffstat (limited to 'plugins/MirLua')
-rw-r--r--plugins/MirLua/Modules/m_popup/src/main.cpp16
-rw-r--r--plugins/MirLua/src/utils.cpp2
2 files changed, 9 insertions, 9 deletions
diff --git a/plugins/MirLua/Modules/m_popup/src/main.cpp b/plugins/MirLua/Modules/m_popup/src/main.cpp
index 35f2b9bb28..da9c9afdff 100644
--- a/plugins/MirLua/Modules/m_popup/src/main.cpp
+++ b/plugins/MirLua/Modules/m_popup/src/main.cpp
@@ -1,15 +1,15 @@
#include "stdafx.h"
-static POPUPDATAT* MakePopupData(lua_State *L)
+static POPUPDATAW* MakePopupData(lua_State *L)
{
- POPUPDATAT *ppd = (POPUPDATAT*)mir_calloc(sizeof(POPUPDATAT));
+ POPUPDATAW *ppd = (POPUPDATAW*)mir_calloc(sizeof(POPUPDATAW));
lua_getfield(L, -1, "ContactName");
- mir_wstrcpy(ppd->lptzContactName, ptrW(mir_utf8decodeW(lua_tostring(L, -1))));
+ mir_wstrcpy(ppd->lpwzContactName, ptrW(mir_utf8decodeW(lua_tostring(L, -1))));
lua_pop(L, 1);
lua_getfield(L, -1, "Text");
- mir_wstrcpy(ppd->lptzText, ptrW(mir_utf8decodeW(luaL_checkstring(L, -1))));
+ mir_wstrcpy(ppd->lpwzText, ptrW(mir_utf8decodeW(luaL_checkstring(L, -1))));
lua_pop(L, 1);
lua_getfield(L, -1, "hContact");
@@ -39,9 +39,9 @@ static int lua_AddPopup(lua_State *L)
return 1;
}
- mir_ptr<POPUPDATAT> ppd(MakePopupData(L));
+ mir_ptr<POPUPDATAW> ppd(MakePopupData(L));
- INT_PTR res = ::CallService(MS_POPUP_ADDPOPUPT, (WPARAM)ppd, 0);
+ INT_PTR res = ::CallService(MS_POPUP_ADDPOPUPW, (WPARAM)ppd, 0);
lua_pushinteger(L, res);
return 1;
@@ -64,7 +64,7 @@ static POPUPDATA2* MakePopupData2(lua_State *L)
lua_pop(L, 1);
lua_getfield(L, -1, "Text");
- ppd->lptzText = mir_utf8decodeW(luaL_checkstring(L, -1));
+ ppd->lpwzText = mir_utf8decodeW(luaL_checkstring(L, -1));
lua_pop(L, 1);
lua_getfield(L, -1, "hContact");
@@ -108,7 +108,7 @@ static int lua_AddPopup2(lua_State *L)
lua_pushinteger(L, res);
mir_free(ppd->lptzTitle);
- mir_free(ppd->lptzText);
+ mir_free(ppd->lpwzText);
return 1;
}
diff --git a/plugins/MirLua/src/utils.cpp b/plugins/MirLua/src/utils.cpp
index 1292a25f50..e36458a64d 100644
--- a/plugins/MirLua/src/utils.cpp
+++ b/plugins/MirLua/src/utils.cpp
@@ -21,7 +21,7 @@ void ShowNotification(const char *caption, const char *message, int flags, MCONT
if (Miranda_IsTerminated())
return;
- if (ServiceExists(MS_POPUP_ADDPOPUPT) && db_get_b(0, "Popup", "ModuleIsEnabled", 1))
+ if (ServiceExists(MS_POPUP_ADDPOPUPW) && db_get_b(0, "Popup", "ModuleIsEnabled", 1))
{
POPUPDATA ppd = { 0 };
ppd.lchContact = hContact;