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 --- protocols/GTalkExt/src/tipper_items.cpp | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) (limited to 'protocols/GTalkExt') diff --git a/protocols/GTalkExt/src/tipper_items.cpp b/protocols/GTalkExt/src/tipper_items.cpp index 6dc8a3d6ae..36d0cbb0b1 100644 --- a/protocols/GTalkExt/src/tipper_items.cpp +++ b/protocols/GTalkExt/src/tipper_items.cpp @@ -47,29 +47,27 @@ static const LPTSTR UNREAD_THREADS_LABEL = LPGENT("Unread threads:"); void ShiftTipperSettings(LPSTR buff, int count, LPSTR format) { for (int i = count; i > 0; i--) { - DBCONTACTWRITESETTING cws; + DBVARIANT dbv; sprintf(buff, format, i - 1); - if (db_get(0, TIPPER_ITEMS_MOD_NAME, buff, &cws.value)) + if (db_get(0, TIPPER_ITEMS_MOD_NAME, buff, &dbv)) break; __try { - if (DBVT_ASCIIZ == cws.value.type) { - db_free(&cws.value); - if (db_get_ws(0, TIPPER_ITEMS_MOD_NAME, buff, &cws.value)) + if (DBVT_ASCIIZ == dbv.type) { + db_free(&dbv); + if (db_get_ws(0, TIPPER_ITEMS_MOD_NAME, buff, &dbv)) break; } - if (db_get_s(0, TIPPER_ITEMS_MOD_NAME, buff, &cws.value)) + if (db_get_s(0, TIPPER_ITEMS_MOD_NAME, buff, &dbv)) break; - cws.szModule = TIPPER_ITEMS_MOD_NAME; sprintf(buff, format, i); - cws.szSetting = buff; - CallService(MS_DB_CONTACT_WRITESETTING, 0, (LPARAM)&cws); + db_set(NULL, TIPPER_ITEMS_MOD_NAME, buff, &dbv); } __finally { - db_free(&cws.value); + db_free(&dbv); } } } -- cgit v1.2.3