summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2014-05-27 23:52:35 +0100
committerVincent Sanders <vince@kyllikki.org>2014-05-27 23:52:35 +0100
commit7d02ae916a9984efb619eac279b4d8e12db0b678 (patch)
treebef9147faf3cc1d0acd08ca98ec6435c6b43eea5 /desktop
parent662e950e48b4ad595e602dfc4d51feb9ce75dbbb (diff)
downloadnetsurf-7d02ae916a9984efb619eac279b4d8e12db0b678.tar.gz
netsurf-7d02ae916a9984efb619eac279b4d8e12db0b678.tar.bz2
make launch_url core operation use nsurl
Diffstat (limited to 'desktop')
-rw-r--r--desktop/browser.c4
-rw-r--r--desktop/gui.h2
-rw-r--r--desktop/gui_factory.c3
3 files changed, 5 insertions, 4 deletions
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,