summaryrefslogtreecommitdiff
path: root/protocols/Skype/src/skype_contacts.cpp
diff options
context:
space:
mode:
authorAlexander Lantsev <aunsane@gmail.com>2013-04-27 09:49:47 +0000
committerAlexander Lantsev <aunsane@gmail.com>2013-04-27 09:49:47 +0000
commitc7fa62a343fe1e5937602c216ec5d7e597462768 (patch)
tree9523b43b24459fcb89d42adf190aee7636f17802 /protocols/Skype/src/skype_contacts.cpp
parent5aadfaa9bcaa25825e33f75f49f713a43670d925 (diff)
- fixed rtl in incoming messages
- fixed contacts nick loading git-svn-id: http://svn.miranda-ng.org/main/trunk@4550 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Skype/src/skype_contacts.cpp')
-rw-r--r--protocols/Skype/src/skype_contacts.cpp22
1 files changed, 21 insertions, 1 deletions
diff --git a/protocols/Skype/src/skype_contacts.cpp b/protocols/Skype/src/skype_contacts.cpp
index 11f36f8c43..0f805c2326 100644
--- a/protocols/Skype/src/skype_contacts.cpp
+++ b/protocols/Skype/src/skype_contacts.cpp
@@ -44,6 +44,17 @@ void CSkypeProto::UpdateContactStatus(HANDLE hContact, CContact::Ref contact)
}
}
+void CSkypeProto::UpdateContactNickName(SEObject *obj, HANDLE hContact)
+{
+ // todo: P_DISPLAYNAME = 21 is unworked
+ wchar_t *nick = ::mir_utf8decodeW(obj->GetStrProp(/* *::P_FULLNAME */ 5));
+ if ( !::wcslen(nick))
+ ::db_unset(hContact, this->m_szModuleName, "Nick");
+ else
+ ::db_set_ws(hContact, this->m_szModuleName, "Nick", nick);
+ ::mir_free(nick);
+}
+
void CSkypeProto::UpdateContactOnlineSinceTime(SEObject *obj, HANDLE hContact)
{
uint newTS = obj->GetUintProp(/* CContact::P_LASTONLINE_TIMESTAMP */35);
@@ -267,7 +278,16 @@ void __cdecl CSkypeProto::LoadContactList(void* data)
this->UpdateContactAuthState(hContact, contact);
this->UpdateContactStatus(hContact, contact);
- this->UpdateProfileNickName(contact.fetch(), hContact);
+ wchar_t *nick = ::db_get_wsa(hContact, "CList", "MyHandle");
+ if ( !nick || !::wcslen(nick))
+ {
+ SEString data;
+ contact->GetPropFullname(data);
+
+ mir_ptr<wchar_t> nick = ::mir_utf8decodeW(data);
+ ::db_set_ws(hContact, "CList", "MyHandle", nick);
+ }
+
this->UpdateProfile(contact.fetch(), hContact);
}
}