diff options
author | Alexander Lantsev <aunsane@gmail.com> | 2013-04-27 09:49:47 +0000 |
---|---|---|
committer | Alexander Lantsev <aunsane@gmail.com> | 2013-04-27 09:49:47 +0000 |
commit | c7fa62a343fe1e5937602c216ec5d7e597462768 (patch) | |
tree | 9523b43b24459fcb89d42adf190aee7636f17802 /protocols/Skype/src/skype_profile.cpp | |
parent | 5aadfaa9bcaa25825e33f75f49f713a43670d925 (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_profile.cpp')
-rw-r--r-- | protocols/Skype/src/skype_profile.cpp | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/protocols/Skype/src/skype_profile.cpp b/protocols/Skype/src/skype_profile.cpp index 4d7af22d45..bbe9eb4a87 100644 --- a/protocols/Skype/src/skype_profile.cpp +++ b/protocols/Skype/src/skype_profile.cpp @@ -1,7 +1,7 @@ #include "skype_proto.h"
SettingItem CSkypeProto::setting[] = {
- {LPGENT("Full name"), "Nick", DBVT_WCHAR, LI_STRING},
+ {LPGENT("Nick"), "Nick", DBVT_WCHAR, LI_STRING},
{LPGENT("Mood"), "XStatusMsg", DBVT_WCHAR, LI_STRING},
{LPGENT("Mobile phone"), "Cellular", DBVT_WCHAR, LI_NUMBER},
@@ -263,14 +263,6 @@ void CSkypeProto::UpdateProfileMobilePhone(SEObject *obj, HANDLE hContact) ::mir_free(phone);
}
-void CSkypeProto::UpdateProfileNickName(SEObject *obj, HANDLE hContact)
-{
- wchar_t *nick = ::mir_utf8decodeW(obj->GetStrProp(/* *::P_DISPLAYNAME */ 21));
- if (::wcslen(nick))
- ::db_set_ws(hContact, this->m_szModuleName, "Nick", nick);
- ::mir_free(nick);
-}
-
void CSkypeProto::UpdateProfilePhone(SEObject *obj, HANDLE hContact)
{
wchar_t* phone = ::mir_a2u(obj->GetStrProp(/* *::P_PHONE_HOME */ 13));
@@ -366,6 +358,7 @@ void CSkypeProto::UpdateProfile(SEObject *obj, HANDLE hContact) if (hContact)
{
+ this->UpdateContactNickName(obj, hContact);
this->UpdateContactOnlineSinceTime(obj, hContact);
this->UpdateContactLastEventDate(obj, hContact);
@@ -379,9 +372,14 @@ void CSkypeProto::UpdateProfile(SEObject *obj, HANDLE hContact) void __cdecl CSkypeProto::LoadOwnInfo(void*)
{
wchar_t *nick = ::db_get_wsa(NULL, this->m_szModuleName, "Nick");
- if (!nick || !::wcslen(nick))
+ if ( !nick || !::wcslen(nick))
{
- ::db_set_ws(NULL, this->m_szModuleName, "Nick", this->login);
+ SEString data;
+ this->account->GetPropFullname(data);
+
+ mir_ptr<wchar_t> nick = ::mir_utf8decodeW(data);
+ ::db_set_ws(NULL, this->m_szModuleName, "Nick", nick);
}
+
this->UpdateProfile(this->account.fetch());
}
\ No newline at end of file |