diff options
author | Vadim Dashevskiy <watcherhd@gmail.com> | 2012-06-15 18:52:16 +0000 |
---|---|---|
committer | Vadim Dashevskiy <watcherhd@gmail.com> | 2012-06-15 18:52:16 +0000 |
commit | 58973a21a30bf95427fd43c456e41e35c386218c (patch) | |
tree | 1413fba069ecd351b2c99fa5a53e52c68d8a662c /plugins/Nudge/main.cpp | |
parent | 55b5cf8a5506f03350e5c80ac86f5717425e4d10 (diff) |
another portion of "#ifsef Unicode" removal
git-svn-id: http://svn.miranda-ng.org/main/trunk@434 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Nudge/main.cpp')
-rw-r--r-- | plugins/Nudge/main.cpp | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/plugins/Nudge/main.cpp b/plugins/Nudge/main.cpp index 5500451eff..ca8e18857e 100644 --- a/plugins/Nudge/main.cpp +++ b/plugins/Nudge/main.cpp @@ -14,9 +14,9 @@ CShake shake; CNudge GlobalNudge;
MM_INTERFACE mmi;
-#ifdef UNICODE
+
UTF8_INTERFACE utfi;
-#endif
+
int hLangpack = 0;
@@ -512,13 +512,13 @@ extern "C" int __declspec(dllexport) Load(PLUGINLINK *link) MessageBox(NULL,_T("Cannot retrieve Miranda Memory Manager Interface.\nYou need to update Miranda IM to the latest version."),_T("Nudge Plugin"),MB_OK);
return 1;
}
-#ifdef UNICODE
+
if(mir_getUTFI(&utfi))
{
MessageBox(NULL,_T("Cannot retrieve Miranda UTF8 Interface.\nYou need to update Miranda IM to the latest version."),_T("Nudge Plugin"),MB_OK);
return 1;
}
-#endif
+
mir_getLP(&pluginInfo);
g_hEventModulesLoaded = HookEvent(ME_SYSTEM_MODULESLOADED,ModulesLoaded);
@@ -696,13 +696,10 @@ void Nudge_SentStatus(CNudgeElement n, HANDLE hContact) NudgeEvent.cbSize = sizeof(NudgeEvent);
NudgeEvent.szModule = (char*)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0);
-#ifdef _UNICODE
+
char *buff = mir_utf8encodeT(n.senText);
NudgeEvent.flags = DBEF_SENT | DBEF_UTF;
-#else
- char *buff = mir_strdup(n.senText);
- NudgeEvent.flags = DBEF_SENT;
-#endif
+
NudgeEvent.timestamp = ( DWORD )time(NULL);
NudgeEvent.eventType = EVENTTYPE_STATUSCHANGE;
NudgeEvent.cbBlob = (DWORD)strlen(buff) + 1;
@@ -726,13 +723,10 @@ void Nudge_ShowStatus(CNudgeElement n, HANDLE hContact, DWORD timestamp) NudgeEvent.cbSize = sizeof(NudgeEvent);
NudgeEvent.szModule = (char*)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0);
-#ifdef _UNICODE
+
char *buff = mir_utf8encodeT(n.recText);
NudgeEvent.flags = DBEF_UTF;
-#else
- char *buff = mir_strdup(n.recText);
- NudgeEvent.flags = 0;
-#endif
+
NudgeEvent.timestamp = timestamp;
NudgeEvent.eventType = EVENTTYPE_STATUSCHANGE;
NudgeEvent.cbBlob = (DWORD)strlen(buff) + 1;
|