From 53fe3e46177d17b4941610de19f5cc6210700cb4 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 12 Nov 2018 21:44:56 +0300 Subject: db_* functions replaced with g_plugin calls --- plugins/SpellChecker/src/dictionary.cpp | 2 +- plugins/SpellChecker/src/options.cpp | 4 ++-- plugins/SpellChecker/src/utils.cpp | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'plugins/SpellChecker') 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 &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", -- cgit v1.2.3