mirror of
https://github.com/netsurf-browser/netsurf
synced 2025-03-03 13:51:46 +03:00
windows: Enable present_cookies callback
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
This commit is contained in:
parent
8e0469d41d
commit
60f8f0126d
@ -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;
|
||||
}
|
||||
|
@ -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.
|
||||
|
@ -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,
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user