From 25ec54ea27a7099f33573b260a620ed7273176fe Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 30 Jun 2013 12:16:44 +0000 Subject: - db_set_blob used everywhere for writing blobs - DBCONTACTWRITESETTING left only in the event handlers git-svn-id: http://svn.miranda-ng.org/main/trunk@5191 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/TipperYM/src/options.cpp | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) (limited to 'plugins/TipperYM/src') diff --git a/plugins/TipperYM/src/options.cpp b/plugins/TipperYM/src/options.cpp index f422396f33..c8a8ce52ac 100644 --- a/plugins/TipperYM/src/options.cpp +++ b/plugins/TipperYM/src/options.cpp @@ -1656,15 +1656,9 @@ INT_PTR CALLBACK DlgProcOptsExtra(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM if (((LPNMHDR)lParam)->code == (unsigned)PSN_APPLY) { TVITEM item = {0}; - int i = 0; - DBCONTACTWRITESETTING cws; - cws.szModule = MODULE; - cws.szSetting = "IconOrder"; - cws.value.type = DBVT_BLOB; - cws.value.cpbVal = SIZEOF(extraIconName); - cws.value.pbVal = opt.exIconsOrder; - item.hItem = TreeView_GetRoot(GetDlgItem(hwndDlg, IDC_TREE_EXTRAICONS)); + + int i = 0; while (item.hItem != NULL) { item.mask = TVIF_HANDLE | TVIF_PARAM; @@ -1672,16 +1666,10 @@ INT_PTR CALLBACK DlgProcOptsExtra(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM opt.exIconsOrder[i++] = ((ICONSTATE *)item.lParam)->order; item.hItem = TreeView_GetNextSibling(GetDlgItem(hwndDlg,IDC_TREE_EXTRAICONS), item.hItem); } - CallService(MS_DB_CONTACT_WRITESETTING, 0,(LPARAM)&cws); + db_set_blob(NULL, MODULE, "IconOrder", opt.exIconsOrder, SIZEOF(opt.exIconsOrder)); i = 0; - cws.szModule = MODULE; - cws.szSetting = "icons_vis"; - cws.value.type = DBVT_BLOB; - cws.value.cpbVal = SIZEOF(extraIconName); - cws.value.pbVal = opt.exIconsVis; item.hItem = TreeView_GetRoot(GetDlgItem(hwndDlg,IDC_TREE_EXTRAICONS)); - while (item.hItem != NULL) { item.mask = TVIF_HANDLE | TVIF_PARAM; @@ -1689,7 +1677,7 @@ INT_PTR CALLBACK DlgProcOptsExtra(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM opt.exIconsVis[i++] = ((ICONSTATE *)item.lParam)->vis; item.hItem = TreeView_GetNextSibling(GetDlgItem(hwndDlg, IDC_TREE_EXTRAICONS), item.hItem); } - CallService(MS_DB_CONTACT_WRITESETTING, 0, (LPARAM)&cws); + db_set_blob(NULL, MODULE, "icons_vis", opt.exIconsVis, SIZEOF(opt.exIconsVis)); opt.iSmileyAddFlags = 0; opt.iSmileyAddFlags |= (IsDlgButtonChecked(hwndDlg, IDC_CHK_ENABLESMILEYS) ? SMILEYADD_ENABLE : 0) | -- cgit v1.2.3