summaryrefslogtreecommitdiff
path: root/plugins/SpellChecker
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-02-27 20:50:07 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-02-27 20:50:07 +0000
commit13c033c257f6c083b0c46b4fa28601db5a0b6335 (patch)
treecb6c2d292df718d1cddd885ad1029a0b81f1b7e4 /plugins/SpellChecker
parent367e673a5a3d4d49b2ef1bfbf57a1a5828a2d174 (diff)
MS_MC_GETMETACONTACT => db_mc_getMeta
git-svn-id: http://svn.miranda-ng.org/main/trunk@8317 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/SpellChecker')
-rw-r--r--plugins/SpellChecker/src/utils.cpp40
1 files changed, 17 insertions, 23 deletions
diff --git a/plugins/SpellChecker/src/utils.cpp b/plugins/SpellChecker/src/utils.cpp
index 028d76c8e7..66013573a2 100644
--- a/plugins/SpellChecker/src/utils.cpp
+++ b/plugins/SpellChecker/src/utils.cpp
@@ -774,16 +774,13 @@ void GetUserLanguageSetting(Dialog *dlg, char *setting)
if (mc != CALLSERVICE_NOTFOUND) {
char* metacontacts_proto = (char *) mc;
if (metacontacts_proto != NULL) {
- mc = CallService(MS_MC_GETMETACONTACT, (WPARAM) dlg->hContact, 0);
- if (mc != CALLSERVICE_NOTFOUND) {
- MCONTACT hMetaContact = (MCONTACT)mc;
- if (hMetaContact != NULL) {
- GetUserProtoLanguageSetting(dlg, hMetaContact, metacontacts_proto, setting);
- if (dlg->lang_name[0] != _T('\0'))
- return;
-
- GetUserProtoLanguageSetting(dlg, hMetaContact, "UserInfo", setting, FALSE);
- }
+ MCONTACT hMetaContact = db_mc_getMeta(dlg->hContact);
+ if (hMetaContact != NULL) {
+ GetUserProtoLanguageSetting(dlg, hMetaContact, metacontacts_proto, setting);
+ if (dlg->lang_name[0] != _T('\0'))
+ return;
+
+ GetUserProtoLanguageSetting(dlg, hMetaContact, "UserInfo", setting, FALSE);
}
}
}
@@ -814,19 +811,16 @@ void GetContactLanguage(Dialog *dlg)
// Try from metacontact
if (dlg->lang_name[0] == _T('\0')) {
- INT_PTR mc = CallService(MS_MC_GETMETACONTACT, (WPARAM) dlg->hContact, 0);
- if (mc != CALLSERVICE_NOTFOUND) {
- MCONTACT hMetaContact = (MCONTACT)mc;
- if (hMetaContact != NULL) {
- if (!db_get_ts(hMetaContact, MODULE_NAME, "TalkLanguage", &dbv)) {
- lstrcpyn(dlg->lang_name, dbv.ptszVal, SIZEOF(dlg->lang_name));
- db_free(&dbv);
- }
-
- if (dlg->lang_name[0] == _T('\0') && !db_get_ts(hMetaContact, "eSpeak", "TalkLanguage", &dbv)) {
- lstrcpyn(dlg->lang_name, dbv.ptszVal, SIZEOF(dlg->lang_name));
- db_free(&dbv);
- }
+ MCONTACT hMetaContact = db_mc_getMeta(dlg->hContact);
+ if (hMetaContact != NULL) {
+ if (!db_get_ts(hMetaContact, MODULE_NAME, "TalkLanguage", &dbv)) {
+ lstrcpyn(dlg->lang_name, dbv.ptszVal, SIZEOF(dlg->lang_name));
+ db_free(&dbv);
+ }
+
+ if (dlg->lang_name[0] == _T('\0') && !db_get_ts(hMetaContact, "eSpeak", "TalkLanguage", &dbv)) {
+ lstrcpyn(dlg->lang_name, dbv.ptszVal, SIZEOF(dlg->lang_name));
+ db_free(&dbv);
}
}
}