summaryrefslogtreecommitdiff
path: root/protocols/JabberG/src/jabber_xstatus.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2015-06-22 20:38:56 +0000
committerGeorge Hazan <george.hazan@gmail.com>2015-06-22 20:38:56 +0000
commit88790eed4ffd9ca555c8f9b73cb014a93b57a34f (patch)
treeb3e5bfe096005a9cac4bc14fdfbe5f6f5acad98a /protocols/JabberG/src/jabber_xstatus.cpp
parent9ecc2aa50e2183e2c4a11861ca6dede7d2151139 (diff)
Menu_ModifyItem unbound from CLISTMENUITEM structure
git-svn-id: http://svn.miranda-ng.org/main/trunk@14334 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/JabberG/src/jabber_xstatus.cpp')
-rw-r--r--protocols/JabberG/src/jabber_xstatus.cpp12
1 files changed, 3 insertions, 9 deletions
diff --git a/protocols/JabberG/src/jabber_xstatus.cpp b/protocols/JabberG/src/jabber_xstatus.cpp
index 3ae7a9bcea..bd78e108c4 100644
--- a/protocols/JabberG/src/jabber_xstatus.cpp
+++ b/protocols/JabberG/src/jabber_xstatus.cpp
@@ -489,16 +489,10 @@ bool CPepGuiService::LaunchSetGui(BYTE bQuiet)
void CPepGuiService::UpdateMenuItem(HANDLE hIcolibIcon, TCHAR *text)
{
m_hIcolibItem = hIcolibIcon;
- if (m_szText) mir_free(m_szText);
- m_szText = text ? mir_tstrdup(text) : NULL;
-
- if (!m_hMenuItem) return;
+ replaceStrT(m_szText, text);
- CLISTMENUITEM mi = { 0 };
- mi.flags = CMIF_TCHAR | CMIM_ICON | CMIM_NAME;
- mi.icolibItem = m_hIcolibItem;
- mi.ptszName = m_szText ? m_szText : _T("<advanced status slot>");
- Menu_ModifyItem(m_hMenuItem, &mi);
+ if (m_hMenuItem)
+ Menu_ModifyItem(m_hMenuItem, m_szText ? m_szText : _T("<advanced status slot>"), m_hIcolibItem);
}
int CPepGuiService::OnMenuItemClick(WPARAM, LPARAM)