From 5b378496114ec47ffa27d3d9e7bc2a744d9e0a77 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 20 Nov 2012 13:36:00 +0000 Subject: - all xstatus services moved to m_xstatus.h - old obsoleted services PS_GETXSTATUS & PS_SETXSTATUS removed git-svn-id: http://svn.miranda-ng.org/main/trunk@2390 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/IcqOscarJ/src/icq_proto.cpp | 10 ++++---- protocols/IcqOscarJ/src/icq_proto.h | 2 -- protocols/IcqOscarJ/src/icq_xstatus.cpp | 36 ++++------------------------ protocols/IcqOscarJ/src/icqoscar.h | 1 + protocols/JabberG/src/jabber.h | 5 +--- protocols/JabberG/src/jabber_proto.cpp | 11 ++++----- protocols/JabberG/src/jabber_proto.h | 2 -- protocols/JabberG/src/jabber_xstatus.cpp | 38 ++--------------------------- protocols/MRA/src/Mra.h | 2 +- protocols/MRA/src/MraConstans.h | 9 ------- protocols/MRA/src/MraProto.cpp | 22 ++++++++--------- protocols/MRA/src/MraProto.h | 2 -- protocols/MRA/src/Mra_svcs.cpp | 41 ++++++++------------------------ 13 files changed, 38 insertions(+), 143 deletions(-) (limited to 'protocols') diff --git a/protocols/IcqOscarJ/src/icq_proto.cpp b/protocols/IcqOscarJ/src/icq_proto.cpp index 7f1276c628..652ecc6b57 100644 --- a/protocols/IcqOscarJ/src/icq_proto.cpp +++ b/protocols/IcqOscarJ/src/icq_proto.cpp @@ -147,13 +147,11 @@ cheekySearchId( -1 ) CreateProtoService(PS_GETMYAVATART, &CIcqProto::GetMyAvatar); CreateProtoService(PS_SETMYAVATART, &CIcqProto::SetMyAvatar); // Custom Status API - CreateProtoService(PS_ICQ_SETCUSTOMSTATUS, &CIcqProto::SetXStatus); - CreateProtoService(PS_ICQ_GETCUSTOMSTATUS, &CIcqProto::GetXStatus); - CreateProtoService(PS_ICQ_SETCUSTOMSTATUSEX, &CIcqProto::SetXStatusEx); - CreateProtoService(PS_ICQ_GETCUSTOMSTATUSEX, &CIcqProto::GetXStatusEx); - CreateProtoService(PS_ICQ_GETCUSTOMSTATUSICON, &CIcqProto::GetXStatusIcon); + CreateProtoService(PS_SETCUSTOMSTATUSEX, &CIcqProto::SetXStatusEx); + CreateProtoService(PS_GETCUSTOMSTATUSEX, &CIcqProto::GetXStatusEx); + CreateProtoService(PS_GETCUSTOMSTATUSICON, &CIcqProto::GetXStatusIcon); + CreateProtoService(PS_GETADVANCEDSTATUSICON, &CIcqProto::RequestAdvStatusIconIdx); CreateProtoService(PS_ICQ_REQUESTCUSTOMSTATUS, &CIcqProto::RequestXStatusDetails); - CreateProtoService(PS_ICQ_GETADVANCEDSTATUSICON, &CIcqProto::RequestAdvStatusIconIdx); CreateProtoService(MS_ICQ_ADDSERVCONTACT, &CIcqProto::AddServerContact); diff --git a/protocols/IcqOscarJ/src/icq_proto.h b/protocols/IcqOscarJ/src/icq_proto.h index a43c2bb36f..2c0d1a12ae 100644 --- a/protocols/IcqOscarJ/src/icq_proto.h +++ b/protocols/IcqOscarJ/src/icq_proto.h @@ -115,7 +115,6 @@ struct CIcqProto : public PROTO_INTERFACE, public MZeroedObject INT_PTR __cdecl GetAvatarInfo(WPARAM wParam, LPARAM lParam); INT_PTR __cdecl GetMyAvatar(WPARAM wParam, LPARAM lParam); INT_PTR __cdecl GetMyAwayMsg(WPARAM wParam, LPARAM lParam); - INT_PTR __cdecl GetXStatus(WPARAM wParam, LPARAM lParam); INT_PTR __cdecl GetXStatusEx(WPARAM wParam, LPARAM lParam); INT_PTR __cdecl GetXStatusIcon(WPARAM wParam, LPARAM lParam); INT_PTR __cdecl GrantAuthorization(WPARAM wParam, LPARAM lParam); @@ -130,7 +129,6 @@ struct CIcqProto : public PROTO_INTERFACE, public MZeroedObject INT_PTR __cdecl SetMyAvatar(WPARAM wParam, LPARAM lParam); INT_PTR __cdecl SetNickName(WPARAM wParam, LPARAM lParam); INT_PTR __cdecl SetPassword(WPARAM wParam, LPARAM lParam); - INT_PTR __cdecl SetXStatus(WPARAM wParam, LPARAM lParam); INT_PTR __cdecl SetXStatusEx(WPARAM wParam, LPARAM lParam); INT_PTR __cdecl ShowXStatusDetails(WPARAM wParam, LPARAM lParam); diff --git a/protocols/IcqOscarJ/src/icq_xstatus.cpp b/protocols/IcqOscarJ/src/icq_xstatus.cpp index 9802b1dee7..3c293eb48b 100644 --- a/protocols/IcqOscarJ/src/icq_xstatus.cpp +++ b/protocols/IcqOscarJ/src/icq_xstatus.cpp @@ -974,39 +974,13 @@ INT_PTR CIcqProto::ShowXStatusDetails(WPARAM wParam, LPARAM lParam) return 0; } -INT_PTR CIcqProto::SetXStatus(WPARAM wParam, LPARAM lParam) -{ - if (!m_bXStatusEnabled && !m_bMoodsEnabled) - return 0; - - if (wParam >= 0 && wParam <= XSTATUS_COUNT) { - setXStatusEx((BYTE)wParam, 1); - return wParam; - } - return 0; -} - -INT_PTR CIcqProto::GetXStatus(WPARAM wParam, LPARAM lParam) -{ - if (!m_bXStatusEnabled && !m_bMoodsEnabled) return 0; - - if (!icqOnline()) return 0; - - BYTE status = getContactXStatus(NULL); - - if (wParam) *((char**)wParam) = m_bXStatusEnabled ? DBSETTING_XSTATUS_NAME : NULL; - if (lParam) *((char**)lParam) = DBSETTING_XSTATUS_MSG; - - return status; -} - INT_PTR CIcqProto::SetXStatusEx(WPARAM wParam, LPARAM lParam) { - ICQ_CUSTOM_STATUS *pData = (ICQ_CUSTOM_STATUS*)lParam; + CUSTOM_STATUS *pData = (CUSTOM_STATUS*)lParam; if (!m_bXStatusEnabled && !m_bMoodsEnabled) return 1; - if (pData->cbSize < sizeof(ICQ_CUSTOM_STATUS)) return 1; // Failure + if (pData->cbSize < sizeof(CUSTOM_STATUS)) return 1; // Failure if (pData->flags & CSSF_MASK_STATUS) { // set custom status int status = *pData->status; @@ -1052,12 +1026,12 @@ INT_PTR CIcqProto::SetXStatusEx(WPARAM wParam, LPARAM lParam) INT_PTR CIcqProto::GetXStatusEx(WPARAM wParam, LPARAM lParam) { - ICQ_CUSTOM_STATUS *pData = (ICQ_CUSTOM_STATUS*)lParam; + CUSTOM_STATUS *pData = (CUSTOM_STATUS*)lParam; HANDLE hContact = (HANDLE)wParam; if (!m_bXStatusEnabled && !m_bMoodsEnabled) return 1; - if (pData->cbSize < sizeof(ICQ_CUSTOM_STATUS)) return 1; // Failure + if (pData->cbSize < sizeof(CUSTOM_STATUS)) return 1; // Failure // fill status member if (pData->flags & CSSF_MASK_STATUS) @@ -1066,7 +1040,7 @@ INT_PTR CIcqProto::GetXStatusEx(WPARAM wParam, LPARAM lParam) // fill status name member if (pData->flags & CSSF_MASK_NAME) { if (pData->flags & CSSF_DEFAULT_NAME) { - int status = *pData->wParam; + int status = (pData->wParam == NULL) ? getContactXStatus(hContact) : *pData->wParam; if (status < 1 || status > XSTATUS_COUNT) return 1; // Failure diff --git a/protocols/IcqOscarJ/src/icqoscar.h b/protocols/IcqOscarJ/src/icqoscar.h index ef0e32a6fd..92ed19550b 100644 --- a/protocols/IcqOscarJ/src/icqoscar.h +++ b/protocols/IcqOscarJ/src/icqoscar.h @@ -89,6 +89,7 @@ #include #include #include +#include #include // Project resources diff --git a/protocols/JabberG/src/jabber.h b/protocols/JabberG/src/jabber.h index 72fb6f12a6..f40352c2b4 100644 --- a/protocols/JabberG/src/jabber.h +++ b/protocols/JabberG/src/jabber.h @@ -77,6 +77,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include #include #include +#include #include #include @@ -246,10 +247,6 @@ enum { #define LR_BIGICON 0x40 #define JS_SENDXML "/SendXML" // Warning: This service is obsolete. Use IJabberNetInterface::SendXmlNode() instead. -#define JS_GETADVANCEDSTATUSICON "/GetAdvancedStatusIcon" -#define JS_GETCUSTOMSTATUSICON "/GetXStatusIcon" -#define JS_GETXSTATUS "/GetXStatus" -#define JS_SETXSTATUS "/SetXStatus" #define JS_HTTP_AUTH "/HttpAuthRequest" #define JS_INCOMING_NOTE_EVENT "/IncomingNoteEvent" diff --git a/protocols/JabberG/src/jabber_proto.cpp b/protocols/JabberG/src/jabber_proto.cpp index 12a870ec20..d74ca56df1 100644 --- a/protocols/JabberG/src/jabber_proto.cpp +++ b/protocols/JabberG/src/jabber_proto.cpp @@ -120,13 +120,11 @@ CJabberProto::CJabberProto(const char* aProtoName, const TCHAR *aUserName) : JCreateService(PS_JOINCHAT, &CJabberProto::OnJoinChat); JCreateService(PS_LEAVECHAT, &CJabberProto::OnLeaveChat); - JCreateService(JS_GETCUSTOMSTATUSICON, &CJabberProto::OnGetXStatusIcon); - JCreateService(JS_GETXSTATUS, &CJabberProto::OnGetXStatus); - JCreateService(JS_SETXSTATUS, &CJabberProto::OnSetXStatus); - JCreateService(JS_SETXSTATUSEX, &CJabberProto::OnSetXStatusEx); - // not needed anymore and therefore commented out - // JCreateService(JS_GETXSTATUSEX, &CJabberProto::OnGetXStatusEx); + // JCreateService(PS_GETXSTATUSEX, &CJabberProto::OnGetXStatusEx); + JCreateService(PS_SETCUSTOMSTATUSEX, &CJabberProto::OnSetXStatusEx); + JCreateService(PS_GETCUSTOMSTATUSICON, &CJabberProto::OnGetXStatusIcon); + JCreateService(PS_GETADVANCEDSTATUSICON, &CJabberProto::JGetAdvancedStatusIcon); JCreateService(JS_HTTP_AUTH, &CJabberProto::OnHttpAuthRequest); JCreateService(JS_INCOMING_NOTE_EVENT, &CJabberProto::OnIncomingNoteEvent); @@ -137,7 +135,6 @@ CJabberProto::CJabberProto(const char* aProtoName, const TCHAR *aUserName) : JCreateService(PS_SETMYAVATART, &CJabberProto::JabberSetAvatar); JCreateService(PS_SETMYNICKNAME, &CJabberProto::JabberSetNickname); - JCreateService(JS_GETADVANCEDSTATUSICON, &CJabberProto::JGetAdvancedStatusIcon); JCreateService(JS_DB_GETEVENTTEXT_CHATSTATES, &CJabberProto::OnGetEventTextChatStates); JCreateService(JS_DB_GETEVENTTEXT_PRESENCE, &CJabberProto::OnGetEventTextPresence); diff --git a/protocols/JabberG/src/jabber_proto.h b/protocols/JabberG/src/jabber_proto.h index 872f773864..5606a3bfd1 100644 --- a/protocols/JabberG/src/jabber_proto.h +++ b/protocols/JabberG/src/jabber_proto.h @@ -956,8 +956,6 @@ struct CJabberProto : public PROTO_INTERFACE, public MZeroedObject INT_PTR __cdecl OnSetListeningTo(WPARAM wParam, LPARAM lParams); INT_PTR __cdecl OnGetXStatusIcon(WPARAM wParam, LPARAM lParams); - INT_PTR __cdecl OnGetXStatus(WPARAM wParam, LPARAM lParams); - INT_PTR __cdecl OnSetXStatus(WPARAM wParam, LPARAM lParams); INT_PTR __cdecl OnSetXStatusEx(WPARAM wParam, LPARAM lParams); HICON GetXStatusIcon(int bStatus, UINT flags); diff --git a/protocols/JabberG/src/jabber_xstatus.cpp b/protocols/JabberG/src/jabber_xstatus.cpp index 4f6e625fcd..7a1d656cb7 100644 --- a/protocols/JabberG/src/jabber_xstatus.cpp +++ b/protocols/JabberG/src/jabber_xstatus.cpp @@ -1159,19 +1159,6 @@ HICON CJabberProto::GetXStatusIcon(int bStatus, UINT flags) return (flags & LR_SHARED) ? icon : CopyIcon(icon); } -///////////////////////////////////////////////////////////////////////////////////////// -// JabberGetXStatus - gets the extended status info (mood) - -INT_PTR __cdecl CJabberProto::OnGetXStatus(WPARAM wParam, LPARAM lParam) -{ - if ( !m_bJabberOnline || !m_bPepSupported) - return 0; - - if (wParam) *((char**)wParam) = DBSETTING_XSTATUSNAME; - if (lParam) *((char**)lParam) = DBSETTING_XSTATUSMSG; - return ((CPepMood *)m_pepServices.Find(_T(JABBER_FEAT_USER_MOOD)))->m_mode; -} - ///////////////////////////////////////////////////////////////////////////////////////// // JabberGetXStatusIcon - Retrieves specified custom status icon // wParam = (int)N // custom status id, 0 = my current custom status @@ -1366,35 +1353,14 @@ void CJabberProto::XStatusUninit() ///////////////////////////////////////////////////////////////////////////////////////// // JabberSetXStatus - sets the extended status info (mood) -INT_PTR __cdecl CJabberProto::OnSetXStatus(WPARAM wParam, LPARAM) -{ - if ( !m_bPepSupported || !m_bJabberOnline) - return 0; - - CPepMood *pepMood = (CPepMood *)m_pepServices.Find(_T(JABBER_FEAT_USER_MOOD)); - if ( !wParam) { - pepMood->m_mode = -1; - pepMood->Retract(); - return 0; - } - - if (wParam > 0 && wParam < SIZEOF(g_arrMoods)) { - pepMood->m_mode = wParam; - pepMood->LaunchSetGui(0); - return wParam; - } - - return 0; -} - INT_PTR __cdecl CJabberProto::OnSetXStatusEx(WPARAM wParam, LPARAM lParam) { - JABBER_CUSTOM_STATUS *pData = (JABBER_CUSTOM_STATUS*)lParam; + CUSTOM_STATUS *pData = (CUSTOM_STATUS*)lParam; if ( !m_bPepSupported || !m_bJabberOnline) return 1; - if (pData->cbSize < sizeof(JABBER_CUSTOM_STATUS)) return 1; // Failure + if (pData->cbSize < sizeof(CUSTOM_STATUS)) return 1; // Failure CPepMood *pepMood = (CPepMood *)m_pepServices.Find(_T(JABBER_FEAT_USER_MOOD)); diff --git a/protocols/MRA/src/Mra.h b/protocols/MRA/src/Mra.h index 38d02d62c1..bcd8a3817d 100644 --- a/protocols/MRA/src/Mra.h +++ b/protocols/MRA/src/Mra.h @@ -65,7 +65,7 @@ #include #include #include -#include +#include #include diff --git a/protocols/MRA/src/MraConstans.h b/protocols/MRA/src/MraConstans.h index d5e0ea5ebd..b0fbb07f26 100644 --- a/protocols/MRA/src/MraConstans.h +++ b/protocols/MRA/src/MraConstans.h @@ -251,15 +251,6 @@ static const LPSTR lpcszMailRuDomains[] = #define DBSETTING_BLOGSTATUS "BlogStatus" #define DBSETTING_BLOGSTATUSMUSIC "ListeningTo" -#define CSSF_MASK_STATUS 0x0001 // status member valid for set/get -#define CSSF_MASK_NAME 0x0002 // pszName member valid for set/get -#define CSSF_MASK_MESSAGE 0x0004 // pszMessage member valid for set/get -#define CSSF_DISABLE_UI 0x0040 // disable default custom status UI, wParam = bEnable -#define CSSF_DEFAULT_NAME 0x0080 // only with CSSF_MASK_NAME and get API to get default custom status name (wParam = status) -#define CSSF_STATUSES_COUNT 0x0100 // returns number of custom statuses in wParam, only get API -#define CSSF_STR_SIZES 0x0200 // returns sizes of custom status name & message (wParam & lParam members) in chars -#define CSSF_UNICODE 0x1000 // strings are in UCS-2 - extern const LPSTR lpcszStatusUri[]; extern const LPWSTR lpcszXStatusNameDef[]; diff --git a/protocols/MRA/src/MraProto.cpp b/protocols/MRA/src/MraProto.cpp index 4d98c17a49..05a592fa25 100644 --- a/protocols/MRA/src/MraProto.cpp +++ b/protocols/MRA/src/MraProto.cpp @@ -21,21 +21,19 @@ CMraProto::CMraProto(const char* _module, const TCHAR* _displayName) : MraMPopSessionQueueInitialize(&hMPopSessionQueue); MraAvatarsQueueInitialize(&hAvatarsQueueHandle); - CreateObjectSvc(PS_ICQ_SETCUSTOMSTATUS, &CMraProto::MraSetXStatus); - CreateObjectSvc(PS_ICQ_SETCUSTOMSTATUSEX, &CMraProto::MraSetXStatusEx); - CreateObjectSvc(PS_ICQ_GETCUSTOMSTATUS, &CMraProto::MraGetXStatus); - CreateObjectSvc(PS_ICQ_GETCUSTOMSTATUSEX, &CMraProto::MraGetXStatusEx); - CreateObjectSvc(PS_ICQ_GETCUSTOMSTATUSICON, &CMraProto::MraGetXStatusIcon); + CreateObjectSvc(PS_SETCUSTOMSTATUSEX, &CMraProto::MraSetXStatusEx); + CreateObjectSvc(PS_GETCUSTOMSTATUSEX, &CMraProto::MraGetXStatusEx); + CreateObjectSvc(PS_GETCUSTOMSTATUSICON, &CMraProto::MraGetXStatusIcon); - CreateObjectSvc(PS_SET_LISTENINGTO, &CMraProto::MraSetListeningTo); + CreateObjectSvc(PS_SET_LISTENINGTO, &CMraProto::MraSetListeningTo); - CreateObjectSvc(PS_CREATEACCMGRUI, &CMraProto::MraCreateAccMgrUI); - CreateObjectSvc(PS_GETAVATARCAPS, &CMraProto::MraGetAvatarCaps); - CreateObjectSvc(PS_GETAVATARINFOT, &CMraProto::MraGetAvatarInfo); - CreateObjectSvc(PS_GETMYAVATART, &CMraProto::MraGetMyAvatar); + CreateObjectSvc(PS_CREATEACCMGRUI, &CMraProto::MraCreateAccMgrUI); + CreateObjectSvc(PS_GETAVATARCAPS, &CMraProto::MraGetAvatarCaps); + CreateObjectSvc(PS_GETAVATARINFOT, &CMraProto::MraGetAvatarInfo); + CreateObjectSvc(PS_GETMYAVATART, &CMraProto::MraGetMyAvatar); - CreateObjectSvc(MS_ICQ_SENDSMS, &CMraProto::MraSendSMS); - CreateObjectSvc(MRA_SEND_NUDGE, &CMraProto::MraSendNudge); + CreateObjectSvc(MS_ICQ_SENDSMS, &CMraProto::MraSendSMS); + CreateObjectSvc(MRA_SEND_NUDGE, &CMraProto::MraSendNudge); if ( ServiceExists(MS_NUDGE_SEND)) heNudgeReceived = CreateHookableEvent(MS_NUDGE); diff --git a/protocols/MRA/src/MraProto.h b/protocols/MRA/src/MraProto.h index fca74708d9..4555f28463 100644 --- a/protocols/MRA/src/MraProto.h +++ b/protocols/MRA/src/MraProto.h @@ -146,9 +146,7 @@ struct CMraProto : public PROTO_INTERFACE, public MZeroedObject return DB_GetContactSettingBlob(hContact, m_szModuleName, lpszValueName, lpbRet, dwRetBuffSize, pdwRetBuffSize); } // ====| Services |==================================================================== - INT_PTR __cdecl MraSetXStatus(WPARAM, LPARAM); INT_PTR __cdecl MraSetXStatusEx(WPARAM, LPARAM); - INT_PTR __cdecl MraGetXStatus(WPARAM, LPARAM); INT_PTR __cdecl MraGetXStatusEx(WPARAM, LPARAM); INT_PTR __cdecl MraGetXStatusIcon(WPARAM, LPARAM); INT_PTR __cdecl MraXStatusMenu(WPARAM, LPARAM, LPARAM param); diff --git a/protocols/MRA/src/Mra_svcs.cpp b/protocols/MRA/src/Mra_svcs.cpp index d61098201a..a845a88d89 100644 --- a/protocols/MRA/src/Mra_svcs.cpp +++ b/protocols/MRA/src/Mra_svcs.cpp @@ -794,24 +794,13 @@ DWORD CMraProto::MraSetXStatusInternal(DWORD dwXStatus) return dwOldStatusMode; } -// obsolete (TODO: remove in next version) -INT_PTR CMraProto::MraSetXStatus(WPARAM wParam, LPARAM lParam) -{ - INT_PTR iRet = 0; - if ( IsXStatusValid(wParam) || wParam == MRA_MIR_XSTATUS_NONE) { - MraSetXStatusInternal(wParam); - iRet = wParam; - } - return iRet; -} - INT_PTR CMraProto::MraSetXStatusEx(WPARAM wParam, LPARAM lParam) { INT_PTR iRet = 1; DWORD dwXStatus; - ICQ_CUSTOM_STATUS *pData = (ICQ_CUSTOM_STATUS*)lParam; + CUSTOM_STATUS *pData = (CUSTOM_STATUS*)lParam; - if (pData->cbSize >= sizeof(ICQ_CUSTOM_STATUS)) { + if (pData->cbSize >= sizeof(CUSTOM_STATUS)) { iRet = 0; if (pData->flags & CSSF_MASK_STATUS) { @@ -884,24 +873,13 @@ INT_PTR CMraProto::MraSetXStatusEx(WPARAM wParam, LPARAM lParam) return iRet; } -INT_PTR CMraProto::MraGetXStatus(WPARAM wParam, LPARAM lParam) -{ - if (m_bLoggedIn) { - if (wParam) *((CHAR**)wParam) = DBSETTING_XSTATUSNAME; - if (lParam) *((CHAR**)lParam) = DBSETTING_XSTATUSMSG; - return m_iXStatus; - } - - return 0; -} - INT_PTR CMraProto::MraGetXStatusEx(WPARAM wParam, LPARAM lParam) { INT_PTR iRet = 1; HANDLE hContact = (HANDLE)wParam; - ICQ_CUSTOM_STATUS *pData = (ICQ_CUSTOM_STATUS*)lParam; + CUSTOM_STATUS *pData = (CUSTOM_STATUS*)lParam; - if (pData->cbSize >= sizeof(ICQ_CUSTOM_STATUS)) { + if (pData->cbSize >= sizeof(CUSTOM_STATUS)) { DWORD dwXStatus; iRet = 0; @@ -913,11 +891,10 @@ INT_PTR CMraProto::MraGetXStatusEx(WPARAM wParam, LPARAM lParam) // fill status name member if (pData->flags & CSSF_MASK_NAME) { if (pData->flags & CSSF_DEFAULT_NAME) { - dwXStatus = (*pData->wParam); + dwXStatus = (pData->wParam == NULL) ? m_iXStatus : *pData->wParam; if ( IsXStatusValid(dwXStatus)) { - if (pData->flags & CSSF_UNICODE) { + if (pData->flags & CSSF_UNICODE) lstrcpynW(pData->pwszName, lpcszXStatusNameDef[dwXStatus], (STATUS_TITLE_MAX+1)); - } else { size_t dwStatusTitleSize = lstrlenW( lpcszXStatusNameDef[dwXStatus] ); if (dwStatusTitleSize>STATUS_TITLE_MAX) dwStatusTitleSize = STATUS_TITLE_MAX; @@ -938,10 +915,12 @@ INT_PTR CMraProto::MraGetXStatusEx(WPARAM wParam, LPARAM lParam) // fill status message member if (pData->flags & CSSF_MASK_MESSAGE) { + char szSetting[100]; + mir_snprintf(szSetting, SIZEOF(szSetting), "XStatus%dMsg", m_iXStatus); if (pData->flags & CSSF_UNICODE) - mraGetStaticStringW(hContact, DBSETTING_XSTATUSMSG, pData->pwszMessage, (STATUS_DESC_MAX+1), NULL); + mraGetStaticStringW(hContact, szSetting, pData->pwszMessage, (STATUS_DESC_MAX+1), NULL); else - mraGetStaticStringA(hContact, DBSETTING_XSTATUSMSG, pData->pszMessage, (STATUS_DESC_MAX+1), NULL); + mraGetStaticStringA(hContact, szSetting, pData->pszMessage, (STATUS_DESC_MAX+1), NULL); } if (pData->flags & CSSF_DISABLE_UI) -- cgit v1.2.3