From 581844d52f2b91a45240a1e7bf7cd95cc93b0837 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 9 Nov 2015 09:19:38 +0000 Subject: fix for the frame processing in Jabber git-svn-id: http://svn.miranda-ng.org/main/trunk@15702 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/JabberG/src/jabber_xstatus.cpp | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) (limited to 'protocols/JabberG/src/jabber_xstatus.cpp') diff --git a/protocols/JabberG/src/jabber_xstatus.cpp b/protocols/JabberG/src/jabber_xstatus.cpp index 42d77dd05c..089ce677d6 100644 --- a/protocols/JabberG/src/jabber_xstatus.cpp +++ b/protocols/JabberG/src/jabber_xstatus.cpp @@ -690,21 +690,20 @@ void CPepMood::SetMood(MCONTACT hContact, const TCHAR *szMood, const TCHAR *szTe m_mode = mood; replaceStrT(m_text, szText); - HANDLE hIcon = (mood >= 0) ? g_MoodIcons.GetIcolibHandle(g_arrMoods[mood].szTag) : Skin_GetIconHandle(SKINICON_OTHER_SMALLDOT); + HANDLE hIcon; TCHAR title[128]; - - if (m_proto->m_pInfoFrame) { - if (mood >= 0) { - mir_sntprintf(title, TranslateT("Mood: %s"), TranslateTS(g_arrMoods[mood].szName)); - m_proto->m_pInfoFrame->UpdateInfoItem("$/PEP/mood", g_MoodIcons.GetIcolibHandle(g_arrMoods[mood].szTag), TranslateTS(g_arrMoods[mood].szName)); - } - else { - mir_tstrcpy(title, LPGENT("Set mood...")); - m_proto->m_pInfoFrame->UpdateInfoItem("$/PEP/mood", Skin_GetIconHandle(SKINICON_OTHER_SMALLDOT), TranslateT("Set mood...")); - } + if (mood >= 0) { + mir_sntprintf(title, TranslateT("Mood: %s"), TranslateTS(g_arrMoods[mood].szName)); + hIcon = g_MoodIcons.GetIcolibHandle(g_arrMoods[mood].szTag); + } + else { + mir_tstrcpy(title, TranslateT("Set mood...")); + hIcon = Skin_GetIconHandle(SKINICON_OTHER_SMALLDOT); } UpdateMenuItem(hIcon, title); + if (m_proto->m_pInfoFrame) + m_proto->m_pInfoFrame->UpdateInfoItem("$/PEP/mood", hIcon, title); } else SetExtraIcon(hContact, mood < 0 ? NULL : g_arrMoods[mood].szTag); -- cgit v1.2.3