diff options
author | George Hazan <george.hazan@gmail.com> | 2013-04-12 21:28:12 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-04-12 21:28:12 +0000 |
commit | 91eb23f044911477f615e7e25e1425b667c3f1fa (patch) | |
tree | 783ff1dbb6ef98f9a7a7979bff8f9383caee9aa4 /plugins/mRadio/i_tray.inc | |
parent | 627687a2d798a8fa4ecbe4578c75d93bf97f6da5 (diff) |
pascal sources sync
git-svn-id: http://svn.miranda-ng.org/main/trunk@4435 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/mRadio/i_tray.inc')
-rw-r--r-- | plugins/mRadio/i_tray.inc | 34 |
1 files changed, 15 insertions, 19 deletions
diff --git a/plugins/mRadio/i_tray.inc b/plugins/mRadio/i_tray.inc index fa63acc720..f0a463c5de 100644 --- a/plugins/mRadio/i_tray.inc +++ b/plugins/mRadio/i_tray.inc @@ -49,32 +49,28 @@ begin // Fill list
FillChar(srch,SizeOf(srch),0);
- hContact:=CallService(MS_DB_CONTACT_FINDFIRST,0,0);
+ hContact:=db_find_first(PluginName);
while hContact<>0 do
begin
- if StrCmp(PAnsiChar(CallService(MS_PROTO_GETCONTACTBASEPROTO,hContact,0)),cPluginName)=0 then
+ p:=DBReadUnicode(hContact,strCList,'MyHandle',nil);
+ if p<>nil then
begin
- p:=DBReadUnicode(hContact,strCList,'MyHandle',nil);
- if p<>nil then
+ srch.name:=p;
+ // search in list
+ if List_GetIndex(@trayStations,@srch,@idx)<>0 then
+ // found - set mark
+ pTrayRadioStation(trayStations.Items[idx]).presents:=1
+ else // add if not found
begin
- srch.name:=p;
- // search in list
- if List_GetIndex(@trayStations,@srch,@idx)<>0 then
- // found - set mark
- pTrayRadioStation(trayStations.Items[idx]).presents:=1
- else // add if not found
- begin
- mGetMem(tmp,SizeOf(tTrayRadioStation));
- tmp.name :=p;
- tmp.presents:=2;
- tmp.hContact:=hContact;
- List_InsertPtr(@trayStations,tmp);
- end;
+ mGetMem(tmp,SizeOf(tTrayRadioStation));
+ tmp.name :=p;
+ tmp.presents:=2;
+ tmp.hContact:=hContact;
+ List_InsertPtr(@trayStations,tmp);
end;
end;
- hContact:=CallService(MS_DB_CONTACT_FINDNEXT,hContact,0);
+ hContact:=db_find_next(hContact,PluginName);
end;
-
// delete obsolete elements
for i:=trayStations.realCount-1 downto 0 do
begin
|