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/plot.h"
|
||||||
#include "windows/corewindow.h"
|
#include "windows/corewindow.h"
|
||||||
#include "windows/cookies.h"
|
#include "windows/cookies.h"
|
||||||
|
#include "windows/gui.h"
|
||||||
|
|
||||||
|
|
||||||
struct nsw32_cookie_window {
|
struct nsw32_cookie_window {
|
||||||
|
@ -170,13 +171,16 @@ static nserror nsw32_cookie_init(HINSTANCE hInstance)
|
||||||
|
|
||||||
|
|
||||||
/* exported interface documented in windows/cookie.h */
|
/* exported interface documented in windows/cookie.h */
|
||||||
nserror nsw32_cookies_present(HINSTANCE hInstance)
|
nserror nsw32_cookies_present(const char *search_term)
|
||||||
{
|
{
|
||||||
nserror res;
|
nserror res;
|
||||||
|
|
||||||
res = nsw32_cookie_init(hInstance);
|
res = nsw32_cookie_init(hinst);
|
||||||
if (res == NSERROR_OK) {
|
if (res == NSERROR_OK) {
|
||||||
ShowWindow(cookie_window->core.hWnd, SW_SHOWNORMAL);
|
ShowWindow(cookie_window->core.hWnd, SW_SHOWNORMAL);
|
||||||
|
if (search_term != NULL) {
|
||||||
|
res = cookie_manager_set_search_string(search_term);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,7 +35,7 @@
|
||||||
*
|
*
|
||||||
* \return NSERROR_OK on success else appropriate error code on faliure.
|
* \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.
|
* Free any resources allocated for the cookie window.
|
||||||
|
|
|
@ -43,6 +43,7 @@
|
||||||
|
|
||||||
#include "windows/findfile.h"
|
#include "windows/findfile.h"
|
||||||
#include "windows/file.h"
|
#include "windows/file.h"
|
||||||
|
#include "windows/cookies.h"
|
||||||
#include "windows/drawable.h"
|
#include "windows/drawable.h"
|
||||||
#include "windows/corewindow.h"
|
#include "windows/corewindow.h"
|
||||||
#include "windows/download.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 = {
|
static struct gui_misc_table win32_misc_table = {
|
||||||
.schedule = win32_schedule,
|
.schedule = win32_schedule,
|
||||||
|
.present_cookies = nsw32_cookies_present,
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1154,7 +1154,7 @@ nsws_window_command(HWND hwnd,
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case IDM_TOOLS_COOKIES:
|
case IDM_TOOLS_COOKIES:
|
||||||
nsw32_cookies_present(hinst);
|
nsw32_cookies_present(NULL);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case IDM_NAV_BOOKMARKS:
|
case IDM_NAV_BOOKMARKS:
|
||||||
|
|
Loading…
Reference in New Issue