diff options
author | Kirill Volinsky <mataes2007@gmail.com> | 2012-10-23 06:29:09 +0000 |
---|---|---|
committer | Kirill Volinsky <mataes2007@gmail.com> | 2012-10-23 06:29:09 +0000 |
commit | 0e13cbe768de6de5cc4dccf5fab7fcd9f51a4b2e (patch) | |
tree | 58b585085d595d63569493dad09733b1eb6b84f9 /protocols/Skype | |
parent | c836f9498c19a8446150c240c222760aea5a70d4 (diff) |
added users languges support. not tested
git-svn-id: http://svn.miranda-ng.org/main/trunk@2059 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Skype')
-rw-r--r-- | protocols/Skype/res/Resource.rc | 3 | ||||
-rw-r--r-- | protocols/Skype/src/skype_contacts.cpp | 239 | ||||
-rw-r--r-- | protocols/Skype/src/skype_proto.h | 5 |
3 files changed, 245 insertions, 2 deletions
diff --git a/protocols/Skype/res/Resource.rc b/protocols/Skype/res/Resource.rc index c2a5433c89..24bf49d7e3 100644 --- a/protocols/Skype/res/Resource.rc +++ b/protocols/Skype/res/Resource.rc @@ -135,6 +135,9 @@ END // Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems.
IDI_ICON ICON "Main.ico"
+IDI_AUTH_GRANT ICON "auth_grant.ico"
+IDI_AUTH_ASK ICON "auth_ask.ico"
+IDI_AUTH_REVOKE ICON "auth_revoke.ico"
/////////////////////////////////////////////////////////////////////////////
//
diff --git a/protocols/Skype/src/skype_contacts.cpp b/protocols/Skype/src/skype_contacts.cpp index 33f37ee86f..8a11a38eb2 100644 --- a/protocols/Skype/src/skype_contacts.cpp +++ b/protocols/Skype/src/skype_contacts.cpp @@ -181,12 +181,247 @@ void CSkypeProto::UpdateContactHomepage(HANDLE hContact, CContact::Ref contact) ::mir_free(homepage);
}
+static LanguagesListEntry languages[] = {
+ {"Abkhazian", "ab"},
+ {"Afar", "aa"},
+ {"Afrikaans", "af"},
+ {"Akan", "ak"},
+ {"Albanian", "sq"},
+ {"Amharic", "am"},
+ {"Arabic", "ar"},
+ {"Aragonese", "an"},
+ {"Armenian", "hy"},
+ {"Assamese", "as"},
+ {"Avaric", "av"},
+ {"Avestan", "ae"},
+ {"Aymara", "ay"},
+ {"Azerbaijani", "az"},
+ {"Bambara", "bm"},
+ {"Bashkir", "ba"},
+ {"Basque", "eu"},
+ {"Belarusian", "be"},
+ {"Bengali", "bn"},
+ {"Bihari languages", "bh"},
+ {"Bislama", "bi"},
+ {"Bokmal, Norwegian", "nb"},
+ {"Bosnian", "bs"},
+ {"Breton", "br"},
+ {"Bulgarian", "bg"},
+ {"Burmese", "my"},
+ {"Castilian", "es"},
+ {"Catalan", "ca"},
+ {"Central Khmer", "km"},
+ {"Chamorro", "ch"},
+ {"Chechen", "ce"},
+ {"Chewa", "ny"},
+ {"Chichewa", "ny"},
+ {"Chinese", "zh"},
+ {"Chuang", "za"},
+ {"Church Slavic", "cu"},
+ {"Church Slavonic", "cu"},
+ {"Chuvash", "cv"},
+ {"Cornish", "kw"},
+ {"Corsican", "co"},
+ {"Cree", "cr"},
+ {"Croatian", "hr"},
+ {"Czech", "cs"},
+ {"Danish", "da"},
+ {"Dhivehi", "dv"},
+ {"Divehi", "dv"},
+ {"Dutch", "nl"},
+ {"Dzongkha", "dz"},
+ {"English", "en"},
+ {"Esperanto", "eo"},
+ {"Estonian", "et"},
+ {"Ewe", "ee"},
+ {"Faroese", "fo"},
+ {"Fijian", "fj"},
+ {"Finnish", "fi"},
+ {"Flemish", "nl"},
+ {"French", "fr"},
+ {"Fulah", "ff"},
+ {"Gaelic", "gd"},
+ {"Galician", "gl"},
+ {"Ganda", "lg"},
+ {"Georgian", "ka"},
+ {"German", "de"},
+ {"Gikuyu", "ki"},
+ {"Greek, Modern (1453-)", "el"},
+ {"Greenlandic", "kl"},
+ {"Guarani", "gn"},
+ {"Gujarati", "gu"},
+ {"Haitian", "ht"},
+ {"Haitian Creole", "ht"},
+ {"Hausa", "ha"},
+ {"Hebrew", "he"},
+ {"Herero", "hz"},
+ {"Hindi", "hi"},
+ {"Hiri Motu", "ho"},
+ {"Hungarian", "hu"},
+ {"Icelandic", "is"},
+ {"Ido", "io"},
+ {"Igbo", "ig"},
+ {"Indonesian", "id"},
+ {"Interlingua (International Auxiliary Language Association)", "ia"},
+ {"Interlingue", "ie"},
+ {"Inuktitut", "iu"},
+ {"Inupiaq", "ik"},
+ {"Irish", "ga"},
+ {"Italian", "it"},
+ {"Japanese", "ja"},
+ {"Javanese", "jv"},
+ {"Kalaallisut", "kl"},
+ {"Kannada", "kn"},
+ {"Kanuri", "kr"},
+ {"Kashmiri", "ks"},
+ {"Kazakh", "kk"},
+ {"Kikuyu", "ki"},
+ {"Kinyarwanda", "rw"},
+ {"Kirghiz", "ky"},
+ {"Komi", "kv"},
+ {"Kongo", "kg"},
+ {"Korean", "ko"},
+ {"Kuanyama", "kj"},
+ {"Kurdish", "ku"},
+ {"Kwanyama", "kj"},
+ {"Kyrgyz", "ky"},
+ {"Lao", "lo"},
+ {"Latin", "la"},
+ {"Latvian", "lv"},
+ {"Letzeburgesch", "lb"},
+ {"Limburgan", "li"},
+ {"Limburger", "li"},
+ {"Limburgish", "li"},
+ {"Lingala", "ln"},
+ {"Lithuanian", "lt"},
+ {"Luba-Katanga", "lu"},
+ {"Luxembourgish", "lb"},
+ {"Macedonian", "mk"},
+ {"Malagasy", "mg"},
+ {"Malay", "ms"},
+ {"Malayalam", "ml"},
+ {"Maldivian", "dv"},
+ {"Maltese", "mt"},
+ {"Manx", "gv"},
+ {"Maori", "mi"},
+ {"Marathi", "mr"},
+ {"Marshallese", "mh"},
+ {"Moldavian", "ro"},
+ {"Moldovan", "ro"},
+ {"Mongolian", "mn"},
+ {"Nauru", "na"},
+ {"Navaho", "nv"},
+ {"Navajo", "nv"},
+ {"Ndebele, North", "nd"},
+ {"Ndebele, South", "nr"},
+ {"Ndonga", "ng"},
+ {"Nepali", "ne"},
+ {"North Ndebele", "nd"},
+ {"Northern Sami", "se"},
+ {"Norwegian", "no"},
+ {"Norwegian Bokmal", "nb"},
+ {"Norwegian Nynorsk", "nn"},
+ {"Nuosu", "ii"},
+ {"Nyanja", "ny"},
+ {"Nynorsk, Norwegian", "nn"},
+ {"Occidental", "ie"},
+ {"Occitan (post 1500)", "oc"},
+ {"Ojibwa", "oj"},
+ {"Old Bulgarian", "cu"},
+ {"Old Church Slavonic", "cu"},
+ {"Old Slavonic", "cu"},
+ {"Oriya", "or"},
+ {"Oromo", "om"},
+ {"Ossetian", "os"},
+ {"Ossetic", "os"},
+ {"Pali", "pi"},
+ {"Panjabi", "pa"},
+ {"Pashto", "ps"},
+ {"Persian", "fa"},
+ {"Polish", "pl"},
+ {"Portuguese", "pt"},
+ {"Punjabi", "pa"},
+ {"Pushto", "ps"},
+ {"Quechua", "qu"},
+ {"Romanian", "ro"},
+ {"Romansh", "rm"},
+ {"Rundi", "rn"},
+ {"Russian", "ru"},
+ {"Samoan", "sm"},
+ {"Sango", "sg"},
+ {"Sanskrit", "sa"},
+ {"Sardinian", "sc"},
+ {"Scottish Gaelic", "gd"},
+ {"Serbian", "sr"},
+ {"Shona", "sn"},
+ {"Sichuan Yi", "ii"},
+ {"Sindhi", "sd"},
+ {"Sinhala", "si"},
+ {"Sinhalese", "si"},
+ {"Slovak", "sk"},
+ {"Slovenian", "sl"},
+ {"Somali", "so"},
+ {"Sotho, Southern", "st"},
+ {"South Ndebele", "nr"},
+ {"Spanish", "es"},
+ {"Sundanese", "su"},
+ {"Swahili", "sw"},
+ {"Swati", "ss"},
+ {"Swedish", "sv"},
+ {"Tagalog", "tl"},
+ {"Tahitian", "ty"},
+ {"Tajik", "tg"},
+ {"Tamil", "ta"},
+ {"Tatar", "tt"},
+ {"Telugu", "te"},
+ {"Thai", "th"},
+ {"Tibetan", "bo"},
+ {"Tigrinya", "ti"},
+ {"Tonga (Tonga Islands)", "to"},
+ {"Tsonga", "ts"},
+ {"Tswana", "tn"},
+ {"Turkish", "tr"},
+ {"Turkmen", "tk"},
+ {"Twi", "tw"},
+ {"Uighur", "ug"},
+ {"Ukrainian", "uk"},
+ {"Urdu", "ur"},
+ {"Uyghur", "ug"},
+ {"Uzbek", "uz"},
+ {"Valencian", "ca"},
+ {"Venda", "ve"},
+ {"Vietnamese", "vi"},
+ {"Volapuk", "vo"},
+ {"Walloon", "wa"},
+ {"Welsh", "cy"},
+ {"Western Frisian", "fy"},
+ {"Wolof", "wo"},
+ {"Xhosa", "xh"},
+ {"Yiddish", "yi"},
+ {"Yoruba", "yo"},
+ {"Zhuang", "za"},
+ {"Zulu", "zu"}
+};
+
void CSkypeProto::UpdateContactLanguages(HANDLE hContact, CContact::Ref contact)
{
- // sanguages (en, ru, etc), space searated
+ // languages (en, ru, etc), space searated
SEString data;
contact->GetPropLanguages(data);
- // todo: write me
+ char* isocode = ::mir_utf8decodeA((const char*)data);
+ if (strcmp(isocode, "") == 0)
+ {
+ this->DeleteSetting(hContact, "Language1"); }
+ else
+ {
+ for (int i = 0; i < SIZEOF(languages); i++)
+ if ( lstrcmpiA((char*)isocode, languages[i].ISOcode) == 0)
+ {
+ this->SetSettingString(hContact, "Language1", languages[i].szName);
+ break;
+ }
+ }
+ ::mir_free(isocode);
}
void CSkypeProto::UpdateContactMobilePhone(HANDLE hContact, CContact::Ref contact)
diff --git a/protocols/Skype/src/skype_proto.h b/protocols/Skype/src/skype_proto.h index 4f06f95746..16d5be39b9 100644 --- a/protocols/Skype/src/skype_proto.h +++ b/protocols/Skype/src/skype_proto.h @@ -19,6 +19,11 @@ struct _tag_iconList HANDLE Handle;
};
+struct LanguagesListEntry {
+ const char *szName;
+ char ISOcode[3];
+};
+
struct CSkypeProto : public PROTO_INTERFACE, public MZeroedObject
{
public:
|