From 007b4c7301f0d26a72f89f74e9929f42e24eb3e6 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 5 Apr 2013 22:27:16 +0000 Subject: - 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 --- plugins/QuickReplies/src/options.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'plugins/QuickReplies/src/options.cpp') diff --git a/plugins/QuickReplies/src/options.cpp b/plugins/QuickReplies/src/options.cpp index 57b8535cc6..6cb7798b74 100644 --- a/plugins/QuickReplies/src/options.cpp +++ b/plugins/QuickReplies/src/options.cpp @@ -74,15 +74,15 @@ INT_PTR CALLBACK DlgProcOptionsPage(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPAR mir_subclassWindow( GetDlgItem(hwndDlg, IDC_REPLIES), MessageEditSubclassProc); mir_snprintf(key, 64, "ImmediatelySend_%x", iNumber); - CheckDlgButton(hwndDlg, IDC_IMMEDIATELY, (BYTE)DBGetContactSettingWord(NULL, MODULE_NAME, key, 1)); + CheckDlgButton(hwndDlg, IDC_IMMEDIATELY, (BYTE)db_get_w(NULL, MODULE_NAME, key, 1)); mir_snprintf(key, 64, "RepliesCount_%x", iNumber); - count = DBGetContactSettingWord(NULL, MODULE_NAME, key, 0); + count = db_get_w(NULL, MODULE_NAME, key, 0); for (int i = 0; i < count; i++) { mir_snprintf(key, 64, "Reply_%x_%x", iNumber, i); - if (!DBGetContactSettingTString(NULL, MODULE_NAME, key, &dbv)) + if (!db_get_ts(NULL, MODULE_NAME, key, &dbv)) if(dbv.ptszVal != NULL) replies.append(dbv.ptszVal); if (i < count - 1) @@ -90,7 +90,7 @@ INT_PTR CALLBACK DlgProcOptionsPage(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPAR } SetDlgItemText(hwndDlg, IDC_REPLIES, replies.c_str()); - DBFreeVariant(&dbv); + db_free(&dbv); } return TRUE; @@ -120,12 +120,12 @@ INT_PTR CALLBACK DlgProcOptionsPage(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPAR TCHAR tszReplies[TEXT_LIMIT]; mir_snprintf(key, 64, "RepliesCount_%x", iNumber); - count = DBGetContactSettingByte(NULL, MODULE_NAME, key, 0); + count = db_get_b(NULL, MODULE_NAME, key, 0); for (int i = 0; i < count; i++) { mir_snprintf(key, 64, "Reply_%x_%x", iNumber, i); - DBDeleteContactSetting(NULL, MODULE_NAME, key); + db_unset(NULL, MODULE_NAME, key); } GetDlgItemText(hwndDlg, IDC_REPLIES, tszReplies, TEXT_LIMIT); @@ -140,16 +140,16 @@ INT_PTR CALLBACK DlgProcOptionsPage(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPAR while ((pos = replies.find(_T("\r\n"))) != tString::npos) { mir_snprintf(key, 64, "Reply_%x_%x", iNumber, count++); - DBWriteContactSettingTString(NULL, MODULE_NAME, key, replies.substr(0, pos).c_str()); + db_set_ts(NULL, MODULE_NAME, key, replies.substr(0, pos).c_str()); replies = replies.substr(pos + 2); } } mir_snprintf(key, 64, "RepliesCount_%x", iNumber); - DBWriteContactSettingWord(NULL, MODULE_NAME, key, count); + db_set_w(NULL, MODULE_NAME, key, count); mir_snprintf(key, 64, "ImmediatelySend_%x", iNumber); - DBWriteContactSettingByte(NULL, MODULE_NAME, key, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_IMMEDIATELY)); + db_set_b(NULL, MODULE_NAME, key, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_IMMEDIATELY)); mir_free(key); -- cgit v1.2.3