summaryrefslogtreecommitdiff
path: root/plugins/mRadio/i_search.inc
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/mRadio/i_search.inc')
-rw-r--r--plugins/mRadio/i_search.inc119
1 files changed, 1 insertions, 118 deletions
diff --git a/plugins/mRadio/i_search.inc b/plugins/mRadio/i_search.inc
index 6bb67cd658..bd5be91a25 100644
--- a/plugins/mRadio/i_search.inc
+++ b/plugins/mRadio/i_search.inc
@@ -1,90 +1,5 @@
{search station code}
-(*
-procedure SetAvatar(hContact:THANDLE);
-var
- success:boolean;
- fname:pAnsiChar;
- url:pWideChar;
- buf,buf1,buf2:array [0..MAX_PATH-1] of AnsiChar;
- ext:array [0..15] of AnsiChar;
- section:pAnsiChar;
- pc:pAnsiChar;
- i:integer;
-begin
- // get url
- url:=DBReadUnicode(hContact,PluginName,optStationURL);
- // translate to Ansi
- FastWideToAnsiBuf(url,buf);
- mFreeMem(url);
-
- // search in INI
- i:=GetFSize(storage);
- if i=0 then
- i:=32767;
- mGetMem(pc,i+1);
- pc^:=#0;
- GetPrivateProfileSectionNamesA(pc,i,storage);
- section:=pc;
-
- while section^<>#0 do
- begin
- GetPrivateProfileStringA(section,'URL','',buf1,SizeOf(buf1),storage);
- if StrCmp(@buf,@buf1)=0 then
- break;
- while section^<>#0 do inc(section);
- inc(section);
- end;
- mFreeMem(pc);
-
- if section^<>#0 then
- begin
- // get avatar link
- buf[0]:=#0;
- GetPrivateProfileStringA(section,'Avatar','',buf,SizeOf(buf),storage);
-
- if buf[0]<>#0 then
- begin
- // Here we trying to get Avatar chache directory
- // (create it if needs)
- // and copy (load) owr avatars there
- // in : buf = source avatar path
- // out: fname = destination (file name in cache)
- // rule for name is?..
-
-
- if StrPos(buf,'://')=nil then
- begin
- fname:=@buf;
- success:=FileExists(fname);
- // need to copy this file to avatar cache
- end
- else
- begin
- // download file
-{
- GetTempPathA(MAX_PATH,pAnsiChar(@buf1));
- pc:=extract(pAnsiChar(@buf),true);
- StrCat(pAnsiChar(@buf1),pc);
- mFreeMem(pc);
-}
- //mrAvt
-
- GetExt(pAnsiChar(@buf),pAnsiChar(@ext));
- GetTempPathA(MAX_PATH,pAnsiChar(@buf2));
- GetTempFileNameA(pAnsiChar(@buf2),'mrAvt',GetCurrentTime,pAnsiChar(@buf1));
- ChangeExt(pAnsiChar(@buf1),PAnsiChar(@ext));
- //
- fname:=@buf1;
- success:=GetFile(pAnsiChar(@buf),fname);
- end;
-
- if success then
- CallService(MS_AV_SETAVATAR,hContact,LPARAM(fname));
- end;
- end;
-end;
-*)
type
TMySearchFilter = record
lStation,
@@ -239,11 +154,10 @@ begin
with filter do
begin
-// CallService(MS_UTILS_PATHTOABSOLUTE,TWPARAM(@ini1),TLPARAM(@ini));
lBitrate:=GetDlgItemInt(wnd,IDC_BITRATE,ltmp,false);
if IsDlgButtonChecked(wnd,IDC_LT)=BST_CHECKED then lBitrateMode:=-1
else if IsDlgButtonChecked(wnd,IDC_EQ)=BST_CHECKED then lBitrateMode:=0
- else{if IsDlgButtonChecked(lParam,IDC_GT)=BST_CHECKED} lBitrateMode:=1;
+ else lBitrateMode:=1;
lStation:=GetDlgText(wnd,IDC_STATION,true);
if lStation<>nil then
@@ -326,16 +240,6 @@ type
y:word;
cx:word;
cy:word;
-{
- sz_Or_Ord menu;
- sz_Or_Ord windowClass;
- title:array [0..titleLen] of WideChar;
- pointsize:word;
- weight:word;
- italic:byte;
- charset:byte;
- typeface:array [0..stringLen] of WideChar;
-}
end;
var
@@ -378,25 +282,6 @@ begin
if lurl<>nil then
begin
-{
-// find contact
- hContact:=db_find_first(PluginName);
- while hContact<>0 do
- begin
- p:=DBReadString(hContact,PluginName,optStationURL);
- l:=StrCmp(p,lurl)=0;
- mFreeMem(p);
- if l then
- begin
- db_unset(hContact,strCList,'NotOnList');
- db_unset(hContact,strCList,'Hidden');
- result:=hContact;
- exit;
- end;
- hContact:=db_find_next(hContact,PluginName);
- end;
-// if not found
-}
hContact:=db_add_contact();
if hContact<>0 then
begin
@@ -429,8 +314,6 @@ begin
SetStatus(hContact,ID_STATUS_OFFLINE);
-// SetAvatar(hContact);
-
Ignore_Ignore(hContact,IGNOREEVENT_USERONLINE);
result:=hContact;
end;