diff options
Diffstat (limited to 'plugins/CyrTranslit')
-rw-r--r-- | plugins/CyrTranslit/src/TransliterationProtocol.cpp | 22 | ||||
-rw-r--r-- | plugins/CyrTranslit/src/TransliterationProtocol.h | 3 |
2 files changed, 3 insertions, 22 deletions
diff --git a/plugins/CyrTranslit/src/TransliterationProtocol.cpp b/plugins/CyrTranslit/src/TransliterationProtocol.cpp index ecb650571f..dc75e17dbf 100644 --- a/plugins/CyrTranslit/src/TransliterationProtocol.cpp +++ b/plugins/CyrTranslit/src/TransliterationProtocol.cpp @@ -33,8 +33,7 @@ void TransliterationProtocol::initialize() pd.type = PROTOTYPE_TRANSLATION;
CallService(MS_PROTO_REGISTERMODULE, 0, reinterpret_cast<LPARAM>(&pd));
- CreateProtoServiceFunction(MODULE_NAME, PSS_MESSAGE, sendMessageA);
- CreateProtoServiceFunction(MODULE_NAME, PSS_MESSAGE"W", sendMessageW);
+ CreateProtoServiceFunction(MODULE_NAME, PSS_MESSAGE, sendMessage);
}
//------------------------------------------------------------------------------
@@ -90,26 +89,9 @@ void TransliterationProtocol::TranslateMessageA(WPARAM wParam, LPARAM lParam) strcpy(reinterpret_cast<char*>(ccs->lParam), txt.c_str());
}
-INT_PTR TransliterationProtocol::sendMessageW(WPARAM wParam, LPARAM lParam)
-{
- CCSDATA *ccs = reinterpret_cast<CCSDATA*>(lParam);
- if ( !MirandaContact::bIsActive(ccs->hContact))
- return CallService(MS_PROTO_CHAINSEND, wParam, lParam);
-
- LPARAM oldlParam = ccs->lParam;
-
- TranslateMessageW(wParam, lParam);
-
- int ret = CallService(MS_PROTO_CHAINSEND /* "W" */, wParam, lParam);
-
- mir_free(reinterpret_cast<void*>(ccs->lParam));
- ccs->lParam = oldlParam;
-
- return ret;
-}
//------------------------------------------------------------------------------
-INT_PTR TransliterationProtocol::sendMessageA(WPARAM wParam, LPARAM lParam)
+INT_PTR TransliterationProtocol::sendMessage(WPARAM wParam, LPARAM lParam)
{
CCSDATA *ccs = reinterpret_cast<CCSDATA*>(lParam);
if ( !MirandaContact::bIsActive(ccs->hContact))
diff --git a/plugins/CyrTranslit/src/TransliterationProtocol.h b/plugins/CyrTranslit/src/TransliterationProtocol.h index 30c890d971..2f746a64b8 100644 --- a/plugins/CyrTranslit/src/TransliterationProtocol.h +++ b/plugins/CyrTranslit/src/TransliterationProtocol.h @@ -44,8 +44,7 @@ public: * @param lParam (LPARAM)(const char*)szMessage
* @return a hProcess corresponding to the one in the ack event.
*/
- static INT_PTR sendMessageA(WPARAM wParam, LPARAM lParam);
- static INT_PTR sendMessageW(WPARAM wParam, LPARAM lParam);
+ static INT_PTR sendMessage(WPARAM wParam, LPARAM lParam);
static void TranslateMessageA(WPARAM wParam, LPARAM lParam);
static void TranslateMessageW(WPARAM wParam, LPARAM lParam);
|