From c60ab801f3cdd4cb7519245a9084fa7c6d4f66a8 Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Thu, 29 Dec 2016 14:59:30 +0000 Subject: Windows: Update for new hotlist API. This allows the hotlist backend to work before the hotlist window opens. --- frontends/windows/hotlist.c | 11 +++-------- frontends/windows/main.c | 2 ++ 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/frontends/windows/hotlist.c b/frontends/windows/hotlist.c index 88a802f4a..c184619bf 100644 --- a/frontends/windows/hotlist.c +++ b/frontends/windows/hotlist.c @@ -41,8 +41,6 @@ */ struct nsw32_hotlist_window { struct nsw32_corewindow core; - - const char *path; /**< path to users bookmarks */ }; /** hotlist window singleton */ @@ -147,11 +145,8 @@ static nserror nsw32_hotlist_init(HINSTANCE hInstance) return res; } - ncwin->path = nsoption_charp(hotlist_path); - - res = hotlist_init(ncwin->core.cb_table, - (struct core_window *)ncwin, - ncwin->path); + res = hotlist_manager_init(ncwin->core.cb_table, + (struct core_window *)ncwin); if (res != NSERROR_OK) { free(ncwin); return res; @@ -187,7 +182,7 @@ nserror nsw32_hotlist_finalise(void) return NSERROR_OK; } - res = hotlist_fini(hotlist_window->path); + res = hotlist_fini(nsoption_charp(hotlist_path)); if (res == NSERROR_OK) { res = nsw32_corewindow_fini(&hotlist_window->core); DestroyWindow(hotlist_window->core.hWnd); diff --git a/frontends/windows/main.c b/frontends/windows/main.c index da0fcc193..442c71b06 100644 --- a/frontends/windows/main.c +++ b/frontends/windows/main.c @@ -38,6 +38,7 @@ #include "netsurf/fetch.h" #include "netsurf/misc.h" #include "netsurf/netsurf.h" +#include "desktop/hotlist.h" #include "windows/findfile.h" #include "windows/file.h" @@ -370,6 +371,7 @@ WinMain(HINSTANCE hInstance, HINSTANCE hLastInstance, LPSTR lpcli, int ncmd) urldb_load(nsoption_charp(url_file)); urldb_load_cookies(nsoption_charp(cookie_file)); + hotlist_init(nsoption_charp(hotlist_path)); ret = nsws_create_main_class(hInstance); ret = nsws_create_drawable_class(hInstance); -- cgit v1.2.3