diff options
author | Vincent Sanders <vince@kyllikki.org> | 2014-05-27 23:52:35 +0100 |
---|---|---|
committer | Vincent Sanders <vince@kyllikki.org> | 2014-05-27 23:52:35 +0100 |
commit | 7d02ae916a9984efb619eac279b4d8e12db0b678 (patch) | |
tree | bef9147faf3cc1d0acd08ca98ec6435c6b43eea5 /amiga/launch.c | |
parent | 662e950e48b4ad595e602dfc4d51feb9ce75dbbb (diff) | |
download | netsurf-7d02ae916a9984efb619eac279b4d8e12db0b678.tar.gz netsurf-7d02ae916a9984efb619eac279b4d8e12db0b678.tar.bz2 |
make launch_url core operation use nsurl
Diffstat (limited to 'amiga/launch.c')
-rwxr-xr-x | amiga/launch.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/amiga/launch.c b/amiga/launch.c index 84d362fa1..1405d6a71 100755 --- a/amiga/launch.c +++ b/amiga/launch.c @@ -122,25 +122,31 @@ void ami_openurl_close(const char *scheme) ami_openurl_free_list(&ami_unsupportedprotocols); } -void gui_launch_url(const char *url) +nserror gui_launch_url(struct nsurl *url) { APTR procwin = SetProcWindow((APTR)-1L); char *launchurl = NULL; - if(ami_openurl_check_list(&ami_unsupportedprotocols, url) == FALSE) + if(ami_openurl_check_list(&ami_unsupportedprotocols, nsurl_access(url)) == FALSE) { if(IOpenURL) { URL_OpenA((STRPTR)url,NULL); } else { - if(launchurl = ASPrintf("URL:%s",url)) { + if(launchurl = ASPrintf("URL:%s", nsurl_access(url))) { BPTR fptr = Open(launchurl,MODE_OLDFILE); - if(fptr) Close(fptr); - else ami_openurl_add_protocol(url); + if(fptr) + { + Close(fptr); + } else { + ami_openurl_add_protocol(nsurl_access(url)); + } FreeVec(launchurl); } } } - SetProcWindow(procwin); + SetProcWindow(procwin); + + return NSERROR_OK; } |