From 7ace528729c37d665e269c8a76991739c9437088 Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Wed, 29 Oct 2014 00:17:11 +0000 Subject: Update url setting API to return nserror code instead of calling warn_user --- riscos/window.c | 11 ++++++----- riscos/window.h | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-) (limited to 'riscos') diff --git a/riscos/window.c b/riscos/window.c index b7cb6e80c..6a62d560c 100644 --- a/riscos/window.c +++ b/riscos/window.c @@ -1052,13 +1052,14 @@ void gui_window_set_pointer(struct gui_window *g, gui_pointer_shape shape) /* exported function documented in riscos/window.h */ -void gui_window_set_url(struct gui_window *g, const char *url) +nserror gui_window_set_url(struct gui_window *g, const char *url) { - if (!g->toolbar) - return; + if (g->toolbar) { + ro_toolbar_set_url(g->toolbar, url, true, false); + ro_gui_url_complete_start(g->toolbar); + } - ro_toolbar_set_url(g->toolbar, url, true, false); - ro_gui_url_complete_start(g->toolbar); + return NSERROR_OK; } diff --git a/riscos/window.h b/riscos/window.h index c4daf8bb8..ea31fcb9b 100644 --- a/riscos/window.h +++ b/riscos/window.h @@ -39,7 +39,7 @@ bool ro_gui_window_check_menu(wimp_menu *menu); * \param g gui_window to update * \param url new url for address bar */ -void gui_window_set_url(struct gui_window *g, const char *url); +nserror gui_window_set_url(struct gui_window *g, const char *url); #endif -- cgit v1.2.3