diff options
Diffstat (limited to 'plugins/ShlExt')
-rw-r--r-- | plugins/ShlExt/shlcom.pas | 16 | ||||
-rw-r--r-- | plugins/ShlExt/shlext.dpr | 30 |
2 files changed, 15 insertions, 31 deletions
diff --git a/plugins/ShlExt/shlcom.pas b/plugins/ShlExt/shlcom.pas index 8aeb14c62b..97fef24660 100644 --- a/plugins/ShlExt/shlcom.pas +++ b/plugins/ShlExt/shlcom.pas @@ -1938,7 +1938,7 @@ begin GetMem(pContacts, (dwContacts + 2) * sizeof(TSlotInfo));
i := 0;
dwOnline := 0;
- hContact := CallService(MS_DB_CONTACT_FINDFIRST, 0, 0);
+ hContact := db_find_first();
while (hContact <> 0) do
begin
if i >= dwContacts then
@@ -1953,7 +1953,7 @@ begin dwCaps := CallService(szTmp, PFLAGNUM_1, 0);
if (dwCaps and PF1_FILESEND) = 0 then
begin
- hContact := CallService(MS_DB_CONTACT_FINDNEXT, hContact, 0);
+ hContact := db_find_next(hContact);
continue;
end;
dwStatus := DBGetContactSettingWord(hContact, szProto, 'Status', ID_STATUS_OFFLINE);
@@ -1961,7 +1961,7 @@ begin inc(dwOnline)
else if bHideOffline then
begin
- hContact := CallService(MS_DB_CONTACT_FINDNEXT, hContact, 0);
+ hContact := db_find_next(hContact);
continue;
end; // if
// is HIT on?
@@ -1974,7 +1974,7 @@ begin (CallService(MS_IGNORE_ISIGNORED, hContact, IGNOREEVENT_MESSAGE or
IGNOREEVENT_URL or IGNOREEVENT_FILE) <> 0) then
begin
- hContact := CallService(MS_DB_CONTACT_FINDNEXT, hContact, 0);
+ hContact := db_find_next(hContact);
continue;
end; // if
end; // if
@@ -1985,7 +1985,7 @@ begin if DBGetContactSettingWord(hContact, szProto, 'ApparentMode', 0) = ID_STATUS_OFFLINE
then
begin
- hContact := CallService(MS_DB_CONTACT_FINDNEXT, hContact, 0);
+ hContact := db_find_next(hContact);
continue;
end; // if
end; // if
@@ -1999,7 +1999,7 @@ begin begin
// contact has no protocol!
end; // if
- hContact := CallService(MS_DB_CONTACT_FINDNEXT, hContact, 0);
+ hContact := db_find_next(hContact);
end; // while
// if no one is online and the CList isn't showing offliners, quit
if (dwOnline = 0) and (bHideOffline) then
@@ -2077,14 +2077,14 @@ var hContact: THandle;
begin
begin
- hContact := CallService(MS_DB_CONTACT_FINDFIRST, 0, 0);
+ hContact := db_find_first();
while hContact <> 0 do
begin
if DBGetContactSettingByte(hContact, SHLExt_Name, SHLExt_MRU, 0) > 0 then
begin
DBWriteContactSettingByte(hContact, SHLExt_Name, SHLExt_MRU, 0);
end;
- hContact := CallService(MS_DB_CONTACT_FINDNEXT, hContact, 0);
+ hContact := db_find_next(hContact);
end;
end;
end;
diff --git a/plugins/ShlExt/shlext.dpr b/plugins/ShlExt/shlext.dpr index 32d1eab0c7..c23ee75f93 100644 --- a/plugins/ShlExt/shlext.dpr +++ b/plugins/ShlExt/shlext.dpr @@ -198,7 +198,6 @@ var comReg: Integer;
iCheck: Integer;
szBuf: array [0 .. MAX_PATH] of Char;
- cgs: TDBCONTACTGETSETTING;
begin
Result := wMsg = WM_INITDIALOG;
case wMsg of
@@ -281,28 +280,13 @@ begin 'Are you sure? this will remove all the settings stored in your database and all registry entries created for shlext to work with Explorer'),
TranslateW('Disable/Remove shlext'), MB_YESNO or MB_ICONQUESTION) then
begin
- cgs.szModule := SHLExt_Name;
-
- cgs.szSetting := SHLExt_UseGroups;
- CallService(MS_DB_CONTACT_DELETESETTING, 0, TLPARAM(@cgs));
-
- cgs.szSetting := SHLExt_UseCListSetting;
- CallService(MS_DB_CONTACT_DELETESETTING, 0, TLPARAM(@cgs));
-
- cgs.szSetting := SHLExt_UseHITContacts;
- CallService(MS_DB_CONTACT_DELETESETTING, 0, TLPARAM(@cgs));
-
- cgs.szSetting := SHLExt_UseHIT2Contacts;
- CallService(MS_DB_CONTACT_DELETESETTING, 0, TLPARAM(@cgs));
-
- cgs.szSetting := SHLExt_ShowNoProfile;
- CallService(MS_DB_CONTACT_DELETESETTING, 0, TLPARAM(@cgs));
-
- cgs.szSetting := SHLExt_ShowNoIcons;
- CallService(MS_DB_CONTACT_DELETESETTING, 0, TLPARAM(@cgs));
-
- cgs.szSetting := SHLExt_ShowNoOffline;
- CallService(MS_DB_CONTACT_DELETESETTING, 0, TLPARAM(@cgs));
+ db_unset(0, SHLExt_Name, SHLExt_UseGroups);
+ db_unset(0, SHLExt_Name, SHLExt_UseCListSetting);
+ db_unset(0, SHLExt_Name, SHLExt_UseHITContacts);
+ db_unset(0, SHLExt_Name, SHLExt_UseHIT2Contacts);
+ db_unset(0, SHLExt_Name, SHLExt_ShowNoProfile);
+ db_unset(0, SHLExt_Name, SHLExt_ShowNoIcons);
+ db_unset(0, SHLExt_Name, SHLExt_ShowNoOffline);
(* remove from Explorer *)
// DllUnregisterServer();
|