summaryrefslogtreecommitdiff
path: root/plugins/SpellChecker
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-04-05 22:27:16 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-04-05 22:27:16 +0000
commit007b4c7301f0d26a72f89f74e9929f42e24eb3e6 (patch)
treeb1ee30b70c6e36d1a06aed6885cb80dc560a68ca /plugins/SpellChecker
parentf4a1bbc6ba4b8137cb868639ac146aa97e97e9df (diff)
- rest of menus cleared;
- old database macroses wiped out from all plugins (left in m_database.h for compatibility) git-svn-id: http://svn.miranda-ng.org/main/trunk@4324 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/SpellChecker')
-rw-r--r--plugins/SpellChecker/src/dictionary.cpp2
-rw-r--r--plugins/SpellChecker/src/options.cpp4
-rw-r--r--plugins/SpellChecker/src/utils.cpp20
3 files changed, 13 insertions, 13 deletions
diff --git a/plugins/SpellChecker/src/dictionary.cpp b/plugins/SpellChecker/src/dictionary.cpp
index aeb03b4b86..374892b060 100644
--- a/plugins/SpellChecker/src/dictionary.cpp
+++ b/plugins/SpellChecker/src/dictionary.cpp
@@ -804,7 +804,7 @@ void GetDictsInfo(LIST<Dictionary> &dicts)
{
lstrcpyn(dict->localized_name, dbv.ptszVal, SIZEOF(dict->localized_name));
- DBFreeVariant(&dbv);
+ db_free(&dbv);
}
if (dict->localized_name[0] == _T('\0'))
diff --git a/plugins/SpellChecker/src/options.cpp b/plugins/SpellChecker/src/options.cpp
index 844ec42390..dd574537da 100644
--- a/plugins/SpellChecker/src/options.cpp
+++ b/plugins/SpellChecker/src/options.cpp
@@ -98,7 +98,7 @@ void LoadOptions()
DBVARIANT dbv;
if (!db_get_ts(NULL, MODULE_NAME, "DefaultLanguage", &dbv)) {
lstrcpyn(opts.default_language, dbv.ptszVal, SIZEOF(opts.default_language));
- DBFreeVariant(&dbv);
+ db_free(&dbv);
}
int i;
@@ -215,7 +215,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;
- DBWriteContactSettingTString(NULL, MODULE_NAME, "DefaultLanguage",
+ db_set_ts(NULL, MODULE_NAME, "DefaultLanguage",
(TCHAR *) languages[sel]->language);
lstrcpy(opts.default_language, languages[sel]->language);
}
diff --git a/plugins/SpellChecker/src/utils.cpp b/plugins/SpellChecker/src/utils.cpp
index 55abea5848..06a82da925 100644
--- a/plugins/SpellChecker/src/utils.cpp
+++ b/plugins/SpellChecker/src/utils.cpp
@@ -529,7 +529,7 @@ LRESULT CALLBACK OwnerProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
void ToggleEnabled(Dialog *dlg)
{
dlg->enabled = !dlg->enabled;
- DBWriteContactSettingByte(dlg->hContact, MODULE_NAME, dlg->name, dlg->enabled);
+ db_set_b(dlg->hContact, MODULE_NAME, dlg->name, dlg->enabled);
if (!dlg->enabled)
SetNoUnderline(dlg);
@@ -750,7 +750,7 @@ void GetUserProtoLanguageSetting(Dialog *dlg, HANDLE hContact, char *group, char
}
if (!rc)
- DBFreeVariant(&dbv);
+ db_free(&dbv);
}
void GetUserLanguageSetting(Dialog *dlg, char *setting)
@@ -796,18 +796,18 @@ void GetContactLanguage(Dialog *dlg)
if (dlg->hContact == NULL) {
if ( !db_get_ts(NULL, MODULE_NAME, dlg->name, &dbv)) {
lstrcpyn(dlg->lang_name, dbv.ptszVal, SIZEOF(dlg->lang_name));
- DBFreeVariant(&dbv);
+ db_free(&dbv);
}
}
else {
if (!db_get_ts(dlg->hContact, MODULE_NAME, "TalkLanguage", &dbv)) {
lstrcpyn(dlg->lang_name, dbv.ptszVal, SIZEOF(dlg->lang_name));
- DBFreeVariant(&dbv);
+ db_free(&dbv);
}
if (dlg->lang_name[0] == _T('\0') && !db_get_ts(dlg->hContact, "eSpeak", "TalkLanguage", &dbv)) {
lstrcpyn(dlg->lang_name, dbv.ptszVal, SIZEOF(dlg->lang_name));
- DBFreeVariant(&dbv);
+ db_free(&dbv);
}
// Try from metacontact
@@ -818,12 +818,12 @@ void GetContactLanguage(Dialog *dlg)
if (hMetaContact != NULL) {
if (!db_get_ts(hMetaContact, MODULE_NAME, "TalkLanguage", &dbv)) {
lstrcpyn(dlg->lang_name, dbv.ptszVal, SIZEOF(dlg->lang_name));
- DBFreeVariant(&dbv);
+ 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));
- DBFreeVariant(&dbv);
+ db_free(&dbv);
}
}
}
@@ -924,7 +924,7 @@ int AddContactTextBox(HANDLE hContact, HWND hwnd, char *name, BOOL srmm, HWND hw
dlg->hContact = hContact;
dlg->hwnd = hwnd;
strncpy(dlg->name, name, sizeof(dlg->name));
- dlg->enabled = DBGetContactSettingByte(dlg->hContact, MODULE_NAME, dlg->name, 1);
+ dlg->enabled = db_get_b(dlg->hContact, MODULE_NAME, dlg->name, 1);
dlg->srmm = srmm;
GetContactLanguage(dlg);
@@ -1250,10 +1250,10 @@ BOOL HandleMenuSelection(Dialog *dlg, POINT pt, unsigned selection)
SetNoUnderline(dlg);
if (dlg->hContact == NULL)
- DBWriteContactSettingTString(NULL, MODULE_NAME, dlg->name,
+ db_set_ts(NULL, MODULE_NAME, dlg->name,
languages[selection - LANGUAGE_MENU_ID_BASE]->language);
else
- DBWriteContactSettingTString(dlg->hContact, MODULE_NAME, "TalkLanguage",
+ db_set_ts(dlg->hContact, MODULE_NAME, "TalkLanguage",
languages[selection - LANGUAGE_MENU_ID_BASE]->language);
GetContactLanguage(dlg);