diff options
Diffstat (limited to 'amiga')
-rwxr-xr-x | amiga/launch.c | 18 | ||||
-rwxr-xr-x | amiga/launch.h | 2 |
2 files changed, 13 insertions, 7 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; } diff --git a/amiga/launch.h b/amiga/launch.h index 7baa6ca27..cab638b1d 100755 --- a/amiga/launch.h +++ b/amiga/launch.h @@ -26,6 +26,6 @@ void ami_openurl_open(void); void ami_openurl_close(void); -void gui_launch_url(const char *url); +nserror gui_launch_url(struct nsurl *url); #endif |