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 --- .../HistorySweeperLight/src/historysweeperlight.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'plugins/HistorySweeperLight/src/historysweeperlight.cpp') diff --git a/plugins/HistorySweeperLight/src/historysweeperlight.cpp b/plugins/HistorySweeperLight/src/historysweeperlight.cpp index 8783aafa34..70be70347b 100644 --- a/plugins/HistorySweeperLight/src/historysweeperlight.cpp +++ b/plugins/HistorySweeperLight/src/historysweeperlight.cpp @@ -132,7 +132,7 @@ static void GetBookmarks(HANDLE hContact, BEventData** books, size_t* bookcnt ) mir_free(tbooks); } - DBFreeVariant(&dbv); + db_free(&dbv); } } @@ -141,15 +141,15 @@ void SweepHistoryFromContact(HANDLE hContact, CriteriaStruct Criteria, BOOL keep { int lPolicy; if (hContact == NULL) // for system history - lPolicy = DBGetContactSettingByte(NULL, ModuleName, "SweepSHistory", 0); + lPolicy = db_get_b(NULL, ModuleName, "SweepSHistory", 0); else // for contact history (or "SweepHistory" - default action) - lPolicy = DBGetContactSettingByte(hContact, ModuleName, "SweepHistory", DBGetContactSettingByte(NULL, ModuleName, "SweepHistory", 0)); + lPolicy = db_get_b(hContact, ModuleName, "SweepHistory", db_get_b(NULL, ModuleName, "SweepHistory", 0)); if (lPolicy == 0) return; // nothing to do int eventsCnt = db_event_count(hContact); if (eventsCnt != 0) { - BOOL doDelete, unsafe = DBGetContactSettingByte(NULL, ModuleName, "UnsafeMode", 0); + BOOL doDelete, unsafe = db_get_b(NULL, ModuleName, "UnsafeMode", 0); BEventData *books, *item, ev = { 0 }; size_t bookcnt, btshift; @@ -211,8 +211,8 @@ void ShutdownAction(void) CriteriaStruct Criteria; HANDLE hContact = db_find_first(); - Criteria.keep = KeepCriteria(DBGetContactSettingByte(NULL, ModuleName, "StartupShutdownKeep", 0)); - Criteria.time = BuildCriteria(DBGetContactSettingByte(NULL, ModuleName, "StartupShutdownOlder", 0)); + Criteria.keep = KeepCriteria(db_get_b(NULL, ModuleName, "StartupShutdownKeep", 0)); + Criteria.time = BuildCriteria(db_get_b(NULL, ModuleName, "StartupShutdownOlder", 0)); SweepHistoryFromContact(NULL, Criteria, FALSE); // sweep system history, keepunread==0 @@ -228,12 +228,12 @@ int OnWindowEvent(WPARAM wParam, LPARAM lParam) { MessageWindowEventData* msgEvData = (MessageWindowEventData*)lParam; - if (msgEvData->uType == MSG_WINDOW_EVT_CLOSE && DBGetContactSettingByte(NULL, ModuleName, "SweepOnClose", 0)) + if (msgEvData->uType == MSG_WINDOW_EVT_CLOSE && db_get_b(NULL, ModuleName, "SweepOnClose", 0)) { CriteriaStruct Criteria; - Criteria.keep = KeepCriteria(DBGetContactSettingByte(NULL, ModuleName, "StartupShutdownKeep", 0)); - Criteria.time = BuildCriteria(DBGetContactSettingByte(NULL, ModuleName, "StartupShutdownOlder", 0)); + Criteria.keep = KeepCriteria(db_get_b(NULL, ModuleName, "StartupShutdownKeep", 0)); + Criteria.time = BuildCriteria(db_get_b(NULL, ModuleName, "StartupShutdownOlder", 0)); SweepHistoryFromContact(msgEvData->hContact, Criteria, TRUE); } -- cgit v1.2.3