summaryrefslogtreecommitdiff
path: root/plugins/ChangeKeyboardLayout/src
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/ChangeKeyboardLayout/src
parent288a07c81370226937d882b7a14fe3b6e3607e9e (diff)
popup code cleaning (cause we have no tchar.h)
Diffstat (limited to 'plugins/ChangeKeyboardLayout/src')
-rw-r--r--plugins/ChangeKeyboardLayout/src/hook_events.cpp4
-rw-r--r--plugins/ChangeKeyboardLayout/src/options.cpp10
-rw-r--r--plugins/ChangeKeyboardLayout/src/text_operations.cpp8
3 files changed, 11 insertions, 11 deletions
diff --git a/plugins/ChangeKeyboardLayout/src/hook_events.cpp b/plugins/ChangeKeyboardLayout/src/hook_events.cpp
index 15c18f7e28..7f8ef8a952 100644
--- a/plugins/ChangeKeyboardLayout/src/hook_events.cpp
+++ b/plugins/ChangeKeyboardLayout/src/hook_events.cpp
@@ -74,7 +74,7 @@ void WritePopupOptions()
void RegPopupActions()
{
- if (ServiceExists(MS_POPUP_ADDPOPUPT)) {
+ if (ServiceExists(MS_POPUP_ADDPOPUPW)) {
poOptions.paActions[0].cbSize = sizeof(POPUPACTION);
strncpy_s(poOptions.paActions[0].lpzTitle, MODULENAME, _TRUNCATE);
strncat_s(poOptions.paActions[0].lpzTitle, _countof(poOptions.paActions[0].lpzTitle), "/Copy to clipboard", _TRUNCATE);
@@ -148,7 +148,7 @@ int OnOptionsInitialise(WPARAM wParam, LPARAM)
odp.pfnDlgProc = DlgMainProcOptions;
g_plugin.addOptions(wParam, &odp);
- if (ServiceExists(MS_POPUP_ADDPOPUPT)) {
+ if (ServiceExists(MS_POPUP_ADDPOPUPW)) {
odp.pszTemplate = MAKEINTRESOURCEA(IDD_POPUP_OPTION_FORM);
odp.szGroup.a = LPGEN("Popups");
odp.pfnDlgProc = DlgPopupsProcOptions;
diff --git a/plugins/ChangeKeyboardLayout/src/options.cpp b/plugins/ChangeKeyboardLayout/src/options.cpp
index a27d12566f..32261377bd 100644
--- a/plugins/ChangeKeyboardLayout/src/options.cpp
+++ b/plugins/ChangeKeyboardLayout/src/options.cpp
@@ -352,10 +352,10 @@ INT_PTR CALLBACK DlgPopupsProcOptions(HWND hWnd, UINT uiMessage, WPARAM wParam,
if ((HIWORD(wParam) == BN_CLICKED )) {
ptszPopupPreviewText = (LPTSTR)mir_alloc(MaxTextSize*sizeof(wchar_t));
- POPUPDATAT_V2 pdtData = { 0 };
+ POPUPDATAW_V2 pdtData = { 0 };
pdtData.cbSize = sizeof(pdtData);
- wcsncpy(pdtData.lptzContactName, TranslateT(MODULENAME), MAX_CONTACTNAME);
- wcsncpy(pdtData.lptzText, L"Ghbdtn? rfr ltkf&", MAX_SECONDLINE);
+ wcsncpy(pdtData.lpwzContactName, TranslateT(MODULENAME), MAX_CONTACTNAME);
+ wcsncpy(pdtData.lpwzText, L"Ghbdtn? rfr ltkf&", MAX_SECONDLINE);
switch(poOptionsTemp.bColourType) {
case PPC_POPUP:
@@ -382,7 +382,7 @@ INT_PTR CALLBACK DlgPopupsProcOptions(HWND hWnd, UINT uiMessage, WPARAM wParam,
pdtData.iSeconds = poOptionsTemp.bTimeout;
break;
}
- mir_wstrcpy(ptszPopupPreviewText, pdtData.lptzText);
+ mir_wstrcpy(ptszPopupPreviewText, pdtData.lpwzText);
pdtData.PluginData = ptszPopupPreviewText;
pdtData.lchIcon = hPopupIcon;
poOptions.paActions[0].lchIcon = hCopyIcon;
@@ -390,7 +390,7 @@ INT_PTR CALLBACK DlgPopupsProcOptions(HWND hWnd, UINT uiMessage, WPARAM wParam,
pdtData.actionCount = 1;
pdtData.PluginWindowProc = (WNDPROC)CKLPopupDlgProc;
- if ( CallService(MS_POPUP_ADDPOPUPT, (WPARAM) &pdtData, APF_NEWDATA) < 0)
+ if ( CallService(MS_POPUP_ADDPOPUPW, (WPARAM) &pdtData, APF_NEWDATA) < 0)
mir_free(ptszPopupPreviewText);
}
break;
diff --git a/plugins/ChangeKeyboardLayout/src/text_operations.cpp b/plugins/ChangeKeyboardLayout/src/text_operations.cpp
index 8136933674..ae0f47645f 100644
--- a/plugins/ChangeKeyboardLayout/src/text_operations.cpp
+++ b/plugins/ChangeKeyboardLayout/src/text_operations.cpp
@@ -448,10 +448,10 @@ int ChangeLayout(HWND hTextWnd, BYTE TextOperation, BOOL CurrentWord)
LPTSTR ptszPopupText = (LPTSTR)mir_alloc(MaxTextSize*sizeof(wchar_t));
mir_wstrcpy(ptszPopupText, ptszMBox);
- POPUPDATAT_V2 pdtData = { 0 };
+ POPUPDATAW_V2 pdtData = { 0 };
pdtData.cbSize = sizeof(pdtData);
- wcsncpy(pdtData.lptzContactName, TranslateT(MODULENAME), MAX_CONTACTNAME);
- wcsncpy(pdtData.lptzText, ptszPopupText, MAX_SECONDLINE);
+ wcsncpy(pdtData.lpwzContactName, TranslateT(MODULENAME), MAX_CONTACTNAME);
+ wcsncpy(pdtData.lpwzText, ptszPopupText, MAX_SECONDLINE);
switch (poOptions.bColourType) {
case PPC_POPUP:
@@ -486,7 +486,7 @@ int ChangeLayout(HWND hTextWnd, BYTE TextOperation, BOOL CurrentWord)
pdtData.lpActions = poOptions.paActions;
pdtData.actionCount = 1;
- if (CallService(MS_POPUP_ADDPOPUPT, (WPARAM)&pdtData, APF_NEWDATA) < 0) {
+ if (CallService(MS_POPUP_ADDPOPUPW, (WPARAM)&pdtData, APF_NEWDATA) < 0) {
mir_free(ptszPopupText);
MessageBox(nullptr, ptszMBox, TranslateT(MODULENAME), MB_ICONINFORMATION);
}