diff options
author | George Hazan <george.hazan@gmail.com> | 2016-09-13 17:11:58 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2016-09-13 17:11:58 +0000 |
commit | f51995e13679a37851baef8e7f52f2d993cbc7c1 (patch) | |
tree | 25ccd03cf2dc4b897cc0dc6fcbe4cc78ddb122c7 /plugins/HistoryPlusPlus | |
parent | fe1e8456d2488095f409a4f2d38b7251abdedccf (diff) |
mode old database junk to die
git-svn-id: http://svn.miranda-ng.org/main/trunk@17291 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/HistoryPlusPlus')
-rw-r--r-- | plugins/HistoryPlusPlus/CustomizeToolbar.pas | 4 | ||||
-rw-r--r-- | plugins/HistoryPlusPlus/HistoryForm.pas | 2 | ||||
-rw-r--r-- | plugins/HistoryPlusPlus/hpp_contacts.pas | 4 | ||||
-rw-r--r-- | plugins/HistoryPlusPlus/hpp_database.pas | 24 | ||||
-rw-r--r-- | plugins/HistoryPlusPlus/hpp_itemprocess.pas | 2 |
5 files changed, 18 insertions, 18 deletions
diff --git a/plugins/HistoryPlusPlus/CustomizeToolbar.pas b/plugins/HistoryPlusPlus/CustomizeToolbar.pas index 3294a99d32..24bea5ae1e 100644 --- a/plugins/HistoryPlusPlus/CustomizeToolbar.pas +++ b/plugins/HistoryPlusPlus/CustomizeToolbar.pas @@ -335,7 +335,7 @@ begin if ToolbarStr = '' then
ToolbarStr := DEF_HISTORY_TOOLBAR;
if ToolbarStr = DEF_HISTORY_TOOLBAR then
- DBDeleteContactSetting(0, hppDBName, 'HistoryToolbar')
+ db_unset(0, hppDBName, 'HistoryToolbar')
else
WriteDBStr(hppDBName, 'HistoryToolbar', ToolbarStr);
end;
@@ -557,7 +557,7 @@ end; procedure TfmCustomizeToolbar.bnResetClick(Sender: TObject);
begin
- DBDeleteContactSetting(0, hppDBName, 'HistoryToolbar');
+ db_unset(0, hppDBName, 'HistoryToolbar');
NotifyAllForms(HM_NOTF_TOOLBARCHANGED, 0, 0);
FillButtons;
UpdateControlButtons;
diff --git a/plugins/HistoryPlusPlus/HistoryForm.pas b/plugins/HistoryPlusPlus/HistoryForm.pas index 2eed1dd124..ba0337d818 100644 --- a/plugins/HistoryPlusPlus/HistoryForm.pas +++ b/plugins/HistoryPlusPlus/HistoryForm.pas @@ -860,7 +860,7 @@ begin end
else
begin
- DBDeleteContactSetting(0, hppDBName, 'HistoryToolbar');
+ db_unset(0, hppDBName, 'HistoryToolbar');
LoadToolbar;
Exit;
end;
diff --git a/plugins/HistoryPlusPlus/hpp_contacts.pas b/plugins/HistoryPlusPlus/hpp_contacts.pas index e898d003f3..331efce404 100644 --- a/plugins/HistoryPlusPlus/hpp_contacts.pas +++ b/plugins/HistoryPlusPlus/hpp_contacts.pas @@ -152,7 +152,7 @@ begin Result := WideToAnsiString(dbv.szVal.w, hppCodepage);
end;
// free variant
- DBFreeVariant(@dbv);
+ db_free(@dbv);
end;
end;
end;
@@ -230,7 +230,7 @@ begin if Proto = '' then
exit;
case RTLMode of
- hppRTLDefault: DBDeleteContactSetting(hContact, PAnsiChar(Proto), 'RTL');
+ hppRTLDefault: db_unset(hContact, PAnsiChar(Proto), 'RTL');
hppRTLEnable: WriteDBByte(hContact, Proto, 'RTL', Byte(True));
hppRTLDisable: WriteDBByte(hContact, Proto, 'RTL', Byte(false));
end;
diff --git a/plugins/HistoryPlusPlus/hpp_database.pas b/plugins/HistoryPlusPlus/hpp_database.pas index 38f307c6ed..ead338fb9c 100644 --- a/plugins/HistoryPlusPlus/hpp_database.pas +++ b/plugins/HistoryPlusPlus/hpp_database.pas @@ -118,7 +118,7 @@ var begin
Result := (db_get(hContact, PAnsiChar(Module), PAnsiChar(Param), @dbv) = 0);
if Result then
- DBFreeVariant(@dbv);
+ db_free(@dbv);
end;
function DBDelete(const Module, Param: AnsiString): Boolean;
@@ -128,7 +128,7 @@ end; function DBDelete(const hContact: THandle; const Module, Param: AnsiString): Boolean;
begin
- Result := (DBDeleteContactSetting(hContact,PAnsiChar(Module),PAnsiChar(Param)) = 0);
+ Result := (db_unset(hContact,PAnsiChar(Module),PAnsiChar(Param)) = 0);
end;
function WriteDBBool(const Module,Param: AnsiString; Value: Boolean): Integer;
@@ -148,7 +148,7 @@ end; function WriteDBByte(const hContact: THandle; const Module,Param: AnsiString; Value: Byte): Integer;
begin
- Result := DBWriteContactSettingByte(hContact,PAnsiChar(Module), PAnsiChar(Param), Value);
+ Result := db_set_b(hContact,PAnsiChar(Module), PAnsiChar(Param), Value);
end;
function WriteDBWord(const Module,Param: AnsiString; Value: Word): Integer;
@@ -158,7 +158,7 @@ end; function WriteDBWord(const hContact: THandle; const Module,Param: AnsiString; Value: Word): Integer;
begin
- Result := DBWriteContactSettingWord(hContact,PAnsiChar(Module),PAnsiChar(Param),Value);
+ Result := db_set_w(hContact,PAnsiChar(Module),PAnsiChar(Param),Value);
end;
function WriteDBDWord(const Module,Param: AnsiString; Value: DWord): Integer;
@@ -168,7 +168,7 @@ end; function WriteDBDWord(const hContact: THandle; const Module,Param: AnsiString; Value: DWord): Integer;
begin
- Result := DBWriteContactSettingDWord(hContact,PAnsiChar(Module),PAnsiChar(Param),Value);
+ Result := db_set_dw(hContact,PAnsiChar(Module),PAnsiChar(Param),Value);
end;
function WriteDBInt(const Module,Param: AnsiString; Value: Integer): Integer;
@@ -188,7 +188,7 @@ end; function WriteDBStr(const hContact: THandle; const Module,Param: AnsiString; const Value: AnsiString): Integer;
begin
- Result := DBWriteContactSettingString(hContact,PAnsiChar(Module),PAnsiChar(Param),PAnsiChar(Value));
+ Result := db_set_s(hContact,PAnsiChar(Module),PAnsiChar(Param),PAnsiChar(Value));
end;
function WriteDBWideStr(const Module,Param: AnsiString; const Value: WideString): Integer;
@@ -247,7 +247,7 @@ begin if dbv.cpbVal = 0 then exit;
GetMem(Value,dbv.cpbVal);
Move(dbv.pbVal^,PByte(Value)^,dbv.cpbVal);
- DBFreeVariant(@dbv);
+ db_free(@dbv);
Result := True;
end;
@@ -268,7 +268,7 @@ end; function GetDBByte(const hContact: THandle; const Module,Param: AnsiString; Default: Byte): Byte;
begin
- Result := DBGetContactSettingByte(hContact,PAnsiChar(Module),PAnsiChar(Param),Default);
+ Result := db_get_b(hContact,PAnsiChar(Module),PAnsiChar(Param),Default);
end;
function GetDBWord(const Module,Param: AnsiString; Default: Word): Word;
@@ -278,7 +278,7 @@ end; function GetDBWord(const hContact: THandle; const Module,Param: AnsiString; Default: Word): Word;
begin
- Result := DBGetContactSettingWord(hContact,PAnsiChar(Module),PAnsiChar(Param),Default);
+ Result := db_get_w(hContact,PAnsiChar(Module),PAnsiChar(Param),Default);
end;
function GetDBDWord(const Module,Param: AnsiString; Default: DWord): DWord;
@@ -288,7 +288,7 @@ end; function GetDBDWord(const hContact: THandle; const Module,Param: AnsiString; Default: DWord): DWord;
begin
- Result := DBGetContactSettingDWord(hContact,PAnsiChar(Module),PAnsiChar(Param),Default);
+ Result := db_get_dw(hContact,PAnsiChar(Module),PAnsiChar(Param),Default);
end;
function GetDBInt(const Module,Param: AnsiString; Default: Integer): Integer;
@@ -337,7 +337,7 @@ begin Result := WideToAnsiString(dbv.szVal.w,hppCodepage);
end;
// free variant
- DBFreeVariant(@dbv);
+ db_free(@dbv);
end;
end;
@@ -367,7 +367,7 @@ begin Result := WideString(dbv.szVal.w);
end;
// free variant
- DBFreeVariant(@dbv);
+ db_free(@dbv);
end;
end;
diff --git a/plugins/HistoryPlusPlus/hpp_itemprocess.pas b/plugins/HistoryPlusPlus/hpp_itemprocess.pas index 858bd2daa5..55518c0f41 100644 --- a/plugins/HistoryPlusPlus/hpp_itemprocess.pas +++ b/plugins/HistoryPlusPlus/hpp_itemprocess.pas @@ -479,7 +479,7 @@ begin begin
// Get profile dir
SetLength(hppProfileDir, MAX_PATH);
- CallService(MS_DB_GETPROFILEPATH, MAX_PATH, lParam(@hppProfileDir[1]));
+ Profile_GetPathA(MAX_PATH, @hppProfileDir[1]);
SetLength(hppProfileDir, StrLen(pAnsiChar(@hppProfileDir[1])));
Link := AnsiString(hppProfileDir) + '\' + ird.pExtended; //!!
end;
|