summaryrefslogtreecommitdiff
path: root/frontends
diff options
context:
space:
mode:
authorDaniel Silverstone <dsilvers@digital-scurf.org>2020-05-23 20:56:20 +0100
committerDaniel Silverstone <dsilvers@digital-scurf.org>2020-05-23 21:18:46 +0100
commita4e9f41948ddb07e1668a6b8e15c19d1838dc0ab (patch)
tree359688e4a514612be7427787bb6a726a5b168693 /frontends
parent26df6ab7dd8fda3bcb1c7bca29608e998fd409f9 (diff)
downloadnetsurf-a4e9f41948ddb07e1668a6b8e15c19d1838dc0ab.tar.gz
netsurf-a4e9f41948ddb07e1668a6b8e15c19d1838dc0ab.tar.bz2
gtk: Implement handling of new present_cookies callback
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
Diffstat (limited to 'frontends')
-rw-r--r--frontends/gtk/cookies.c3
-rw-r--r--frontends/gtk/cookies.h2
-rw-r--r--frontends/gtk/gui.c1
-rw-r--r--frontends/gtk/toolbar.c2
4 files changed, 5 insertions, 3 deletions
diff --git a/frontends/gtk/cookies.c b/frontends/gtk/cookies.c
index d787e35fb..0df9719cb 100644
--- a/frontends/gtk/cookies.c
+++ b/frontends/gtk/cookies.c
@@ -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;
}
diff --git a/frontends/gtk/cookies.h b/frontends/gtk/cookies.h
index c1a68b7f9..b8fc9aba2 100644
--- a/frontends/gtk/cookies.h
+++ b/frontends/gtk/cookies.h
@@ -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.
diff --git a/frontends/gtk/gui.c b/frontends/gtk/gui.c
index 17dbc499a..e5006d954 100644
--- a/frontends/gtk/gui.c
+++ b/frontends/gtk/gui.c
@@ -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,
};
diff --git a/frontends/gtk/toolbar.c b/frontends/gtk/toolbar.c
index d08973293..32adabc5b 100644
--- a/frontends/gtk/toolbar.c
+++ b/frontends/gtk/toolbar.c
@@ -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.");
}