diff options
author | Kirill Volinsky <mataes2007@gmail.com> | 2012-10-22 20:25:43 +0000 |
---|---|---|
committer | Kirill Volinsky <mataes2007@gmail.com> | 2012-10-22 20:25:43 +0000 |
commit | 6059a59c2774daeb1747a9108ae2d8f1bd1d97ef (patch) | |
tree | 2c19ada67b7dd8d8c08e3119bd0b83bb008ff252 /protocols/Skype/src/skype_contacts.cpp | |
parent | 1b3eb999850503df29c166127a9f17511976ee1a (diff) |
fixed users country info
git-svn-id: http://svn.miranda-ng.org/main/trunk@2053 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Skype/src/skype_contacts.cpp')
-rw-r--r-- | protocols/Skype/src/skype_contacts.cpp | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/protocols/Skype/src/skype_contacts.cpp b/protocols/Skype/src/skype_contacts.cpp index 6e29158e95..d825c85546 100644 --- a/protocols/Skype/src/skype_contacts.cpp +++ b/protocols/Skype/src/skype_contacts.cpp @@ -72,7 +72,7 @@ void CSkypeProto::UpdateContactBirthday(HANDLE hContact, CContact::Ref contact) contact->GetPropBirthday(data);
TCHAR date[9];
_itot_s(data, date, 10);
- if (date > 0)
+ if (data > 0)
{
INT day, month, year;
_stscanf(date, _T("%04d%02d%02d"), &year, &month, &day);
@@ -104,10 +104,20 @@ void CSkypeProto::UpdateContactCountry(HANDLE hContact, CContact::Ref contact) {
// country (en, ru, etc)
SEString data;
+ char* country;
contact->GetPropCountry(data);
- // todo: write me
- //BYTE countryId = this->GetCountryIdByName((const char*)sData);
- //this->SetSettingByte(hContact, "Country", countryId);
+ char* isocode = ::mir_utf8decodeA((const char*)data);
+ if (strcmp(isocode, "") == 0)
+ {
+ country = (char*)CallService(MS_UTILS_GETCOUNTRYBYNUMBER, 0xFFFF, 0);
+ this->SetSettingString(hContact, "Country", _A2T(country));
+ }
+ else
+ {
+ country = (char*)CallService(MS_UTILS_GETCOUNTRYBYISOCODE, (WPARAM)isocode, 0);
+ this->SetSettingString(hContact, "Country", _A2T(country));
+ }
+ ::mir_free(isocode);
}
void CSkypeProto::UpdateContactEmails(HANDLE hContact, CContact::Ref contact)
|