diff options
author | George Hazan <george.hazan@gmail.com> | 2013-04-05 22:27:16 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-04-05 22:27:16 +0000 |
commit | 007b4c7301f0d26a72f89f74e9929f42e24eb3e6 (patch) | |
tree | b1ee30b70c6e36d1a06aed6885cb80dc560a68ca /plugins/SpellChecker/src/utils.cpp | |
parent | f4a1bbc6ba4b8137cb868639ac146aa97e97e9df (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/src/utils.cpp')
-rw-r--r-- | plugins/SpellChecker/src/utils.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
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); |