summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-02-23 19:24:04 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-02-23 19:24:04 +0000
commita4bd1d2df4f0599c56b4ce1f0f06a8f7e62331a0 (patch)
treedf8ec4f7ce4979c14642f65743750f777293f226
parent67960e0354247c38f995606d3098614fc9bd46d3 (diff)
- strong menu items prototypes in NAS;
- memory corruption issue fixed git-svn-id: http://svn.miranda-ng.org/main/trunk@8234 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r--plugins/NewAwaySysMod/src/AwaySys.cpp6
-rw-r--r--plugins/NewAwaySysMod/src/Services.cpp6
2 files changed, 5 insertions, 7 deletions
diff --git a/plugins/NewAwaySysMod/src/AwaySys.cpp b/plugins/NewAwaySysMod/src/AwaySys.cpp
index d3cac85120..77463950e8 100644
--- a/plugins/NewAwaySysMod/src/AwaySys.cpp
+++ b/plugins/NewAwaySysMod/src/AwaySys.cpp
@@ -50,8 +50,8 @@ CLIST_INTERFACE *pcli;
int hLangpack;
HANDLE g_hContactMenuItem, g_hReadStatMenuItem, g_hTopToolbarbutton;
-HANDLE g_hToggleSOEMenuItem, g_hToggleSOEContactMenuItem;
-HANDLE g_hAutoreplyOnContactMenuItem, g_hAutoreplyOffContactMenuItem, g_hAutoreplyUseDefaultContactMenuItem;
+HGENMENU g_hToggleSOEMenuItem, g_hToggleSOEContactMenuItem;
+HGENMENU g_hAutoreplyOnContactMenuItem, g_hAutoreplyOffContactMenuItem, g_hAutoreplyUseDefaultContactMenuItem;
bool g_fNoProcessing = false; // tells the status change proc not to do anything
int g_bIsIdle = false;
HANDLE hMainThread;
@@ -783,7 +783,7 @@ int MirandaLoaded(WPARAM wParam, LPARAM lParam)
g_hToggleSOEContactMenuItem = Menu_AddContactMenuItem(&mi);
mi.flags = CMIF_TCHAR | CMIF_CHILDPOPUP;
- mi.pszPopupName = (char*)g_hToggleSOEContactMenuItem;
+ mi.hParentMenu = g_hToggleSOEContactMenuItem;
mi.popupPosition = 1000020000;
mi.position = 1000020000;
diff --git a/plugins/NewAwaySysMod/src/Services.cpp b/plugins/NewAwaySysMod/src/Services.cpp
index 44aa93e633..b98f2cf605 100644
--- a/plugins/NewAwaySysMod/src/Services.cpp
+++ b/plugins/NewAwaySysMod/src/Services.cpp
@@ -96,12 +96,10 @@ int GetState(WPARAM wParam, LPARAM lParam, int Widechar)
if ((pi->status >= ID_STATUS_ONLINE && pi->status <= ID_STATUS_OUTTOLUNCH) || !pi->status) {
TCString Msg(pi->status ? CProtoSettings(pi->szProto, pi->status).GetMsgFormat(GMF_LASTORDEFAULT) : CProtoSettings(pi->szProto).GetMsgFormat(((Flags & PIF_NOTTEMPORARY) ? 0 : GMF_TEMPORARY) | GMF_PERSONAL));
if (Msg != NULL) {
- pi->szMsg = (char*)mir_alloc(Msg.GetLen() + 1);
- _ASSERT(pi->szMsg);
if (Widechar)
- lstrcpyW(pi->wszMsg, Msg);
+ pi->tszMsg = mir_tstrdup(Msg);
else
- lstrcpyA(pi->szMsg, _T2A(Msg));
+ pi->szMsg = mir_strdup(_T2A(Msg));
}
else pi->szMsg = NULL;