From 7d02ae916a9984efb619eac279b4d8e12db0b678 Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Tue, 27 May 2014 23:52:35 +0100 Subject: make launch_url core operation use nsurl --- desktop/browser.c | 4 ++-- desktop/gui.h | 2 +- desktop/gui_factory.c | 3 ++- 3 files changed, 5 insertions(+), 4 deletions(-) (limited to 'desktop') diff --git a/desktop/browser.c b/desktop/browser.c index 01f57178d..6e3ed9718 100644 --- a/desktop/browser.c +++ b/desktop/browser.c @@ -839,7 +839,7 @@ browser_window_download(struct browser_window *bw, NULL, NULL, &l); if (error == NSERROR_NO_FETCH_HANDLER) { /* no internal handler for this type, call out to frontend */ - guit->browser->launch_url(nsurl_access(url)); + error = guit->browser->launch_url(url); } else if (error != NSERROR_OK) { LOG(("Failed to fetch download: %d", error)); } else { @@ -1932,7 +1932,7 @@ nserror browser_window_navigate(struct browser_window *bw, case NSERROR_NO_FETCH_HANDLER: /* no handler for this type */ /** @todo does this always try and download even unverifiable content? */ - guit->browser->launch_url(nsurl_access(url)); + error = guit->browser->launch_url(url); break; default: /* report error to user */ diff --git a/desktop/gui.h b/desktop/gui.h index bc7553c16..dc964db81 100644 --- a/desktop/gui.h +++ b/desktop/gui.h @@ -475,7 +475,7 @@ struct gui_browser_table { /** * core has no fetcher for url */ - void (*launch_url)(const char *url); + nserror (*launch_url)(struct nsurl *url); /** * create a form select menu diff --git a/desktop/gui_factory.c b/desktop/gui_factory.c index a60766647..b3a27fea2 100644 --- a/desktop/gui_factory.c +++ b/desktop/gui_factory.c @@ -515,8 +515,9 @@ static void gui_default_quit(void) } -static void gui_default_launch_url(const char *url) +static nserror gui_default_launch_url(struct nsurl *url) { + return NSERROR_NO_FETCH_HANDLER; } static void gui_default_create_form_select_menu(struct browser_window *bw, -- cgit v1.2.3