summaryrefslogtreecommitdiff
path: root/plugins/BasicHistory/src
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-10-10 07:46:53 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-10-10 07:46:53 +0000
commitf90be5cdeec5875d1022e1ef35f5b101bd76ac84 (patch)
tree59e5e8bf3b6a87dbee148bd63f841a8a62daac5f /plugins/BasicHistory/src
parented10055737300c07e485eb22b27ccf92ffadab7c (diff)
service call replaced with the direct function call
git-svn-id: http://svn.miranda-ng.org/main/trunk@1857 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/BasicHistory/src')
-rw-r--r--plugins/BasicHistory/src/HistoryWindow.cpp24
-rw-r--r--plugins/BasicHistory/src/Options.cpp16
2 files changed, 20 insertions, 20 deletions
diff --git a/plugins/BasicHistory/src/HistoryWindow.cpp b/plugins/BasicHistory/src/HistoryWindow.cpp
index a518914278..a8dfcefd14 100644
--- a/plugins/BasicHistory/src/HistoryWindow.cpp
+++ b/plugins/BasicHistory/src/HistoryWindow.cpp
@@ -1799,7 +1799,7 @@ void HistoryWindow::ReloadContacts()
}
}
- HANDLE _hContact = (HANDLE) CallService(MS_DB_CONTACT_FINDFIRST, 0, 0);
+ HANDLE _hContact = db_find_first();
while(_hContact)
{
if(EventList::GetContactMessageNumber(_hContact) && (metaContactProto == NULL || DBGetContactSettingByte(_hContact, metaContactProto, "IsSubcontact", 0) == 0))
@@ -1819,7 +1819,7 @@ void HistoryWindow::ReloadContacts()
}
}
- _hContact = (HANDLE) CallService(MS_DB_CONTACT_FINDNEXT, (WPARAM)_hContact, 0);
+ _hContact = db_find_next(_hContact);
}
if(hContact != NULL)
@@ -1970,7 +1970,7 @@ void HistoryWindow::SavePos(bool all)
HANDLE contactToSave = hContact;
if(all)
{
- HANDLE _hContact = (HANDLE) CallService(MS_DB_CONTACT_FINDFIRST, 0, 0);
+ HANDLE _hContact = db_find_first();
while(_hContact)
{
DBDeleteContactSetting(_hContact, MODULE, "history_x");
@@ -1980,7 +1980,7 @@ void HistoryWindow::SavePos(bool all)
DBDeleteContactSetting(_hContact, MODULE, "history_ismax");
DBDeleteContactSetting(_hContact, MODULE, "history_splitterv");
DBDeleteContactSetting(_hContact, MODULE, "history_splitter");
- _hContact = (HANDLE) CallService(MS_DB_CONTACT_FINDNEXT, (WPARAM)_hContact, 0);
+ _hContact = db_find_next(_hContact);
}
contactToSave = NULL;
@@ -2460,7 +2460,7 @@ HANDLE HistoryWindow::GetNextContact(HANDLE hContact, int adder)
{
if(hContact != NULL)
{
- _hContact = (HANDLE) CallService(MS_DB_CONTACT_FINDNEXT, (WPARAM)hContact, 0);
+ _hContact = db_find_next(hContact);
while(_hContact)
{
HANDLE hItem = (HANDLE)SendMessage(contactList, CLM_FINDCONTACT, (WPARAM)_hContact, 0);
@@ -2470,7 +2470,7 @@ HANDLE HistoryWindow::GetNextContact(HANDLE hContact, int adder)
break;
}
- _hContact = (HANDLE) CallService(MS_DB_CONTACT_FINDNEXT, (WPARAM)_hContact, 0);
+ _hContact = db_find_next(_hContact);
}
if(!find && EventList::GetContactMessageNumber(NULL))
@@ -2482,7 +2482,7 @@ HANDLE HistoryWindow::GetNextContact(HANDLE hContact, int adder)
if(!find)
{
- _hContact = (HANDLE) CallService(MS_DB_CONTACT_FINDFIRST, 0, 0);
+ _hContact = db_find_first();
while(_hContact && _hContact != hContact)
{
HANDLE hItem = (HANDLE)SendMessage(contactList, CLM_FINDCONTACT, (WPARAM)_hContact, 0);
@@ -2492,14 +2492,14 @@ HANDLE HistoryWindow::GetNextContact(HANDLE hContact, int adder)
break;
}
- _hContact = (HANDLE) CallService(MS_DB_CONTACT_FINDNEXT, (WPARAM)_hContact, 0);
+ _hContact = db_find_next(_hContact);
}
}
}
else
{
HANDLE lastContact = NULL;
- _hContact = (HANDLE) CallService(MS_DB_CONTACT_FINDFIRST, 0, 0);
+ _hContact = db_find_first();
while(_hContact && _hContact != hContact)
{
HANDLE hItem = (HANDLE)SendMessage(contactList, CLM_FINDCONTACT, (WPARAM)_hContact, 0);
@@ -2508,14 +2508,14 @@ HANDLE HistoryWindow::GetNextContact(HANDLE hContact, int adder)
lastContact = _hContact;
}
- _hContact = (HANDLE) CallService(MS_DB_CONTACT_FINDNEXT, (WPARAM)_hContact, 0);
+ _hContact = db_find_next(_hContact);
}
if(hContact != NULL)
{
if(lastContact == NULL && !EventList::GetContactMessageNumber(NULL))
{
- _hContact = (HANDLE) CallService(MS_DB_CONTACT_FINDNEXT, (WPARAM)hContact, 0);
+ _hContact = db_find_next(hContact);
while(_hContact)
{
HANDLE hItem = (HANDLE)SendMessage(contactList, CLM_FINDCONTACT, (WPARAM)_hContact, 0);
@@ -2524,7 +2524,7 @@ HANDLE HistoryWindow::GetNextContact(HANDLE hContact, int adder)
lastContact = _hContact;
}
- _hContact = (HANDLE) CallService(MS_DB_CONTACT_FINDNEXT, (WPARAM)_hContact, 0);
+ _hContact = db_find_next(_hContact);
}
}
diff --git a/plugins/BasicHistory/src/Options.cpp b/plugins/BasicHistory/src/Options.cpp
index 67610e7724..4d8b759d7e 100644
--- a/plugins/BasicHistory/src/Options.cpp
+++ b/plugins/BasicHistory/src/Options.cpp
@@ -598,12 +598,12 @@ void Options::SaveTasks(std::list<TaskOptions>* tasks)
sprintf_s(buf, "Task_zipPassword_%d", i);
DBWriteContactSettingString(0, MODULE, buf, it->zipPassword.c_str());
- HANDLE _hContact = (HANDLE) CallService(MS_DB_CONTACT_FINDFIRST, 0, 0);
+ HANDLE _hContact = db_find_first();
sprintf_s(buf, "IsInTask_%d", i);
while(_hContact)
{
DBDeleteContactSetting(_hContact, MODULE, buf);
- _hContact = (HANDLE) CallService(MS_DB_CONTACT_FINDNEXT, (WPARAM)_hContact, 0);
+ _hContact = db_find_next(_hContact);
}
for(size_t j = 0; j < it->contacts.size(); ++j)
@@ -660,12 +660,12 @@ void Options::SaveTasks(std::list<TaskOptions>* tasks)
sprintf_s(buf, "Task_taskName_%d", i);
DBDeleteContactSetting(NULL, MODULE, buf);
- HANDLE _hContact = (HANDLE) CallService(MS_DB_CONTACT_FINDFIRST, 0, 0);
+ HANDLE _hContact = db_find_first();
sprintf_s(buf, "IsInTask_%d", i);
while(_hContact)
{
DBDeleteContactSetting(_hContact, MODULE, buf);
- _hContact = (HANDLE) CallService(MS_DB_CONTACT_FINDNEXT, (WPARAM)_hContact, 0);
+ _hContact = db_find_next(_hContact);
}
}
@@ -758,7 +758,7 @@ void Options::LoadTasks()
DBFreeVariant(&var);
}
- HANDLE _hContact = (HANDLE) CallService(MS_DB_CONTACT_FINDFIRST, 0, 0);
+ HANDLE _hContact = db_find_first();
sprintf_s(buf, "IsInTask_%d", i);
while(_hContact)
{
@@ -767,7 +767,7 @@ void Options::LoadTasks()
to.contacts.push_back(_hContact);
}
- _hContact = (HANDLE) CallService(MS_DB_CONTACT_FINDNEXT, (WPARAM)_hContact, 0);
+ _hContact = db_find_next(_hContact);
}
to.orderNr = i;
@@ -1770,14 +1770,14 @@ void SaveList(HWND hwnd, HANDLE hSystem, TaskOptions* to)
to->contacts.clear();
if (hSystem)
to->isSystem = SendMessage(hwnd, CLM_GETCHECKMARK, (WPARAM) hSystem, 0) != 0;
- hContact = (HANDLE) CallService(MS_DB_CONTACT_FINDFIRST, 0, 0);
+ hContact = db_find_first();
do
{
hItem = (HANDLE) SendMessage(hwnd, CLM_FINDCONTACT, (WPARAM) hContact, 0);
if (hItem && SendMessage(hwnd, CLM_GETCHECKMARK, (WPARAM) hItem, 0))
to->contacts.push_back(hContact);
}
- while (hContact = (HANDLE) CallService(MS_DB_CONTACT_FINDNEXT, (WPARAM) hContact, 0));
+ while (hContact = db_find_next(hContact));
}
bool IsValidTask(TaskOptions& to, std::list<TaskOptions>* top = NULL, std::wstring* err = NULL, std::wstring* errDescr = NULL);