summaryrefslogtreecommitdiff
path: root/frontends/windows
diff options
context:
space:
mode:
authorDaniel Silverstone <dsilvers@digital-scurf.org>2020-05-23 21:16:10 +0100
committerDaniel Silverstone <dsilvers@digital-scurf.org>2020-05-23 21:18:47 +0100
commit60f8f0126d49dc5313d44858e9b4da0aeb1f5697 (patch)
treee8c0eb6319b8df874381e0c6190cf07aaeac5c3d /frontends/windows
parent8e0469d41db6b53f75c509d364cf25f3c0abc71a (diff)
downloadnetsurf-60f8f0126d49dc5313d44858e9b4da0aeb1f5697.tar.gz
netsurf-60f8f0126d49dc5313d44858e9b4da0aeb1f5697.tar.bz2
windows: Enable present_cookies callback
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
Diffstat (limited to 'frontends/windows')
-rw-r--r--frontends/windows/cookies.c8
-rw-r--r--frontends/windows/cookies.h2
-rw-r--r--frontends/windows/main.c2
-rw-r--r--frontends/windows/window.c2
4 files changed, 10 insertions, 4 deletions
diff --git a/frontends/windows/cookies.c b/frontends/windows/cookies.c
index b3c56da8c..ee754bc3f 100644
--- a/frontends/windows/cookies.c
+++ b/frontends/windows/cookies.c
@@ -34,6 +34,7 @@
#include "windows/plot.h"
#include "windows/corewindow.h"
#include "windows/cookies.h"
+#include "windows/gui.h"
struct nsw32_cookie_window {
@@ -170,13 +171,16 @@ static nserror nsw32_cookie_init(HINSTANCE hInstance)
/* exported interface documented in windows/cookie.h */
-nserror nsw32_cookies_present(HINSTANCE hInstance)
+nserror nsw32_cookies_present(const char *search_term)
{
nserror res;
- res = nsw32_cookie_init(hInstance);
+ res = nsw32_cookie_init(hinst);
if (res == NSERROR_OK) {
ShowWindow(cookie_window->core.hWnd, SW_SHOWNORMAL);
+ if (search_term != NULL) {
+ res = cookie_manager_set_search_string(search_term);
+ }
}
return res;
}
diff --git a/frontends/windows/cookies.h b/frontends/windows/cookies.h
index 8500c7821..dd7ae4279 100644
--- a/frontends/windows/cookies.h
+++ b/frontends/windows/cookies.h
@@ -35,7 +35,7 @@
*
* \return NSERROR_OK on success else appropriate error code on faliure.
*/
-nserror nsw32_cookies_present(HINSTANCE hinstance);
+nserror nsw32_cookies_present(const char *search_term);
/**
* Free any resources allocated for the cookie window.
diff --git a/frontends/windows/main.c b/frontends/windows/main.c
index 24362df09..c051f446c 100644
--- a/frontends/windows/main.c
+++ b/frontends/windows/main.c
@@ -43,6 +43,7 @@
#include "windows/findfile.h"
#include "windows/file.h"
+#include "windows/cookies.h"
#include "windows/drawable.h"
#include "windows/corewindow.h"
#include "windows/download.h"
@@ -370,6 +371,7 @@ static nserror win32_to_unix_commandline(int *argc_out, char ***argv_out)
static struct gui_misc_table win32_misc_table = {
.schedule = win32_schedule,
+ .present_cookies = nsw32_cookies_present,
};
/**
diff --git a/frontends/windows/window.c b/frontends/windows/window.c
index 716039aeb..e682eb889 100644
--- a/frontends/windows/window.c
+++ b/frontends/windows/window.c
@@ -1154,7 +1154,7 @@ nsws_window_command(HWND hwnd,
break;
case IDM_TOOLS_COOKIES:
- nsw32_cookies_present(hinst);
+ nsw32_cookies_present(NULL);
break;
case IDM_NAV_BOOKMARKS: