summaryrefslogtreecommitdiff
path: root/plugins/TipperYM
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-06-30 12:16:44 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-06-30 12:16:44 +0000
commit25ec54ea27a7099f33573b260a620ed7273176fe (patch)
tree1810a0cb35d23deeed9ccdaf0ab276a4022f9a41 /plugins/TipperYM
parenta546606709e6bb72e01eb38b2c8c8756608fd5d6 (diff)
- 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
Diffstat (limited to 'plugins/TipperYM')
-rw-r--r--plugins/TipperYM/src/options.cpp20
1 files changed, 4 insertions, 16 deletions
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) |