Pass all unknown URLs to launch-handler/OpenURL.
launch-handler in particular can be coerced into opening things like news: just by creating a new config file as ENVARC:launch-handler/URL/NEWS.LH svn path=/trunk/netsurf/; revision=10106
This commit is contained in:
parent
81e9d33a22
commit
ee958f5983
|
@ -51,22 +51,19 @@ void ami_openurl_close(const char *scheme)
|
|||
|
||||
void gui_launch_url(const char *url)
|
||||
{
|
||||
if(!strncmp("mailto:",url,7))
|
||||
APTR procwin = SetProcWindow((APTR)-1L);
|
||||
char *launchurl = NULL;
|
||||
BPTR fptr = 0;
|
||||
|
||||
launchurl = ASPrintf("URL:%s",url);
|
||||
|
||||
if(launchurl && (fptr = Open(launchurl,MODE_OLDFILE)))
|
||||
{
|
||||
APTR procwin = SetProcWindow((APTR)-1L);
|
||||
char *launchurl = NULL;
|
||||
BPTR fptr = 0;
|
||||
|
||||
launchurl = ASPrintf("URL:%s",url);
|
||||
|
||||
if(launchurl && (fptr = Open(launchurl,MODE_OLDFILE)))
|
||||
{
|
||||
Close(fptr);
|
||||
}
|
||||
else if(IOpenURL)
|
||||
URL_OpenA(url,NULL);
|
||||
|
||||
FreeVec(launchurl);
|
||||
SetProcWindow(procwin);
|
||||
Close(fptr);
|
||||
}
|
||||
else if(IOpenURL)
|
||||
URL_OpenA(url,NULL);
|
||||
|
||||
FreeVec(launchurl);
|
||||
SetProcWindow(procwin);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue