diff options
author | George Hazan <ghazan@miranda.im> | 2019-02-27 12:43:20 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2019-02-27 12:43:20 +0300 |
commit | 423be683866fd8e305457eb725d8cdbe1f297fbd (patch) | |
tree | c49a7bdaf7f08683b9bfae48f0250050b2bf1872 /plugins/MirOTR | |
parent | 288a07c81370226937d882b7a14fe3b6e3607e9e (diff) |
popup code cleaning (cause we have no tchar.h)
Diffstat (limited to 'plugins/MirOTR')
-rw-r--r-- | plugins/MirOTR/src/options.cpp | 2 | ||||
-rw-r--r-- | plugins/MirOTR/src/utils.cpp | 18 |
2 files changed, 10 insertions, 10 deletions
diff --git a/plugins/MirOTR/src/options.cpp b/plugins/MirOTR/src/options.cpp index f71d65e2f0..ab0e698f32 100644 --- a/plugins/MirOTR/src/options.cpp +++ b/plugins/MirOTR/src/options.cpp @@ -87,7 +87,7 @@ void LoadOptions() options.end_offline = (g_plugin.getByte("EndOffline", 1) == 1); options.end_window_close = (g_plugin.getByte("EndWindowClose", 0) == 1); - options.bHavePopups = 0 != ServiceExists(MS_POPUP_ADDPOPUPT) && ServiceExists(MS_POPUP_SHOWMESSAGE); + options.bHavePopups = 0 != ServiceExists(MS_POPUP_ADDPOPUPW) && ServiceExists(MS_POPUP_SHOWMESSAGE); options.bHaveSecureIM = 0 != ServiceExists("SecureIM/IsContactSecured"); LoadFilenames(); diff --git a/plugins/MirOTR/src/utils.cpp b/plugins/MirOTR/src/utils.cpp index 0dcd1e1cfe..e3dbd2164b 100644 --- a/plugins/MirOTR/src/utils.cpp +++ b/plugins/MirOTR/src/utils.cpp @@ -130,26 +130,26 @@ void ShowPopup(const wchar_t* line1, const wchar_t* line2, int timeout, const MC return; } - POPUPDATAT ppd = {0}; - //memset((void *)&ppd, 0, sizeof(POPUPDATAT)); + POPUPDATAW ppd = {0}; + //memset((void *)&ppd, 0, sizeof(POPUPDATAW)); ppd.lchContact = hContact; ppd.lchIcon = nullptr; if(line1 && line2) { - wcsncpy( ppd.lptzContactName, line1, MAX_CONTACTNAME-1 ); - wcsncpy( ppd.lptzText, line2, MAX_SECONDLINE-1 ); + wcsncpy( ppd.lpwzContactName, line1, MAX_CONTACTNAME-1 ); + wcsncpy( ppd.lpwzText, line2, MAX_SECONDLINE-1 ); } else if(line1) - wcsncpy( ppd.lptzText, line1, MAX_SECONDLINE-1 ); + wcsncpy( ppd.lpwzText, line1, MAX_SECONDLINE-1 ); else if(line2) - wcsncpy( ppd.lptzText, line2, MAX_SECONDLINE-1 ); + wcsncpy( ppd.lpwzText, line2, MAX_SECONDLINE-1 ); ppd.iSeconds = timeout; ppd.PluginWindowProc = nullptr; ppd.PluginData = nullptr; - PUAddPopupT(&ppd); + PUAddPopupW(&ppd); } @@ -169,7 +169,7 @@ void ShowWarning(wchar_t *msg) { int size = int(mir_wstrlen(msg) + 515); wchar_t *message = new wchar_t[size]; // newline and null terminator mir_snwprintf(message, size, L"%s\r\n%s", buffer, msg); - PUShowMessageT(message, SM_WARNING); + PUShowMessageW(message, SM_WARNING); delete[] message; } break; @@ -199,7 +199,7 @@ void ShowError(wchar_t *msg) { int size = int(mir_wstrlen(msg) + 515); message = new wchar_t[size]; // newline and null terminator mir_snwprintf(message, size, L"%s\r\n%s", buffer, msg); - PUShowMessageT(message, SM_WARNING); + PUShowMessageW(message, SM_WARNING); delete[] message; } break; |