diff options
author | George Hazan <george.hazan@gmail.com> | 2013-03-30 20:10:26 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-03-30 20:10:26 +0000 |
commit | 2bbb9971bf1711850504d93828f571e27147abc7 (patch) | |
tree | 58d7b09d4a5f89f3990fff0ddd98c562e37b122c /plugins/HistoryPlusPlus/HistoryForm.pas | |
parent | 53bb473ba5f24175ac124098dac69df6ca3570a3 (diff) |
MS_DB_EVENT_* services' calls removed from pascal sources
git-svn-id: http://svn.miranda-ng.org/main/trunk@4262 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/HistoryPlusPlus/HistoryForm.pas')
-rw-r--r-- | plugins/HistoryPlusPlus/HistoryForm.pas | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/plugins/HistoryPlusPlus/HistoryForm.pas b/plugins/HistoryPlusPlus/HistoryForm.pas index e657c09fd7..0cdca49b7a 100644 --- a/plugins/HistoryPlusPlus/HistoryForm.pas +++ b/plugins/HistoryPlusPlus/HistoryForm.pas @@ -471,7 +471,7 @@ implementation uses
EventDetailForm, PassForm, hpp_options, hpp_services, hpp_eventfilters,
- hpp_database, hpp_contacts, hpp_itemprocess, hpp_events, hpp_forms, hpp_richedit,
+ hpp_database, hpp_contacts, hpp_itemprocess, hpp_events, hpp_forms, hpp_richedit,
hpp_messages, hpp_bookmarks, Checksum, CustomizeFiltersForm, CustomizeToolbar;
{$R *.DFM}
@@ -594,7 +594,7 @@ procedure THistoryFrm.LoadHistory(Sender: TObject); LineIdx: Integer;
ToRead: Integer;
begin
- HistoryLength := CallService(MS_DB_EVENT_GETCOUNT, hContact, 0);
+ HistoryLength := db_event_count(hContact);
if HistoryLength = -1 then
begin
// contact is missing
@@ -604,14 +604,14 @@ procedure THistoryFrm.LoadHistory(Sender: TObject); SetLength(History, HistoryLength);
if HistoryLength = 0 then
Exit;
- hDBEvent := CallService(MS_DB_EVENT_FINDLAST, hContact, 0);
+ hDBEvent := db_event_last(hContact);
History[HistoryLength - 1] := NotZero(hDBEvent);
{ if NeedhDBEvent = 0 then toRead := Max(0,HistoryLength-hppLoadBlock-1)
else toRead := 0; }
ToRead := Max(0, HistoryLength - hppFirstLoadBlock - 1);
LineIdx := HistoryLength - 2;
repeat
- hDBEvent := CallService(MS_DB_EVENT_FINDPREV, hDBEvent, 0);
+ hDBEvent := db_event_prev(hDBEvent);
History[LineIdx] := NotZero(hDBEvent);
{ if NeedhDBEvent = hDbEvent then begin
Result := HistoryLength-LineIdx-1;
@@ -1513,7 +1513,7 @@ begin if fromRowIdx > HistoryLength - 1 then
begin
fromRowIdx := HistoryLength - 1;
- hDBEvent := CallService(MS_DB_EVENT_FINDLAST, hContact, 0);
+ hDBEvent := db_event_last(hContact);
History[fromRowIdx] := hDBEvent;
end
else
@@ -1522,7 +1522,7 @@ begin begin
if History[ridx] <> 0 then
break;
- hDBEvent := CallService(MS_DB_EVENT_FINDPREV, hDBEvent, 0);
+ hDBEvent := db_event_prev(hDBEvent);
History[ridx] := NotZero(hDBEvent);
end;
end
@@ -1531,7 +1531,7 @@ begin if tillRowIdx < 0 then
begin
tillRowIdx := 0;
- hDBEvent := CallService(MS_DB_EVENT_FINDFIRST, hContact, 0);
+ hDBEvent := db_event_first(hContact);
History[tillRowIdx] := hDBEvent;
end
else
@@ -1540,7 +1540,7 @@ begin begin
if History[ridx] <> 0 then
break;
- hDBEvent := CallService(MS_DB_EVENT_FINDNEXT, hDBEvent, 0);
+ hDBEvent := db_event_next(hDBEvent);
History[ridx] := NotZero(hDBEvent);
end;
end;
@@ -1860,15 +1860,15 @@ begin begin // routine is called from DeleteAll
if FormState = gsDelete then
begin // probably unnecessary considering prev check
- hDBEvent := CallService(MS_DB_EVENT_FINDFIRST, hContact, 0);
- CallService(MS_DB_EVENT_DELETE, hContact, hDBEvent);
+ hDBEvent := db_event_first(hContact);
+ db_event_delete(hContact, hDBEvent);
end;
end
else
begin
idx := GridIndexToHistory(Index);
if (FormState = gsDelete) and (History[idx] <> 0) then
- CallService(MS_DB_EVENT_DELETE, hContact, History[idx]);
+ db_event_delete(hContact, History[idx]);
DeleteEventFromSessions(idx);
DeleteHistoryItem(idx);
end;
@@ -2085,7 +2085,7 @@ begin begin
if Sessions[idx].hDBEventLast = hDBEvent then
begin
- hDBEvent := CallService(MS_DB_EVENT_FINDPREV, hDBEvent, 0);
+ hDBEvent := db_event_prev(hDBEvent);
if hDBEvent <> 0 then
begin
Sessions[idx].hDBEventLast := hDBEvent;
@@ -2144,7 +2144,7 @@ begin Sessions[idx].TimestampLast := 0;
Exit;
end;
- hDBEvent := CallService(MS_DB_EVENT_FINDNEXT, hDBEvent, 0);
+ hDBEvent := db_event_next(hDBEvent);
if hDBEvent <> 0 then
begin
Sessions[idx].hDBEventFirst := hDBEvent;
|