diff options
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/Actman/i_options.inc | 2 | ||||
-rw-r--r-- | plugins/Actman/iac_dbrw.pas | 4 | ||||
-rw-r--r-- | plugins/Actman/ua/i_options.inc | 24 | ||||
-rw-r--r-- | plugins/HistoryPlusPlus/hpp_events.pas | 11 | ||||
-rw-r--r-- | plugins/QuickSearch/sr_global.pas | 2 | ||||
-rw-r--r-- | plugins/QuickSearch/sr_window.pas | 2 | ||||
-rw-r--r-- | plugins/Utils.pas/dbsettings.pas | 21 | ||||
-rw-r--r-- | plugins/Watrack/proto/i_proto_dlg.inc | 2 | ||||
-rw-r--r-- | plugins/Watrack/watrack.dpr | 2 | ||||
-rw-r--r-- | plugins/mRadio/i_optdlg.inc | 2 | ||||
-rw-r--r-- | plugins/mRadio/i_search.inc | 4 | ||||
-rw-r--r-- | plugins/mRadio/rbass.pas | 2 | ||||
-rw-r--r-- | plugins/mRadio/rccenter.pas | 10 | ||||
-rw-r--r-- | plugins/mRadio/roptions.pas | 4 |
14 files changed, 35 insertions, 57 deletions
diff --git a/plugins/Actman/i_options.inc b/plugins/Actman/i_options.inc index 2dc6af1665..1c7ccec6df 100644 --- a/plugins/Actman/i_options.inc +++ b/plugins/Actman/i_options.inc @@ -467,7 +467,7 @@ begin if v2 then
begin
- DBDeleteSetting(0,DBBranch,opt_numacts);
+ db_unset(0,DBBranch,opt_numacts);
SaveMacros;
MessageBoxW(0,TranslateW(Notes),TranslateW(ConvResult),MB_ICONINFORMATION);
end;
diff --git a/plugins/Actman/iac_dbrw.pas b/plugins/Actman/iac_dbrw.pas index dffd5ca233..416827c598 100644 --- a/plugins/Actman/iac_dbrw.pas +++ b/plugins/Actman/iac_dbrw.pas @@ -213,9 +213,9 @@ begin if (asbuf[0]='*') or (asbuf[StrLen(asbuf)-1]='*') then
DBDeleteGroup(hContact,ambuf,asbuf)
else if asbuf[0]=#0 then
- DBDeleteModule(hContact,ambuf)
+ DbModule_Delete(hContact,ambuf)
else
- DBDeleteSetting(hContact,ambuf,asbuf);
+ db_unset(hContact,ambuf,asbuf);
end
else
begin
diff --git a/plugins/Actman/ua/i_options.inc b/plugins/Actman/ua/i_options.inc index 977ff7891b..fd023c6480 100644 --- a/plugins/Actman/ua/i_options.inc +++ b/plugins/Actman/ua/i_options.inc @@ -30,24 +30,24 @@ begin p^:='*'; inc(p); p^:=#0;
DBDeleteGroup(0,DBBranch,setting);
!!}
- StrCopy(p,opt_Flags); DBDeleteSetting(0,DBBranch,setting);
+ StrCopy(p,opt_Flags); db_unset(0,DBBranch,setting);
- StrCopy(p,opt_TTBTooltip ); DBDeleteSetting(0,DBBranch,setting);
- StrCopy(p,opt_TTBTooltipPressed ); DBDeleteSetting(0,DBBranch,setting);
- StrCopy(p,opt_TTBShowWhenVars ); DBDeleteSetting(0,DBBranch,setting);
+ StrCopy(p,opt_TTBTooltip ); db_unset(0,DBBranch,setting);
+ StrCopy(p,opt_TTBTooltipPressed ); db_unset(0,DBBranch,setting);
+ StrCopy(p,opt_TTBShowWhenVars ); db_unset(0,DBBranch,setting);
- StrCopy(p,opt_TabBTooltip ); DBDeleteSetting(0,DBBranch,setting);
- StrCopy(p,opt_TabBTooltipPressed); DBDeleteSetting(0,DBBranch,setting);
+ StrCopy(p,opt_TabBTooltip ); db_unset(0,DBBranch,setting);
+ StrCopy(p,opt_TabBTooltipPressed); db_unset(0,DBBranch,setting);
for lmenu:=main_menu to HIGH(tMenuType) do
begin
pm:=p;
pm^:=AnsiChar(ORD(lmenu)+ORD('0')); inc(pm);
pm^:='_'; inc(pm);
- StrCopy(pm,opt_MenuPopup ); DBDeleteSetting(0,DBBranch,setting);
- StrCopy(pm,opt_MenuNameVars ); DBDeleteSetting(0,DBBranch,setting);
- StrCopy(pm,opt_MenuShowWhenVars); DBDeleteSetting(0,DBBranch,setting);
- StrCopy(pm,opt_MenuOptions ); DBDeleteSetting(0,DBBranch,setting);
+ StrCopy(pm,opt_MenuPopup ); db_unset(0,DBBranch,setting);
+ StrCopy(pm,opt_MenuNameVars ); db_unset(0,DBBranch,setting);
+ StrCopy(pm,opt_MenuShowWhenVars); db_unset(0,DBBranch,setting);
+ StrCopy(pm,opt_MenuOptions ); db_unset(0,DBBranch,setting);
end;
end;
end;
@@ -55,13 +55,13 @@ end; procedure addSaveUA(setting:pAnsiChar;txt:pWideChar); overload;
begin
- if (txt=nil) or (txt^=#0) then DBDeleteSetting(0,DBBranch,setting)
+ if (txt=nil) or (txt^=#0) then db_unset(0,DBBranch,setting)
else DBWriteUnicode(0,DBBranch,setting,txt);
end;
procedure addSaveUA(setting:pAnsiChar;txt:pAnsiChar); overload;
begin
- if (txt=nil) or (txt^=#0) then DBDeleteSetting(0,DBBranch,setting)
+ if (txt=nil) or (txt^=#0) then db_unset(0,DBBranch,setting)
else DBWriteString(0,DBBranch,setting,txt);
end;
diff --git a/plugins/HistoryPlusPlus/hpp_events.pas b/plugins/HistoryPlusPlus/hpp_events.pas index 848008a37e..f3493adf03 100644 --- a/plugins/HistoryPlusPlus/hpp_events.pas +++ b/plugins/HistoryPlusPlus/hpp_events.pas @@ -298,8 +298,7 @@ begin exit;
end;
end;
- etd := Pointer(CallService(MS_DB_EVENT_GETTYPE, WPARAM(PAnsiChar(Hi.Module)),
- LPARAM(Hi.EventType)));
+ etd := DbEvent_GetType(PAnsiChar(Hi.Module), Hi.EventType);
if etd = nil then
begin
Result := @EventRecords[mtOther];
@@ -525,16 +524,12 @@ end; function GetEventCoreText(EventInfo: TDBEventInfo; var Hi: THistoryItem): Boolean;
var
- dbegt: TDBEVENTGETTEXT;
- msg: Pointer;
+ msg: PWideChar;
begin
Result := False;
- dbegt.dbei := @EventInfo;
- dbegt.datatype := DBVT_WCHAR;
- dbegt.codepage := hi.Codepage;
msg := nil;
try
- msg := Pointer(CallService(MS_DB_EVENT_GETTEXT,0,LPARAM(@dbegt)));
+ msg := DbEvent_GetTextW(@EventInfo, CP_ACP);
Result := Assigned(msg);
except
if Assigned(msg) then mir_free(msg);
diff --git a/plugins/QuickSearch/sr_global.pas b/plugins/QuickSearch/sr_global.pas index 0abc91cf62..d6b60ebed8 100644 --- a/plugins/QuickSearch/sr_global.pas +++ b/plugins/QuickSearch/sr_global.pas @@ -696,7 +696,7 @@ var begin
if DBGetSettingType(0,qs_module,so_flags)=DBVT_DELETED then
begin
- DBDeleteModule(0,qs_module);
+ DbModule_Delete(0,qs_module);
qsopt.flags:=
QSO_SORTBYSTATUS or QSO_DRAWGRID or
QSO_CLIENTICONS or QSO_COLORIZE or
diff --git a/plugins/QuickSearch/sr_window.pas b/plugins/QuickSearch/sr_window.pas index 3ed4343e6d..de7b108950 100644 --- a/plugins/QuickSearch/sr_window.pas +++ b/plugins/QuickSearch/sr_window.pas @@ -539,7 +539,7 @@ begin begin
contact:=FlagBuf[LV_GetLParam(grid,i)].contact;
if container^=#0 then
- DBDeleteSetting(contact,'Tab_SRMsg','containerW')
+ db_unset(contact,'Tab_SRMsg','containerW')
else
DBWriteUnicode(contact,'Tab_SRMsg','containerW',container);
if ((qsopt.flags and QSO_AUTOCLOSE)=0) and (grcol>=0) then
diff --git a/plugins/Utils.pas/dbsettings.pas b/plugins/Utils.pas/dbsettings.pas index df2b28aa22..c60220e3a2 100644 --- a/plugins/Utils.pas/dbsettings.pas +++ b/plugins/Utils.pas/dbsettings.pas @@ -32,13 +32,8 @@ function DBWriteString (hContact:TMCONTACT;szModule:PAnsiChar;szSetting:PAnsiCha function DBWriteUTF8 (hContact:TMCONTACT;szModule:PAnsiChar;szSetting:PAnsiChar;val:PAnsiChar):int_ptr;
function DBWriteUnicode(hContact:TMCONTACT;szModule:PAnsiChar;szSetting:PAnsiChar;val:PWideChar):int_ptr;
-//function db_free(dbv:PDBVARIANT):int_ptr;
-function DBDeleteSetting(hContact:TMCONTACT;szModule:PAnsiChar;szSetting:PAnsiChar):int_ptr;
-
function DBDeleteGroup(hContact:TMCONTACT;szModule:PAnsiChar;prefix:PAnsiChar=nil):int_ptr;
-function DBDeleteModule(hContact:TMCONTACT;szModule:PAnsiChar):integer;
-
function DBGetSettingType(hContact:TMCONTACT;szModule:PAnsiChar;szSetting:PAnsiChar):integer;
implementation
@@ -204,12 +199,6 @@ begin result:=db_set_ws(hContact, szModule, szSetting, val);
end;
-function DBDeleteSetting(hContact:TMCONTACT;szModule:PAnsiChar;szSetting:PAnsiChar):int_ptr;
- {$IFDEF AllowInline}inline;{$ENDIF}
-begin
- result:=db_unset(hContact, szModule, szSetting);
-end;
-
type
ppchar = ^PAnsiChar;
@@ -238,7 +227,7 @@ var begin
if (prefix=nil) or (prefix^=#0) then
begin
- DBDeleteModule(hContact,szModule);
+ DbModule_Delete(hContact,szModule);
result:=0;
exit;
end;
@@ -307,7 +296,7 @@ begin if res then
begin
- DBDeleteSetting(hContact,szModule,ptr);
+ db_unset(hContact,szModule,ptr);
end;
while ptr^<>#0 do inc(ptr);
inc(ptr);
@@ -315,12 +304,6 @@ begin FreeMem(p);
end;
-function DBDeleteModule(hContact:TMCONTACT;szModule:PAnsiChar):integer;
-begin
- result:=0;
- CallService(MS_DB_MODULE_DELETE,hContact,lParam(szModule));
-end;
-
function DBGetSettingType(hContact:TMCONTACT;szModule:PAnsiChar;szSetting:PAnsiChar):integer;
var
ldbv:TDBVARIANT;
diff --git a/plugins/Watrack/proto/i_proto_dlg.inc b/plugins/Watrack/proto/i_proto_dlg.inc index d5c3f2262b..fff194f5d9 100644 --- a/plugins/Watrack/proto/i_proto_dlg.inc +++ b/plugins/Watrack/proto/i_proto_dlg.inc @@ -32,7 +32,7 @@ begin if SendMessage(hwndList,CLM_GETCHECKMARK,hItem,0)<>0 then
DBWriteByte(hContact,strCList,ShareOptText,1)
else
- DBDeleteSetting(hContact,strCList,ShareOptText);
+ db_unset(hContact,strCList,ShareOptText);
end;
hContact:=db_find_next(hContact);
end;
diff --git a/plugins/Watrack/watrack.dpr b/plugins/Watrack/watrack.dpr index f653ec22ea..d766d53b06 100644 --- a/plugins/Watrack/watrack.dpr +++ b/plugins/Watrack/watrack.dpr @@ -557,7 +557,7 @@ begin dbetd.flags :=cdbetd[i].flags;
dbetd.eventType :=cdbetd[i].event;
dbetd.descr :=cdbetd[i].descr;
- CallService(MS_DB_EVENT_REGISTERTYPE,0,TLPARAM(@dbetd));
+ DbEvent_RegisterType(@dbetd);
end;
// Load WATrack modules
diff --git a/plugins/mRadio/i_optdlg.inc b/plugins/mRadio/i_optdlg.inc index 3b13dffae6..69e9ab3971 100644 --- a/plugins/mRadio/i_optdlg.inc +++ b/plugins/mRadio/i_optdlg.inc @@ -172,7 +172,7 @@ begin if dst<>nil then
DBWriteUnicode(i,strCList,optGroup,dst)
else
- DBDeleteSetting(i,strCList,optGroup);
+ db_unset(i,strCList,optGroup);
end
else if loword(wParam)=IDC_ADD_INI then
diff --git a/plugins/mRadio/i_search.inc b/plugins/mRadio/i_search.inc index d6e65e4794..355d91f833 100644 --- a/plugins/mRadio/i_search.inc +++ b/plugins/mRadio/i_search.inc @@ -388,8 +388,8 @@ begin mFreeMem(p);
if l then
begin
- DBDeleteSetting(hContact,strCList,'NotOnList');
- DBDeleteSetting(hContact,strCList,'Hidden');
+ db_unset(hContact,strCList,'NotOnList');
+ db_unset(hContact,strCList,'Hidden');
result:=hContact;
exit;
end;
diff --git a/plugins/mRadio/rbass.pas b/plugins/mRadio/rbass.pas index 41516866ce..509d4e9057 100644 --- a/plugins/mRadio/rbass.pas +++ b/plugins/mRadio/rbass.pas @@ -185,7 +185,7 @@ begin chan:=0;
mFreeMem(StationHeader);
mFreeMem(ActiveURL);
- DBDeleteSetting(ActiveContact,strCList,optStatusMsg);
+ db_unset(ActiveContact,strCList,optStatusMsg);
MyStopBass;
end;
diff --git a/plugins/mRadio/rccenter.pas b/plugins/mRadio/rccenter.pas index 2b8f48b1a7..ef8b77bf9a 100644 --- a/plugins/mRadio/rccenter.pas +++ b/plugins/mRadio/rccenter.pas @@ -81,7 +81,7 @@ begin mFreeMem(buf);
end
else
- DBDeleteSetting(ActiveContact,strCList,optStatusMsg);
+ db_unset(ActiveContact,strCList,optStatusMsg);
end;
{$IFDEF Debug}
@@ -351,7 +351,7 @@ begin SetStatus(ActiveContact,ID_STATUS_OFFLINE);
ActiveContact:=0;
- DBDeleteSetting(0,PluginName,optActiveURL);
+ db_unset(0,PluginName,optActiveURL);
PlayStatus:=RD_STATUS_NOSTATION;
// empty message
@@ -359,10 +359,10 @@ begin RD_STATUS_STOPPED: begin
if ActiveContact<>0 then //!! fools proof
- DBDeleteSetting(ActiveContact,strCList,optStatusMsg);
+ db_unset(ActiveContact,strCList,optStatusMsg);
- DBDeleteSetting(0,PluginName,optTitle);
- DBDeleteSetting(0,PluginName,optArtist);
+ db_unset(0,PluginName,optTitle);
+ db_unset(0,PluginName,optArtist);
PlayStatus:=RD_STATUS_STOPPED;
// empty message
diff --git a/plugins/mRadio/roptions.pas b/plugins/mRadio/roptions.pas index 2932dbbcbd..59fbba0042 100644 --- a/plugins/mRadio/roptions.pas +++ b/plugins/mRadio/roptions.pas @@ -134,8 +134,8 @@ begin while j>Length(Presets) do
begin
dec(j);
- StrCopy(p ,IntToStr(num,j)); DBDeleteSetting(0,PluginName,preset);
- StrCopy(pd,num); DBDeleteSetting(0,PluginName,descr);
+ StrCopy(p ,IntToStr(num,j)); db_unset(0,PluginName,preset);
+ StrCopy(pd,num); db_unset(0,PluginName,descr);
end;
DBWriteByte(0,PluginName,optOldPreset,OldEQPreset);
DBWriteByte(0,PluginName,optPresets ,Length(Presets));
|