riscos: Enable support for present_cookies

Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
This commit is contained in:
Daniel Silverstone 2020-05-23 21:04:00 +01:00
parent adafe3c750
commit 82dc6ec097
No known key found for this signature in database
GPG Key ID: C30DF439F2987D74
5 changed files with 8 additions and 4 deletions

View File

@ -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);
}

View File

@ -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.

View File

@ -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,
};

View File

@ -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();

View File

@ -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: