diff options
author | Alexey Kulakov <panda75@bk.ru> | 2014-04-05 17:52:11 +0000 |
---|---|---|
committer | Alexey Kulakov <panda75@bk.ru> | 2014-04-05 17:52:11 +0000 |
commit | c4e2e2cfa438205154e7a074e46bd0fb267bb35d (patch) | |
tree | d75c11082a4d9f71a4858af52d216e3b2b907fd9 /plugins/mRadio/i_myservice.inc | |
parent | 0b9c05beba5766dfc43e127244b1c4893e9c8a5d (diff) |
mRadio "Quick Open" added
git-svn-id: http://svn.miranda-ng.org/main/trunk@8863 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/mRadio/i_myservice.inc')
-rw-r--r-- | plugins/mRadio/i_myservice.inc | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/plugins/mRadio/i_myservice.inc b/plugins/mRadio/i_myservice.inc index dc144b616d..74b4c11b4f 100644 --- a/plugins/mRadio/i_myservice.inc +++ b/plugins/mRadio/i_myservice.inc @@ -281,3 +281,39 @@ begin end;
end;
end;
+
+function QuickOpen(wParam:WPARAM;lParam:LPARAM):int; cdecl;
+var
+ filter:pWideChar;
+ buf:array [0..MAX_PATH-1] of WideChar;
+begin
+ filter:=ConstructFilter;
+ if ShowDlgW(@buf,nil,filter) then
+ begin
+ result:=CallService(MS_DB_CONTACT_ADD,0,0);
+ if result<>0 then
+ begin
+ CallService(MS_PROTO_ADDTOCONTACT,result,tlparam(PluginName));
+ //
+// DBWriteByte(result,strCList,'Hidden' ,0);
+ DBWriteByte(result,strCList,'NotOnList',1);
+ // URL
+ DBWriteUnicode(result,PluginName,optStationURL,@buf);
+ DBWriteUnicode(result,PluginName,optFirstName ,@buf);
+ // Name
+ DBWriteUnicode(result,strCList ,optMyHandle,@buf);
+ DBWriteUnicode(result,PluginName,optNick ,@buf);
+
+ SetStatus(result,ID_STATUS_OFFLINE);
+
+ CallService(MS_IGNORE_IGNORE,result,IGNOREEVENT_USERONLINE{IGNOREEVENT_ALL});
+
+ CallService(MS_RADIO_COMMAND,MRC_PLAY,result);
+ end;
+ end
+ else
+ begin
+ result:=0;
+ end;
+ mFreeMem(filter);
+end;
|