summaryrefslogtreecommitdiff
path: root/plugins/BasicHistory/src/HistoryWindow.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-03-30 17:32:39 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-03-30 17:32:39 +0000
commit109877a3c75cb290c55755dcfc88794d2453669d (patch)
tree3ede8b9170b2fc3f6f35dc2cea6742d44b19d631 /plugins/BasicHistory/src/HistoryWindow.cpp
parentfee8d991bdf4a59b563d1b92165ea0ed2f7bacb8 (diff)
MS_DB_EVENT_* services remained, but their calls removed
git-svn-id: http://svn.miranda-ng.org/main/trunk@4255 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/BasicHistory/src/HistoryWindow.cpp')
-rw-r--r--plugins/BasicHistory/src/HistoryWindow.cpp16
1 files changed, 5 insertions, 11 deletions
diff --git a/plugins/BasicHistory/src/HistoryWindow.cpp b/plugins/BasicHistory/src/HistoryWindow.cpp
index 8fefc1062b..ea2e1edc69 100644
--- a/plugins/BasicHistory/src/HistoryWindow.cpp
+++ b/plugins/BasicHistory/src/HistoryWindow.cpp
@@ -476,25 +476,19 @@ INT_PTR HistoryWindow::DeleteAllUserHistory(WPARAM wParam, LPARAM lParam)
return FALSE;
std::deque<HANDLE> toRemove;
- HANDLE hDbEvent=(HANDLE)CallService(MS_DB_EVENT_FINDFIRST,(WPARAM)hContact,0);
- while ( hDbEvent != NULL )
- {
+ HANDLE hDbEvent = db_event_first(hContact);
+ while ( hDbEvent != NULL ) {
toRemove.push_back(hDbEvent);
- hDbEvent=(HANDLE)CallService(MS_DB_EVENT_FINDNEXT,(WPARAM)hDbEvent,0);
+ hDbEvent = db_event_next(hDbEvent);
}
for(std::deque<HANDLE>::iterator it = toRemove.begin(); it != toRemove.end(); ++it)
- {
- CallService(MS_DB_EVENT_DELETE,(WPARAM)hContact,(LPARAM)(HANDLE)*it);
- }
+ db_event_delete(hContact, *it);
- if(EventList::IsImportedHistory(hContact))
- {
+ if(EventList::IsImportedHistory(hContact)) {
TCHAR *message = TranslateT("Do you want delete all imported messages for this contact?\nNote that next scheduler task import this messages again.");
if(MessageBox(hWnd, message, TranslateT("Are You sure?"), MB_YESNO | MB_ICONERROR) == IDYES)
- {
EventList::DeleteImporter(hContact);
- }
}
RebuildEvents(hContact);