diff options
author | George Hazan <ghazan@miranda.im> | 2018-11-12 21:44:56 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-11-12 21:44:56 +0300 |
commit | 53fe3e46177d17b4941610de19f5cc6210700cb4 (patch) | |
tree | b67a6bc208dad141f9db14035cd7e42ff2a51872 /plugins/SpellChecker | |
parent | 488214ac8af0c4aeb1a5c1d8fd48368daaf4c4c7 (diff) |
db_* functions replaced with g_plugin calls
Diffstat (limited to 'plugins/SpellChecker')
-rw-r--r-- | plugins/SpellChecker/src/dictionary.cpp | 2 | ||||
-rw-r--r-- | plugins/SpellChecker/src/options.cpp | 4 | ||||
-rw-r--r-- | plugins/SpellChecker/src/utils.cpp | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/plugins/SpellChecker/src/dictionary.cpp b/plugins/SpellChecker/src/dictionary.cpp index 4b7c517c93..d804b2336a 100644 --- a/plugins/SpellChecker/src/dictionary.cpp +++ b/plugins/SpellChecker/src/dictionary.cpp @@ -777,7 +777,7 @@ void GetDictsInfo(LIST<Dictionary> &dicts) char lang[128]; WideCharToMultiByte(CP_ACP, 0, dict->language, -1, lang, sizeof(lang), nullptr, nullptr); - if (!db_get_ws(NULL, MODULENAME, lang, &dbv)) { + if (!g_plugin.getWString(lang, &dbv)) { mir_wstrncpy(dict->localized_name, dbv.pwszVal, _countof(dict->localized_name)); db_free(&dbv); } diff --git a/plugins/SpellChecker/src/options.cpp b/plugins/SpellChecker/src/options.cpp index 8188bad73a..0c2f526f6a 100644 --- a/plugins/SpellChecker/src/options.cpp +++ b/plugins/SpellChecker/src/options.cpp @@ -84,7 +84,7 @@ void LoadOptions() }
DBVARIANT dbv;
- if (!db_get_ws(NULL, MODULENAME, "DefaultLanguage", &dbv)) {
+ if (!g_plugin.getWString("DefaultLanguage", &dbv)) {
mir_wstrncpy(opts.default_language, dbv.pwszVal, _countof(opts.default_language));
db_free(&dbv);
}
@@ -201,7 +201,7 @@ static INT_PTR CALLBACK OptionsDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP int sel = SendDlgItemMessage(hwndDlg, IDC_DEF_LANG, CB_GETCURSEL, 0, 0);
if (sel >= languages.getCount())
sel = 0;
- db_set_ws(NULL, MODULENAME, "DefaultLanguage",
+ g_plugin.setWString("DefaultLanguage",
(wchar_t *)languages[sel]->language);
mir_wstrcpy(opts.default_language, languages[sel]->language);
}
diff --git a/plugins/SpellChecker/src/utils.cpp b/plugins/SpellChecker/src/utils.cpp index 217e95daad..aa11ff39e0 100644 --- a/plugins/SpellChecker/src/utils.cpp +++ b/plugins/SpellChecker/src/utils.cpp @@ -769,7 +769,7 @@ void GetContactLanguage(Dialog *dlg) dlg->lang_name[0] = '\0';
if (dlg->hContact == NULL) {
- if (!db_get_ws(NULL, MODULENAME, dlg->name, &dbv)) {
+ if (!g_plugin.getWString(dlg->name, &dbv)) {
mir_wstrncpy(dlg->lang_name, dbv.pwszVal, _countof(dlg->lang_name));
db_free(&dbv);
}
@@ -1203,7 +1203,7 @@ BOOL HandleMenuSelection(Dialog *dlg, unsigned selection) SetNoUnderline(dlg);
if (dlg->hContact == NULL)
- db_set_ws(NULL, MODULENAME, dlg->name,
+ g_plugin.setWString(dlg->name,
languages[selection - LANGUAGE_MENU_ID_BASE]->language);
else
db_set_ws(dlg->hContact, MODULENAME, "TalkLanguage",
|