From 82dc6ec097405dbbc179b0ea2b3ff99f980ed107 Mon Sep 17 00:00:00 2001 From: Daniel Silverstone Date: Sat, 23 May 2020 21:04:00 +0100 Subject: [PATCH] riscos: Enable support for present_cookies Signed-off-by: Daniel Silverstone --- frontends/riscos/cookies.c | 5 ++++- frontends/riscos/cookies.h | 2 +- frontends/riscos/gui.c | 1 + frontends/riscos/iconbar.c | 2 +- frontends/riscos/window.c | 2 +- 5 files changed, 8 insertions(+), 4 deletions(-) diff --git a/frontends/riscos/cookies.c b/frontends/riscos/cookies.c index 4884950a1..199699dba 100644 --- a/frontends/riscos/cookies.c +++ b/frontends/riscos/cookies.c @@ -447,7 +447,7 @@ static nserror ro_cookie_init(void) /* exported interface documented in riscos/cookies.h */ -nserror ro_gui_cookies_present(void) +nserror ro_gui_cookies_present(const char *search_term) { nserror res; @@ -457,6 +457,9 @@ nserror ro_gui_cookies_present(void) ro_gui_dialog_open_top(cookie_window->core.wh, cookie_window->core.toolbar, 600, 800); + if (search_term != NULL) { + res = cookie_manager_set_search_string(search_term); + } } else { NSLOG(netsurf, INFO, "Failed presenting code %d", res); } diff --git a/frontends/riscos/cookies.h b/frontends/riscos/cookies.h index 1b07d2122..6a217903e 100644 --- a/frontends/riscos/cookies.h +++ b/frontends/riscos/cookies.h @@ -41,7 +41,7 @@ void ro_gui_cookies_initialise(void); * * \return NSERROR_OK on success else appropriate error code on faliure. */ -nserror ro_gui_cookies_present(void); +nserror ro_gui_cookies_present(const char *search_term); /** * Free any resources allocated for the cookie window. diff --git a/frontends/riscos/gui.c b/frontends/riscos/gui.c index 52081b218..b0eb23256 100644 --- a/frontends/riscos/gui.c +++ b/frontends/riscos/gui.c @@ -2431,6 +2431,7 @@ static struct gui_misc_table riscos_misc_table = { .quit = gui_quit, .launch_url = gui_launch_url, + .present_cookies = ro_gui_cookies_present, }; diff --git a/frontends/riscos/iconbar.c b/frontends/riscos/iconbar.c index 23f97258b..a9a62a98f 100644 --- a/frontends/riscos/iconbar.c +++ b/frontends/riscos/iconbar.c @@ -232,7 +232,7 @@ bool ro_gui_iconbar_menu_select(wimp_w w, wimp_i i, wimp_menu *menu, ro_gui_global_history_present(); return true; case COOKIES_SHOW: - ro_gui_cookies_present(); + ro_gui_cookies_present(NULL); return true; case CHOICES_SHOW: ro_gui_configure_show(); diff --git a/frontends/riscos/window.c b/frontends/riscos/window.c index 5a9a7215e..2206ae8e8 100644 --- a/frontends/riscos/window.c +++ b/frontends/riscos/window.c @@ -2638,7 +2638,7 @@ ro_gui_window_menu_select(wimp_w w, /* cookies actions */ case COOKIES_SHOW: - ro_gui_cookies_present(); + ro_gui_cookies_present(NULL); break; case COOKIES_DELETE: