mirror of
https://github.com/netsurf-browser/netsurf
synced 2025-01-01 00:34:31 +03:00
gtk: Implement handling of new present_cookies callback
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
This commit is contained in:
parent
26df6ab7dd
commit
a4e9f41948
@ -309,13 +309,14 @@ static nserror nsgtk_cookies_init(void)
|
||||
|
||||
|
||||
/* exported function documented gtk/cookies.h */
|
||||
nserror nsgtk_cookies_present(void)
|
||||
nserror nsgtk_cookies_present(const char *search_term)
|
||||
{
|
||||
nserror res;
|
||||
|
||||
res = nsgtk_cookies_init();
|
||||
if (res == NSERROR_OK) {
|
||||
gtk_window_present(cookie_window->wnd);
|
||||
res = cookie_manager_set_search_string(search_term);
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
@ -28,7 +28,7 @@
|
||||
*
|
||||
* \return NSERROR_OK on success else appropriate error code on faliure.
|
||||
*/
|
||||
nserror nsgtk_cookies_present(void);
|
||||
nserror nsgtk_cookies_present(const char *search_term);
|
||||
|
||||
/**
|
||||
* Free any resources allocated for the cookie window.
|
||||
|
@ -1183,6 +1183,7 @@ static struct gui_misc_table nsgtk_misc_table = {
|
||||
.quit = gui_quit,
|
||||
.launch_url = gui_launch_url,
|
||||
.pdf_password = nsgtk_pdf_password,
|
||||
.present_cookies = nsgtk_cookies_present,
|
||||
};
|
||||
|
||||
|
||||
|
@ -3022,7 +3022,7 @@ static gboolean
|
||||
showcookies_button_clicked_cb(GtkWidget *widget, gpointer data)
|
||||
{
|
||||
nserror res;
|
||||
res = nsgtk_cookies_present();
|
||||
res = nsgtk_cookies_present(NULL);
|
||||
if (res != NSERROR_OK) {
|
||||
NSLOG(netsurf, INFO, "Unable to initialise cookies window.");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user