summaryrefslogtreecommitdiff
path: root/protocols/JabberG/src/jabber_xstatus.cpp
diff options
context:
space:
mode:
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)